Version: 6.3.1
Functions

1D Meshing Hypotheses

Defining hypotheses
Collaboration diagram for 1D Meshing Hypotheses:

Functions

def smeshDC::Mesh_Segment.LocalLength
 Defines "LocalLength" hypothesis to cut an edge in several segments with the same length.
def smeshDC::Mesh_Segment.MaxSize
 Defines "MaxSize" hypothesis to cut an edge into segments not longer than given value.
def smeshDC::Mesh_Segment.NumberOfSegments
 Defines "NumberOfSegments" hypothesis to cut an edge in a fixed number of segments.
def smeshDC::Mesh_Segment.Arithmetic1D
 Defines "Arithmetic1D" hypothesis to cut an edge in several segments with increasing arithmetic length.
def smeshDC::Mesh_Segment.FixedPoints1D
 Defines "FixedPoints1D" hypothesis to cut an edge using parameter on curve from 0 to 1 (additionally it is neecessary to check orientation of edges and create list of reversed edges if it is needed) and sets numbers of segments between given points (default values are equals 1.
def smeshDC::Mesh_Segment.StartEndLength
 Defines "StartEndLength" hypothesis to cut an edge in several segments with increasing geometric length.
def smeshDC::Mesh_Segment.Deflection1D
 Defines "Deflection1D" hypothesis.
def smeshDC::Mesh_Segment.AutomaticLength
 Defines "AutomaticLength" hypothesis.
def smeshDC::Mesh_Segment_Python.PythonSplit1D
 Defines "PythonSplit1D" hypothesis.

Function Documentation

def smeshDC.Mesh_Segment.Arithmetic1D (   self,
  start,
  end,
  reversedEdges = [],
  UseExisting = 0 
) [inherited]

Defines "Arithmetic1D" hypothesis to cut an edge in several segments with increasing arithmetic length.

Parameters:
startdefines the length of the first segment
enddefines the length of the last segment
reversedEdgesis a list of edges to mesh using reversed orientation
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns:
an instance of StdMeshers_Arithmetic1D hypothesis

Definition at line 4616 of file smeshDC.py.

04617                                                                        :
04618         if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
04619             reversedEdges, UseExisting = [], reversedEdges
04620         if reversedEdges and isinstance(reversedEdges[0],geompyDC.GEOM._objref_GEOM_Object):
04621             reversedEdges = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, e) for e in reversedEdges ]
04622         entry = self.MainShapeEntry()
04623         hyp = self.Hypothesis("Arithmetic1D", [start, end, reversedEdges, entry],
04624                               UseExisting=UseExisting,
04625                               CompareMethod=self.CompareArithmetic1D)
04626         hyp.SetStartLength(start)
04627         hyp.SetEndLength(end)
04628         hyp.SetReversedEdges( reversedEdges )
04629         hyp.SetObjectEntry( entry )
04630         return hyp

def smeshDC.Mesh_Segment.AutomaticLength (   self,
  fineness = 0,
  UseExisting = 0 
) [inherited]

Defines "AutomaticLength" hypothesis.

Parameters:
finenessfor the fineness [0-1]
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one

Definition at line 4740 of file smeshDC.py.

04741                                                         :
04742         hyp = self.Hypothesis("AutomaticLength",[fineness],UseExisting=UseExisting,
04743                               CompareMethod=self.CompareAutomaticLength)
04744         hyp.SetFineness( fineness )
04745         return hyp

def smeshDC.Mesh_Segment.Deflection1D (   self,
  d,
  UseExisting = 0 
) [inherited]

Defines "Deflection1D" hypothesis.

Parameters:
dfor the deflection
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one

Definition at line 4719 of file smeshDC.py.

04720                                             :
04721         hyp = self.Hypothesis("Deflection1D", [d], UseExisting=UseExisting,
04722                               CompareMethod=self.CompareDeflection1D)
04723         hyp.SetDeflection(d)
04724         return hyp

def smeshDC.Mesh_Segment.FixedPoints1D (   self,
  points,
  nbSegs = [1],
  reversedEdges = [],
  UseExisting = 0 
) [inherited]

Defines "FixedPoints1D" hypothesis to cut an edge using parameter on curve from 0 to 1 (additionally it is neecessary to check orientation of edges and create list of reversed edges if it is needed) and sets numbers of segments between given points (default values are equals 1.

Parameters:
pointsdefines the list of parameters on curve
nbSegsdefines the list of numbers of segments
reversedEdgesis a list of edges to mesh using reversed orientation
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns:
an instance of StdMeshers_Arithmetic1D hypothesis

Definition at line 4654 of file smeshDC.py.

04655                                                                                 :
04656         if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
04657             reversedEdges, UseExisting = [], reversedEdges
04658         if reversedEdges and isinstance(reversedEdges[0],geompyDC.GEOM._objref_GEOM_Object):
04659             reversedEdges = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, e) for e in reversedEdges ]
04660         entry = self.MainShapeEntry()
04661         hyp = self.Hypothesis("FixedPoints1D", [points, nbSegs, reversedEdges, entry],
04662                               UseExisting=UseExisting,
04663                               CompareMethod=self.CompareFixedPoints1D)
04664         hyp.SetPoints(points)
04665         hyp.SetNbSegments(nbSegs)
04666         hyp.SetReversedEdges(reversedEdges)
04667         hyp.SetObjectEntry(entry)
04668         return hyp

def smeshDC.Mesh_Segment.LocalLength (   self,
  l,
  UseExisting = 0,
  p = 1e-07 
) [inherited]

Defines "LocalLength" hypothesis to cut an edge in several segments with the same length.

Parameters:
lfor the length of segments that cut an edge
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
pprecision, used for calculation of the number of segments. The precision should be a positive, meaningful value within the range [0,1]. In general, the number of segments is calculated with the formula: nb = ceil((edge_length / l) - p) Function ceil rounds its argument to the higher integer. So, p=0 means rounding of (edge_length / l) to the higher integer, p=0.5 means rounding of (edge_length / l) to the nearest integer, p=1 means rounding of (edge_length / l) to the lower integer. Default value is 1e-07.
Returns:
an instance of StdMeshers_LocalLength hypothesis

Definition at line 4523 of file smeshDC.py.

04524                                                     :
04525         hyp = self.Hypothesis("LocalLength", [l,p], UseExisting=UseExisting,
04526                               CompareMethod=self.CompareLocalLength)
04527         hyp.SetLength(l)
04528         hyp.SetPrecision(p)
04529         return hyp

def smeshDC.Mesh_Segment.MaxSize (   self,
  length = 0.0,
  UseExisting = 0 
) [inherited]

Defines "MaxSize" hypothesis to cut an edge into segments not longer than given value.

Parameters:
lengthis optional maximal allowed length of segment, if it is omitted the preestimated length is used that depends on geometry size
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one
Returns:
an instance of StdMeshers_MaxLength hypothesis

Definition at line 4544 of file smeshDC.py.

04545                                                 :
04546         hyp = self.Hypothesis("MaxLength", [length], UseExisting=UseExisting)
04547         if length > 0.0:
04548             # set given length
04549             hyp.SetLength(length)
04550         if not UseExisting:
04551             # set preestimated length
04552             gen = self.mesh.smeshpyD
04553             initHyp = gen.GetHypothesisParameterValues("MaxLength", "libStdMeshersEngine.so",
04554                                                        self.mesh.GetMesh(), self.mesh.GetShape(),
04555                                                        False) # <- byMesh
04556             preHyp = initHyp._narrow(StdMeshers.StdMeshers_MaxLength)
04557             if preHyp:
04558                 hyp.SetPreestimatedLength( preHyp.GetPreestimatedLength() )
04559                 pass
04560             pass
04561         hyp.SetUsePreestimatedLength( length == 0.0 )
04562         return hyp

def smeshDC.Mesh_Segment.NumberOfSegments (   self,
  n,
  s = [],
  reversedEdges = [],
  UseExisting = 0 
) [inherited]

Defines "NumberOfSegments" hypothesis to cut an edge in a fixed number of segments.

Parameters:
nfor the number of segments that cut an edge
sfor the scale factor (optional)
reversedEdgesis a list of edges to mesh using reversed orientation
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one
Returns:
an instance of StdMeshers_NumberOfSegments hypothesis

Definition at line 4571 of file smeshDC.py.

04572                                                                         :
04573         if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
04574             reversedEdges, UseExisting = [], reversedEdges
04575         entry = self.MainShapeEntry()
04576         if reversedEdges and isinstance(reversedEdges[0],geompyDC.GEOM._objref_GEOM_Object):
04577             reversedEdges = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, e) for e in reversedEdges ]
04578         if s == []:
04579             hyp = self.Hypothesis("NumberOfSegments", [n, reversedEdges, entry],
04580                                   UseExisting=UseExisting,
04581                                   CompareMethod=self.CompareNumberOfSegments)
04582         else:
04583             hyp = self.Hypothesis("NumberOfSegments", [n,s, reversedEdges, entry],
04584                                   UseExisting=UseExisting,
04585                                   CompareMethod=self.CompareNumberOfSegments)
04586             hyp.SetDistrType( 1 )
04587             hyp.SetScaleFactor(s)
04588         hyp.SetNumberOfSegments(n)
04589         hyp.SetReversedEdges( reversedEdges )
04590         hyp.SetObjectEntry( entry )
04591         return hyp

def smeshDC.Mesh_Segment_Python.PythonSplit1D (   self,
  n,
  func,
  UseExisting = 0 
) [inherited]

Defines "PythonSplit1D" hypothesis.

Parameters:
nfor the number of segments that cut an edge
funcfor the python function that calculates the length of all segments
UseExistingif ==true - searches for the existing hypothesis created with the same parameters, else (default) - creates a new one

Definition at line 4838 of file smeshDC.py.

04839                                                    :
04840         hyp = self.Hypothesis("PythonSplit1D", [n], "libPython1dEngine.so",
04841                               UseExisting=UseExisting, CompareMethod=self.ComparePythonSplit1D)
04842         hyp.SetNumberOfSegments(n)
04843         hyp.SetPythonLog10RatioFunction(func)
04844         return hyp

def smeshDC.Mesh_Segment.StartEndLength (   self,
  start,
  end,
  reversedEdges = [],
  UseExisting = 0 
) [inherited]

Defines "StartEndLength" hypothesis to cut an edge in several segments with increasing geometric length.

Parameters:
startdefines the length of the first segment
enddefines the length of the last segment
reversedEdgesis a list of edges to mesh using reversed orientation
UseExistingif ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one
Returns:
an instance of StdMeshers_StartEndLength hypothesis

Definition at line 4690 of file smeshDC.py.

04691                                                                          :
04692         if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
04693             reversedEdges, UseExisting = [], reversedEdges
04694         if reversedEdges and isinstance(reversedEdges[0],geompyDC.GEOM._objref_GEOM_Object):
04695             reversedEdges = [ self.mesh.geompyD.GetSubShapeID(self.mesh.geom, e) for e in reversedEdges ]
04696         entry = self.MainShapeEntry()
04697         hyp = self.Hypothesis("StartEndLength", [start, end, reversedEdges, entry],
04698                               UseExisting=UseExisting,
04699                               CompareMethod=self.CompareStartEndLength)
04700         hyp.SetStartLength(start)
04701         hyp.SetEndLength(end)
04702         hyp.SetReversedEdges( reversedEdges )
04703         hyp.SetObjectEntry( entry )
04704         return hyp

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