Calculate parameter u for a Geom_Curve

Hi all,

I have solved my BSPline-segmentation problem and thought that maybe someone else would be interested in general, how !

Imagine that you have a curve (BSPlineCurve or what ever) and you are interested for a specific segment from it confinded by two points.You seek the parameter u1 and u2 for both points, because you calculate the segment with them via Geom_BSPlineCurve::Segment(Standard_Real u1, Standard_Real u2).

Now just cut (see GeomAPI_IntCS)the Curve with a BSPlineSurface created by the GeomFill-package, that contains the interesting point and get the Parameter via GeomAPI_IntCS::Parameters();
An unstable alternative would be Geom_ProjectPointOnCurve, but I do not recommend that ! It is not working properly.

I hope this may help someone out in the world struggling with comparable questions like me.

Besides, how can one calculate a normal-vector in an arbitrary 3-dimensional (not 2) point (gp_Pnt or whatever) ?
You first want to calculate the tangent ? How, using D0-methods or what ?????
But it must be very precise, others it is better to calculate it by hand.

Hints are always welcome.

Best Regards

Mike

ekiroglu's picture

Hello Mike,

For calculating normal or tangent vector of an Edge, have a look at BRepLProp_CLProps class.

Regards,
Erki