I'm trying to use GeomConvert::CurveToBSplineCurve to convert a Handle(Geom_Curve) built from two points, and I have an exception "Standard_DomainError: No such curve"
gp_Pnt P1 ( 0.0, 0.0, 0.0 );
gp_Pnt P4 ( 0.0, 20.0, 0.0 );
const TopoDS_Edge& Line01 = BRepBuilderAPI_MakeEdge ( P1, P4 );
Standard_Real dFirst, dLast;
Handle(Geom_Curve) crv = BRep_Tool::Curve( Line01 , dFirst, dLast );
Handle(Geom_BSplineCurve) bspCrv = GeomConvert::CurveToBSplineCurve( crv );
Could somebody help me in this issue?
Thank You in Advance