How to obtain parameter of point on curve

Technical discussions
Post Reply
Naci Selçuk
Posts: 1
Joined: Thu Nov 12, 2020 5:13 am

How to obtain parameter of point on curve

Post 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

Eric Holt
Posts: 3
Joined: Wed Jul 09, 2014 11:56 pm

Re: How to obtain parameter of point on curve

Post 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.

Post Reply