From: skl Date: Fri, 19 Mar 2010 08:18:09 +0000 (+0000) Subject: Changes for 0020673 - Implementation of "Auto-correct edges orientation". X-Git-Tag: V5_1_4a1~31 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=04da005e39e26396827b422a99c09af289314524;p=modules%2Fgeom.git Changes for 0020673 - Implementation of "Auto-correct edges orientation". --- diff --git a/doc/salome/gui/GEOM/input/creating_filling.doc b/doc/salome/gui/GEOM/input/creating_filling.doc index e082127ac..ed554c51c 100644 --- a/doc/salome/gui/GEOM/input/creating_filling.doc +++ b/doc/salome/gui/GEOM/input/creating_filling.doc @@ -37,7 +37,7 @@ rather complex cases. \n TUI Command: geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter) \n Arguments: Name + 1 List of edges + 7 Parameters (Min. degree, Max. degree, Number of iterations, 2D tolerance, 3D -tolerance, Number of iterations, Use orientation, Approximation). +tolerance, Number of iterations, Method, Approximation). \image html filling.png diff --git a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx index 6c03dd7fb..29de3fb75 100644 --- a/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx @@ -1507,10 +1507,13 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFilling //Make a Python command GEOM::TPythonDump pd (aFunction); pd << aFilling << " = geompy.MakeFilling(" - << theShape << ", " << theMinDeg << ", " << theMaxDeg << ", " - << theTol2D << ", " << theTol3D << ", " << theNbIter; + << theShape << ", " << theMinDeg << ", " << theMaxDeg << ", " + << theTol2D << ", " << theTol3D << ", " << theNbIter << ", "; + if( theMethod==1 ) pd << "GEOM.FOM_UseOri"; + else if( theMethod==2 ) pd << "GEOM.FOM_AutoCorrect"; + else pd << "GEOM.FOM_Default"; if(isApprox) - pd << ", " << isApprox; + pd << ", " << isApprox ; pd << ")"; SetErrorCode(OK); diff --git a/src/GEOM_SWIG/geompyDC.py b/src/GEOM_SWIG/geompyDC.py index a43ab71fd..f0883723d 100644 --- a/src/GEOM_SWIG/geompyDC.py +++ b/src/GEOM_SWIG/geompyDC.py @@ -1322,7 +1322,14 @@ class geompyDC(GEOM._objref_GEOM_Gen): # @param theTol2D a 2d tolerance to be reached # @param theTol3D a 3d tolerance to be reached # @param theNbIter a number of iteration of approximation algorithm - # @param isUseOri flag for take into account orientation of edges + # @param theMethod Kind of method to perform filling operation: + # 0 - Default - standard behaviour + # 1 - Use edges orientation - orientation of edges are + # used: if edge is reversed curve from this edge + # is reversed before using in filling algorithm. + # 2 - Auto-correct orientation - change orientation + # of curves using minimization of sum of distances + # between ends points of edges. # @param isApprox if True, BSpline curves are generated in the process # of surface construction. By default it is False, that means # the surface is created using Besier curves. The usage of @@ -1332,13 +1339,12 @@ class geompyDC(GEOM._objref_GEOM_Gen): # # @ref tui_creation_filling "Example" def MakeFilling(self, theShape, theMinDeg, theMaxDeg, theTol2D, - theTol3D, theNbIter, isUseOri=0, isApprox=0): + theTol3D, theNbIter, theMethod=GEOM.FOM_Default, isApprox=0): # Example: see GEOM_TestAll.py - theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, - theTol2D, theTol3D, theNbIter) + theMinDeg,theMaxDeg,theTol2D,theTol3D,theNbIter,Parameters = ParseParameters(theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter) anObj = self.PrimOp.MakeFilling(theShape, theMinDeg, theMaxDeg, theTol2D, theTol3D, theNbIter, - isUseOri, isApprox) + theMethod, isApprox) RaiseIfFailed("MakeFilling", self.PrimOp) anObj.SetParameters(Parameters) return anObj