approximation of Geom_BSplineCurve

I approximated a TopoDS_Edge successfully with the following code example.
BRepAdaptor_Curve edgeAdaptor(edge);
Handle(BRepAdaptor_HCurve) crv = new BRepAdaptor_HCurve(edgeAdaptor);
Approx_Curve3d approx(crv, tolerance, GeomAbs_C2, 1000, 3);
But is there any possibility to force the resulting curve to be nonrational, all weights to be 1.0?
Gernot Knieling

Gerhard Hofmann's picture

Hello Gernot,

If the curve is an ellipse or a cricle then there will be a rational BSpline, because this is an exact representation of the ellipse rsp. cricle.

I made the experience that "ShapeConstruct::ConvertCurveToBSpline" converts ellipses and cricles to nonrational BSplines (with many poles). I would prefere rational BSplines from circles, because they are exact (not approximated), but in your case this is maybe what you want.

best regards