1 # -*- coding: utf-8 -*-
7 theStudy = salome.myStudy
14 from salome.geom import geomBuilder
15 geompy = geomBuilder.New(salome.myStudy)
18 geompy.init_geom(theStudy)
20 sphere = geompy.MakeSphereR(10)
21 geompy.addToStudy( sphere, 'sphere' )
28 from salome.smesh import smeshBuilder
29 smesh = smeshBuilder.New(salome.myStudy)
32 Mesh_1 = smesh.Mesh(sphere)
34 BLSURF_1 = Mesh_1.Triangle(algo=smeshBuilder.MG_CADSurf)
35 BLSURF_Parameters = BLSURF_1.Parameters()
36 BLSURF_Parameters.SetPhySize( 5 )
37 BLSURF_Parameters.SetGeometricMesh( 1 )
38 BLSURF_Parameters.SetAngleMesh( 8 )
43 raise Exception("Error when computing surface mesh")
45 Mesh_1.Tetrahedron(algo=smeshBuilder.MG_Tetra)
50 raise Exception("Error when computing volume mesh")
52 if salome.sg.hasDesktop():
53 salome.sg.updateObjBrowser(1)