mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-01-19 16:30:33 +05:00
0020889: EDF 1433 SMESH: SplitHexaToTetra: add the 24 tetras mode
* Add Hex_24Tet splitting mode
This commit is contained in:
parent
cd749c768d
commit
61e5c761ce
@ -198,6 +198,8 @@ PrecisionConfusion = 1e-07
|
|||||||
# TopAbs_State enumeration
|
# TopAbs_State enumeration
|
||||||
[TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = range(4)
|
[TopAbs_IN, TopAbs_OUT, TopAbs_ON, TopAbs_UNKNOWN] = range(4)
|
||||||
|
|
||||||
|
# Methods of splitting a hexahedron into tetrahedra
|
||||||
|
Hex_5Tet, Hex_6Tet, Hex_24Tet = 1, 2, 3
|
||||||
|
|
||||||
## Converts an angle from degrees to radians
|
## Converts an angle from degrees to radians
|
||||||
def DegreesToRadians(AngleInDegrees):
|
def DegreesToRadians(AngleInDegrees):
|
||||||
@ -687,6 +689,9 @@ class smeshDC(SMESH._objref_SMESH_Gen):
|
|||||||
def Concatenate( self, meshes, uniteIdenticalGroups,
|
def Concatenate( self, meshes, uniteIdenticalGroups,
|
||||||
mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False):
|
mergeNodesAndElements = False, mergeTolerance = 1e-5, allGroups = False):
|
||||||
mergeTolerance,Parameters = geompyDC.ParseParameters(mergeTolerance)
|
mergeTolerance,Parameters = geompyDC.ParseParameters(mergeTolerance)
|
||||||
|
for i,m in enumerate(meshes):
|
||||||
|
if isinstance(m, Mesh):
|
||||||
|
meshes[i] = m.GetMesh()
|
||||||
if allGroups:
|
if allGroups:
|
||||||
aSmeshMesh = SMESH._objref_SMESH_Gen.ConcatenateWithGroups(
|
aSmeshMesh = SMESH._objref_SMESH_Gen.ConcatenateWithGroups(
|
||||||
self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
|
self,meshes,uniteIdenticalGroups,mergeNodesAndElements,mergeTolerance)
|
||||||
@ -2547,11 +2552,10 @@ class Mesh:
|
|||||||
|
|
||||||
## Splits volumic elements into tetrahedrons
|
## Splits volumic elements into tetrahedrons
|
||||||
# @param elemIDs either list of elements or mesh or group or submesh
|
# @param elemIDs either list of elements or mesh or group or submesh
|
||||||
# @param method flags passing splitting method:
|
# @param method flags passing splitting method: Hex_5Tet, Hex_6Tet, Hex_24Tet
|
||||||
# 1 - split the hexahedron into 5 tetrahedrons
|
# Hex_5Tet - split the hexahedron into 5 tetrahedrons, etc
|
||||||
# 2 - split the hexahedron into 6 tetrahedrons
|
|
||||||
# @ingroup l2_modif_cutquadr
|
# @ingroup l2_modif_cutquadr
|
||||||
def SplitVolumesIntoTetra(self, elemIDs, method=1 ):
|
def SplitVolumesIntoTetra(self, elemIDs, method=Hex_5Tet ):
|
||||||
if isinstance( elemIDs, Mesh ):
|
if isinstance( elemIDs, Mesh ):
|
||||||
elemIDs = elemIDs.GetMesh()
|
elemIDs = elemIDs.GetMesh()
|
||||||
self.editor.SplitVolumesIntoTetra(elemIDs, method)
|
self.editor.SplitVolumesIntoTetra(elemIDs, method)
|
||||||
|
Loading…
Reference in New Issue
Block a user