## Define "LocalLength" hypothesis to cut an edge in several segments with the same length
# @param l for the length of segments that cut an edge
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def LocalLength(self, l, UseExisting=0):
hyp = self.Hypothesis("LocalLength", [l], UseExisting=UseExisting)
hyp.SetLength(l)
## Define "NumberOfSegments" hypothesis to cut an edge in several fixed number of segments
# @param n for the number of segments that cut an edge
# @param s for the scale factor (optional)
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def NumberOfSegments(self, n, s=[], UseExisting=0):
if s == []:
hyp = self.Hypothesis("NumberOfSegments", [n], UseExisting=UseExisting)
## Define "Arithmetic1D" hypothesis to cut an edge in several segments with arithmetic length increasing
# @param start for the length of the first segment
# @param end for the length of the last segment
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def Arithmetic1D(self, start, end, UseExisting=0):
hyp = self.Hypothesis("Arithmetic1D", [start, end], UseExisting=UseExisting)
hyp.SetLength(start, 1)
## Define "StartEndLength" hypothesis to cut an edge in several segments with geometric length increasing
# @param start for the length of the first segment
# @param end for the length of the last segment
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def StartEndLength(self, start, end, UseExisting=0):
hyp = self.Hypothesis("StartEndLength", [start, end], UseExisting=UseExisting)
hyp.SetLength(start, 1)
## Define "Deflection1D" hypothesis
# @param d for the deflection
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def Deflection1D(self, d, UseExisting=0):
hyp = self.Hypothesis("Deflection1D", [d], UseExisting=UseExisting)
hyp.SetDeflection(d)
## Define "Propagation" hypothesis that propagate all other hypothesis on all others edges that are in
# the opposite side in the case of quadrangular faces
+ # @param UseExisting - if ==true (default) - search existing hypothesis
+ # created with same parameters, else - create new
def Propagation(self):
return self.Hypothesis("Propagation", UseExisting=1)
## Define "AutomaticLength" hypothesis
# @param fineness for the fineness [0-1]
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def AutomaticLength(self, fineness=0, UseExisting=0):
hyp = self.Hypothesis("AutomaticLength",[fineness],UseExisting=UseExisting)
hyp.SetFineness( fineness )
## Define "SegmentLengthAroundVertex" hypothesis
# @param length for the segment length
# @param vertex for the length localization: vertex index [0,1] | verext object
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def LengthNearVertex(self, length, vertex=0, UseExisting=0):
import types
store_geom = self.geom
## Define "PythonSplit1D" hypothesis based on the Erwan Adam patch, awaiting equivalent SALOME functionality
# @param n for the number of segments that cut an edge
# @param func for the python function that calculate the length of all segments
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def PythonSplit1D(self, n, func, UseExisting=0):
hyp = self.Hypothesis("PythonSplit1D", [n], "libPython1dEngine.so", UseExisting=UseExisting)
hyp.SetNumberOfSegments(n)
## Define "MaxElementArea" hypothesis to give the maximun area of each triangles
# @param area for the maximum area of each triangles
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def MaxElementArea(self, area, UseExisting=0):
if self.algoType == MEFISTO:
hyp = self.Hypothesis("MaxElementArea", [area], UseExisting=UseExisting)
## Define "MaxElementVolume" hypothesis to give the maximun volume of each tetrahedral
# @param vol for the maximum volume of each tetrahedral
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def MaxElementVolume(self, vol, UseExisting=0):
hyp = self.Hypothesis("MaxElementVolume", [vol], UseExisting=UseExisting)
hyp.SetMaxElementVolume(vol)
# @param srcV is vertex of \a edge to associate with \a tgtV (optional)
# @param tgtV is vertex of \a the edge where the algorithm is assigned,
# to associate with \a srcV (optional)
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def SourceEdge(self, edge, mesh=None, srcV=None, tgtV=None, UseExisting=0):
hyp = self.Hypothesis("ProjectionSource1D", [edge,mesh,srcV,tgtV], UseExisting=UseExisting)
hyp.SetSourceEdge( edge )
# @param srcV2 is vertex of \a face to associate with \a tgtV1 (optional)
# @param tgtV2 is vertex of \a the face where the algorithm is assigned,
# to associate with \a srcV2 (optional)
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
#
# Note: association vertices must belong to one edge of a face
def SourceFace(self, face, mesh=None, srcV1=None, tgtV1=None,
# @param srcV2 is vertex of \a solid to associate with \a tgtV1 (optional)
# @param tgtV2 is vertex of \a the solid where the algorithm is assigned,
# to associate with \a srcV2 (optional)
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
#
# Note: association vertices must belong to one edge of a solid
def SourceShape3D(self, solid, mesh=0, srcV1=0, tgtV1=0,
## Define "NumberOfLayers" hypothesis, specifying a number of layers of
# prisms to build between the inner and outer shells
+ # @param UseExisting - if ==true - search existing hypothesis created with
+ # same parameters, else (default) - create new
def NumberOfLayers(self, n, UseExisting=0):
self.mesh.GetMesh().RemoveHypothesis( self.geom, self.distribHyp )
self.nbLayers = self.Hypothesis("NumberOfLayers", [n], UseExisting=UseExisting)