Version: 8.3.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Mesh Class Reference

This class allows defining and managing a mesh. More...

Public Member Functions

def __init__
 Constructor. More...
 
def __del__
 Destructor. More...
 
def SetMesh
 Initialize the Mesh object from an instance of SMESH_Mesh interface. More...
 
def GetMesh
 Return the mesh, that is an instance of SMESH_Mesh interface. More...
 
def GetName
 Get the name of the mesh. More...
 
def SetName
 Set a name to the mesh. More...
 
def GetSubMesh
 Get a sub-mesh object associated to a geom geometrical object. More...
 
def GetShape
 Return the shape associated to the mesh. More...
 
def SetShape
 Associate the given shape to the mesh (entails the recreation of the mesh) More...
 
def Load
 Load mesh from the study after opening the study. More...
 
def IsReadyToCompute
 Return true if the hypotheses are defined well. More...
 
def GetAlgoState
 Return errors of hypotheses definition. More...
 
def GetGeometryByMeshElement
 Return a geometrical object on which the given element was built. More...
 
def MeshDimension
 Return the mesh dimension depending on the dimension of the underlying shape or, if the mesh is not based on any shape, basing on deimension of elements. More...
 
def Evaluate
 Evaluate size of prospective mesh on a shape. More...
 
def Compute
 Compute the mesh and return the status of the computation. More...
 
def GetComputeErrors
 Return a list of error messages (SMESH.ComputeError) of the last Compute() More...
 
def GetSubShapeName
 Return a name of a sub-shape by its ID. More...
 
def GetFailedShapes
 Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by error of an algorithm. More...
 
def GetMeshOrder
 Return sub-mesh objects list in meshing order. More...
 
def SetMeshOrder
 Set order in which concurrent sub-meshes should be meshed. More...
 
def Clear
 Remove all nodes and elements generated on geometry. More...
 
def ClearSubMesh
 Remove all nodes and elements of indicated shape. More...
 
def AutomaticTetrahedralization
 Compute a tetrahedral mesh using AutomaticLength + MEFISTO + Tetrahedron. More...
 
def AutomaticHexahedralization
 Compute an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron. More...
 
def AddHypothesis
 Assign a hypothesis. More...
 
def IsUsedHypothesis
 Return True if an algorithm of hypothesis is assigned to a given shape. More...
 
def RemoveHypothesis
 Unassign a hypothesis. More...
 
def GetHypothesisList
 Get the list of hypotheses added on a geometry. More...
 
def RemoveGlobalHypotheses
 Remove all global hypotheses. More...
 
def ExportMED
 Export the mesh in a file in MED format allowing to overwrite the file if it exists or add the exported data to its contents. More...
 
def ExportSAUV
 Export the mesh in a file in SAUV format. More...
 
def ExportDAT
 Export the mesh in a file in DAT format. More...
 
def ExportUNV
 Export the mesh in a file in UNV format. More...
 
def ExportSTL
 Export the mesh in a file in STL format. More...
 
def ExportCGNS
 Export the mesh in a file in CGNS format. More...
 
def ExportGMF
 Export the mesh in a file in GMF format. More...
 
def ExportToMED
 Deprecated, used only for compatibility! Please, use ExportMED() method instead. More...
 
def CreateEmptyGroup
 Create an empty mesh group. More...
 
def Group
 Create a mesh group based on the geometric object grp and gives a name,
if this parameter is not defined the name is the same as the geometric group name
Note: Works like GroupOnGeom(). More...
 
def GroupOnGeom
 Create a mesh group based on the geometrical object grp and gives a name,
if this parameter is not defined the name is the same as the geometrical group name. More...
 
def GroupOnFilter
 Create a mesh group with given name based on the filter which is a special type of group dynamically updating it's contents during mesh modification. More...
 
def MakeGroupByIds
 Create a mesh group by the given ids of elements. More...
 
def MakeGroup
 Create a mesh group by the given conditions. More...
 
def MakeGroupByCriterion
 Create a mesh group by the given criterion. More...
 
def MakeGroupByCriteria
 Create a mesh group by the given criteria (list of criteria) More...
 
def MakeGroupByFilter
 Create a mesh group by the given filter. More...
 
def RemoveGroup
 Remove a group. More...
 
def RemoveGroupWithContents
 Remove a group with its contents. More...
 
def GetGroups
 Get the list of groups existing in the mesh in the order of creation (starting from the oldest one) More...
 
def NbGroups
 Get the number of groups existing in the mesh. More...
 
def GetGroupNames
 Get the list of names of groups existing in the mesh. More...
 
def GetGroupByName
 Find groups by name and type. More...
 
def UnionGroups
 Produce a union of two groups. More...
 
def UnionListOfGroups
 Produce a union list of groups. More...
 
def IntersectGroups
 Prodice an intersection of two groups. More...
 
def IntersectListOfGroups
 Produce an intersection of groups. More...
 
def CutGroups
 Produce a cut of two groups. More...
 
def CutListOfGroups
 Produce a cut of groups. More...
 
def CreateDimGroup
 Create a standalone group of entities basing on nodes of other groups. More...
 
def ConvertToStandalone
 Convert group on geom into standalone group. More...
 
def GetLog
 Return the log of nodes and elements added or removed since the previous clear of the log. More...
 
def ClearLog
 Clear the log of nodes and elements added or removed since the previous clear. More...
 
def SetAutoColor
 Toggle auto color mode on the object. More...
 
def GetAutoColor
 Get flag of object auto color mode. More...
 
def GetId
 Get the internal ID. More...
 
def GetStudyId
 Get the study Id. More...
 
def HasDuplicatedGroupNamesMED
 Check the group names for duplications. More...
 
def GetMeshEditor
 Obtain the mesh editor tool. More...
 
def GetIDSource
 Wrap a list of IDs of elements or nodes into SMESH_IDSource which can be passed as argument to a method accepting mesh, group or sub-mesh. More...
 
def GetMeshInfo
 Get the mesh stattistic. More...
 
def NbNodes
 Return the number of nodes in the mesh. More...
 
def NbElements
 Return the number of elements in the mesh. More...
 
def Nb0DElements
 Return the number of 0d elements in the mesh. More...
 
def NbBalls
 Return the number of ball discrete elements in the mesh. More...
 
def NbEdges
 Return the number of edges in the mesh. More...
 
def NbEdgesOfOrder
 Return the number of edges with the given order in the mesh. More...
 
def NbFaces
 Return the number of faces in the mesh. More...
 
def NbFacesOfOrder
 Return the number of faces with the given order in the mesh. More...
 
def NbTriangles
 Return the number of triangles in the mesh. More...
 
def NbTrianglesOfOrder
 Return the number of triangles with the given order in the mesh. More...
 
def NbBiQuadTriangles
 Return the number of biquadratic triangles in the mesh. More...
 
def NbQuadrangles
 Return the number of quadrangles in the mesh. More...
 
def NbQuadranglesOfOrder
 Return the number of quadrangles with the given order in the mesh. More...
 
def NbBiQuadQuadrangles
 Return the number of biquadratic quadrangles in the mesh. More...
 
def NbPolygons
 Return the number of polygons of given order in the mesh. More...
 
def NbVolumes
 Return the number of volumes in the mesh. More...
 
def NbVolumesOfOrder
 Return the number of volumes with the given order in the mesh. More...
 
def NbTetras
 Return the number of tetrahedrons in the mesh. More...
 
def NbTetrasOfOrder
 Return the number of tetrahedrons with the given order in the mesh. More...
 
def NbHexas
 Return the number of hexahedrons in the mesh. More...
 
def NbHexasOfOrder
 Return the number of hexahedrons with the given order in the mesh. More...
 
def NbTriQuadraticHexas
 Return the number of triquadratic hexahedrons in the mesh. More...
 
def NbPyramids
 Return the number of pyramids in the mesh. More...
 
def NbPyramidsOfOrder
 Return the number of pyramids with the given order in the mesh. More...
 
def NbPrisms
 Return the number of prisms in the mesh. More...
 
def NbPrismsOfOrder
 Return the number of prisms with the given order in the mesh. More...
 
def NbHexagonalPrisms
 Return the number of hexagonal prisms in the mesh. More...
 
def NbPolyhedrons
 Return the number of polyhedrons in the mesh. More...
 
def NbSubMesh
 Return the number of submeshes in the mesh. More...
 
def GetElementsId
 Return the list of mesh elements IDs. More...
 
def GetElementsByType
 Return the list of IDs of mesh elements with the given type. More...
 
def GetNodesId
 Return the list of mesh nodes IDs. More...
 
def GetElementType
 Return the type of mesh element. More...
 
def GetElementGeomType
 Return the geometric type of mesh element. More...
 
def GetElementShape
 Return the shape type of mesh element. More...
 
def GetSubMeshElementsId
 Return the list of submesh elements IDs. More...
 
def GetSubMeshNodesId
 Return the list of submesh nodes IDs. More...
 
def GetSubMeshElementType
 Return type of elements on given shape. More...
 
def Dump
 Get the mesh description. More...
 
def GetNodeXYZ
 Get XYZ coordinates of a node
If there is no nodes for the given ID - return an empty list. More...
 
def GetNodeInverseElements
 Return list of IDs of inverse elements for the given node
If there is no node for the given ID - return an empty list. More...
 
def GetNodePosition
 Return the position of a node on the shape. More...
 
def GetElementPosition
 Return the position of an element on the shape. More...
 
def GetShapeID
 Return the ID of the shape, on which the given node was generated. More...
 
def GetShapeIDForElem
 Return the ID of the shape, on which the given element was generated. More...
 
def GetElemNbNodes
 Return the number of nodes of the given element. More...
 
def GetElemNode
 Return the node ID the given (zero based) index for the given element
If there is no element for the given ID - return -1
If there is no node for the given index - return -2. More...
 
def GetElemNodes
 Return the IDs of nodes of the given element. More...
 
def IsMediumNode
 Return true if the given node is the medium node in the given quadratic element. More...
 
def IsMediumNodeOfAnyElem
 Return true if the given node is the medium node in one of quadratic elements. More...
 
def ElemNbEdges
 Return the number of edges for the given element. More...
 
def ElemNbFaces
 Return the number of faces for the given element. More...
 
def GetElemFaceNodes
 Return nodes of given face (counted from zero) for given volumic element. More...
 
def GetFaceNormal
 Return three components of normal of given mesh face (or an empty array in KO case) More...
 
def FindElementByNodes
 Return an element based on all given nodes. More...
 
def IsPoly
 Return true if the given element is a polygon. More...
 
def IsQuadratic
 Return true if the given element is quadratic. More...
 
def GetBallDiameter
 Return diameter of a ball discrete element or zero in case of an invalid id. More...
 
def BaryCenter
 Return XYZ coordinates of the barycenter of the given element
If there is no element for the given ID - return an empty list. More...
 
def GetIdsFromFilter
 Pass mesh elements through the given filter and return IDs of fitting elements. More...
 
def GetFreeBorders
 Verify whether a 2D mesh element has free edges (edges connected to one face only)
Return a list of special structures (borders). More...
 
def MinDistance
 Get minimum distance between two nodes, elements or distance to the origin. More...
 
def GetMinDistance
 Get measure structure specifying minimum distance data between two objects. More...
 
def BoundingBox
 Get bounding box of the specified object(s) More...
 
def GetBoundingBox
 Get measure structure specifying bounding box data of the specified object(s) More...
 
def RemoveElements
 Remove the elements from the mesh by ids. More...
 
def RemoveNodes
 Remove nodes from mesh by ids. More...
 
def RemoveOrphanNodes
 Remove all orphan (free) nodes from mesh. More...
 
def AddNode
 Add a node to the mesh by coordinates. More...
 
def Add0DElement
 Create a 0D element on a node with given number. More...
 
def Add0DElementsToAllNodes
 Create 0D elements on all nodes of the given elements except those nodes on which a 0D element already exists. More...
 
def AddBall
 Create a ball element on a node with given ID. More...
 
def AddEdge
 Create a linear or quadratic edge (this is determined by the number of given nodes). More...
 
def AddFace
 Create a linear or quadratic face (this is determined by the number of given nodes). More...
 
def AddPolygonalFace
 Add a polygonal face to the mesh by the list of node IDs. More...
 
def AddQuadPolygonalFace
 Add a quadratic polygonal face to the mesh by the list of node IDs. More...
 
def AddVolume
 Create both simple and quadratic volume (this is determined by the number of given nodes). More...
 
def AddPolyhedralVolume
 Create a volume of many faces, giving nodes for each face. More...
 
def AddPolyhedralVolumeByFaces
 Create a volume of many faces, giving the IDs of the existing faces. More...
 
def SetNodeOnVertex
 Binds a node to a vertex. More...
 
def SetNodeOnEdge
 Stores the node position on an edge. More...
 
def SetNodeOnFace
 Stores node position on a face. More...
 
def SetNodeInVolume
 Binds a node to a solid. More...
 
def SetMeshElementOnShape
 Bind an element to a shape. More...
 
def MoveNode
 Move the node with the given id. More...
 
def MoveClosestNodeToPoint
 Find the node closest to a point and moves it to a point location. More...
 
def FindNodeClosestTo
 Find the node closest to a point. More...
 
def FindElementsByPoint
 Find the elements where a point lays IN or ON. More...
 
def GetPointState
 Return point state in a closed 2D mesh in terms of TopAbs_State enumeration: 0-IN, 1-OUT, 2-ON, 3-UNKNOWN UNKNOWN state means that either mesh is wrong or the analysis fails. More...
 
def MeshToPassThroughAPoint
 Find the node closest to a point and moves it to a point location. More...
 
def InverseDiag
 Replace two neighbour triangles sharing Node1-Node2 link with the triangles built on the same 4 nodes but having other common link. More...
 
def DeleteDiag
 Replace two neighbour triangles sharing Node1-Node2 link with a quadrangle built on the same 4 nodes. More...
 
def Reorient
 Reorient elements by ids. More...
 
def ReorientObject
 Reorient all elements of the object. More...
 
def Reorient2D
 Reorient faces contained in the2DObject. More...
 
def Reorient2DBy3D
 Reorient faces according to adjacent volumes. More...
 
def TriToQuad
 Fuse the neighbouring triangles into quadrangles. More...
 
def TriToQuadObject
 Fuse the neighbouring triangles of the object into quadrangles. More...
 
def QuadToTri
 Split quadrangles into triangles. More...
 
def QuadToTriObject
 Split quadrangles into triangles. More...
 
def QuadTo4Tri
 Split each of given quadrangles into 4 triangles. More...
 
def SplitQuad
 Split quadrangles into triangles. More...
 
def SplitQuadObject
 Split quadrangles into triangles. More...
 
def BestSplit
 Find a better splitting of the given quadrangle. More...
 
def SplitVolumesIntoTetra
 Split volumic elements into tetrahedrons. More...
 
def SplitBiQuadraticIntoLinear
 Split bi-quadratic elements into linear ones without creation of additional nodes: More...
 
def SplitHexahedraIntoPrisms
 Split hexahedra into prisms. More...
 
def SplitQuadsNearTriangularFacets
 Split quadrangle faces near triangular facets of volumes. More...
 
def SplitHexaToTetras
 Splits hexahedrons into tetrahedrons. More...
 
def SplitHexaToPrisms
 Split hexahedrons into prisms. More...
 
def Smooth
 Smooth elements. More...
 
def SmoothObject
 Smooth elements which belong to the given object. More...
 
def SmoothParametric
 Parametrically smooth the given elements. More...
 
def SmoothParametricObject
 Parametrically smooth the elements which belong to the given object. More...
 
def ConvertToQuadratic
 Convert the mesh to quadratic or bi-quadratic, deletes old elements, replacing them with quadratic with the same id. More...
 
def ConvertFromQuadratic
 Convert the mesh from quadratic to ordinary, deletes old quadratic elements,
replacing them with ordinary mesh elements with the same id. More...
 
def Make2DMeshFrom3D
 Create 2D mesh as skin on boundary faces of a 3D mesh. More...
 
def MakeBoundaryMesh
 Create missing boundary elements. More...
 
def MakeBoundaryElements
 Create missing boundary elements around either the whole mesh or groups of elements. More...
 
def RenumberNodes
 Renumber mesh nodes (Obsolete, does nothing) More...
 
def RenumberElements
 Renumber mesh elements (Obsole, does nothing) More...
 
def RotationSweepObjects
 Generate new elements by rotation of the given elements and nodes around the axis. More...
 
def RotationSweep
 Generate new elements by rotation of the elements around the axis. More...
 
def RotationSweepObject
 Generate new elements by rotation of the elements of object around the axis. More...
 
def RotationSweepObject1D
 Generate new elements by rotation of the elements of object around the axis. More...
 
def RotationSweepObject2D
 Generate new elements by rotation of the elements of object around the axis. More...
 
def ExtrusionSweepObjects
 Generate new elements by extrusion of the given elements and nodes. More...
 
def ExtrusionSweep
 Generate new elements by extrusion of the elements with given ids. More...
 
def ExtrusionByNormal
 Generate new elements by extrusion along the normal to a discretized surface or wire. More...
 
def ExtrusionSweepObject
 Generate new elements by extrusion of the elements or nodes which belong to the object. More...
 
def ExtrusionSweepObject1D
 Generate new elements by extrusion of edges which belong to the object. More...
 
def ExtrusionSweepObject2D
 Generate new elements by extrusion of faces which belong to the object. More...
 
def AdvancedExtrusion
 Generate new elements by extrusion of the elements with given ids. More...
 
def ExtrusionAlongPathObjects
 Generate new elements by extrusion of the given elements and nodes along the path. More...
 
def ExtrusionAlongPathX
 Generate new elements by extrusion of the given elements The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPath
 Generate new elements by extrusion of the given elements The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPathObject
 Generate new elements by extrusion of the elements which belong to the object The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPathObject1D
 Generate new elements by extrusion of mesh segments which belong to the object The path of extrusion must be a meshed edge. More...
 
def ExtrusionAlongPathObject2D
 Generate new elements by extrusion of faces which belong to the object The path of extrusion must be a meshed edge. More...
 
def Mirror
 Create a symmetrical copy of mesh elements. More...
 
def MirrorMakeMesh
 Create a new mesh by a symmetrical copy of mesh elements. More...
 
def MirrorObject
 Create a symmetrical copy of the object. More...
 
def MirrorObjectMakeMesh
 Create a new mesh by a symmetrical copy of the object. More...
 
def Translate
 Translate the elements. More...
 
def TranslateMakeMesh
 Create a new mesh of translated elements. More...
 
def TranslateObject
 Translate the object. More...
 
def TranslateObjectMakeMesh
 Create a new mesh from the translated object. More...
 
def Scale
 Scale the object. More...
 
def ScaleMakeMesh
 Create a new mesh from the translated object. More...
 
def Rotate
 Rotate the elements. More...
 
def RotateMakeMesh
 Create a new mesh of rotated elements. More...
 
def RotateObject
 Rotate the object. More...
 
def RotateObjectMakeMesh
 Create a new mesh from the rotated object. More...
 
def FindCoincidentNodes
 Find groups of adjacent nodes within Tolerance. More...
 
def FindCoincidentNodesOnPart
 Find groups of ajacent nodes within Tolerance. More...
 
def MergeNodes
 Merge nodes. More...
 
def FindEqualElements
 Find the elements built on the same nodes. More...
 
def MergeElements
 Merge elements in each given group. More...
 
def MergeEqualElements
 Leave one element and remove all other elements built on the same nodes. More...
 
def FindCoincidentFreeBorders
 Return groups of FreeBorder's coincident within the given tolerance. More...
 
def SewCoincidentFreeBorders
 Sew FreeBorder's of each group. More...
 
def SewFreeBorders
 Sew free borders. More...
 
def SewConformFreeBorders
 Sew conform free borders. More...
 
def SewBorderToSide
 Sew border to side. More...
 
def SewSideElements
 Sew two sides of a mesh. More...
 
def ChangeElemNodes
 Set new nodes for the given element. More...
 
def GetLastCreatedNodes
 If during the last operation of MeshEditor some nodes were created, this method return the list of their IDs,
if new nodes were not created - return empty list. More...
 
def GetLastCreatedElems
 If during the last operation of MeshEditor some elements were created this method return the list of their IDs,
if new elements were not created - return empty list. More...
 
def ClearLastCreated
 Forget what nodes and elements were created by the last mesh edition operation. More...
 
def DoubleElements
 Create duplicates of given elements, i.e. More...
 
def DoubleNodes
 Create a hole in a mesh by doubling the nodes of some particular elements. More...
 
def DoubleNode
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def DoubleNodeGroup
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def DoubleNodeGroups
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def DoubleNodeElem
 Create a hole in a mesh by doubling the nodes of some particular elements. More...
 
def DoubleNodeElemInRegion
 Create a hole in a mesh by doubling the nodes of some particular elements. More...
 
def DoubleNodeElemGroup
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def DoubleNodeElemGroupInRegion
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def DoubleNodeElemGroups
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def DoubleNodeElemGroupsInRegion
 Create a hole in a mesh by doubling the nodes of some particular elements This method provided for convenience works as DoubleNodes() described above. More...
 
def AffectedElemGroupsInRegion
 Identify the elements that will be affected by node duplication (actual duplication is not performed. More...
 
def DoubleNodesOnGroupBoundaries
 Double nodes on shared faces between groups of volumes and create flat elements on demand. More...
 
def CreateFlatElementsOnFacesGroups
 Double nodes on some external faces and create flat elements. More...
 
def CreateHoleSkin
 identify all the elements around a geom shape, get the faces delimiting the hole More...
 
def FunctorValue
 Return value of a functor for a given element. More...
 
def GetLength
 Get length of 1D element or sum of lengths of all 1D mesh elements. More...
 
def GetArea
 Get area of 2D element or sum of areas of all 2D mesh elements. More...
 
def GetVolume
 Get volume of 3D element or sum of volumes of all 3D mesh elements. More...
 
def GetMaxElementLength
 Get maximum element length. More...
 
def GetAspectRatio
 Get aspect ratio of 2D or 3D element. More...
 
def GetWarping
 Get warping angle of 2D element. More...
 
def GetMinimumAngle
 Get minimum angle of 2D element. More...
 
def GetTaper
 Get taper of 2D element. More...
 
def GetSkew
 Get skew of 2D element. More...
 
def GetMinMax
 Return minimal and maximal value of a given functor. More...
 
def Triangle
 Creates triangle 2D algorithm for faces. More...
 
def Polygon
 Creates polygon 2D algorithm for faces. More...
 
def Quadrangle
 Creates quadrangle 1D-2D algorithm for faces. More...
 
def Segment
 Creates segment 1D algorithm for edges. More...
 
def Hexahedron
 Creates hexahedron 3D algorithm for volumes. More...
 
def UseExisting1DElements
 Creates 1D algorithm for edges with reusing of existing mesh elements. More...
 
def Projection1D2D
 Creates projection 1D-2D algorithm for faces. More...
 
def Projection3D
 Creates projection 3D algorithm for volumes. More...
 
def UseExisting2DElements
 Creates 1D-2D algorithm for faces with reusing of existing mesh elements. More...
 
def Prism
 Creates prism 3D algorithm for volumes. More...
 
def Projection2D
 Creates projection 2D algorithm for faces. More...
 
def UseExistingSegments
 Creates 1D algorithm allowing batch meshing of edges. More...
 
def UseExistingFaces
 Creates 2D algorithm allowing batch meshing of faces. More...
 
def Projection1D
 Creates projection 1D algorithm for edges. More...
 
def BodyFitted
 Creates Body Fitting 3D algorithm for volumes. More...
 

Data Fields

 smeshpyD
 
 geompyD
 
 geom
 
 editor
 
 functors
 
 mesh
 

Static Public Attributes

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

Private Member Functions

def _groupTypeFromShape
 Pivate method to get a type of group on geometry. More...
 
def _getIdSourceList
 Private method converting arg into a list of SMESH_IdSource's. More...
 
def _getFunctor
 

Static Private Attributes

 __metaclass__ = MeshMeta
 

Detailed Description

This class allows defining and managing a mesh.

It has a set of methods to build a mesh on the given geometry, including the definition of sub-meshes. It also has methods to define groups of mesh elements, to modify a mesh (by addition of new nodes and elements and by changing the existing entities), to get information about a mesh and to export a mesh in different formats.

Note
Some methods are dynamically added to the Mesh class in runtime by meshing plug-in modules. If you fail to find help on some methods in the documentation of SMESH module, try to look into the documentation for the meshing plug-ins.

Constructor & Destructor Documentation

def __del__ (   self)

Destructor.

Clean-up resources

References Mesh.mesh.

Member Function Documentation

def Load (   self)

Load mesh from the study after opening the study.

def _groupTypeFromShape (   self,
  shape 
)
private

Pivate method to get a type of group on geometry.

References Mesh._groupTypeFromShape(), and Mesh.GetName().

def _getIdSourceList (   self,
  arg,
  idType,
  unRegister 
)
private

Private method converting arg into a list of SMESH_IdSource's.

References Mesh.GetIDSource(), Mesh.GetMesh(), and Mesh.RotationSweepObjects().

def Scale (   self,
  theObject,
  thePoint,
  theScaleFact,
  Copy,
  MakeGroups = False 
)

Scale the object.

Parameters
theObject- the object to translate (mesh, submesh, or group)
thePoint- base point for scale (SMESH.PointStruct or list of 3 coordinates)
theScaleFact- list of 1-3 scale factors for axises
Copy- allows copying the translated elements
MakeGroups- forces the generation of new groups from existing ones (if Copy)
Returns
list of created groups (SMESH_GroupBase) if MakeGroups=True, empty list otherwise

References Mesh.GetIDSource().

def ScaleMakeMesh (   self,
  theObject,
  thePoint,
  theScaleFact,
  MakeGroups = False,
  NewMeshName = "" 
)

Create a new mesh from the translated object.

Parameters
theObject- the object to translate (mesh, submesh, or group)
thePoint- base point for scale (SMESH.PointStruct or list of 3 coordinates)
theScaleFact- list of 1-3 scale factors for axises
MakeGroups- forces the generation of new groups from existing ones
NewMeshName- the name of the newly created mesh
Returns
instance of Mesh class

References smeshBuilder.geompyD, Mesh.geompyD, Mesh.GetIDSource(), and Mesh.smeshpyD.

def CreateHoleSkin (   self,
  radius,
  theShape,
  groupName,
  theNodesCoords 
)

identify all the elements around a geom shape, get the faces delimiting the hole

def _getFunctor (   self,
  funcType 
)
private

References Mesh.functors, and Mesh.mesh.

def Triangle (   algo_type,
  geom_shape = 0 
)

Creates triangle 2D algorithm for faces.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Triangle_MEFISTO
def Polygon (   algo_type,
  geom_shape = 0 
)

Creates polygon 2D algorithm for faces.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_PolygonPerFace
def Quadrangle (   algo_type,
  geom_shape = 0 
)

Creates quadrangle 1D-2D algorithm for faces.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_QuadMA_1D2D, StdMeshersBuilder.StdMeshersBuilder_Quadrangle, StdMeshersBuilder.StdMeshersBuilder_RadialQuadrangle1D2D
def Segment (   algo_type,
  geom_shape = 0 
)

Creates segment 1D algorithm for edges.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_CompositeSegment, StdMeshersBuilder.StdMeshersBuilder_Segment, StdMeshersBuilder.StdMeshersBuilder_Segment_Python
def Hexahedron (   algo_type,
  geom_shape = 0 
)

Creates hexahedron 3D algorithm for volumes.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Hexahedron
def UseExisting1DElements (   algo_type,
  geom_shape = 0 
)

Creates 1D algorithm for edges with reusing of existing mesh elements.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_UseExistingElements_1D
def Projection1D2D (   algo_type,
  geom_shape = 0 
)

Creates projection 1D-2D algorithm for faces.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Projection1D2D
def Projection3D (   algo_type,
  geom_shape = 0 
)

Creates projection 3D algorithm for volumes.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Projection3D
def UseExisting2DElements (   algo_type,
  geom_shape = 0 
)

Creates 1D-2D algorithm for faces with reusing of existing mesh elements.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_UseExistingElements_1D2D
def Prism (   algo_type,
  geom_shape = 0 
)

Creates prism 3D algorithm for volumes.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Prism3D, StdMeshersBuilder.StdMeshersBuilder_RadialPrism3D
def Projection2D (   algo_type,
  geom_shape = 0 
)

Creates projection 2D algorithm for faces.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Projection2D
def UseExistingSegments (   algo_type,
  geom_shape = 0 
)

Creates 1D algorithm allowing batch meshing of edges.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_UseExisting_1D
def UseExistingFaces (   algo_type,
  geom_shape = 0 
)

Creates 2D algorithm allowing batch meshing of faces.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_UseExisting_2D
def Projection1D (   algo_type,
  geom_shape = 0 
)

Creates projection 1D algorithm for edges.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Projection1D
def BodyFitted (   algo_type,
  geom_shape = 0 
)

Creates Body Fitting 3D algorithm for volumes.

This method is dynamically added to Mesh class by the meshing plug-in(s).

If the optional geom_shape parameter is not set, this algorithm is global (applied to whole mesh). Otherwise, this algorithm defines a submesh based on geom_shape subshape.

Parameters
algo_typetype of algorithm to be created; allowed values are specified by classes implemented by plug-in (see below)
geom_shapeif defined, the subshape to be meshed (GEOM_Object)
Returns
An instance of Mesh_Algorithm sub-class according to the specified algo_type, see StdMeshersBuilder.StdMeshersBuilder_Cartesian_3D

Field Documentation

__metaclass__ = MeshMeta
staticprivate
int geom = 0
static
int mesh = 0
static
int editor = 0
static
smeshpyD
geompyD
geom
editor
functors
mesh