mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-18 11:50:32 +05:00
1)
+ ## Defines "QuadrangleParams" hypothesis + # @param vertex: vertex of a trilateral geometrical face, around which triangles + # will be created while other elements will be quadrangles. + # Vertex can be either a GEOM_Object or a vertex ID within the + # shape to mesh + # + def TriangleVertex(self, vertex, UseExisting=0): 2) in FixedPoints1D(), convert geom reversed edges into IDs
This commit is contained in:
parent
436321583b
commit
db9b76d342
@ -3943,10 +3943,13 @@ class Mesh_Segment(Mesh_Algorithm):
|
|||||||
def FixedPoints1D(self, points, nbSegs=[1], reversedEdges=[], UseExisting=0):
|
def FixedPoints1D(self, points, nbSegs=[1], reversedEdges=[], UseExisting=0):
|
||||||
if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
|
if not isinstance(reversedEdges,list): #old version script, before adding reversedEdges
|
||||||
reversedEdges, UseExisting = [], reversedEdges
|
reversedEdges, UseExisting = [], reversedEdges
|
||||||
|
if reversedEdges and isinstance( reversedEdges[0], geompyDC.GEOM._objref_GEOM_Object ):
|
||||||
|
for i in range( len( reversedEdges )):
|
||||||
|
reversedEdges[i] = self.mesh.geompyD.GetSubShapeID(self.mesh.geom, reversedEdges[i] )
|
||||||
entry = self.MainShapeEntry()
|
entry = self.MainShapeEntry()
|
||||||
hyp = self.Hypothesis("FixedPoints1D", [points, nbSegs, reversedEdges, entry],
|
hyp = self.Hypothesis("FixedPoints1D", [points, nbSegs, reversedEdges, entry],
|
||||||
UseExisting=UseExisting,
|
UseExisting=UseExisting,
|
||||||
CompareMethod=self.CompareArithmetic1D)
|
CompareMethod=self.CompareFixedPoints1D)
|
||||||
hyp.SetPoints(points)
|
hyp.SetPoints(points)
|
||||||
hyp.SetNbSegments(nbSegs)
|
hyp.SetNbSegments(nbSegs)
|
||||||
hyp.SetReversedEdges(reversedEdges)
|
hyp.SetReversedEdges(reversedEdges)
|
||||||
@ -4459,6 +4462,23 @@ class Mesh_Quadrangle(Mesh_Algorithm):
|
|||||||
CompareMethod=self.CompareEqualHyp)
|
CompareMethod=self.CompareEqualHyp)
|
||||||
return hyp
|
return hyp
|
||||||
|
|
||||||
|
## Defines "QuadrangleParams" hypothesis
|
||||||
|
# @param vertex: vertex of a trilateral geometrical face, around which triangles
|
||||||
|
# will be created while other elements will be quadrangles.
|
||||||
|
# Vertex can be either a GEOM_Object or a vertex ID within the
|
||||||
|
# shape to mesh
|
||||||
|
#
|
||||||
|
# @ingroup l3_hypos_additi
|
||||||
|
def TriangleVertex(self, vertex, UseExisting=0):
|
||||||
|
vertexID = vertex
|
||||||
|
if isinstance( vertexID, geompyDC.GEOM._objref_GEOM_Object ):
|
||||||
|
vertexID = self.mesh.geompyD.GetSubShapeID( self.mesh.geom, vertex )
|
||||||
|
hyp = self.Hypothesis("QuadrangleParams", [vertexID], UseExisting = UseExisting,
|
||||||
|
CompareMethod=lambda hyp,args: hyp.GetTriaVertex()==args[0])
|
||||||
|
hyp.SetTriaVertex( vertexID )
|
||||||
|
return hyp
|
||||||
|
|
||||||
|
|
||||||
# Public class: Mesh_Tetrahedron
|
# Public class: Mesh_Tetrahedron
|
||||||
# ------------------------------
|
# ------------------------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user