smeshDC.Mesh Class Reference

Class to define a mesh. More...


Public Member Functions

def __init__
 Constructor.
def SetMesh
 Method that inits the Mesh object from SMESH_Mesh interface.
def GetMesh
 Method that returns the mesh.
def GetName
 Get mesh name.
def SetName
 Set name to mesh.
def GetSubMesh
 Get the subMesh object associated to a subShape.
def GetShape
 Method that returns the shape associated to the mesh.
def SetShape
 Method that associates given shape to the mesh(entails the mesh recreation).
def IsReadyToCompute
 Return true if hypotheses are defined well.
def GetAlgoState
 Return errors of hypotheses definintion error list is empty if everything is OK.
def GetGeometryByMeshElement
 Return geometrical object the given element is built on.
def MeshDimension
 Returns mesh dimension depending on shape one.
def Segment
 Creates a segment discretization 1D algorithm.
def Triangle
 Creates a triangle 2D algorithm for faces.
def Quadrangle
 Creates a quadrangle 2D algorithm for faces.
def Tetrahedron
 Creates a tetrahedron 3D algorithm for solids.
def Hexahedron
 Creates a hexahedron 3D algorithm for solids.
def Netgen
 Deprecated, only for compatibility!
def Projection1D
 Creates a projection 1D algorithm for edges.
def Projection2D
 Creates a projection 2D algorithm for faces.
def Projection3D
 Creates a projection 3D algorithm for solids.
def Prism
 Creates a 3D extrusion (Prism 3D) or RadialPrism 3D algorithm for solids.
def Compute
 Compute the mesh and return the status of the computation.
def AutomaticTetrahedralization
 Compute tetrahedral mesh using AutomaticLength + MEFISTO + NETGEN The parameter fineness [0,-1] defines mesh fineness.
def AutomaticHexahedralization
 Compute hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron The parameter fineness [0,-1] defines mesh fineness.
def AddHypothesis
 Assign hypothesis.
def GetHypothesisList
 Get the list of hypothesis added on a geom.
def RemoveGlobalHypotheses
 Removes all global hypotheses.
def Group
 Create a mesh group based on geometric object grp and give a name,
if this parameter is not defined the name is the same as the geometric group name
Note: Works like GroupOnGeom().
def ExportToMED
 Deprecated, only for compatibility! Please, use ExportMED() method instead.
def ExportMED
 Export the mesh in a file with the MED format.
def ExportDAT
 Export the mesh in a file with the DAT format.
def ExportUNV
 Export the mesh in a file with the UNV format.
def ExportSTL
 Export the mesh in a file with the STL format.
def CreateEmptyGroup
 Creates an empty mesh group.
def GroupOnGeom
 Creates a mesh group based on geometric object grp and give a name,
if this parameter is not defined the name is the same as the geometric group name.
def MakeGroupByIds
 Create a mesh group by the given ids of elements.
def MakeGroup
 Create a mesh group by the given conditions.
def MakeGroupByCriterion
 Create a mesh group by the given criterion.
def MakeGroupByCriteria
 Create a mesh group by the given criteria(list of criterions).
def MakeGroupByFilter
 Create a mesh group by the given filter.
def GetIdsFromFilter
 Pass mesh elements through the given filter and return ids.
def GetFreeBorders
 Verify whether 2D mesh element has free edges(edges connected to one face only)
Returns list of special structures(borders).
def RemoveGroup
 Remove a group.
def RemoveGroupWithContents
 Remove group with its contents.
def GetGroups
 Get the list of groups existing in the mesh.
def GetGroupNames
 Get the list of names of groups existing in the mesh.
def UnionGroups
 Union of two groups New group is created.
def IntersectGroups
 Intersection of two groups New group is created.
def CutGroups
 Cut of two groups New group is created.
def GetLog
 Get the log of nodes and elements added or removed since previous clear of the log.
def ClearLog
 Clear the log of nodes and elements added or removed since previous clear.
def GetId
 Get the internal Id.
def GetStudyId
 Get the study Id.
def HasDuplicatedGroupNamesMED
 Check group names for duplications.
def GetMeshEditor
 Obtain instance of SMESH_MeshEditor.
def GetMEDMesh
 Get MED Mesh.
def NbNodes
 Returns number of nodes in mesh.
def NbElements
 Returns number of elements in mesh.
def NbEdges
 Returns number of edges in mesh.
def NbEdgesOfOrder
 Returns number of edges with given order in mesh.
def NbFaces
 Returns number of faces in mesh.
def NbFacesOfOrder
 Returns number of faces with given order in mesh.
def NbTriangles
 Returns number of triangles in mesh.
def NbTrianglesOfOrder
 Returns number of triangles with given order in mesh.
def NbQuadrangles
 Returns number of quadrangles in mesh.
def NbQuadranglesOfOrder
 Returns number of quadrangles with given order in mesh.
def NbPolygons
 Returns number of polygons in mesh.
def NbVolumes
 Returns number of volumes in mesh.
def NbVolumesOfOrder
 Returns number of volumes with given order in mesh.
def NbTetras
 Returns number of tetrahedrons in mesh.
def NbTetrasOfOrder
 Returns number of tetrahedrons with given order in mesh.
def NbHexas
 Returns number of hexahedrons in mesh.
def NbHexasOfOrder
 Returns number of hexahedrons with given order in mesh.
def NbPyramids
 Returns number of pyramids in mesh.
def NbPyramidsOfOrder
 Returns number of pyramids with given order in mesh.
def NbPrisms
 Returns number of prisms in mesh.
def NbPrismsOfOrder
 Returns number of prisms with given order in mesh.
def NbPolyhedrons
 Returns number of polyhedrons in mesh.
def NbSubMesh
 Returns number of submeshes in mesh.
def GetElementsId
 Returns list of mesh elements ids.
def GetElementsByType
 Returns list of ids of mesh elements with given type.
def GetNodesId
 Returns list of mesh nodes ids.
def GetElementType
 Returns type of mesh element.
def GetSubMeshElementsId
 Returns list of submesh elements ids.
def GetSubMeshNodesId
 Returns list of submesh nodes ids.
def GetSubMeshElementType
 Returns list of ids of submesh elements with given type.
def Dump
 Get mesh description.
def GetNodeXYZ
 Get XYZ coordinates of node as list of double
If there is not node for given ID - returns empty list.
def GetNodeInverseElements
 For given node returns list of IDs of inverse elements
If there is not node for given ID - returns empty list.
def GetShapeID
 If given element is node returns IDs of shape from position
If there is not node for given ID - returns -1.
def GetShapeIDForElem
 For given element returns ID of result shape after FindShape() from SMESH_MeshEditor
If there is not element for given ID - returns -1.
def GetElemNbNodes
 Returns number of nodes for given element
If there is not element for given ID - returns -1.
def GetElemNode
 Returns ID of node by given index for given element
If there is not element for given ID - returns -1
If there is not node for given index - returns -2.
def IsMediumNode
 Returns true if given node is medium node in given quadratic element.
def IsMediumNodeOfAnyElem
 Returns true if given node is medium node in one of quadratic elements.
def ElemNbEdges
 Returns number of edges for given element.
def ElemNbFaces
 Returns number of faces for given element.
def IsPoly
 Returns true if given element is polygon.
def IsQuadratic
 Returns true if given element is quadratic.
def BaryCenter
 Returns XYZ coordinates of bary center for given element as list of double
If there is not element for given ID - returns empty list.
def RemoveElements
 Removes elements from mesh by ids.
def RemoveNodes
 Removes nodes from mesh by ids.
def AddNode
 Add node to mesh by coordinates.
def AddEdge
 Create edge both similar and quadratic (this is determed by number of given nodes).
def AddFace
 Create face both similar and quadratic (this is determed by number of given nodes).
def AddPolygonalFace
 Add polygonal face to mesh by list of nodes ids.
def AddVolume
 Create volume both similar and quadratic (this is determed by number of given nodes).
def AddPolyhedralVolume
 Create volume of many faces, giving nodes for each face.
def AddPolyhedralVolumeByFaces
 Create volume of many faces, giving IDs of existing faces.
def MoveNode
 Move node with given id.
def FindNodeClosestTo
 Find a node closest to a point.
def MeshToPassThroughAPoint
 Find a node closest to a point and move it to a point location.
def InverseDiag
 Replace two neighbour triangles sharing Node1-Node2 link with ones built on the same 4 nodes but having other common link.
def DeleteDiag
 Replace two neighbour triangles sharing Node1-Node2 link with a quadrangle built on the same 4 nodes.
def Reorient
 Reorient elements by ids.
def ReorientObject
 Reorient all elements of the object.
def TriToQuad
 Fuse neighbour triangles into quadrangles.
def TriToQuadObject
 Fuse neighbour triangles of the object into quadrangles.
def QuadToTri
 Split quadrangles into triangles.
def QuadToTriObject
 Split quadrangles into triangles.
def SplitQuad
 Split quadrangles into triangles.
def SplitQuadObject
 Split quadrangles into triangles.
def BestSplit
 Find better splitting of the given quadrangle.
def SplitQuadsNearTriangularFacets
 Split quafrangle faces near triangular facets of volumes.
def SplitHexaToTetras
 Split hexahedrons into tetrahedrons.
def SplitHexaToPrisms
 Split hexahedrons into prisms.
def Smooth
 Smooth elements.
def SmoothObject
 Smooth elements belong to given object.
def SmoothParametric
 Parametric smooth the given elements.
def SmoothParametricObject
 Parametric smooth elements belong to given object.
def ConvertToQuadratic
 Converts all mesh to quadratic one, deletes old elements, replacing them with quadratic ones with the same id.
def ConvertFromQuadratic
 Converts all mesh from quadratic to ordinary ones, deletes old quadratic elements,
replacing them with ordinary mesh elements with the same id.
def RenumberNodes
 Renumber mesh nodes.
def RenumberElements
 Renumber mesh elements.
def RotationSweep
 Generate new elements by rotation of the elements around the axis.
def RotationSweepObject
 Generate new elements by rotation of the elements of object around the axis.
def ExtrusionSweep
 Generate new elements by extrusion of the elements with given ids.
def AdvancedExtrusion
 Generate new elements by extrusion of the elements with given ids.
def ExtrusionSweepObject
 Generate new elements by extrusion of the elements belong to object.
def ExtrusionSweepObject1D
 Generate new elements by extrusion of the elements belong to object.
def ExtrusionSweepObject2D
 Generate new elements by extrusion of the elements belong to object.
def ExtrusionAlongPath
 Generate new elements by extrusion of the given elements A path of extrusion must be a meshed edge.
def ExtrusionAlongPathObject
 Generate new elements by extrusion of the elements belong to object A path of extrusion must be a meshed edge.
def Mirror
 Symmetrical copy of mesh elements.
def MirrorObject
 Symmetrical copy of object.
def Translate
 Translates the elements.
def TranslateObject
 Translates the object.
def Rotate
 Rotates the elements.
def RotateObject
 Rotates the object.
def FindCoincidentNodes
 Find group of nodes close to each other within Tolerance.
def FindCoincidentNodesOnPart
 Find group of nodes close to each other within Tolerance.
def MergeNodes
 Merge nodes.
def FindEqualElements
 Find elements built on the same nodes.
def MergeElements
 Merge elements in each given group.
def MergeEqualElements
 Remove all but one of elements built on the same nodes.
def SewFreeBorders
 Sew free borders.
def SewConformFreeBorders
 Sew conform free borders.
def SewBorderToSide
 Sew border to side.
def SewSideElements
 Sew two sides of a mesh.
def ChangeElemNodes
 Set new nodes for given element.
def GetLastCreatedNodes
 If during last operation of MeshEditor some nodes were created this method returns list of it's IDs,
if new nodes not created - returns empty list.
def GetLastCreatedElems
 If during last operation of MeshEditor some elements were created this method returns list of it's IDs,
if new elements not creared - returns empty list.

Data Fields

 smeshpyD
 geompyD
 geom
 mesh
 editor

Static Public Attributes

int geom = 0
int mesh = 0
int editor = 0


Detailed Description

The class contains mesh shape, SMESH_Mesh, SMESH_MeshEditor More details.


Member Function Documentation

def smeshDC.Mesh.__init__ (   self,
  smeshpyD,
  geompyD,
  obj = 0,
  name = 0 
)

Creates mesh on the shape geom(or the empty mesh if geom equal to 0), sets GUI name of this mesh to name.

Parameters:
obj Shape to be meshed or SMESH_Mesh object
name Study name of the mesh

def smeshDC.Mesh.SetMesh (   self,
  theMesh 
)

Parameters:
theMesh is SMESH_Mesh object

def smeshDC.Mesh.GetMesh (   self  ) 

Returns:
SMESH_Mesh object

def smeshDC.Mesh.GetName (   self  ) 

def smeshDC.Mesh.SetName (   self,
  name 
)

def smeshDC.Mesh.GetSubMesh (   self,
  theSubObject,
  name 
)

The subMesh object gives access to nodes and elements IDs.
SubMesh will be used instead of SubShape in a next idl version to adress a specific subMesh...

def smeshDC.Mesh.GetShape (   self  ) 

Returns:
GEOM_Object

def smeshDC.Mesh.SetShape (   self,
  geom 
)

Parameters:
geom shape to be meshed(GEOM_Object)

def smeshDC.Mesh.IsReadyToCompute (   self,
  theSubObject 
)

Parameters:
theMesh is an instance of Mesh class
theSubObject subshape of a mesh shape

def smeshDC.Mesh.GetAlgoState (   self,
  theSubObject 
)

Parameters:
theMesh is an instance of Mesh class
theSubObject subshape of a mesh shape
Returns:
a list of errors

def smeshDC.Mesh.GetGeometryByMeshElement (   self,
  theElementID,
  theGeomName 
)

The returned geometrical object, if not nil, is either found in the study or is published by this method with the given name

Parameters:
theMesh is an instance of Mesh class
theElementID an id of the mesh element
theGeomName user defined name of geometrical object
Returns:
GEOM.GEOM_Object instance

def smeshDC.Mesh.MeshDimension (   self  ) 

def smeshDC.Mesh.Segment (   self,
  algo = REGULAR,
  geom = 0 
)

If the optional algo parameter is not sets, this algorithm is REGULAR. If the optional geom parameter is not sets, this algorithm is global.
Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
algo values are smesh.REGULAR or smesh.PYTHON for discretization via python function
geom If defined, subshape to be meshed

def smeshDC.Mesh.Triangle (   self,
  algo = MEFISTO,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global.
Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
algo values are: smesh.MEFISTO or smesh.NETGEN
geom If defined, subshape to be meshed

def smeshDC.Mesh.Quadrangle (   self,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global.
Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
geom If defined, subshape to be meshed

def smeshDC.Mesh.Tetrahedron (   self,
  algo = NETGEN,
  geom = 0 
)

The parameter algo permits to choice the algorithm: NETGEN or GHS3D If the optional geom parameter is not sets, this algorithm is global.
Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
algo values are: smesh.NETGEN, smesh.GHS3D, smesh.FULL_NETGEN
geom If defined, subshape to be meshed

def smeshDC.Mesh.Hexahedron (   self,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global.
Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
geom If defined, subshape to be meshed

def smeshDC.Mesh.Netgen (   self,
  is3D,
  geom = 0 
)

def smeshDC.Mesh.Projection1D (   self,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
geom If defined, subshape to be meshed

def smeshDC.Mesh.Projection2D (   self,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
geom If defined, subshape to be meshed

def smeshDC.Mesh.Projection3D (   self,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
geom If defined, subshape to be meshed

def smeshDC.Mesh.Prism (   self,
  geom = 0 
)

If the optional geom parameter is not sets, this algorithm is global. Otherwise, this algorithm define a submesh based on geom subshape.

Parameters:
geom If defined, subshape to be meshed

def smeshDC.Mesh.Compute (   self,
  geom = 0 
)

def smeshDC.Mesh.AutomaticTetrahedralization (   self,
  fineness = 0 
)

def smeshDC.Mesh.AutomaticHexahedralization (   self,
  fineness = 0 
)

def smeshDC.Mesh.AddHypothesis (   self,
  hyp,
  geom = 0 
)

Parameters:
hyp is a hypothesis to assign
geom is subhape of mesh geometry

def smeshDC.Mesh.GetHypothesisList (   self,
  geom 
)

Parameters:
geom is subhape of mesh geometry

def smeshDC.Mesh.RemoveGlobalHypotheses (   self  ) 

def smeshDC.Mesh.Group (   self,
  grp,
  name = "" 
)

Parameters:
grp is a geometric group, a vertex, an edge, a face or a solid
name is the name of the mesh group
Returns:
SMESH_GroupOnGeom

def smeshDC.Mesh.ExportToMED (   self,
  f,
  version,
  opt = 0 
)

Export the mesh in a file with the MED format and choice the version of MED format

Parameters:
f is the file name
version values are SMESH.MED_V2_1, SMESH.MED_V2_2

def smeshDC.Mesh.ExportMED (   self,
  f,
  auto_groups = 0,
  version = MED_V2_2 
)

Parameters:
f is the file name
auto_groups boolean parameter for creating/not creating the groups Group_On_All_Nodes, Group_On_All_Faces, ... ; the typical use is auto_groups=false.
version MED format version(MED_V2_1 or MED_V2_2)

def smeshDC.Mesh.ExportDAT (   self,
  f 
)

Parameters:
f is the file name

def smeshDC.Mesh.ExportUNV (   self,
  f 
)

Parameters:
f is the file name

def smeshDC.Mesh.ExportSTL (   self,
  f,
  ascii = 1 
)

Parameters:
f is the file name
ascii defined the kind of file contents

def smeshDC.Mesh.CreateEmptyGroup (   self,
  elementType,
  name 
)

Parameters:
elementType is the type of elements in the group
name is the name of the mesh group
Returns:
SMESH_Group

def smeshDC.Mesh.GroupOnGeom (   self,
  grp,
  name = "",
  typ = None 
)

Parameters:
grp is a geometric group, a vertex, an edge, a face or a solid
name is the name of the mesh group
Returns:
SMESH_GroupOnGeom

def smeshDC.Mesh.MakeGroupByIds (   self,
  groupName,
  elementType,
  elemIDs 
)

Parameters:
groupName is the name of the mesh group
elementType is the type of elements in the group
elemIDs is the list of ids
Returns:
SMESH_Group

def smeshDC.Mesh.MakeGroup (   self,
  groupName,
  elementType,
  CritType = FT_Undefined,
  Compare = FT_EqualTo,
  Treshold = "",
  UnaryOp = FT_Undefined 
)

Parameters:
groupName is the name of the mesh group
elementType is the type of elements in the group
CritType is type of criterion( FT_Taper, FT_Area, FT_RangeOfIds, FT_LyingOnGeom etc. )
Compare belong to {FT_LessThan, FT_MoreThan, FT_EqualTo}
Treshold is threshold value (range of id ids as string, shape, numeric)
UnaryOp is FT_LogicalNOT or FT_Undefined
Returns:
SMESH_Group

def smeshDC.Mesh.MakeGroupByCriterion (   self,
  groupName,
  Criterion 
)

Parameters:
groupName is the name of the mesh group
Criterion is the instance of Criterion class
Returns:
SMESH_Group

def smeshDC.Mesh.MakeGroupByCriteria (   self,
  groupName,
  theCriteria 
)

Parameters:
groupName is the name of the mesh group
Criteria is the list of criterions
Returns:
SMESH_Group

def smeshDC.Mesh.MakeGroupByFilter (   self,
  groupName,
  theFilter 
)

Parameters:
groupName is the name of the mesh group
Criterion is the instance of Filter class
Returns:
SMESH_Group

def smeshDC.Mesh.GetIdsFromFilter (   self,
  theFilter 
)

Parameters:
theFilter is SMESH_Filter
Returns:
list of ids

def smeshDC.Mesh.GetFreeBorders (   self  ) 

Returns:
list of SMESH.FreeEdges.Border structure: edge id and two its nodes ids.

def smeshDC.Mesh.RemoveGroup (   self,
  group 
)

def smeshDC.Mesh.RemoveGroupWithContents (   self,
  group 
)

def smeshDC.Mesh.GetGroups (   self  ) 

def smeshDC.Mesh.GetGroupNames (   self  ) 

def smeshDC.Mesh.UnionGroups (   self,
  group1,
  group2,
  name 
)

All mesh elements that are present in initial groups are added to the new one

def smeshDC.Mesh.IntersectGroups (   self,
  group1,
  group2,
  name 
)

All mesh elements that are present in both initial groups are added to the new one.

def smeshDC.Mesh.CutGroups (   self,
  mainGroup,
  toolGroup,
  name 
)

All mesh elements that are present in main group but do not present in tool group are added to the new one

def smeshDC.Mesh.GetLog (   self,
  clearAfterGet 
)

Parameters:
clearAfterGet log is emptied after Get (safe if concurrents access)
Returns:
list of log_block structures: commandType number coords indexes

def smeshDC.Mesh.ClearLog (   self  ) 

Must be used immediately after GetLog if clearAfterGet is false.

def smeshDC.Mesh.GetId (   self  ) 

def smeshDC.Mesh.GetStudyId (   self  ) 

def smeshDC.Mesh.HasDuplicatedGroupNamesMED (   self  ) 

Consider maximum group name length stored in MED file.

def smeshDC.Mesh.GetMeshEditor (   self  ) 

def smeshDC.Mesh.GetMEDMesh (   self  ) 

def smeshDC.Mesh.NbNodes (   self  ) 

def smeshDC.Mesh.NbElements (   self  ) 

def smeshDC.Mesh.NbEdges (   self  ) 

def smeshDC.Mesh.NbEdgesOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbFaces (   self  ) 

def smeshDC.Mesh.NbFacesOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbTriangles (   self  ) 

def smeshDC.Mesh.NbTrianglesOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbQuadrangles (   self  ) 

def smeshDC.Mesh.NbQuadranglesOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbPolygons (   self  ) 

def smeshDC.Mesh.NbVolumes (   self  ) 

def smeshDC.Mesh.NbVolumesOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbTetras (   self  ) 

def smeshDC.Mesh.NbTetrasOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbHexas (   self  ) 

def smeshDC.Mesh.NbHexasOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbPyramids (   self  ) 

def smeshDC.Mesh.NbPyramidsOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbPrisms (   self  ) 

def smeshDC.Mesh.NbPrismsOfOrder (   self,
  elementOrder 
)

Parameters:
elementOrder is order of elements: ORDER_ANY, ORDER_LINEAR or ORDER_QUADRATIC

def smeshDC.Mesh.NbPolyhedrons (   self  ) 

def smeshDC.Mesh.NbSubMesh (   self  ) 

def smeshDC.Mesh.GetElementsId (   self  ) 

def smeshDC.Mesh.GetElementsByType (   self,
  elementType 
)

Parameters:
elementType is required type of elements

def smeshDC.Mesh.GetNodesId (   self  ) 

def smeshDC.Mesh.GetElementType (   self,
  id,
  iselem 
)

def smeshDC.Mesh.GetSubMeshElementsId (   self,
  shapeID 
)

Parameters:
shapeID is geom object(subshape) IOR

def smeshDC.Mesh.GetSubMeshNodesId (   self,
  shapeID,
  all 
)

Parameters:
shapeID is geom object(subshape) IOR

def smeshDC.Mesh.GetSubMeshElementType (   self,
  shapeID 
)

Parameters:
shapeID is geom object(subshape) IOR

def smeshDC.Mesh.Dump (   self  ) 

def smeshDC.Mesh.GetNodeXYZ (   self,
  id 
)

def smeshDC.Mesh.GetNodeInverseElements (   self,
  id 
)

def smeshDC.Mesh.GetShapeID (   self,
  id 
)

def smeshDC.Mesh.GetShapeIDForElem (   self,
  id 
)

def smeshDC.Mesh.GetElemNbNodes (   self,
  id 
)

def smeshDC.Mesh.GetElemNode (   self,
  id,
  index 
)

def smeshDC.Mesh.IsMediumNode (   self,
  elementID,
  nodeID 
)

def smeshDC.Mesh.IsMediumNodeOfAnyElem (   self,
  nodeID,
  elementType 
)

def smeshDC.Mesh.ElemNbEdges (   self,
  id 
)

def smeshDC.Mesh.ElemNbFaces (   self,
  id 
)

def smeshDC.Mesh.IsPoly (   self,
  id 
)

def smeshDC.Mesh.IsQuadratic (   self,
  id 
)

def smeshDC.Mesh.BaryCenter (   self,
  id 
)

def smeshDC.Mesh.RemoveElements (   self,
  IDsOfElements 
)

Parameters:
IDsOfElements is list of ids of elements to remove

def smeshDC.Mesh.RemoveNodes (   self,
  IDsOfNodes 
)

Parameters:
IDsOfNodes is list of ids of nodes to remove

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

def smeshDC.Mesh.AddEdge (   self,
  IDsOfNodes 
)

Parameters:
IdsOfNodes List of node IDs for creation of element. Needed order of nodes in this list corresponds to description of MED.
This description is located by the following link: http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.

def smeshDC.Mesh.AddFace (   self,
  IDsOfNodes 
)

Parameters:
IdsOfNodes List of node IDs for creation of element. Needed order of nodes in this list corresponds to description of MED.
This description is located by the following link: http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.

def smeshDC.Mesh.AddPolygonalFace (   self,
  IdsOfNodes 
)

def smeshDC.Mesh.AddVolume (   self,
  IDsOfNodes 
)

Parameters:
IdsOfNodes List of node IDs for creation of element. Needed order of nodes in this list corresponds to description of MED.
This description is located by the following link: http://www.salome-platform.org/salome2/web_med_internet/logiciels/medV2.2.2_doc_html/html/modele_de_donnees.html#3.

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

Parameters:
IdsOfNodes List of node IDs for volume creation face by face.
Quantities List of integer values, Quantities[i] gives quantity of nodes in face number i.

def smeshDC.Mesh.AddPolyhedralVolumeByFaces (   self,
  IdsOfFaces 
)

Parameters:
IdsOfFaces List of face IDs for volume creation.
Note: The created volume will refer only to nodes of the given faces, not to the faces itself.

def smeshDC.Mesh.MoveNode (   self,
  NodeID,
  x,
  y,
  z 
)

Parameters:
NodeID id of the node
x new X coordinate
y new Y coordinate
z new Z coordinate

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

Parameters:
x X coordinate of a point
y Y coordinate of a point
z Z coordinate of a point
Returns:
id of a node

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

Parameters:
x X coordinate of a point
y Y coordinate of a point
z Z coordinate of a point
Returns:
id of a moved node

def smeshDC.Mesh.InverseDiag (   self,
  NodeID1,
  NodeID2 
)

Parameters:
NodeID1 first node id
NodeID2 second node id
Returns:
false if proper faces not found

def smeshDC.Mesh.DeleteDiag (   self,
  NodeID1,
  NodeID2 
)

Parameters:
NodeID1 first node id
NodeID2 second node id
Returns:
false if proper faces not found

def smeshDC.Mesh.Reorient (   self,
  IDsOfElements = None 
)

Parameters:
IDsOfElements if undefined reorient all mesh elements

def smeshDC.Mesh.ReorientObject (   self,
  theObject 
)

Parameters:
theObject is mesh, submesh or group

def smeshDC.Mesh.TriToQuad (   self,
  IDsOfElements,
  theCriterion,
  MaxAngle 
)

Parameters:
IDsOfElements The triangles to be fused,
theCriterion is FT_...; used to choose a neighbour to fuse with.
MaxAngle is a max angle between element normals at which fusion is still performed; theMaxAngle is mesured in radians.
Returns:
TRUE in case of success, FALSE otherwise.

def smeshDC.Mesh.TriToQuadObject (   self,
  theObject,
  theCriterion,
  MaxAngle 
)

Parameters:
theObject is mesh, submesh or group
theCriterion is FT_...; used to choose a neighbour to fuse with.
MaxAngle is a max angle between element normals at which fusion is still performed; theMaxAngle is mesured in radians.
Returns:
TRUE in case of success, FALSE otherwise.

def smeshDC.Mesh.QuadToTri (   self,
  IDsOfElements,
  theCriterion 
)

Parameters:
IDsOfElements the faces to be splitted.
theCriterion is FT_...; used to choose a diagonal for splitting.
 TRUE in case of success, FALSE otherwise.

def smeshDC.Mesh.QuadToTriObject (   self,
  theObject,
  theCriterion 
)

Parameters:
theObject object to taking list of elements from, is mesh, submesh or group
theCriterion is FT_...; used to choose a diagonal for splitting.

def smeshDC.Mesh.SplitQuad (   self,
  IDsOfElements,
  Diag13 
)

Parameters:
theElems The faces to be splitted
the13Diag is used to choose a diagonal for splitting.
Returns:
TRUE in case of success, FALSE otherwise.

def smeshDC.Mesh.SplitQuadObject (   self,
  theObject,
  Diag13 
)

Parameters:
theObject is object to taking list of elements from, is mesh, submesh or group

def smeshDC.Mesh.BestSplit (   self,
  IDOfQuad,
  theCriterion 
)

Parameters:
IDOfQuad ID of the quadrangle to be splitted.
theCriterion is FT_...; a criterion to choose a diagonal for splitting.
Returns:
1 if 1-3 diagonal is better, 2 if 2-4 diagonal is better, 0 if error occurs.

def smeshDC.Mesh.SplitQuadsNearTriangularFacets (   self  ) 

def smeshDC.Mesh.SplitHexaToTetras (   self,
  theObject,
  theNode000,
  theNode001 
)

Use pattern mapping functionality for splitting.

Parameters:
theObject object to take list of hexahedrons from; is mesh, submesh or group.
theNode000,theNode001 is in range [0,7]; give an orientation of the pattern relatively each hexahedron: the (0,0,0) key-point of pattern will be mapped into <theNode000>-th node of each volume, the (0,0,1) key-point will be mapped into <theNode001>-th node of each volume. The (0,0,0) key-point of used pattern corresponds to not split corner.
 TRUE in case of success, FALSE otherwise.

def smeshDC.Mesh.SplitHexaToPrisms (   self,
  theObject,
  theNode000,
  theNode001 
)

Use pattern mapping functionality for splitting.

Parameters:
theObject object to take list of hexahedrons from; is mesh, submesh or group.
theNode000,theNode001 is in range [0,7]; give an orientation of the pattern relatively each hexahedron: the (0,0,0) key-point of pattern will be mapped into <theNode000>-th node of each volume, the (0,0,1) key-point will be mapped into <theNode001>-th node of each volume. The edge (0,0,0)-(0,0,1) of used pattern connects two not split corners.
 TRUE in case of success, FALSE otherwise.

def smeshDC.Mesh.Smooth (   self,
  IDsOfElements,
  IDsOfFixedNodes,
  MaxNbOfIterations,
  MaxAspectRatio,
  Method 
)

Parameters:
IDsOfElements list if ids of elements to smooth
IDsOfFixedNodes list of ids of fixed nodes. Note that nodes built on edges and boundary nodes are always fixed.
MaxNbOfIterations maximum number of iterations
MaxAspectRatio varies in range [1.0, inf]
Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)

def smeshDC.Mesh.SmoothObject (   self,
  theObject,
  IDsOfFixedNodes,
  MaxNbOfIterations,
  MaxxAspectRatio,
  Method 
)

Parameters:
theObject object to smooth
IDsOfFixedNodes list of ids of fixed nodes. Note that nodes built on edges and boundary nodes are always fixed.
MaxNbOfIterations maximum number of iterations
MaxAspectRatio varies in range [1.0, inf]
Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)

def smeshDC.Mesh.SmoothParametric (   self,
  IDsOfElements,
  IDsOfFixedNodes,
  MaxNbOfIterations,
  MaxAspectRatio,
  Method 
)

Parameters:
IDsOfElements list if ids of elements to smooth
IDsOfFixedNodes list of ids of fixed nodes. Note that nodes built on edges and boundary nodes are always fixed.
MaxNbOfIterations maximum number of iterations
MaxAspectRatio varies in range [1.0, inf]
Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)

def smeshDC.Mesh.SmoothParametricObject (   self,
  theObject,
  IDsOfFixedNodes,
  MaxNbOfIterations,
  MaxAspectRatio,
  Method 
)

Parameters:
theObject object to smooth
IDsOfFixedNodes list of ids of fixed nodes. Note that nodes built on edges and boundary nodes are always fixed.
MaxNbOfIterations maximum number of iterations
MaxAspectRatio varies in range [1.0, inf]
Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)

def smeshDC.Mesh.ConvertToQuadratic (   self,
  theForce3d 
)

def smeshDC.Mesh.ConvertFromQuadratic (   self  ) 

def smeshDC.Mesh.RenumberNodes (   self  ) 

def smeshDC.Mesh.RenumberElements (   self  ) 

def smeshDC.Mesh.RotationSweep (   self,
  IDsOfElements,
  Axix,
  AngleInRadians,
  NbOfSteps,
  Tolerance 
)

Parameters:
IDsOfElements list of ids of elements to sweep
Axix axis of rotation, AxisStruct or line(geom object)
AngleInRadians angle of Rotation
NbOfSteps number of steps
Tolerance tolerance

def smeshDC.Mesh.RotationSweepObject (   self,
  theObject,
  Axix,
  AngleInRadians,
  NbOfSteps,
  Tolerance 
)

Parameters:
theObject object wich elements should be sweeped
Axix axis of rotation, AxisStruct or line(geom object)
AngleInRadians angle of Rotation
NbOfSteps number of steps
Tolerance tolerance

def smeshDC.Mesh.ExtrusionSweep (   self,
  IDsOfElements,
  StepVector,
  NbOfSteps 
)

Parameters:
IDsOfElements list of elements ids for extrusion
StepVector vector, defining the direction and value of extrusion
NbOfSteps the number of steps

def smeshDC.Mesh.AdvancedExtrusion (   self,
  IDsOfElements,
  StepVector,
  NbOfSteps,
  ExtrFlags,
  SewTolerance 
)

Parameters:
IDsOfElements is ids of elements
StepVector vector, defining the direction and value of extrusion
NbOfSteps the number of steps
ExtrFlags set flags for performing extrusion
SewTolerance uses for comparing locations of nodes if flag EXTRUSION_FLAG_SEW is set

def smeshDC.Mesh.ExtrusionSweepObject (   self,
  theObject,
  StepVector,
  NbOfSteps 
)

Parameters:
theObject object wich elements should be processed
StepVector vector, defining the direction and value of extrusion
NbOfSteps the number of steps

def smeshDC.Mesh.ExtrusionSweepObject1D (   self,
  theObject,
  StepVector,
  NbOfSteps 
)

Parameters:
theObject object wich elements should be processed
StepVector vector, defining the direction and value of extrusion
NbOfSteps the number of steps

def smeshDC.Mesh.ExtrusionSweepObject2D (   self,
  theObject,
  StepVector,
  NbOfSteps 
)

Parameters:
theObject object wich elements should be processed
StepVector vector, defining the direction and value of extrusion
NbOfSteps the number of steps

def smeshDC.Mesh.ExtrusionAlongPath (   self,
  IDsOfElements,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles,
  Angles,
  HasRefPoint,
  RefPoint,
  LinearVariation = False 
)

Parameters:
IDsOfElements is ids of elements
PathMesh mesh containing a 1D sub-mesh on the edge, along which proceeds the extrusion
PathShape is shape(edge); as the mesh can be complex, the edge is used to define the sub-mesh for the path
NodeStart the first or the last node on the edge. It is used to define the direction of extrusion
HasAngles allows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angles list of angles
HasRefPoint allows to use base point
RefPoint point around which the shape is rotated(the mass center of the shape by default). User can specify any point as the Base Point and the shape will be rotated with respect to this point.
LinearVariation makes compute rotation angles as linear variation of given Angles along path steps

def smeshDC.Mesh.ExtrusionAlongPathObject (   self,
  theObject,
  PathMesh,
  PathShape,
  NodeStart,
  HasAngles,
  Angles,
  HasRefPoint,
  RefPoint,
  LinearVariation = False 
)

Parameters:
IDsOfElements is ids of elements
PathMesh mesh containing a 1D sub-mesh on the edge, along which proceeds the extrusion
PathShape is shape(edge); as the mesh can be complex, the edge is used to define the sub-mesh for the path
NodeStart the first or the last node on the edge. It is used to define the direction of extrusion
HasAngles allows the shape to be rotated around the path to get the resulting mesh in a helical fashion
Angles list of angles
HasRefPoint allows to use base point
RefPoint point around which the shape is rotated(the mass center of the shape by default). User can specify any point as the Base Point and the shape will be rotated with respect to this point.
LinearVariation makes compute rotation angles as linear variation of given Angles along path steps

def smeshDC.Mesh.Mirror (   self,
  IDsOfElements,
  Mirror,
  theMirrorType,
  Copy = 0 
)

Parameters:
IDsOfElements list of elements ids
Mirror is AxisStruct or geom object(point, line, plane)
theMirrorType is POINT, AXIS or PLANE If the Mirror is geom object this parameter is unnecessary
Copy allows to copy element(Copy is 1) or to replace with its mirroring(Copy is 0)

def smeshDC.Mesh.MirrorObject (   self,
  theObject,
  Mirror,
  theMirrorType,
  Copy = 0 
)

Parameters:
theObject mesh, submesh or group
Mirror is AxisStruct or geom object(point, line, plane)
theMirrorType is POINT, AXIS or PLANE If the Mirror is geom object this parameter is unnecessary
Copy allows to copy element(Copy is 1) or to replace with its mirroring(Copy is 0)

def smeshDC.Mesh.Translate (   self,
  IDsOfElements,
  Vector,
  Copy 
)

Parameters:
IDsOfElements list of elements ids
Vector direction of translation(DirStruct or vector)
Copy allows to copy the translated elements

def smeshDC.Mesh.TranslateObject (   self,
  theObject,
  Vector,
  Copy 
)

Parameters:
theObject object to translate(mesh, submesh, or group)
Vector direction of translation(DirStruct or geom vector)
Copy allows to copy the translated elements

def smeshDC.Mesh.Rotate (   self,
  IDsOfElements,
  Axis,
  AngleInRadians,
  Copy 
)

Parameters:
IDsOfElements list of elements ids
Axis axis of rotation(AxisStruct or geom line)
AngleInRadians angle of rotation(in radians)
Copy allows to copy the rotated elements

def smeshDC.Mesh.RotateObject (   self,
  theObject,
  Axis,
  AngleInRadians,
  Copy 
)

Parameters:
theObject object to rotate(mesh, submesh, or group)
Axis axis of rotation(AxisStruct or geom line)
AngleInRadians angle of rotation(in radians)
Copy allows to copy the rotated elements

def smeshDC.Mesh.FindCoincidentNodes (   self,
  Tolerance 
)

Parameters:
Tolerance tolerance value
list of group of nodes

def smeshDC.Mesh.FindCoincidentNodesOnPart (   self,
  SubMeshOrGroup,
  Tolerance 
)

Parameters:
Tolerance tolerance value
SubMeshOrGroup SubMesh or Group
list of group of nodes

def smeshDC.Mesh.MergeNodes (   self,
  GroupsOfNodes 
)

Parameters:
list of group of nodes

def smeshDC.Mesh.FindEqualElements (   self,
  MeshOrSubMeshOrGroup 
)

Parameters:
MeshOrSubMeshOrGroup Mesh or SubMesh, or Group of elements for searching
Returns:
a list of groups of equal elements

def smeshDC.Mesh.MergeElements (   self,
  GroupsOfElementsID 
)

Parameters:
GroupsOfElementsID groups of elements for merging

def smeshDC.Mesh.MergeEqualElements (   self  ) 

def smeshDC.Mesh.SewFreeBorders (   self,
  FirstNodeID1,
  SecondNodeID1,
  LastNodeID1,
  FirstNodeID2,
  SecondNodeID2,
  LastNodeID2,
  CreatePolygons,
  CreatePolyedrs 
)

def smeshDC.Mesh.SewConformFreeBorders (   self,
  FirstNodeID1,
  SecondNodeID1,
  LastNodeID1,
  FirstNodeID2,
  SecondNodeID2 
)

def smeshDC.Mesh.SewBorderToSide (   self,
  FirstNodeIDOnFreeBorder,
  SecondNodeIDOnFreeBorder,
  LastNodeIDOnFreeBorder,
  FirstNodeIDOnSide,
  LastNodeIDOnSide,
  CreatePolygons,
  CreatePolyedrs 
)

def smeshDC.Mesh.SewSideElements (   self,
  IDsOfSide1Elements,
  IDsOfSide2Elements,
  NodeID1OfSide1ToMerge,
  NodeID1OfSide2ToMerge,
  NodeID2OfSide1ToMerge,
  NodeID2OfSide2ToMerge 
)

Nodes belonging to Side1 are merged with nodes of elements of Side2. Number of elements in theSide1 and in theSide2 must be equal and they should have similar node connectivity. The nodes to merge should belong to sides borders and the first node should be linked to the second.

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

Parameters:
ide the element id
newIDs nodes ids
Returns:
If number of nodes is not corresponded to type of element - returns false

def smeshDC.Mesh.GetLastCreatedNodes (   self  ) 

def smeshDC.Mesh.GetLastCreatedElems (   self  ) 


Field Documentation

int smeshDC.Mesh.geom = 0 [static]

int smeshDC.Mesh.mesh = 0 [static]

int smeshDC.Mesh.editor = 0 [static]

smeshDC.Mesh.smeshpyD

smeshDC.Mesh.geompyD

smeshDC.Mesh.geom

smeshDC.Mesh.mesh

smeshDC.Mesh.editor