[V8i MDL] Get Koordinates from BSpline

Hello,

I want to extract the pole coordinates from a bspline curve.

In the element information dialog I can see the following:

MSElementUnion		header;
int			type=0, rational=0;
BsplineDisplay		display;
BsplineParam		params;
DPoint3d		*poles=NULL;
double			*knots=NULL, *weights=NULL;
int                     i;

if (mdlBspline_extractCurve (&header, &type, &rational, &display, &params, &poles, &knots, &weights, oEld)==SUCCESS)
{
  for (i=0;i<params.numPoles;i++)
  {
    printf("%f %f %f\n", poles[i].x, poles[i].x, poles[i].x);
  }
}


Here I get the coordinates:

5407756.4861589409 5661054.0491611995 2147483.6469999999
5300963.6462771045 5554261.1976117715 2092188.6739999999
5407755.6605592519 5661053.2462589797 2147483.6469999999

I tried the function mdlBspline_unWeightPoles to get the correct values, but then I get these coordinates

5407756.4861589409 5661054.0491611995 2147483.6469999999
5441064.1282926546 5701056.1433896348 2147483.6469999999
5407755.6605592519 5661053.2462589797 2147483.6469999999

What must I do to get the coordinates that are shown in the element information dialog?

Best regards

Martin Roling

6330.bspline.dgn

Parents Reply Children