Version: 6.5.0
Home
 All Data Structures Namespaces Files Functions Variables Groups
Functions
Constructing meshes
Creating meshes

Functions

def Mesh
 Creates an empty Mesh.
def __init__
 Constructor.
def SetMesh
 Initializes the Mesh object from an instance of SMESH_Mesh interface.
def GetMesh
 Returns the mesh, that is an instance of SMESH_Mesh interface.
def GetName
 Gets the name of the mesh.
def SetName
 Sets a name to the mesh.
def GetShape
 Returns the shape associated to the mesh.
def SetShape
 Associates the given shape to the mesh (entails the recreation of the mesh)
def IsReadyToCompute
 Returns true if the hypotheses are defined well.
def GetAlgoState
 Returns errors of hypotheses definition.
def GetGeometryByMeshElement
 Returns a geometrical object on which the given element was built.
def Compute
 Computes the mesh and returns the status of the computation.
def GetMeshOrder
 Return submesh objects list in meshing order.
def SetMeshOrder
 Return submesh objects list in meshing order.
def Clear
 Removes all nodes and elements.
def ClearSubMesh
 Removes all nodes and elements of indicated shape.

Detailed Description

Function Documentation

def smesh.Mesh (   self,
  obj = 0,
  name = 0 
)

Creates an empty Mesh.

This mesh can have an underlying geometry.

Parameters
objthe Geometrical object on which the mesh is built. If not defined, the mesh will have no underlying geometry.
namethe name for the new mesh.
Returns
an instance of Mesh class.
def __init__ (   self,
  smeshpyD,
  geompyD,
  obj = 0,
  name = 0 
)

Constructor.

Creates a mesh on the shape obj (or an empty mesh if obj is equal to 0) and sets the GUI name of this mesh to name.

Parameters
smeshpyDan instance of smeshDC class
geompyDan instance of geompyDC class
objShape to be meshed or SMESH_Mesh object
nameStudy name of the mesh
def SetMesh (   self,
  theMesh 
)

Initializes the Mesh object from an instance of SMESH_Mesh interface.

Parameters
theMesha SMESH_Mesh object

References Mesh.geom, and Mesh.mesh.

def GetMesh (   self)

Returns the mesh, that is an instance of SMESH_Mesh interface.

Returns
a SMESH_Mesh object

References Mesh.mesh.

def GetName (   self)

Gets the name of the mesh.

Returns
the name of the mesh as a string

References Mesh.GetMesh().

def SetName (   self,
  name 
)

Sets a name to the mesh.

Parameters
namea new name of the mesh

References Mesh.GetMesh().

def GetShape (   self)

Returns the shape associated to the mesh.

Returns
a GEOM_Object

References Mesh.geom.

def SetShape (   self,
  geom 
)

Associates the given shape to the mesh (entails the recreation of the mesh)

Parameters
geomthe shape to be meshed (GEOM_Object)

References Mesh.mesh.

def IsReadyToCompute (   self,
  theSubObject 
)

Returns true if the hypotheses are defined well.

Parameters
theSubObjecta sub-shape of a mesh shape
Returns
True or False

References Mesh.mesh.

def GetAlgoState (   self,
  theSubObject 
)

Returns errors of hypotheses definition.

The list of errors is empty if everything is OK.

Parameters
theSubObjecta sub-shape of a mesh shape
Returns
a list of errors

References Mesh.mesh.

def GetGeometryByMeshElement (   self,
  theElementID,
  theGeomName 
)

Returns a geometrical object on which the given element was built.

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

Parameters
theElementIDthe id of the mesh element
theGeomNamethe user-defined name of the geometrical object
Returns
GEOM::GEOM_Object instance

References Mesh.mesh.

def Compute (   self,
  geom = 0,
  discardModifs = False 
)

Computes the mesh and returns the status of the computation.

Parameters
geomgeomtrical shape on which mesh data should be computed
discardModifsif True and the mesh has been edited since a last total re-compute and that may prevent successful partial re-compute, then the mesh is cleaned before Compute()
Returns
True or False

References Mesh.geom, Mesh.GetName(), Mesh.mesh, and Mesh.NbNodes().

def GetMeshOrder (   self)

Return submesh objects list in meshing order.

Returns
list of list of submesh objects
def SetMeshOrder (   self,
  submeshes 
)

Return submesh objects list in meshing order.

Returns
list of list of submesh objects
def Clear (   self)

Removes all nodes and elements.

References Mesh.mesh.

def ClearSubMesh (   self,
  geomId 
)

Removes all nodes and elements of indicated shape.

References Mesh.mesh.

Copyright © 2007-2012 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