Back to index

salome-smesh  6.5.0
Functions
Modifying nodes and elements
Modifying meshes
Collaboration diagram for Modifying nodes and elements:

Functions

def smeshDC.Mesh.Make2DMeshFrom3D
 Creates 2D mesh as skin on boundary faces of a 3D mesh.
def smeshDC.Mesh.MakeBoundaryMesh
 Creates missing boundary elements.
def smeshDC.Mesh.ChangeElemNodes
 Sets new nodes for the given element.
def smeshDC.Mesh.DoubleNode
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.
def smeshDC.Mesh.DoubleNodeGroup
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.
def smeshDC.Mesh.DoubleNodeGroups
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.
def smeshDC.Mesh.DoubleNodeElem
 Creates a hole in a mesh by doubling the nodes of some particular elements.
def smeshDC.Mesh.DoubleNodeElemInRegion
 Creates a hole in a mesh by doubling the nodes of some particular elements.
def smeshDC.Mesh.DoubleNodeElemGroup
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.
def smeshDC.Mesh.DoubleNodeElemGroupInRegion
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.
def smeshDC.Mesh.DoubleNodeElemGroups
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.
def smeshDC.Mesh.DoubleNodeElemGroupsInRegion
 Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Function Documentation

def smeshDC.Mesh.ChangeElemNodes (   self,
  ide,
  newIDs 
)

Sets new nodes for the given element.

Parameters:
idethe element id
newIDsnodes ids
Returns:
If the number of nodes does not correspond to the type of element - returns false

Definition at line 3765 of file smeshDC.py.

03765 
03766     def ChangeElemNodes(self, ide, newIDs):
03767         return self.editor.ChangeElemNodes(ide, newIDs)

def smeshDC.Mesh.DoubleNode (   self,
  theNodeId,
  theModifiedElems 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theNodeIdidentifiers of node to be doubled
theModifiedElemsidentifiers of elements to be updated
Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 3800 of file smeshDC.py.

03800 
03801     def DoubleNode(self, theNodeId, theModifiedElems):
03802         return self.editor.DoubleNode(theNodeId, theModifiedElems)

def smeshDC.Mesh.DoubleNodeElem (   self,
  theElems,
  theNodesNot,
  theAffectedElems 
)

Creates a hole in a mesh by doubling the nodes of some particular elements.

Parameters:
theElems- the list of elements (edges or faces) to be replicated The nodes for duplication could be found from these elements
theNodesNot- list of nodes to NOT replicate
theAffectedElems- the list of elements (cells and edges) to which the replicated nodes should be associated to.
Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 3836 of file smeshDC.py.

03836 
03837     def DoubleNodeElem(self, theElems, theNodesNot, theAffectedElems):
03838         return self.editor.DoubleNodeElem(theElems, theNodesNot, theAffectedElems)

def smeshDC.Mesh.DoubleNodeElemGroup (   self,
  theElems,
  theNodesNot,
  theAffectedElems,
  theMakeGroup = False,
  theMakeNodeGroup = False 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theElems- group of of elements (edges or faces) to be replicated
theNodesNot- group of nodes not to replicated
theAffectedElems- group of elements to which the replicated nodes should be associated to.
theMakeGroupforces the generation of a group containing new elements.
theMakeNodeGroupforces the generation of a group containing new nodes.
Returns:
TRUE or created groups (one or two) if operation has been completed successfully, FALSE or None otherwise

Definition at line 3863 of file smeshDC.py.

03863 
03864                              theMakeGroup=False, theMakeNodeGroup=False):
03865         if theMakeGroup or theMakeNodeGroup:
03866             twoGroups = self.editor.DoubleNodeElemGroup2New(theElems, theNodesNot,
03867                                                             theAffectedElems,
03868                                                             theMakeGroup, theMakeNodeGroup)
03869             if theMakeGroup and theMakeNodeGroup:
03870                 return twoGroups
03871             else:
03872                 return twoGroups[ int(theMakeNodeGroup) ]
03873         return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theAffectedElems)

Here is the caller graph for this function:

def smeshDC.Mesh.DoubleNodeElemGroupInRegion (   self,
  theElems,
  theNodesNot,
  theShape 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theElems- group of of elements (edges or faces) to be replicated
theNodesNot- group of nodes not to replicated
theShape- shape to detect affected elements (element which geometric center located on or inside shape). The replicated nodes should be associated to affected elements.

Definition at line 3882 of file smeshDC.py.

03882 
03883     def DoubleNodeElemGroupInRegion(self, theElems, theNodesNot, theShape):
03884         return self.editor.DoubleNodeElemGroupInRegion(theElems, theNodesNot, theShape)

Here is the call graph for this function:

def smeshDC.Mesh.DoubleNodeElemGroups (   self,
  theElems,
  theNodesNot,
  theAffectedElems,
  theMakeGroup = False,
  theMakeNodeGroup = False 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theElems- list of groups of elements (edges or faces) to be replicated
theNodesNot- list of groups of nodes not to replicated
theAffectedElems- group of elements to which the replicated nodes should be associated to.
theMakeGroupforces the generation of a group containing new elements.
theMakeNodeGroupforces the generation of a group containing new nodes.
Returns:
TRUE or created groups (one or two) if operation has been completed successfully, FALSE or None otherwise

Definition at line 3897 of file smeshDC.py.

03897 
03898                              theMakeGroup=False, theMakeNodeGroup=False):
03899         if theMakeGroup or theMakeNodeGroup:
03900             twoGroups = self.editor.DoubleNodeElemGroups2New(theElems, theNodesNot,
03901                                                              theAffectedElems,
03902                                                              theMakeGroup, theMakeNodeGroup)
03903             if theMakeGroup and theMakeNodeGroup:
03904                 return twoGroups
03905             else:
03906                 return twoGroups[ int(theMakeNodeGroup) ]
03907         return self.editor.DoubleNodeElemGroups(theElems, theNodesNot, theAffectedElems)

Here is the caller graph for this function:

def smeshDC.Mesh.DoubleNodeElemGroupsInRegion (   self,
  theElems,
  theNodesNot,
  theShape 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theElems- list of groups of elements (edges or faces) to be replicated
theNodesNot- list of groups of nodes not to replicated
theShape- shape to detect affected elements (element which geometric center located on or inside shape). The replicated nodes should be associated to affected elements.
Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 3917 of file smeshDC.py.

03917 
03918     def DoubleNodeElemGroupsInRegion(self, theElems, theNodesNot, theShape):
03919         return self.editor.DoubleNodeElemGroupsInRegion(theElems, theNodesNot, theShape)

def smeshDC.Mesh.DoubleNodeElemInRegion (   self,
  theElems,
  theNodesNot,
  theShape 
)

Creates a hole in a mesh by doubling the nodes of some particular elements.

Parameters:
theElems- the list of elements (edges or faces) to be replicated The nodes for duplication could be found from these elements
theNodesNot- list of nodes to NOT replicate
theShape- shape to detect affected elements (element which geometric center located on or inside shape). The replicated nodes should be associated to affected elements.
Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 3848 of file smeshDC.py.

03848 
03849     def DoubleNodeElemInRegion(self, theElems, theNodesNot, theShape):
03850         return self.editor.DoubleNodeElemInRegion(theElems, theNodesNot, theShape)

Here is the call graph for this function:

def smeshDC.Mesh.DoubleNodeGroup (   self,
  theNodes,
  theModifiedElems,
  theMakeGroup = False 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theNodesgroup of nodes to be doubled
theModifiedElemsgroup of elements to be updated.
theMakeGroupforces the generation of a group containing new nodes.
Returns:
TRUE or a created group if operation has been completed successfully, FALSE or None otherwise

Definition at line 3811 of file smeshDC.py.

03811 
03812     def DoubleNodeGroup(self, theNodes, theModifiedElems, theMakeGroup=False):
03813         if theMakeGroup:
03814             return self.editor.DoubleNodeGroupNew(theNodes, theModifiedElems)
03815         return self.editor.DoubleNodeGroup(theNodes, theModifiedElems)

def smeshDC.Mesh.DoubleNodeGroups (   self,
  theNodes,
  theModifiedElems,
  theMakeGroup = False 
)

Creates a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above.

Parameters:
theNodeslist of groups of nodes to be doubled
theModifiedElemslist of groups of elements to be updated.
theMakeGroupforces the generation of a group containing new nodes.
Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 3823 of file smeshDC.py.

03823 
03824     def DoubleNodeGroups(self, theNodes, theModifiedElems, theMakeGroup=False):
03825         if theMakeGroup:
03826             return self.editor.DoubleNodeGroupsNew(theNodes, theModifiedElems)
03827         return self.editor.DoubleNodeGroups(theNodes, theModifiedElems)

Creates 2D mesh as skin on boundary faces of a 3D mesh.

Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 2880 of file smeshDC.py.

02880 
02881     def  Make2DMeshFrom3D(self):
02882         return self.editor. Make2DMeshFrom3D()

Here is the call graph for this function:

def smeshDC.Mesh.MakeBoundaryMesh (   self,
  elements,
  dimension = SMESH.BND_2DFROM3D,
  groupName = "",
  meshName = "",
  toCopyElements = False,
  toCopyExistingBondary = False 
)

Creates missing boundary elements.

Parameters:
elements- elements whose boundary is to be checked: mesh, group, sub-mesh or list of elements if elements is mesh, it must be the mesh whose MakeBoundaryMesh() is called
dimension- defines type of boundary elements to create: SMESH.BND_2DFROM3D, SMESH.BND_1DFROM3D, SMESH.BND_1DFROM2D SMESH.BND_1DFROM3D creates mesh edges on all borders of free facets of 3D cells
groupName- a name of group to store created boundary elements in, "" means not to create the group
meshName- a name of new mesh to store created boundary elements in, "" means not to create the new mesh
toCopyElements- if true, the checked elements will be copied into the new mesh else only boundary elements will be copied into the new mesh
toCopyExistingBondary- if true, not only new but also pre-existing boundary elements will be copied into the new mesh
Returns:
tuple (mesh, group) where bondary elements were added to

Definition at line 2901 of file smeshDC.py.

02901 
02902                          toCopyElements=False, toCopyExistingBondary=False):
02903         if isinstance( elements, Mesh ):
02904             elements = elements.GetMesh()
02905         if ( isinstance( elements, list )):
02906             elemType = SMESH.ALL
02907             if elements: elemType = self.GetElementType( elements[0], iselem=True)
02908             elements = self.editor.MakeIDSource(elements, elemType)
02909         mesh, group = self.editor.MakeBoundaryMesh(elements,dimension,groupName,meshName,
02910                                                    toCopyElements,toCopyExistingBondary)
02911         if mesh: mesh = self.smeshpyD.Mesh(mesh)
02912         return mesh, group

Here is the call graph for this function:

Here is the caller graph for this function: