
Fri, 10/30/2009 - 08:59
Forums:
I have drawn a Bezier Curve or BSpline curve.
How can i draw a tangent to Bezier curve or BSpline curve?
For BSpline Curve : I have used method GeomAPI_Interpolate::Load(initialTangent,finalTangent); method but nothing happens.
For Bezier Curve : I have used LProp_CLProps::Tangent(gp_Dir) but I get compiler error as - 'LProp_CLProps' : undeclared identifier
Thanks in advance.
-Komal Patil
Mon, 11/02/2009 - 00:38
The tangent in the startpoint of a bsplinecurve is the line between the startpoint and the first pole, the tangent in the endpoint is the line between the endpoint and the (last pole)-1. You can get the point of the pole by using "gp_Pnt polePointNumberX = bspline->Pole(x);"
If you want a tangent not in the start or endpoint you can create a Geom_TrimmedCurve out of the original curve form the start/endpoint to the desired tangentpoint. The trimmed curve you can convert back to a bspline curve (GeomConvert_CompCurveToBSplineCurve). So you can again create the tangent by using start/endpoint and the related pole.