Back to index

salome-smesh  6.5.0
Modules | Functions
Defining hypotheses
Creating meshes
Collaboration diagram for Defining hypotheses:

Modules

 1D Meshing Hypotheses
 2D Meshing Hypotheses
 Max Element Volume hypothesis
 Quadrangle Parameters hypothesis
 Additional Hypotheses

Functions

def smeshDC.Mesh.AddHypothesis
 Assigns a hypothesis.
def smeshDC.Mesh.IsUsedHypothesis
 Return True if an algorithm of hypothesis is assigned to a given shape.
def smeshDC.Mesh.RemoveHypothesis
 Unassigns a hypothesis.
def smeshDC.Mesh.GetHypothesisList
 Gets the list of hypotheses added on a geometry.
def smeshDC.Mesh.RemoveGlobalHypotheses
 Removes all global hypotheses.

Function Documentation

def smeshDC.Mesh.AddHypothesis (   self,
  hyp,
  geom = 0 
)

Assigns a hypothesis.

Parameters:
hypa hypothesis to assign
geoma subhape of mesh geometry
Returns:
SMESH.Hypothesis_Status

Definition at line 1308 of file smeshDC.py.

01308 
01309     def AddHypothesis(self, hyp, geom=0):
01310         if isinstance( hyp, Mesh_Algorithm ):
01311             hyp = hyp.GetAlgorithm()
01312             pass
01313         if not geom:
01314             geom = self.geom
01315             if not geom:
01316                 geom = self.mesh.GetShapeToMesh()
01317             pass
01318         AssureGeomPublished( self, geom, "shape for %s" % hyp.GetName())
01319         status = self.mesh.AddHypothesis(geom, hyp)
01320         isAlgo = hyp._narrow( SMESH_Algo )
01321         hyp_name = GetName( hyp )
01322         geom_name = ""
01323         if geom:
01324             geom_name = GetName( geom )
01325         TreatHypoStatus( status, hyp_name, geom_name, isAlgo )
01326         return status

Here is the call graph for this function:

def smeshDC.Mesh.GetHypothesisList (   self,
  geom 
)

Gets the list of hypotheses added on a geometry.

Parameters:
geoma sub-shape of mesh geometry
Returns:
the sequence of SMESH_Hypothesis

Definition at line 1363 of file smeshDC.py.

01363 
01364     def GetHypothesisList(self, geom):
01365         return self.mesh.GetHypothesisList( geom )

Here is the caller graph for this function:

def smeshDC.Mesh.IsUsedHypothesis (   self,
  hyp,
  geom 
)

Return True if an algorithm of hypothesis is assigned to a given shape.

Parameters:
hypa hypothesis to check
geoma subhape of mesh geometry
Returns:
True of False

Definition at line 1332 of file smeshDC.py.

01332 
01333     def IsUsedHypothesis(self, hyp, geom):
01334         if not hyp or not geom:
01335             return False
01336         if isinstance( hyp, Mesh_Algorithm ):
01337             hyp = hyp.GetAlgorithm()
01338             pass
01339         hyps = self.GetHypothesisList(geom)
01340         for h in hyps:
01341             if h.GetId() == hyp.GetId():
01342                 return True
01343         return False

Here is the call graph for this function:

Removes all global hypotheses.

Definition at line 1368 of file smeshDC.py.

01368 
01369     def RemoveGlobalHypotheses(self):
01370         current_hyps = self.mesh.GetHypothesisList( self.geom )
01371         for hyp in current_hyps:
01372             self.mesh.RemoveHypothesis( self.geom, hyp )
01373             pass
01374         pass

Here is the caller graph for this function:

def smeshDC.Mesh.RemoveHypothesis (   self,
  hyp,
  geom = 0 
)

Unassigns a hypothesis.

Parameters:
hypa hypothesis to unassign
geoma sub-shape of mesh geometry
Returns:
SMESH.Hypothesis_Status

Definition at line 1349 of file smeshDC.py.

01349 
01350     def RemoveHypothesis(self, hyp, geom=0):
01351         if isinstance( hyp, Mesh_Algorithm ):
01352             hyp = hyp.GetAlgorithm()
01353             pass
01354         if not geom:
01355             geom = self.geom
01356             pass
01357         status = self.mesh.RemoveHypothesis(geom, hyp)
01358         return status