Sun, 08/28/2022 - 13:13
Forums:
I have a B-Spline 3d curve , built from an array of 3d points calling a function like this:
Handle(Geom_BSplineCurve) aBSplineCurve = aBSpline.Curve(); where aBSpline comes from GeomAPI_PointsToBSpline . This is ok.
Now I want get discrete 3d points on that curve, using "GCPnts_UniformAbscissa" class , example :
GCPnts_UniformAbscissa DiscretePoints( ACurve, 30.0);
Unfortunately , the constructor of GCPnts_UniformAbscissa accepts only "const Adaptor3d_Curve&"
Now my question is :
How convert a 'const opencascade::handle<Geom_Curve> (aBSplineCurve) to a 'const Adaptor3d_Curve' ?
Thanks in advance
Sun, 08/28/2022 - 16:49
Adaptor3d_Curve is a base class, so you should be able to do something like:
GeomAdaptor_Curve ca(aBSplineCurve);
GCPnts_UniformAbscissa DiscretePoints(ca, 30.0);
Wed, 10/05/2022 - 10:35
why this code is failed?
TopoDS_Edge aEdge; //edge of surface;
Standard_Real first, second;
Handle(Geom_Curve) c=BRep_Tool::Curve(aEdge,first,second);
GeomAdaptor_Curve adapC(c);
GCPnts_UniformAbscissa sUniPoints(adapC, 1.0);
sUniPoints.IsDone() //this code is false, the seperation points on edge is failed;
if you have any method,pls tell me.
Wed, 10/05/2022 - 12:00
Probably you must to create the restricted adaptor:
GeomAdaptor_Curve adapC(c, first, second);
Or, alternatively, restrict the range of the curve like this:
GCPnts_UniformAbscissa sUniPoints(adapC, 1.0, first, second);
Anyhow, you must restrict the considered range of the curve that by default may be infinite.
Mon, 10/10/2022 - 11:37
I got the points using this code.
Thank you very much,
Best regards.