Back to index

salome-smesh  6.5.0
Classes
3D extrusion meshing algorithm
Defining Algorithms
Collaboration diagram for 3D extrusion meshing algorithm:

Classes

class  StdMeshersDC.StdMeshersDC_Prism3D
 Defines a Prism 3D algorithm, which is either "Extrusion 3D" or "Radial Prism" depending on geometry It is created by calling Mesh.Prism(geom=0) More...

Class Documentation

class StdMeshersDC::StdMeshersDC_Prism3D

Defines a Prism 3D algorithm, which is either "Extrusion 3D" or "Radial Prism" depending on geometry It is created by calling Mesh.Prism(geom=0)

Definition at line 719 of file StdMeshersDC.py.

Inheritance diagram for StdMeshersDC.StdMeshersDC_Prism3D:
Collaboration diagram for StdMeshersDC.StdMeshersDC_Prism3D:

Public Member Functions

def __init__
 Private constructor.
def Get3DHypothesis
 Return 3D hypothesis holding the 1D one.
def OwnHypothesis
 Private method creating a 1D hypothesis and storing it in the LayerDistribution hypothesis.
def NumberOfLayers
 Defines "NumberOfLayers" hypothesis, specifying the number of layers of prisms to build between the inner and outer shells.
def LocalLength
 Defines "LocalLength" hypothesis, specifying the segment length to build between the inner and the outer shells.
def NumberOfSegments
 Defines "NumberOfSegments" hypothesis, specifying the number of layers of prisms to build between the inner and the outer shells.
def Arithmetic1D
 Defines "Arithmetic1D" hypothesis, specifying the distribution of segments to build between the inner and the outer shells with a length that changes in arithmetic progression.
def StartEndLength
 Defines "StartEndLength" hypothesis, specifying distribution of segments to build between the inner and the outer shells as geometric length increasing.
def AutomaticLength
 Defines "AutomaticLength" hypothesis, specifying the number of segments to build between the inner and outer shells.

Public Attributes

 algoType
 distribHyp
 nbLayers

Static Public Attributes

string meshMethod = "Prism"
 Name of method of class Mesh creating an instance of this class.
string algoType = "Prism_3D"
 Name of algorithm type.

Constructor & Destructor Documentation

def StdMeshersDC.StdMeshersDC_Prism3D.__init__ (   self,
  mesh,
  geom = 0 
)

Private constructor.

Definition at line 727 of file StdMeshersDC.py.

00727 
00728     def __init__(self, mesh, geom=0):
00729         Mesh_Algorithm.__init__(self)
00730         
00731         shape = geom
00732         if not shape:
00733             shape = mesh.geom
00734         from geompy import SubShapeAll, ShapeType
00735         nbSolids = len( SubShapeAll( shape, ShapeType["SOLID"] ))
00736         nbShells = len( SubShapeAll( shape, ShapeType["SHELL"] ))
00737         if nbSolids == 0 or nbSolids == nbShells:
00738             self.Create(mesh, geom, "Prism_3D")
00739         else:
00740             self.algoType = "RadialPrism_3D"
00741             self.Create(mesh, geom, "RadialPrism_3D")
00742             self.distribHyp = self.Hypothesis("LayerDistribution", UseExisting=0)
00743             self.nbLayers = None

Here is the call graph for this function:


Member Function Documentation

def StdMeshersDC.StdMeshersDC_Prism3D.Arithmetic1D (   self,
  start,
  end 
)

Defines "Arithmetic1D" hypothesis, specifying the distribution of segments to build between the inner and the outer shells with a length that changes in arithmetic progression.

Parameters:
startthe length of the first segment
endthe length of the last segment

Definition at line 817 of file StdMeshersDC.py.

00817 
00818     def Arithmetic1D(self, start, end ):
00819         if self.algoType != "RadialPrism_3D":
00820             print "Prism_3D algorith doesn't support any hyposesis"
00821             return None
00822         hyp = self.OwnHypothesis("Arithmetic1D", [start, end])
00823         hyp.SetLength(start, 1)
00824         hyp.SetLength(end  , 0)
00825         return hyp

Here is the call graph for this function:

def StdMeshersDC.StdMeshersDC_Prism3D.AutomaticLength (   self,
  fineness = 0 
)

Defines "AutomaticLength" hypothesis, specifying the number of segments to build between the inner and outer shells.

Parameters:
finenessdefines the quality of the mesh within the range [0-1]

Definition at line 842 of file StdMeshersDC.py.

00842 
00843     def AutomaticLength(self, fineness=0):
00844         if self.algoType != "RadialPrism_3D":
00845             print "Prism_3D algorith doesn't support any hyposesis"
00846             return None
00847         hyp = self.OwnHypothesis("AutomaticLength")
00848         hyp.SetFineness( fineness )
00849         return hyp
00850 
00851 
00852 # Public class: Mesh_RadialQuadrangle1D2D
00853 # -------------------------------

Here is the call graph for this function:

Return 3D hypothesis holding the 1D one.

Definition at line 745 of file StdMeshersDC.py.

00745 
00746     def Get3DHypothesis(self):
00747         if self.algoType != "RadialPrism_3D":
00748             print "Prism_3D algorith doesn't support any hyposesis"
00749             return None
00750         return self.distribHyp

def StdMeshersDC.StdMeshersDC_Prism3D.LocalLength (   self,
  l,
  p = 1e-07 
)

Defines "LocalLength" hypothesis, specifying the segment length to build between the inner and the outer shells.

Parameters:
lthe length of segments
pthe precision of rounding

Definition at line 787 of file StdMeshersDC.py.

00787 
00788     def LocalLength(self, l, p=1e-07):
00789         if self.algoType != "RadialPrism_3D":
00790             print "Prism_3D algorith doesn't support any hyposesis"
00791             return None
00792         hyp = self.OwnHypothesis("LocalLength", [l,p])
00793         hyp.SetLength(l)
00794         hyp.SetPrecision(p)
00795         return hyp

Here is the call graph for this function:

def StdMeshersDC.StdMeshersDC_Prism3D.NumberOfLayers (   self,
  n,
  UseExisting = 0 
)

Defines "NumberOfLayers" hypothesis, specifying the number of layers of prisms to build between the inner and outer shells.

Parameters:
nnumber of layers
UseExistingif ==true - searches for the existing hypothesis created with the same parameters, else (default) - creates a new one

Definition at line 772 of file StdMeshersDC.py.

00772 
00773     def NumberOfLayers(self, n, UseExisting=0):
00774         if self.algoType != "RadialPrism_3D":
00775             print "Prism_3D algorith doesn't support any hyposesis"
00776             return None
00777         self.mesh.RemoveHypothesis( self.distribHyp, self.geom )
00778         compFun = lambda hyp, args: IsEqual(hyp.GetNumberOfLayers(), args[0])
00779         self.nbLayers = self.Hypothesis("NumberOfLayers", [n], UseExisting=UseExisting,
00780                                         CompareMethod=compFun)
00781         self.nbLayers.SetNumberOfLayers( n )
00782         return self.nbLayers

Here is the call graph for this function:

def StdMeshersDC.StdMeshersDC_Prism3D.NumberOfSegments (   self,
  n,
  s = [] 
)

Defines "NumberOfSegments" hypothesis, specifying the number of layers of prisms to build between the inner and the outer shells.

Parameters:
nthe number of layers
sthe scale factor (optional)

Definition at line 800 of file StdMeshersDC.py.

00800 
00801     def NumberOfSegments(self, n, s=[]):
00802         if self.algoType != "RadialPrism_3D":
00803             print "Prism_3D algorith doesn't support any hyposesis"
00804             return None
00805         if s == []:
00806             hyp = self.OwnHypothesis("NumberOfSegments", [n])
00807         else:
00808             hyp = self.OwnHypothesis("NumberOfSegments", [n,s])
00809             hyp.SetDistrType( 1 )
00810             hyp.SetScaleFactor(s)
00811         hyp.SetNumberOfSegments(n)
00812         return hyp

Here is the call graph for this function:

def StdMeshersDC.StdMeshersDC_Prism3D.OwnHypothesis (   self,
  hypType,
  args = [],
  so = "libStdMeshersEngine.so" 
)

Private method creating a 1D hypothesis and storing it in the LayerDistribution hypothesis.

Returns the created hypothesis

Definition at line 753 of file StdMeshersDC.py.

00753 
00754     def OwnHypothesis(self, hypType, args=[], so="libStdMeshersEngine.so"):
00755         if self.algoType != "RadialPrism_3D":
00756             print "Prism_3D algorith doesn't support any hyposesis"
00757             return None
00758         if not self.nbLayers is None:
00759             self.mesh.GetMesh().RemoveHypothesis( self.geom, self.nbLayers )
00760             self.mesh.GetMesh().AddHypothesis( self.geom, self.distribHyp )
00761         study = self.mesh.smeshpyD.GetCurrentStudy() # prevents publishing own 1D hypothesis
00762         self.mesh.smeshpyD.SetCurrentStudy( None )
00763         hyp = self.mesh.smeshpyD.CreateHypothesis(hypType, so)
00764         self.mesh.smeshpyD.SetCurrentStudy( study ) # enables publishing
00765         self.distribHyp.SetLayerDistribution( hyp )
00766         return hyp

Here is the caller graph for this function:

def StdMeshersDC.StdMeshersDC_Prism3D.StartEndLength (   self,
  start,
  end 
)

Defines "StartEndLength" hypothesis, specifying distribution of segments to build between the inner and the outer shells as geometric length increasing.

Parameters:
startfor the length of the first segment
endfor the length of the last segment

Definition at line 830 of file StdMeshersDC.py.

00830 
00831     def StartEndLength(self, start, end):
00832         if self.algoType != "RadialPrism_3D":
00833             print "Prism_3D algorith doesn't support any hyposesis"
00834             return None
00835         hyp = self.OwnHypothesis("StartEndLength", [start, end])
00836         hyp.SetLength(start, 1)
00837         hyp.SetLength(end  , 0)
00838         return hyp

Here is the call graph for this function:


Member Data Documentation

string StdMeshersDC.StdMeshersDC_Prism3D.algoType = "Prism_3D" [static]

Name of algorithm type.

Definition at line 724 of file StdMeshersDC.py.

Name of method of class Mesh creating an instance of this class.

Definition at line 722 of file StdMeshersDC.py.