X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESH_SWIG%2FsmeshBuilder.py;h=f2641f7c8360cd45195eea05b7849614117c6e8f;hp=270d5946bf631382e392f4febd7163d812c59347;hb=3a821b48ba986795abde72f524fa1a62a5802df2;hpb=c656333fb4f2415a0b88821a721072f28b30a53a diff --git a/src/SMESH_SWIG/smeshBuilder.py b/src/SMESH_SWIG/smeshBuilder.py index 270d5946b..f2641f7c8 100644 --- a/src/SMESH_SWIG/smeshBuilder.py +++ b/src/SMESH_SWIG/smeshBuilder.py @@ -4583,6 +4583,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 + ## Find groups of adjacent nodes within Tolerance. # @param Tolerance the value of tolerance # @param SeparateCornerAndMediumNodes if @c True, in quadratic mesh puts @@ -4794,7 +4812,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 == "".