]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
Mantis issue 20052: RemoveExtraEdges signature changed (integer parameter theOptimumN...
authorjfa <jfa@opencascade.com>
Wed, 4 Nov 2009 08:42:19 +0000 (08:42 +0000)
committerjfa <jfa@opencascade.com>
Wed, 4 Nov 2009 08:42:19 +0000 (08:42 +0000)
doc/salome/gui/GEOM/input/remove_extra_edges_operation.doc
src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
src/GEOM_SWIG/geompyDC.py

index 4988009e622279b2f0727cb7329c446b95dea103..ef1b932bfdb19bcfb622744f7d003047dcf99eb6 100644 (file)
@@ -10,9 +10,9 @@ hexahedral solids and compounds of hexahedral solids.
 However, there is an option to unite all faces sharing one
 surface, which produces not only hexahedral solids.
 
-\n <b>TUI Command:</b> <em>geompy.RemoveExtraEdges(theShape,theOptimumNbFaces)</em>,
+\n <b>TUI Command:</b> <em>geompy.RemoveExtraEdges(theShape,doUnionFaces)</em>,
 where <em>theShape</em> is a compound or a single solid
-and <em>theOptimumNbFaces</em> is an integer parameter, that regulates,
+and <em>doUnionFaces</em> is a boolean parameter, that regulates,
 whether the faces, sharing a common surface, should be united.
 \n <b>Arguments:</b> Name + one shape + a flag.
 \n <b>Advanced option:</b>
index 0a2c4d6e0a151b074a54a84a76df7181d4905372..5869679663c339c221f1e6a245483099c51a3214 100644 (file)
@@ -2350,9 +2350,9 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
   }
 
   //Make a Python command
-  GEOM::TPythonDump(aFunction) << aCopy
-                               << " = geompy.RemoveExtraEdges(" << theObject
-                               << ", " << theOptimumNbFaces << ")";
+  std::string doUnionFaces = (theOptimumNbFaces < 0) ? "False" : "True";
+  GEOM::TPythonDump(aFunction) << aCopy << " = geompy.RemoveExtraEdges("
+                               << theObject << ", " << doUnionFaces.data() << ")";
 
   SetErrorCode(OK);
   return aCopy;
index b2eb778f30d743ff146fe33d46d67ed0fc4e7615..42afc3c82d9616d7ea597baf4692eaedeb790f37 100644 (file)
@@ -3627,16 +3627,16 @@ class geompyDC(GEOM._objref_GEOM_Gen):
         #  Unite faces and edges, sharing one surface. It means that
         #  this faces must have references to one C++ surface object (handle).
         #  @param theShape The compound or single solid to remove irregular edges from.
-        #  @param theOptimumNbFaces If more than zero, unite faces only for those solids,
-        #         that have more than theOptimumNbFaces faces. If zero, unite faces always,
-        #         regardsless their quantity in the solid. If negative (the default value),
-        #         do not unite faces at all. For blocks repairing recommended value is 6.
+        #  @param doUnionFaces If True, then unite faces. If False (the default value),
+        #         do not unite faces.
         #  @return Improved shape.
         #
         #  @ref swig_RemoveExtraEdges "Example"
-        def RemoveExtraEdges(self,theShape,theOptimumNbFaces=-1):
+        def RemoveExtraEdges(self, theShape, doUnionFaces=False):
             # Example: see GEOM_TestOthers.py
-            anObj = self.BlocksOp.RemoveExtraEdges(theShape,theOptimumNbFaces)
+            nbFacesOptimum = -1 # -1 means do not unite faces
+            if doUnionFaces is True: nbFacesOptimum = 0 # 0 means unite faces
+            anObj = self.BlocksOp.RemoveExtraEdges(theShape, nbFacesOptimum)
             RaiseIfFailed("RemoveExtraEdges", self.BlocksOp)
             return anObj