Back to index

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

Functions

def smeshDC.Mesh.AddNode
 Add a node to the mesh by coordinates.
def smeshDC.Mesh.Add0DElement
 Creates a 0D element on a node with given number.
def smeshDC.Mesh.AddEdge
 Creates a linear or quadratic edge (this is determined by the number of given nodes).
def smeshDC.Mesh.AddFace
 Creates a linear or quadratic face (this is determined by the number of given nodes).
def smeshDC.Mesh.AddPolygonalFace
 Adds a polygonal face to the mesh by the list of node IDs.
def smeshDC.Mesh.AddVolume
 Creates both simple and quadratic volume (this is determined by the number of given nodes).
def smeshDC.Mesh.AddPolyhedralVolume
 Creates a volume of many faces, giving nodes for each face.
def smeshDC.Mesh.AddPolyhedralVolumeByFaces
 Creates a volume of many faces, giving the IDs of the existing faces.
def smeshDC.Mesh.SetNodeOnVertex
 Binds a node to a vertex.
def smeshDC.Mesh.SetNodeOnEdge
 Stores the node position on an edge.
def smeshDC.Mesh.SetNodeOnFace
 Stores node position on a face.
def smeshDC.Mesh.SetNodeInVolume
 Binds a node to a solid.
def smeshDC.Mesh.SetMeshElementOnShape
 Bind an element to a shape.

Function Documentation

def smeshDC.Mesh.Add0DElement (   self,
  IDOfNode 
)

Creates a 0D element on a node with given number.

Parameters:
IDOfNodethe ID of node for creation of the element.
Returns:
the Id of the new 0D element

Definition at line 2295 of file smeshDC.py.

02295 
02296     def Add0DElement(self, IDOfNode):
02297         return self.editor.Add0DElement(IDOfNode)

def smeshDC.Mesh.AddEdge (   self,
  IDsOfNodes 
)

Creates a linear or quadratic edge (this is determined by the number of given nodes).

Parameters:
IDsOfNodesthe list of node IDs for creation of the element. The order of nodes in this list should correspond to the description of MED.
This description is located by the following link: http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3.
Returns:
the Id of the new edge

Definition at line 2306 of file smeshDC.py.

02306 
02307     def AddEdge(self, IDsOfNodes):
02308         return self.editor.AddEdge(IDsOfNodes)

def smeshDC.Mesh.AddFace (   self,
  IDsOfNodes 
)

Creates a linear or quadratic face (this is determined by the number of given nodes).

Parameters:
IDsOfNodesthe list of node IDs for creation of the element. The order of nodes in this list should correspond to the description of MED.
This description is located by the following link: http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3.
Returns:
the Id of the new face

Definition at line 2317 of file smeshDC.py.

02317 
02318     def AddFace(self, IDsOfNodes):
02319         return self.editor.AddFace(IDsOfNodes)

def smeshDC.Mesh.AddNode (   self,
  x,
  y,
  z 
)

Add a node to the mesh by coordinates.

Returns:
Id of the new node

Definition at line 2286 of file smeshDC.py.

02286 
02287     def AddNode(self, x, y, z):
02288         x,y,z,Parameters,hasVars = ParseParameters(x,y,z)
02289         if hasVars: self.mesh.SetParameters(Parameters)
02290         return self.editor.AddNode( x, y, z)

Here is the call graph for this function:

def smeshDC.Mesh.AddPolygonalFace (   self,
  IdsOfNodes 
)

Adds a polygonal face to the mesh by the list of node IDs.

Parameters:
IdsOfNodesthe list of node IDs for creation of the element.
Returns:
the Id of the new face

Definition at line 2324 of file smeshDC.py.

02324 
02325     def AddPolygonalFace(self, IdsOfNodes):
02326         return self.editor.AddPolygonalFace(IdsOfNodes)

def smeshDC.Mesh.AddPolyhedralVolume (   self,
  IdsOfNodes,
  Quantities 
)

Creates a volume of many faces, giving nodes for each face.

Parameters:
IdsOfNodesthe list of node IDs for volume creation face by face.
Quantitiesthe list of integer values, Quantities[i] gives the quantity of nodes in face number i.
Returns:
the Id of the new volumic element

Definition at line 2344 of file smeshDC.py.

02344 
02345     def AddPolyhedralVolume (self, IdsOfNodes, Quantities):
02346         return self.editor.AddPolyhedralVolume(IdsOfNodes, Quantities)

def smeshDC.Mesh.AddPolyhedralVolumeByFaces (   self,
  IdsOfFaces 
)

Creates a volume of many faces, giving the IDs of the existing faces.

Parameters:
IdsOfFacesthe list of face IDs for volume creation.

Note: The created volume will refer only to the nodes of the given faces, not to the faces themselves.

Returns:
the Id of the new volumic element

Definition at line 2354 of file smeshDC.py.

02354 
02355     def AddPolyhedralVolumeByFaces (self, IdsOfFaces):
02356         return self.editor.AddPolyhedralVolumeByFaces(IdsOfFaces)
02357 

def smeshDC.Mesh.AddVolume (   self,
  IDsOfNodes 
)

Creates both simple and quadratic volume (this is determined by the number of given nodes).

Parameters:
IDsOfNodesthe list of node IDs for creation of the element. The order of nodes in this list should correspond to the description of MED.
This description is located by the following link: http://www.code-aster.org/outils/med/html/modele_de_donnees.html#3.
Returns:
the Id of the new volumic element

Definition at line 2335 of file smeshDC.py.

02335 
02336     def AddVolume(self, IDsOfNodes):
02337         return self.editor.AddVolume(IDsOfNodes)

def smeshDC.Mesh.SetMeshElementOnShape (   self,
  ElementID,
  Shape 
)

Bind an element to a shape.

Parameters:
ElementIDan element ID
Shapea shape or shape ID
Returns:
True if succeed else raises an exception

Definition at line 2431 of file smeshDC.py.

02431 
02432     def SetMeshElementOnShape(self, ElementID, Shape):
02433         if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
02434             ShapeID = Shape.GetSubShapeIndices()[0]
02435         else:
02436             ShapeID = Shape
02437         try:
02438             self.editor.SetMeshElementOnShape(ElementID, ShapeID)
02439         except SALOME.SALOME_Exception, inst:
02440             raise ValueError, inst.details.text
02441         return True
02442 

def smeshDC.Mesh.SetNodeInVolume (   self,
  NodeID,
  Solid 
)

Binds a node to a solid.

Parameters:
NodeIDa node ID
Solida solid or solid ID
Returns:
True if succeed else raises an exception

Definition at line 2415 of file smeshDC.py.

02415 
02416     def SetNodeInVolume(self, NodeID, Solid):
02417         if ( isinstance( Solid, geompyDC.GEOM._objref_GEOM_Object)):
02418             SolidID = Solid.GetSubShapeIndices()[0]
02419         else:
02420             SolidID = Solid
02421         try:
02422             self.editor.SetNodeInVolume(NodeID, SolidID)
02423         except SALOME.SALOME_Exception, inst:
02424             raise ValueError, inst.details.text
02425         return True

def smeshDC.Mesh.SetNodeOnEdge (   self,
  NodeID,
  Edge,
  paramOnEdge 
)

Stores the node position on an edge.

Parameters:
NodeIDa node ID
Edgean edge or edge ID
paramOnEdgea parameter on the edge where the node is located
Returns:
True if succeed else raises an exception

Definition at line 2381 of file smeshDC.py.

02381 
02382     def SetNodeOnEdge(self, NodeID, Edge, paramOnEdge):
02383         if ( isinstance( Edge, geompyDC.GEOM._objref_GEOM_Object)):
02384             EdgeID = Edge.GetSubShapeIndices()[0]
02385         else:
02386             EdgeID = Edge
02387         try:
02388             self.editor.SetNodeOnEdge(NodeID, EdgeID, paramOnEdge)
02389         except SALOME.SALOME_Exception, inst:
02390             raise ValueError, inst.details.text
02391         return True

def smeshDC.Mesh.SetNodeOnFace (   self,
  NodeID,
  Face,
  u,
  v 
)

Stores node position on a face.

Parameters:
NodeIDa node ID
Facea face or face ID
uU parameter on the face where the node is located
vV parameter on the face where the node is located
Returns:
True if succeed else raises an exception

Definition at line 2399 of file smeshDC.py.

02399 
02400     def SetNodeOnFace(self, NodeID, Face, u, v):
02401         if ( isinstance( Face, geompyDC.GEOM._objref_GEOM_Object)):
02402             FaceID = Face.GetSubShapeIndices()[0]
02403         else:
02404             FaceID = Face
02405         try:
02406             self.editor.SetNodeOnFace(NodeID, FaceID, u, v)
02407         except SALOME.SALOME_Exception, inst:
02408             raise ValueError, inst.details.text
02409         return True

def smeshDC.Mesh.SetNodeOnVertex (   self,
  NodeID,
  Vertex 
)

Binds a node to a vertex.

Parameters:
NodeIDa node ID
Vertexa vertex or vertex ID
Returns:
True if succeed else raises an exception

Definition at line 2363 of file smeshDC.py.

02363 
02364     def SetNodeOnVertex(self, NodeID, Vertex):
02365         if ( isinstance( Vertex, geompyDC.GEOM._objref_GEOM_Object)):
02366             VertexID = Vertex.GetSubShapeIndices()[0]
02367         else:
02368             VertexID = Vertex
02369         try:
02370             self.editor.SetNodeOnVertex(NodeID, VertexID)
02371         except SALOME.SALOME_Exception, inst:
02372             raise ValueError, inst.details.text
02373         return True
02374