How to trim a Curve with two point on it?

Hi Bros, I'm JianBaoXia.
I get a BSpline curve, and two point on it.
I want to trim the curve and get the segment of the curve between the two points.
I try to do it through Geom_TrimmedCurve, however, it needs convert the two points to parameter values U1 and U2.
In surface I know xyz can convert to uv through ShapeAnalysis_Surface.ValueOfUV().
But there are not same tool in ShapeAnalysis_Curve.
The parameter values always make me confuse.

It's my honor to get advice from you!

Mikhail Sazonov's picture

You can use the class GeomAPI_ProjectPointOnCurve.

linbei jianbaoxia's picture

Thanks for your advice, actually I get the parameter u through GeomLib_Tool::Parameter and trim it use Geom_TrimmedCurve succeed.