Version: 6.3.1
Data Structures | Functions

Basic meshing algorithms

Defining Algorithms
Collaboration diagram for Basic meshing algorithms:

Data Structures

class  smeshDC.Mesh_Segment
 Class to define a segment 1D algorithm for discretization. More...
class  smeshDC.Mesh_CompositeSegment
 Defines a segment 1D algorithm for discretization. More...
class  smeshDC.Mesh_Segment_Python
 Defines a segment 1D algorithm for discretization with python function. More...
class  smeshDC.Mesh_Triangle
 Defines a triangle 2D algorithm. More...
class  smeshDC.Mesh_Quadrangle
 Defines a quadrangle 2D algorithm. More...
class  smeshDC.Mesh_Tetrahedron
 Defines a tetrahedron 3D algorithm. More...
class  smeshDC.Mesh_Hexahedron
 Defines a hexahedron 3D algorithm. More...
class  smeshDC.Mesh_Netgen
 Defines a NETGEN-based 2D or 3D algorithm that needs no discrete boundary (i.e. More...
class  smeshDC.Mesh_UseExistingElements
 Defines a Radial Quadrangle 1D2D algorithm. More...

Functions

def smeshDC::Mesh.Segment
 Creates a segment discretization 1D algorithm.
def smeshDC::Mesh.UseExisting1DElements
 Creates 1D algorithm importing segments conatined in groups of other mesh.
def smeshDC::Mesh.UseExisting2DElements
 Creates 2D algorithm importing faces conatined in groups of other mesh.
def smeshDC::Mesh.UseExistingSegments
 Enables creation of nodes and segments usable by 2D algoritms.
def smeshDC::Mesh.UseExistingFaces
 Enables creation of nodes and faces usable by 3D algoritms.
def smeshDC::Mesh.Triangle
 Creates a triangle 2D algorithm for faces.
def smeshDC::Mesh.Quadrangle
 Creates a quadrangle 2D algorithm for faces.
def smeshDC::Mesh.Tetrahedron
 Creates a tetrahedron 3D algorithm for solids.
def smeshDC::Mesh.Hexahedron
 Creates a hexahedron 3D algorithm for solids.
def smeshDC::Mesh.Netgen
 Deprecated, used only for compatibility!
def smeshDC::Mesh.AutomaticTetrahedralization
 Computes a tetrahedral mesh using AutomaticLength + MEFISTO + NETGEN.
def smeshDC::Mesh.AutomaticHexahedralization
 Computes an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron.

Function Documentation

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

Computes an hexahedral mesh using AutomaticLength + Quadrangle + Hexahedron.

Parameters:
fineness[0.0, 1.0] defines mesh fineness
Returns:
True or False

Definition at line 1597 of file smeshDC.py.

01598                                                     :
01599         dim = self.MeshDimension()
01600         # assign the hypotheses
01601         self.RemoveGlobalHypotheses()
01602         self.Segment().AutomaticLength(fineness)
01603         if dim > 1 :
01604             self.Quadrangle()
01605             pass
01606         if dim > 2 :
01607             self.Hexahedron()
01608             pass
01609         return self.Compute()

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

Computes a tetrahedral mesh using AutomaticLength + MEFISTO + NETGEN.

Parameters:
fineness[0.0,1.0] defines mesh fineness
Returns:
True or False

Definition at line 1580 of file smeshDC.py.

01581                                                      :
01582         dim = self.MeshDimension()
01583         # assign hypotheses
01584         self.RemoveGlobalHypotheses()
01585         self.Segment().AutomaticLength(fineness)
01586         if dim > 1 :
01587             self.Triangle().LengthFromEdges()
01588             pass
01589         if dim > 2 :
01590             self.Tetrahedron(NETGEN)
01591             pass
01592         return self.Compute()

def smeshDC.Mesh.Hexahedron (   self,
  algo = Hexa,
  geom = 0 
) [inherited]

Creates a hexahedron 3D algorithm for solids.

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

Parameters:
algopossible values are: smesh.Hexa, smesh.Hexotic
geomIf defined, the subshape to be meshed (GEOM_Object)
Returns:
an instance of Mesh_Hexahedron algorithm

Definition at line 1347 of file smeshDC.py.

01348                                            :
01349         ## if Hexahedron(geom, algo) or Hexahedron(geom) is called by mistake
01350         if ( isinstance(algo, geompyDC.GEOM._objref_GEOM_Object) ):
01351             if   geom in [Hexa, Hexotic]: algo, geom = geom, algo
01352             elif geom == 0:               algo, geom = Hexa, algo
01353         return Mesh_Hexahedron(self, algo, geom)

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

Deprecated, used only for compatibility!

Returns:
an instance of Mesh_Netgen algorithm

Definition at line 1357 of file smeshDC.py.

01358                                   :
01359         return Mesh_Netgen(self,  is3D, geom)

def smeshDC.Mesh.Quadrangle (   self,
  geom = 0,
  algo = QUADRANGLE 
) [inherited]

Creates a quadrangle 2D algorithm for faces.

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

Parameters:
geomIf defined, the subshape to be meshed (GEOM_Object)
algovalues are: smesh.QUADRANGLE || smesh.RADIAL_QUAD
Returns:
an instance of Mesh_Quadrangle algorithm

Definition at line 1318 of file smeshDC.py.

01319                                                  :
01320         if algo==RADIAL_QUAD:
01321             return Mesh_RadialQuadrangle1D2D(self,geom)
01322         else:
01323             return Mesh_Quadrangle(self, geom)

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

Creates a segment discretization 1D algorithm.

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

Parameters:
algothe type of the required algorithm. Possible values are:

  • smesh.REGULAR,
  • smesh.PYTHON for discretization via a python function,
  • smesh.COMPOSITE for meshing a set of edges on one face side as a whole.
geomIf defined is the subshape to be meshed
Returns:
an instance of Mesh_Segment or Mesh_Segment_Python, or Mesh_CompositeSegment class

Definition at line 1240 of file smeshDC.py.

01241                                            :
01242         ## if Segment(geom) is called by mistake
01243         if isinstance( algo, geompyDC.GEOM._objref_GEOM_Object):
01244             algo, geom = geom, algo
01245             if not algo: algo = REGULAR
01246             pass
01247         if algo == REGULAR:
01248             return Mesh_Segment(self,  geom)
01249         elif algo == PYTHON:
01250             return Mesh_Segment_Python(self, geom)
01251         elif algo == COMPOSITE:
01252             return Mesh_CompositeSegment(self, geom)
01253         else:
01254             return Mesh_Segment(self, geom)

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

Creates a tetrahedron 3D algorithm for solids.

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

Parameters:
algovalues are: smesh.NETGEN, smesh.GHS3D, smesh.GHS3DPRL, smesh.FULL_NETGEN
geomIf defined, the subshape to be meshed (GEOM_Object)
Returns:
an instance of Mesh_Tetrahedron algorithm

Definition at line 1332 of file smeshDC.py.

01333                                               :
01334         ## if Tetrahedron(geom) is called by mistake
01335         if ( isinstance( algo, geompyDC.GEOM._objref_GEOM_Object)):
01336             algo, geom = geom, algo
01337             if not algo: algo = NETGEN
01338             pass
01339         return Mesh_Tetrahedron(self,  algo, geom)

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

Creates a triangle 2D algorithm for faces.

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

Parameters:
algovalues are: smesh.MEFISTO || smesh.NETGEN_1D2D || smesh.NETGEN_2D || smesh.BLSURF
geomIf defined, the subshape to be meshed (GEOM_Object)
Returns:
an instance of Mesh_Triangle algorithm

Definition at line 1304 of file smeshDC.py.

01305                                             :
01306         ## if Triangle(geom) is called by mistake
01307         if (isinstance(algo, geompyDC.GEOM._objref_GEOM_Object)):
01308             geom = algo
01309             algo = MEFISTO
01310         return Mesh_Triangle(self, algo, geom)

def smeshDC.Mesh.UseExisting1DElements (   self,
  geom = 0 
) [inherited]

Creates 1D algorithm importing segments conatined in groups of other mesh.

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

Parameters:
geomIf defined the subshape is to be meshed
Returns:
an instance of Mesh_UseExistingElements class

Definition at line 1261 of file smeshDC.py.

01262                                            :
01263         return Mesh_UseExistingElements(1,self, geom)

def smeshDC.Mesh.UseExisting2DElements (   self,
  geom = 0 
) [inherited]

Creates 2D algorithm importing faces conatined in groups of other mesh.

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

Parameters:
geomIf defined the subshape is to be meshed
Returns:
an instance of Mesh_UseExistingElements class

Definition at line 1270 of file smeshDC.py.

01271                                            :
01272         return Mesh_UseExistingElements(2,self, geom)

def smeshDC.Mesh.UseExistingFaces (   self,
  geom = 0 
) [inherited]

Enables creation of nodes and faces usable by 3D algoritms.

The added nodes and faces must be bound to geom faces by SetNodeOnFace() and SetMeshElementOnShape() If the optional geom parameter is not set, this algorithm is global.
Otherwise, this algorithm defines a submesh based on geom subshape.

Parameters:
geomthe subshape to be manually meshed
Returns:
StdMeshers_UseExisting_2D algorithm that generates nothing

Definition at line 1293 of file smeshDC.py.

01294                                       :
01295         algo = Mesh_UseExisting(2,self,geom)
01296         return algo.GetAlgorithm()

def smeshDC.Mesh.UseExistingSegments (   self,
  geom = 0 
) [inherited]

Enables creation of nodes and segments usable by 2D algoritms.

The added nodes and segments must be bound to edges and vertices by SetNodeOnVertex(), SetNodeOnEdge() and SetMeshElementOnShape() If the optional geom parameter is not set, this algorithm is global.
Otherwise, this algorithm defines a submesh based on geom subshape.

Parameters:
geomthe subshape to be manually meshed
Returns:
StdMeshers_UseExisting_1D algorithm that generates nothing

Definition at line 1281 of file smeshDC.py.

01282                                          :
01283         algo = Mesh_UseExisting(1,self,geom)
01284         return algo.GetAlgorithm()

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