]> SALOME platform Git repositories - modules/smesh.git/blobdiff - src/SMESH_SWIG/smeshBuilder.py
Salome HOME
refs #255: 7.5.6. Generation of the boundary particles for particulate boundary model
[modules/smesh.git] / src / SMESH_SWIG / smeshBuilder.py
index 3afd753c16561de846f9ce01a192aed4d7a9faa7..82666a7723d9e8fe9f259a18321f6c5127c56ba3 100644 (file)
@@ -4501,6 +4501,24 @@ class Mesh:
         self.mesh.SetParameters(Parameters)
         return Mesh( self.smeshpyD, self.geompyD, mesh )
 
+    ## Create an offset mesh from the given 2D object
+    #  @param theObject the source object (mesh, submesh, group or filter)
+    #  @param theValue signed offset size
+    #  @param MakeGroups forces the generation of new groups from existing ones
+    #  @param NewMeshName the name of a mesh to create. If empty, offset elements are added
+    #         to this mesh
+    #  @return a tuple (mesh, list_of_groups)
+    #  @ingroup l2_modif_trsf
+    def Offset(self, theObject, theValue, MakeGroups=False, NewMeshName=''):
+        if isinstance( theObject, Mesh ):
+            theObject = theObject.GetMesh()
+        theValue,Parameters,hasVars = ParseParameters(theValue)
+        mesh_groups = self.editor.Offset(theObject, theValue, MakeGroups, NewMeshName )
+        self.mesh.SetParameters(Parameters)
+        # if mesh_groups[0]:
+        #     return Mesh( self.smeshpyD, self.geompyD, mesh_groups[0] ), mesh_groups[1]
+        return mesh_groups
+
     ## Finds groups of adjacent nodes within Tolerance.
     #  @param Tolerance the value of tolerance
     #  @param SeparateCornerAndMediumNodes if @c True, in quadratic mesh puts
@@ -4710,7 +4728,7 @@ class Mesh:
     #         a Mesh, elements of highest dimension are duplicated
     #  @param theGroupName - a name of group to contain the generated elements.
     #                    If a group with such a name already exists, the new elements
-    #                    are added to the existng group, else a new group is created.
+    #                    are added to the existing group, else a new group is created.
     #                    If \a theGroupName is empty, new elements are not added 
     #                    in any group.
     # @return a group where the new elements are added. None if theGroupName == "".