print "GetInPlace : ", ShapesOp.GetErrorCode()
return anObj
+## Get sub-shape(s) of \a theShapeWhere, which are
+# coincident with \a theShapeWhat or could be a part of it.
+#
+# Implementation of this method is based on a saved history of an operation,
+# produced \a theShapeWhere. The \a theShapeWhat must be among this operation's
+# arguments (an argument shape or a sub-shape of an argument shape).
+# The operation could be the Partition or one of boolean operations,
+# performed on simple shapes (not on compounds).
+#
+# @param theShapeWhere Shape to find sub-shapes of.
+# @param theShapeWhat Shape, specifying what to find (must be in the
+# building history of the ShapeWhere).
+# @return Group of all found sub-shapes or a single found sub-shape.
+#
+# Example: see GEOM_TestOthers.py
+def GetInPlaceByHistory(theShapeWhere, theShapeWhat):
+ anObj = ShapesOp.GetInPlaceByHistory(theShapeWhere, theShapeWhat)
+ if ShapesOp.IsDone() == 0:
+ print "GetInPlace : ", ShapesOp.GetErrorCode()
+ return anObj
+
## Get sub-shape of theShapeWhere, which is
# equal to \a theShapeWhat.
# @param theShapeWhere Shape to find sub-shape of.
## Replace coincident faces in theShape by one face.
# @param theShape Initial shape.
# @param theTolerance Maximum distance between faces, which can be considered as coincident.
+# @param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
# @return New GEOM_Object, containing a copy of theShape without coincident faces.
#
# Example: see GEOM_Spanner.py
-def MakeGlueFaces(theShape, theTolerance):
- anObj = ShapesOp.MakeGlueFaces(theShape, theTolerance)
+def MakeGlueFaces(theShape, theTolerance, doKeepNonSolids=True):
+ anObj = ShapesOp.MakeGlueFaces(theShape, theTolerance, doKeepNonSolids)
if ShapesOp.IsDone() == 0:
print "MakeGlueFaces : ", ShapesOp.GetErrorCode()
return anObj
# @param theTolerance Maximum distance between faces,
# which can be considered as coincident.
# @param theFaces List of faces for gluing.
+# @param doKeepNonSolids If FALSE, only solids will present in the result, otherwise all initial shapes.
# @return New GEOM_Object, containing a copy of theShape
# without some faces.
#
# Example: see GEOM_Spanner.py
-def MakeGlueFacesByList(theShape, theTolerance, theFaces):
- anObj = ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces)
+def MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids=True):
+ anObj = ShapesOp.MakeGlueFacesByList(theShape, theTolerance, theFaces, doKeepNonSolids)
if ShapesOp.IsDone() == 0:
print "MakeGlueFacesByList : ", ShapesOp.GetErrorCode()
return anObj