Salome HOME
Fix bug 15567: MakeFuse() for compounds of faces raises error.
[modules/geom.git] / src / GEOM_SWIG / geompy.py
index 119e2d9764c2f50d0f1f152a40471adeb1f39ace..089a39c6b411a5b785aa54335237634e30a3a1af 100644 (file)
@@ -740,6 +740,32 @@ def MakePipeWithDifferentSections(theSeqBases, theLocations,thePath,theWithConta
       print "MakePipeWithDifferentSections : ", PrimOp.GetErrorCode()
     return anObj
 
+## Create a shape by extrusion of the profile shape along
+#  the path shape. The path shape can be a shell or a face.
+#  the several profiles can be specified in the several locations of path.     
+#  @param theSeqBases - list of  Bases shape to be extruded.
+#  @param theSeqSubBases - list of corresponding subshapes of section shapes.
+#  @param theLocations - list of locations on the path corresponding
+#                        specified list of the Bases shapes. Number of locations
+#                        should be equal to number of bases or list of locations can be empty.
+#  @param thePath - Path shape to extrude the base shape along it.
+#  @param theWithContact - the mode defining that the section is translated to be in
+#                          contact with the spine.
+#  @param - WithCorrection - defining that the section is rotated to be
+#                            orthogonal to the spine tangent in the correspondent point
+#  @return New GEOM_Object, containing the created solids.
+#
+#  Example: see GEOM_TestAll.py
+def MakePipeWithShellSections(theSeqBases, theSeqSubBases,
+                              theLocations, thePath,
+                              theWithContact, theWithCorrection):
+    anObj = PrimOp.MakePipeWithShellSections(theSeqBases, theSeqSubBases,
+                                             theLocations, thePath,
+                                             theWithContact, theWithCorrection)
+    if PrimOp.IsDone() == 0:
+      print "MakePipeWithShellSections : ", PrimOp.GetErrorCode()
+    return anObj
+
 # -----------------------------------------------------------------------------
 # Create base shapes
 # -----------------------------------------------------------------------------
@@ -1361,6 +1387,38 @@ def MakeGlueFaces(theShape, theTolerance):
       print "MakeGlueFaces : ", ShapesOp.GetErrorCode()
     return anObj
 
+
+## Find coincident faces in theShape for possible gluing.
+#  @param theShape Initial shape.
+#  @param theTolerance Maximum distance between faces,
+#                      which can be considered as coincident.
+#  @return ListOfGO.
+#
+#  Example: see GEOM_Spanner.py
+def GetGlueFaces(theShape, theTolerance):
+    anObj = ShapesOp.GetGlueFaces(theShape, theTolerance)
+    if ShapesOp.IsDone() == 0:
+      print "GetGlueFaces : ", ShapesOp.GetErrorCode()
+    return anObj
+
+
+## Replace coincident faces in theShape by one face
+#  in compliance with given list of faces
+#  @param theShape Initial shape.
+#  @param theTolerance Maximum distance between faces,
+#                      which can be considered as coincident.
+#  @param theFaces List of faces for gluing.
+#  @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)
+    if ShapesOp.IsDone() == 0:
+      print "MakeGlueFacesByList : ", ShapesOp.GetErrorCode()
+    return anObj
+
+
 # -----------------------------------------------------------------------------
 # Boolean (Common, Cut, Fuse, Section)
 # -----------------------------------------------------------------------------