X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FGEOMImpl%2FGEOMImpl_ICurvesOperations.cxx;h=654a12a31437b487b517208312f743c83332f15b;hb=522b8bee2266d0688108a4e7084ec857385212f4;hp=6a6b8f9ef257d21b2d4ee2100df8f92446718695;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx index 6a6b8f9ef..654a12a31 100644 --- a/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx @@ -334,12 +334,14 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse (Handle(GEOM_Object) thePnt, Handle(GEOM_Object) theVec, - double theRMajor, double theRMinor) + double theRMajor, double theRMinor, + Handle(GEOM_Object) theVecMaj) { SetErrorCode(KO); // Not set thePnt means origin of global CS, // Not set theVec means Z axis of global CS + // Not set theVecMaj means X axis of global CS //if (thePnt.IsNull() || theVec.IsNull()) return NULL; //Add a new Ellipse object @@ -370,6 +372,12 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse aCI.SetRMajor(theRMajor); aCI.SetRMinor(theRMinor); + if (!theVecMaj.IsNull()) { + Handle(GEOM_Function) aRefVecMaj = theVecMaj->GetLastFunction(); + if (aRefVecMaj.IsNull()) return NULL; + aCI.SetVectorMajor(aRefVecMaj); + } + //Compute the Ellipse value try { #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100 @@ -387,8 +395,15 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse } //Make a Python command - GEOM::TPythonDump(aFunction) << anEll << " = geompy.MakeEllipse(" - << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor << ")"; + if (!theVecMaj.IsNull()) { + GEOM::TPythonDump(aFunction) << anEll << " = geompy.MakeEllipse(" + << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor + << ", " << theVecMaj << ")"; + } + else { + GEOM::TPythonDump(aFunction) << anEll << " = geompy.MakeEllipse(" + << thePnt << ", " << theVec << ", " << theRMajor << ", " << theRMinor << ")"; + } SetErrorCode(OK); return anEll; @@ -649,7 +664,8 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier */ //============================================================================= Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation - (list thePoints) + (list thePoints, + bool theIsClosed) { SetErrorCode(KO); @@ -679,6 +695,8 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation aCI.SetPoint(ind, aRefPnt); } + aCI.SetIsClosed(theIsClosed); + //Compute the Spline value try { #if (OCC_VERSION_MAJOR << 16 | OCC_VERSION_MINOR << 8 | OCC_VERSION_MAINTENANCE) > 0x060100