]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Changes for 0020673 - Implementation of "Auto-correct edges orientation".
authorskl <skl@opencascade.com>
Fri, 19 Mar 2010 08:18:09 +0000 (08:18 +0000)
committerskl <skl@opencascade.com>
Fri, 19 Mar 2010 08:18:09 +0000 (08:18 +0000)
doc/salome/gui/GEOM/input/creating_filling.doc
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOM_SWIG/geompyDC.py

index e082127ac10bbf98d4dc01f611deac6d58fa498e..ed554c51ca390307ef4203109256fe9aad256ad0 100644 (file)
@@ -37,7 +37,7 @@ rather complex cases.
 \n <b>TUI Command:</b> <em>geompy.MakeFilling(Edges, MinDegree, MaxDegree, Tol2D, Tol3D, NbIter)</em>
 \n <b>Arguments:</b> 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
 
index 6c03dd7fbe9f29f7e681ecbdb89fe13c88d40e1b..29de3fb75b2f4444e78cf23d999c1b1bbf97556e 100644 (file)
@@ -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);
index a43ab71fdcc0a9d8c68d03252da751670f0256f8..f0883723df51638348cad4a4387d1fe4d7b33400 100644 (file)
@@ -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