X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGeomAPI%2FGeomAPI_BSpline2d.cpp;fp=src%2FGeomAPI%2FGeomAPI_BSpline2d.cpp;h=d23633dfa4ccf6474a754a771c6932f14b3c4819;hb=15e07776045d232135802444b5eb3375e31c9a0e;hp=de07f9299e1437c93baffa05d0c254cf61268d5b;hpb=a4461306d16531c21f019477c95101e370e551de;p=modules%2Fshaper.git diff --git a/src/GeomAPI/GeomAPI_BSpline2d.cpp b/src/GeomAPI/GeomAPI_BSpline2d.cpp index de07f9299..d23633dfa 100644 --- a/src/GeomAPI/GeomAPI_BSpline2d.cpp +++ b/src/GeomAPI/GeomAPI_BSpline2d.cpp @@ -26,6 +26,13 @@ #define MY_BSPLINE (*(implPtr())) +static Handle_Geom2d_BSplineCurve* newBSpline2d( + const std::list >& thePoles, + const std::list& theWeights, + const int theDegree, + const bool thePeriodic); + + static Handle_Geom2d_BSplineCurve* newBSpline2d( const std::list >& thePoles, const std::list& theWeights, @@ -34,6 +41,9 @@ static Handle_Geom2d_BSplineCurve* newBSpline2d( const int theDegree, const bool thePeriodic) { + if (theKnots.empty() || theMults.empty()) + return newBSpline2d(thePoles, theWeights, theDegree, thePeriodic); + // collect arrays of poles, weights, knots and multiplicities TColgp_Array1OfPnt2d aPoles(1, (int)thePoles.size()); TColStd_Array1OfReal aWeights(1, (int)theWeights.size()); @@ -62,7 +72,7 @@ static Handle_Geom2d_BSplineCurve* newBSpline2d( return new Handle_Geom2d_BSplineCurve(aCurve); } -static Handle_Geom2d_BSplineCurve* newBSpline2d( +Handle_Geom2d_BSplineCurve* newBSpline2d( const std::list >& thePoles, const std::list& theWeights, const int theDegree,