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

Functions

def Mesh
 Create a mesh. More...
 
def __init__
 Constructor. 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 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 IsReadyToCompute
 Return true if the hypotheses are defined well. More...
 
def GetAlgoState
 Return errors of hypotheses definition. 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 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...
 

Detailed Description

Function Documentation

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

Create a mesh.

This can be either an empty mesh, possibly having an underlying geometry, or a mesh wrapping a CORBA mesh given as a parameter.

Parameters
objeither (1) a CORBA mesh (SMESH._objref_SMESH_Mesh) got e.g. by calling salome.myStudy.FindObjectID("0:1:2:3").GetObject() or (2) a Geometrical object for meshing or (3) none.
namethe name for the new mesh.
Returns
an instance of Mesh class.

References smeshBuilder.geompyD.

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

Constructor.

Create 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 smeshBuilder class
geompyDan instance of geomBuilder class
objShape to be meshed or SMESH_Mesh object
nameStudy name of the mesh
def SetMesh (   self,
  theMesh 
)

Initialize the Mesh object from an instance of SMESH_Mesh interface.

Parameters
theMesha SMESH_Mesh object
def GetMesh (   self)

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

Returns
a SMESH_Mesh object

References Mesh.mesh.

def GetName (   self)

Get the name of the mesh.

Returns
the name of the mesh as a string

References Mesh.GetMesh().

def SetName (   self,
  name 
)

Set a name to the mesh.

Parameters
namea new name of the mesh

References Mesh.GetMesh().

def GetShape (   self)

Return the shape associated to the mesh.

Returns
a GEOM_Object

References Mesh.geom.

def SetShape (   self,
  geom 
)

Associate 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 
)

Return 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 
)

Return 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 Evaluate (   self,
  geom = 0 
)

Evaluate size of prospective mesh on a shape.

Returns
a list where i-th element is a number of elements of i-th SMESH.EntityType To know predicted number of e.g. edges, inquire it this way Evaluate()[ EnumToLong( Entity_Edge )]

References Mesh.geom, and Mesh.mesh.

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

Compute the mesh and return 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()
refreshif True, Object browser is automatically updated (when running in GUI)
Returns
True or False

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

def GetComputeErrors (   self,
  shape = 0 
)

Return a list of error messages (SMESH.ComputeError) of the last Compute()

References Mesh.mesh.

def GetFailedShapes (   self,
  publish = False 
)

Return a list of sub-shapes meshing of which failed, grouped into GEOM groups by error of an algorithm.

Parameters
publishif True, the returned groups will be published in the study
Returns
a list of GEOM groups each named after a failed algorithm

References Mesh.geom, Mesh.GetShape(), and Mesh.mesh.

def GetMeshOrder (   self)

Return sub-mesh objects list in meshing order.

Returns
list of lists of sub-meshes
def SetMeshOrder (   self,
  submeshes 
)

Set order in which concurrent sub-meshes should be meshed.

Parameters
submesheslist of lists of sub-meshes
def Clear (   self,
  refresh = False 
)

Remove all nodes and elements generated on geometry.

Imported elements remain.

Parameters
refreshif True, Object browser is automatically updated (when running in GUI)

References Mesh.mesh.