Forum archiveIssue archiveModeling Data and Algorithms

Archived discussion

Approx_Curve3d convert an wire to Geom_BSplineCurve

Modeling Data and AlgorithmsFri, 08/07/2020 - 03:410 replies

Browse this forum
QuestionAuthor

Hello everyone, when I use the Approx_Curve3d function to convert a wire to a C2 continuous BSplineCurve.but the resutl curve is a C0 continuous curve.

BRepAdaptor_CompCurve wireAdaptor(wire);
Handle(BRepAdaptor_HCompCurve) curve = new BRepAdaptor_HCompCurve(wireAdaptor);
Approx_Curve3d approx(curve, 0.001, GeomAbs_C1, 200, 12);
if (approx.IsDone() && approx.HasResult()) {
   Handle(Geom_BSplineCurve) anApproximatedCurve = approx.Curve();
   return anApproximatedCurve;
}

Is there a problem with the wire processed by BRepAdaptor_HCompCurve or is there any other reason? Thank you all.

Discussion

No archived replies

Posts are displayed in their archived order.