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);
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)
#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]
## @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
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
# 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
# @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 )):