BSpline Approximation with AppDef_BSplineCompute, how can i extract...


For Bspline approximation i use the advanced approximation package AppDef, i created an instance from AppDef_BSplineCompute, and i use the ChangeValue()-method to obtain a AppParCurves_MultiBSpCurve, so far as i know, with creating an object from AppDef_BSplineCompute, the method approximate an bspline curve ans store it in AppParCurves_MultiBSpCurve, but

how can i now create an Geom_BSplineCurve-object to show this approximated curve, with the AppParCurves_MultiBSpCurve i can obtain the Knots and Multiplicities table, but not a curve returned as Geom_BSplineCurve. When i use the same method for Bezier curves, in AppParCurves_MultiBSpCurve i have a method "curve" with returning Geom_BezierCurve...

please help, im gonna crazy with this stuff, i use this approximation variant cause i can specify more paramters as in the high level packages like GeomAPI package.

thanks in advance

Bearloga's picture

Hi David,
You can grep the sources of OCC to find the string "AppParCurves_MultiBSpCurve". You will get a lot of examples how to do what you want. For example, look at the files GeomAPI_PointsToBSpline.cxx, TopOpeBRepTool_CurveTool.cxx.