Mon, 03/21/2005 - 10:30
Hi,
I have been searching for how to get the points that are passed by the BSplineCurve. If for example, there is a value t(time). If t is zero, then the start point of the spline curve is returned, and if t is 1, then the end point of the spline curve is returned. If t is >0 and
Thank you.
For reference, this is my code to create the bspline curve:
//Prepare the points to be interpolated (passed)
Handle(TColgp_HArray1OfPnt2d) harray = new TColgp_HArray1OfPnt2d (1,MAIN_NUM_SPHERES); // sizing harray
for (int i=0;i
harray->SetValue(i+1,gp_Pnt2d (g_vSpheresPos[i].x,g_vSpheresPos[i].y));
}
Geom2dAPI_Interpolate anInterpolation(harray,Standard_False,0.01);
anInterpolation.Perform();
Handle(Geom2d_BSplineCurve) SPL2 = anInterpolation.Curve();
Mon, 03/21/2005 - 13:57
Well, assuming you just need points on the curve and not the original set of knot points, try using GeomLProp_CLProps2d and its Value function to get the location of a point at a parameter value on the curve. Use FirstParameter and LastParameter to get the start and end point parameters on the curve (as opposed to 0 and 1). You can also try using the D0 function on your Geom2D_BSplineCurve.
Tue, 03/22/2005 - 07:38
Thank you for your reply, but I found only GeomLProp_CLProps in the documentation, and I could not find GeomLProp_CLProps2d. Did you mean GeomLProp_CLProps when you said GeomLProp_CLProps2d?
Then again, it seems FirstParameter and LastParameter functions don`t exist in GeomLProp_CLProps class.
Thank you,
Sindharta
Tue, 03/22/2005 - 11:16
Thank you very much. I used the D0 function and it works. Thanks again.
Sindharta
Mon, 03/21/2005 - 14:01
you may have a look at the GCPnts package.
HTH,
Stephane
http://www.exotk.org
Tue, 03/22/2005 - 11:21
I have seen the package you suggested too. I didn`t know there are such functions and I am sure it will be very useful.
Thank you very much.