mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-15 01:10:36 +05:00
0022106: EDF 2464 SMESH : Split quadrangles in 4 triangles
+ def QuadTo4Tri (self, theElements=[]):
This commit is contained in:
parent
b2bb39a768
commit
f96a5f853b
@ -2857,7 +2857,6 @@ class Mesh:
|
|||||||
return self.editor.TriToQuadObject(theObject, Functor, MaxAngle)
|
return self.editor.TriToQuadObject(theObject, Functor, MaxAngle)
|
||||||
|
|
||||||
## Splits quadrangles into triangles.
|
## Splits quadrangles into triangles.
|
||||||
#
|
|
||||||
# @param IDsOfElements the faces to be splitted.
|
# @param IDsOfElements the faces to be splitted.
|
||||||
# @param theCriterion is a numerical functor, in terms of enum SMESH.FunctorType, used to
|
# @param theCriterion is a numerical functor, in terms of enum SMESH.FunctorType, used to
|
||||||
# choose a diagonal for splitting. If @a theCriterion is None, which is a default
|
# choose a diagonal for splitting. If @a theCriterion is None, which is a default
|
||||||
@ -2888,6 +2887,20 @@ class Mesh:
|
|||||||
Functor = self.smeshpyD.GetFunctor(theCriterion)
|
Functor = self.smeshpyD.GetFunctor(theCriterion)
|
||||||
return self.editor.QuadToTriObject(theObject, Functor)
|
return self.editor.QuadToTriObject(theObject, Functor)
|
||||||
|
|
||||||
|
## Splits each of given quadrangles into 4 triangles. A node is added at the center of
|
||||||
|
# a quadrangle.
|
||||||
|
# @param theElements the faces to be splitted. This can be either mesh, sub-mesh,
|
||||||
|
# group or a list of face IDs. By default all quadrangles are split
|
||||||
|
# @ingroup l2_modif_cutquadr
|
||||||
|
def QuadTo4Tri (self, theElements=[]):
|
||||||
|
if isinstance( theElements, Mesh ):
|
||||||
|
theElements = theElements.mesh
|
||||||
|
elif not theElements:
|
||||||
|
theElements = self.mesh
|
||||||
|
elif isinstance( theElements, list ):
|
||||||
|
theElements = self.GetIDSource( theElements, SMESH.FACE )
|
||||||
|
return self.editor.QuadTo4Tri( theElements )
|
||||||
|
|
||||||
## Splits quadrangles into triangles.
|
## Splits quadrangles into triangles.
|
||||||
# @param IDsOfElements the faces to be splitted
|
# @param IDsOfElements the faces to be splitted
|
||||||
# @param Diag13 is used to choose a diagonal for splitting.
|
# @param Diag13 is used to choose a diagonal for splitting.
|
||||||
@ -3150,6 +3163,8 @@ class Mesh:
|
|||||||
# @param theToBiQuad If True, converts the mesh to bi-quadratic
|
# @param theToBiQuad If True, converts the mesh to bi-quadratic
|
||||||
# @ingroup l2_modif_tofromqu
|
# @ingroup l2_modif_tofromqu
|
||||||
def ConvertToQuadratic(self, theForce3d, theSubMesh=None, theToBiQuad=False):
|
def ConvertToQuadratic(self, theForce3d, theSubMesh=None, theToBiQuad=False):
|
||||||
|
if isinstance( theSubMesh, Mesh ):
|
||||||
|
theSubMesh = theSubMesh.mesh
|
||||||
if theToBiQuad:
|
if theToBiQuad:
|
||||||
self.editor.ConvertToBiQuadratic(theForce3d,theSubMesh)
|
self.editor.ConvertToBiQuadratic(theForce3d,theSubMesh)
|
||||||
else:
|
else:
|
||||||
@ -3157,6 +3172,9 @@ class Mesh:
|
|||||||
self.editor.ConvertToQuadraticObject(theForce3d,theSubMesh)
|
self.editor.ConvertToQuadraticObject(theForce3d,theSubMesh)
|
||||||
else:
|
else:
|
||||||
self.editor.ConvertToQuadratic(theForce3d)
|
self.editor.ConvertToQuadratic(theForce3d)
|
||||||
|
error = self.editor.GetLastError()
|
||||||
|
if error and error.comment:
|
||||||
|
print error.comment
|
||||||
|
|
||||||
## Converts the mesh from quadratic to ordinary,
|
## Converts the mesh from quadratic to ordinary,
|
||||||
# deletes old quadratic elements, \n replacing
|
# deletes old quadratic elements, \n replacing
|
||||||
|
Loading…
Reference in New Issue
Block a user