|
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. | |
| 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.
| start | defines the length of the first segment |
| end | defines the length of the last segment |
| reversedEdges | is a list of edges to mesh using reversed orientation |
| UseExisting | if ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one |
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.
| fineness | for the fineness [0-1] |
| UseExisting | if ==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.
| def smeshDC.Mesh_Segment.Deflection1D | ( | self, | |
| d, | |||
UseExisting = 0 |
|||
| ) | [inherited] |
Defines "Deflection1D" hypothesis.
| d | for the deflection |
| UseExisting | if ==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.
| 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.
| points | defines the list of parameters on curve |
| nbSegs | defines the list of numbers of segments |
| reversedEdges | is a list of edges to mesh using reversed orientation |
| UseExisting | if ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one |
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.
| l | for the length of segments that cut an edge |
| UseExisting | if ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one |
| p | precision, 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. |
Definition at line 4523 of file smeshDC.py.
| 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.
| length | is optional maximal allowed length of segment, if it is omitted the preestimated length is used that depends on geometry size |
| UseExisting | if ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one |
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.
| n | for the number of segments that cut an edge |
| s | for the scale factor (optional) |
| reversedEdges | is a list of edges to mesh using reversed orientation |
| UseExisting | if ==true - searches for an existing hypothesis created with the same parameters, else (default) - create a new one |
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.
| n | for the number of segments that cut an edge |
| func | for the python function that calculates the length of all segments |
| UseExisting | if ==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.
| 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.
| start | defines the length of the first segment |
| end | defines the length of the last segment |
| reversedEdges | is a list of edges to mesh using reversed orientation |
| UseExisting | if ==true - searches for an existing hypothesis created with the same parameters, else (default) - creates a new one |
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