This function creates the geometry on the specified study and with
given parameters.
'''
- print "TUBE: creating the geometry ..."
+ print("TUBE: creating the geometry ...")
- studyId = study._get_StudyId()
- geompy = geomtools.getGeompy(studyId)
+ geompy = geomtools.getGeompy()
radius_ext = radius
radius_int = radius_ext - width
# We have to create a partition so that we can use an hexaedric
# meshing algorithm.
- studyId = study._get_StudyId()
- geompy = geomtools.getGeompy(studyId)
+ geompy = geomtools.getGeompy()
- print "TUBE: creating a partition ..."
+ print("TUBE: creating a partition ...")
toolPlane = geompy.MakeFaceHW(2.1*length,2.1*radius,3)
partition = geompy.MakePartition([shape], [toolPlane], [], [], geompy.ShapeType["SOLID"], 0, [], 0)
entry = geompy.addToStudy( partition, "TubeWithPartition" )
return partition
-def createMesh(study, shape):
- '''This function creates the mesh of the specified shape on the specified study'''
+def createMesh(shape):
+ '''This function creates the mesh of the specified shape on the current study'''
- print "TUBE: creating the mesh ..."
+ print("TUBE: creating the mesh ...")
import SMESH
from salome.smesh import smeshBuilder
- smesh = smeshBuilder.New(study)
+ smesh = smeshBuilder.New()
mesh = smesh.Mesh(shape)
Regular_1D = mesh.Segment()