3 \page tui_cartesian_algo Usage of Body Fitting algorithm
7 SetCurrentStudy(salome.myStudy)
10 sphere = geompy.MakeSphereR( 50 )
11 geompy.addToStudy( sphere, "sphere" )
13 # create a mesh and assign a "Body Fitting" algo
15 cartAlgo = mesh.BodyFitted()
17 # define a cartesian grid using Coordinates
18 coords = range(-100,100,10)
19 cartHyp = cartAlgo.SetGrid( coords,coords,coords, 1000000)
23 print "nb hexahedra",mesh.NbHexas()
24 print "nb tetrahedra",mesh.NbTetras()
25 print "nb polyhedra",mesh.NbPolyhedrons()
28 # define the grid by sitting constant spacing
29 cartHyp = cartAlgo.SetGrid( "10","10","10", 1000000)
32 print "nb hexahedra",mesh.NbHexas()
33 print "nb tetrahedra",mesh.NbTetras()
34 print "nb polyhedra",mesh.NbPolyhedrons()
37 # define the grid by sitting different spacing in 2 sub-ranges of geometry
38 spaceFuns = ["5","10+10*t"]
39 cartAlgo.SetGrid( [spaceFuns, [0.5]], [spaceFuns, [0.5]], [spaceFuns, [0.25]], 2 )
42 print "nb hexahedra",mesh.NbHexas()
43 print "nb tetrahedra",mesh.NbTetras()
44 print "nb polyhedra",mesh.NbPolyhedrons()