Page 1 of 1

How to obtain parameter of point on curve

Posted: Thu Nov 12, 2020 5:20 am
by Naci Selçuk
I have made a BSpline curve by 10 points using IBSplineCurve_DG.Interpolate But I want to get a segment of this BSpline curve from such as point 2 to point 5 or two points which created by this curve and other intersecting surfaces. I only have x,y,z for those points , but how can I get those points' u parameter value? (The points are on the curve.)
Thanks for help

Re: How to obtain parameter of point on curve

Posted: Mon Nov 16, 2020 3:30 am
by Eric Holt
Hi Naci
ICurve_DG.GetNearestPoint() gives point to curve projection. It returns the parameter on the curve. In your case the projected point will coincide with the input so the return will be the parameter along the curve:

Code: Select all

double u = iCurve_DG.GetNearestPoint(point, null);
To be extra sure you can get the projected point and check that the distance is under your tolerance.