Mantis issue 20052: RemoveExtraEdges signature changed (integer parameter theOptimumNbFaces replaced with boolean doUnionFaces).

This commit is contained in:
jfa 2009-11-04 08:42:19 +00:00
parent d2f606321a
commit f5e416e256
3 changed files with 11 additions and 11 deletions

View 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>

View 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;

View 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