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

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

02510                                     :
02511         return self.editor.Add0DElement(IDOfNode)

def smeshDC.Mesh.AddEdge (   self,
  IDsOfNodes 
) [inherited]

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

02521                                  :
02522         return self.editor.AddEdge(IDsOfNodes)

def smeshDC.Mesh.AddFace (   self,
  IDsOfNodes 
) [inherited]

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

02532                                  :
02533         return self.editor.AddFace(IDsOfNodes)

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

Add a node to the mesh by coordinates.

Returns:
Id of the new node

Definition at line 2500 of file smeshDC.py.

02501                               :
02502         x,y,z,Parameters = geompyDC.ParseParameters(x,y,z)
02503         self.mesh.SetParameters(Parameters)
02504         return self.editor.AddNode( x, y, z)

def smeshDC.Mesh.AddPolygonalFace (   self,
  IdsOfNodes 
) [inherited]

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

02539                                           :
02540         return self.editor.AddPolygonalFace(IdsOfNodes)

def smeshDC.Mesh.AddPolyhedralVolume (   self,
  IdsOfNodes,
  Quantities 
) [inherited]

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

02559                                                           :
02560         return self.editor.AddPolyhedralVolume(IdsOfNodes, Quantities)

def smeshDC.Mesh.AddPolyhedralVolumeByFaces (   self,
  IdsOfFaces 
) [inherited]

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

02569                                                      :
02570         return self.editor.AddPolyhedralVolumeByFaces(IdsOfFaces)
02571 

def smeshDC.Mesh.AddVolume (   self,
  IDsOfNodes 
) [inherited]

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

02550                                    :
02551         return self.editor.AddVolume(IDsOfNodes)

def smeshDC.Mesh.SetMeshElementOnShape (   self,
  ElementID,
  Shape 
) [inherited]

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

02646                                                      :
02647         if ( isinstance( Shape, geompyDC.GEOM._objref_GEOM_Object)):
02648             ShapeID = Shape.GetSubShapeIndices()[0]
02649         else:
02650             ShapeID = Shape
02651         try:
02652             self.editor.SetMeshElementOnShape(ElementID, ShapeID)
02653         except SALOME.SALOME_Exception, inst:
02654             raise ValueError, inst.details.text
02655         return True
02656 

def smeshDC.Mesh.SetNodeInVolume (   self,
  NodeID,
  Solid 
) [inherited]

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

02630                                             :
02631         if ( isinstance( Solid, geompyDC.GEOM._objref_GEOM_Object)):
02632             SolidID = Solid.GetSubShapeIndices()[0]
02633         else:
02634             SolidID = Solid
02635         try:
02636             self.editor.SetNodeInVolume(NodeID, SolidID)
02637         except SALOME.SALOME_Exception, inst:
02638             raise ValueError, inst.details.text
02639         return True

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

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

02596                                                       :
02597         if ( isinstance( Edge, geompyDC.GEOM._objref_GEOM_Object)):
02598             EdgeID = Edge.GetSubShapeIndices()[0]
02599         else:
02600             EdgeID = Edge
02601         try:
02602             self.editor.SetNodeOnEdge(NodeID, EdgeID, paramOnEdge)
02603         except SALOME.SALOME_Exception, inst:
02604             raise ValueError, inst.details.text
02605         return True

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

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

02614                                                :
02615         if ( isinstance( Face, geompyDC.GEOM._objref_GEOM_Object)):
02616             FaceID = Face.GetSubShapeIndices()[0]
02617         else:
02618             FaceID = Face
02619         try:
02620             self.editor.SetNodeOnFace(NodeID, FaceID, u, v)
02621         except SALOME.SALOME_Exception, inst:
02622             raise ValueError, inst.details.text
02623         return True

def smeshDC.Mesh.SetNodeOnVertex (   self,
  NodeID,
  Vertex 
) [inherited]

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

02578                                              :
02579         if ( isinstance( Vertex, geompyDC.GEOM._objref_GEOM_Object)):
02580             VertexID = Vertex.GetSubShapeIndices()[0]
02581         else:
02582             VertexID = Vertex
02583         try:
02584             self.editor.SetNodeOnVertex(NodeID, VertexID)
02585         except SALOME.SALOME_Exception, inst:
02586             raise ValueError, inst.details.text
02587         return True
02588 

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