Version: 6.3.1
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 
) [inherited]

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 4027 of file smeshDC.py.

04028                                           :
04029         return self.editor.ChangeElemNodes(ide, newIDs)

def smeshDC.Mesh.DoubleNode (   self,
  theNodeId,
  theModifiedElems 
) [inherited]

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 4062 of file smeshDC.py.

04063                                                      :
04064         return self.editor.DoubleNode(theNodeId, theModifiedElems)

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

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 4097 of file smeshDC.py.

04098                                                                      :
04099         return self.editor.DoubleNodeElem(theElems, theNodesNot, theAffectedElems)

def smeshDC.Mesh.DoubleNodeElemGroup (   self,
  theElems,
  theNodesNot,
  theAffectedElems,
  theMakeGroup = False 
) [inherited]

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.
Returns:
TRUE or a created group if operation has been completed successfully, FALSE or None otherwise

Definition at line 4122 of file smeshDC.py.

04123                                                                                               :
04124         if theMakeGroup:
04125             return self.editor.DoubleNodeElemGroupNew(theElems, theNodesNot, theAffectedElems)
04126         return self.editor.DoubleNodeElemGroup(theElems, theNodesNot, theAffectedElems)

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

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 4135 of file smeshDC.py.

04136                                                                           :
04137         return self.editor.DoubleNodeElemGroupInRegion(theElems, theNodesNot, theShape)

def smeshDC.Mesh.DoubleNodeElemGroups (   self,
  theElems,
  theNodesNot,
  theAffectedElems,
  theMakeGroup = False 
) [inherited]

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.
Returns:
TRUE or a created group if operation has been completed successfully, FALSE or None otherwise

Definition at line 4148 of file smeshDC.py.

04149                                                                                                :
04150         if theMakeGroup:
04151             return self.editor.DoubleNodeElemGroupsNew(theElems, theNodesNot, theAffectedElems)
04152         return self.editor.DoubleNodeElemGroups(theElems, theNodesNot, theAffectedElems)

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

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 4162 of file smeshDC.py.

04163                                                                            :
04164         return self.editor.DoubleNodeElemGroupsInRegion(theElems, theNodesNot, theShape)

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

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 4109 of file smeshDC.py.

04110                                                                      :
04111         return self.editor.DoubleNodeElemInRegion(theElems, theNodesNot, theShape)

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

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 4073 of file smeshDC.py.

04074                                                                              :
04075         if theMakeGroup:
04076             return self.editor.DoubleNodeGroupNew(theNodes, theModifiedElems)
04077         return self.editor.DoubleNodeGroup(theNodes, theModifiedElems)

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

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.
Returns:
TRUE if operation has been completed successfully, FALSE otherwise

Definition at line 4084 of file smeshDC.py.

04085                                                                               :
04086         if theMakeGroup:
04087             return self.editor.DoubleNodeGroupsNew(theNodes, theModifiedElems)
04088         return self.editor.DoubleNodeGroups(theNodes, theModifiedElems)

def smeshDC.Mesh.Make2DMeshFrom3D (   self) [inherited]

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 3090 of file smeshDC.py.

03091                                :
03092         return self.editor. Make2DMeshFrom3D()

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

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 3110 of file smeshDC.py.

03112                                                                            :
03113         if isinstance( elements, Mesh ):
03114             elements = elements.GetMesh()
03115         if ( isinstance( elements, list )):
03116             elemType = SMESH.ALL
03117             if elements: elemType = self.GetElementType( elements[0], iselem=True)
03118             elements = self.editor.MakeIDSource(elements, elemType)
03119         mesh, group = self.editor.MakeBoundaryMesh(elements,dimension,groupName,meshName,
03120                                                    toCopyElements,toCopyExistingBondary)
03121         if mesh: mesh = self.smeshpyD.Mesh(mesh)
03122         return mesh, group

Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS