mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 17:30:35 +05:00
PR: debug examples
This commit is contained in:
parent
970a92d2c6
commit
a091c1bd76
@ -44,7 +44,7 @@ geompy.AddObject(aGeomGroup2, 10)
|
||||
geompy.addToStudy(aGeomGroup1, "Group on Faces")
|
||||
geompy.addToStudy(aGeomGroup2, "Group on Edges")
|
||||
|
||||
aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", smesh.FACE)
|
||||
aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", smesh.EDGE)
|
||||
aSmeshGroup1 = mesh.GroupOnGeom(aGeomGroup1, "SMESHGroup1", SMESH.FACE)
|
||||
aSmeshGroup2 = mesh.GroupOnGeom(aGeomGroup2, "SMESHGroup2", SMESH.EDGE)
|
||||
|
||||
salome.sg.updateObjBrowser(1);
|
||||
|
@ -207,7 +207,7 @@ vector = SMESH.DirStruct(point)
|
||||
mesh.ExtrusionSweepObject(GroupTriToQuad, vector, 5)
|
||||
|
||||
#4 mirror object
|
||||
mesh.Mirror([], SMESH.AxisStruct(0, 0, 0, 0, 0, 0), SMESH.POINT, 0)
|
||||
mesh.Mirror([], SMESH.AxisStruct(0, 0, 0, 0, 0, 0), smesh.POINT, 0)
|
||||
|
||||
#5 mesh translation
|
||||
point = SMESH.PointStruct(10, 10, 10)
|
||||
@ -222,7 +222,7 @@ mesh.Rotate([], axisXYZ, angle180, 0)
|
||||
#7 group smoothing
|
||||
FacesSmooth = [864, 933, 941, 950, 1005, 1013]
|
||||
GroupSmooth = mesh.MakeGroupByIds("Group of faces (smooth)", SMESH.FACE, FacesSmooth)
|
||||
mesh.SmoothObject(GroupSmooth, [], 20, 2, SMESH.CENTROIDAL_SMOOTH)
|
||||
mesh.SmoothObject(GroupSmooth, [], 20, 2, smesh.CENTROIDAL_SMOOTH)
|
||||
|
||||
#8 rotation sweep object
|
||||
FacesRotate = [492, 493, 502, 503]
|
||||
|
@ -96,23 +96,6 @@ import os
|
||||
## @addtogroup l1_auxiliary
|
||||
## @{
|
||||
|
||||
# MirrorType enumeration
|
||||
POINT = SMESH_MeshEditor.POINT
|
||||
AXIS = SMESH_MeshEditor.AXIS
|
||||
PLANE = SMESH_MeshEditor.PLANE
|
||||
|
||||
# Smooth_Method enumeration
|
||||
LAPLACIAN_SMOOTH = SMESH_MeshEditor.LAPLACIAN_SMOOTH
|
||||
CENTROIDAL_SMOOTH = SMESH_MeshEditor.CENTROIDAL_SMOOTH
|
||||
|
||||
PrecisionConfusion = 1e-07
|
||||
|
||||
# TopAbs_State enumeration
|
||||
[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
|
||||
def DegreesToRadians(AngleInDegrees):
|
||||
from math import pi
|
||||
@ -172,8 +155,8 @@ def __initAxisStruct(ax,*args):
|
||||
pass
|
||||
SMESH.AxisStruct.__init__ = __initAxisStruct
|
||||
|
||||
|
||||
def IsEqual(val1, val2, tol=PrecisionConfusion):
|
||||
smeshPrecisionConfusion = 1.e-07
|
||||
def IsEqual(val1, val2, tol=smeshPrecisionConfusion):
|
||||
if abs(val1 - val2) < tol:
|
||||
return True
|
||||
return False
|
||||
@ -308,6 +291,23 @@ doLcc = False
|
||||
# It also has methods to get infos on meshes.
|
||||
class smeshBuilder(object, SMESH._objref_SMESH_Gen):
|
||||
|
||||
# MirrorType enumeration
|
||||
POINT = SMESH_MeshEditor.POINT
|
||||
AXIS = SMESH_MeshEditor.AXIS
|
||||
PLANE = SMESH_MeshEditor.PLANE
|
||||
|
||||
# Smooth_Method enumeration
|
||||
LAPLACIAN_SMOOTH = SMESH_MeshEditor.LAPLACIAN_SMOOTH
|
||||
CENTROIDAL_SMOOTH = SMESH_MeshEditor.CENTROIDAL_SMOOTH
|
||||
|
||||
PrecisionConfusion = smeshPrecisionConfusion
|
||||
|
||||
# TopAbs_State enumeration
|
||||
[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
|
||||
|
||||
def __new__(cls):
|
||||
global engine
|
||||
global smeshInst
|
||||
@ -2891,7 +2891,7 @@ class Mesh:
|
||||
# @param method flags passing splitting method: Hex_5Tet, Hex_6Tet, Hex_24Tet
|
||||
# Hex_5Tet - split the hexahedron into 5 tetrahedrons, etc
|
||||
# @ingroup l2_modif_cutquadr
|
||||
def SplitVolumesIntoTetra(self, elemIDs, method=Hex_5Tet ):
|
||||
def SplitVolumesIntoTetra(self, elemIDs, method=smeshBuilder.Hex_5Tet ):
|
||||
if isinstance( elemIDs, Mesh ):
|
||||
elemIDs = elemIDs.GetMesh()
|
||||
if ( isinstance( elemIDs, list )):
|
||||
|
Loading…
Reference in New Issue
Block a user