6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p1 = geompy.MakeVertex(25, 55, 0)
12 p2 = geompy.MakeVertex( 0, 0, 0)
13 v = geompy.MakeVector(p1, p2)
18 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
21 sphere = geompy.MakeSphereR(40)
24 box = geompy.MakeBoxDXDYDZ(80, 80, 80)
27 fuse1 = geompy.MakeFuse(cylinder, sphere)
28 fuse2 = geompy.MakeBoolean(cylinder, sphere, 3)
29 fuse3 = geompy.MakeFuseList([cylinder, sphere, box])
32 id_cylinder = geompy.addToStudy(cylinder,
"Cylinder")
33 id_sphere = geompy.addToStudy(sphere,
"Sphere")
34 id_box = geompy.addToStudy(box,
"Box")
35 id_fuse1 = geompy.addToStudy(fuse1,
"Fuse_1")
36 id_fuse2 = geompy.addToStudy(fuse2,
"Fuse_2")
37 id_fuse3 = geompy.addToStudy(fuse3,
"Fuse_3")
40 gg.createAndDisplayGO(id_cylinder)
41 gg.setDisplayMode(id_cylinder,1)
42 gg.createAndDisplayGO(id_sphere)
43 gg.setDisplayMode(id_sphere,1)
44 gg.createAndDisplayGO(id_box)
45 gg.setDisplayMode(id_box,1)
46 gg.createAndDisplayGO(id_fuse1)
47 gg.setDisplayMode(id_fuse1,1)
48 gg.createAndDisplayGO(id_fuse2)
49 gg.setDisplayMode(id_fuse2,1)
50 gg.createAndDisplayGO(id_fuse3)
51 gg.setDisplayMode(id_fuse3,1)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p1 = geompy.MakeVertex(25, 55, 0)
12 p2 = geompy.MakeVertex( 0, 0, 0)
13 v = geompy.MakeVector(p1, p2)
18 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
21 sphere = geompy.MakeSphereR(40)
24 box = geompy.MakeBoxDXDYDZ(80, 80, 80)
27 common1 = geompy.MakeCommon(cylinder, sphere)
28 common2 = geompy.MakeCommonList([cylinder, sphere, box])
31 id_cylinder = geompy.addToStudy(cylinder,
"Cylinder")
32 id_sphere = geompy.addToStudy(sphere,
"Sphere")
33 id_box = geompy.addToStudy(box,
"Box")
34 id_common1 = geompy.addToStudy(common1,
"Common_1")
35 id_common2 = geompy.addToStudy(common2,
"Common_2")
38 gg.createAndDisplayGO(id_cylinder)
39 gg.setDisplayMode(id_cylinder,1)
40 gg.createAndDisplayGO(id_sphere)
41 gg.setDisplayMode(id_sphere,1)
42 gg.createAndDisplayGO(id_box)
43 gg.setDisplayMode(id_box,1)
44 gg.createAndDisplayGO(id_common1)
45 gg.setDisplayMode(id_common1,1)
46 gg.createAndDisplayGO(id_common2)
47 gg.setDisplayMode(id_common2,1)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p1 = geompy.MakeVertex(25, 55, 0)
12 p2 = geompy.MakeVertex( 0, 0, 0)
13 v = geompy.MakeVector(p1, p2)
18 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
21 sphere = geompy.MakeSphereR(40)
24 box = geompy.MakeBoxDXDYDZ(80, 80, 80)
27 cut1 = geompy.MakeCut(cylinder, sphere)
28 cut2 = geompy.MakeCutList(cylinder, [sphere, box])
31 id_cylinder = geompy.addToStudy(cylinder,
"Cylinder")
32 id_sphere = geompy.addToStudy(sphere,
"Sphere")
33 id_box = geompy.addToStudy(box,
"Box")
34 id_cut1 = geompy.addToStudy(cut1,
"Cut_1")
35 id_cut2 = geompy.addToStudy(cut2,
"Cut_2")
38 gg.createAndDisplayGO(id_cylinder)
39 gg.setDisplayMode(id_cylinder,1)
40 gg.createAndDisplayGO(id_sphere)
41 gg.setDisplayMode(id_sphere,1)
42 gg.createAndDisplayGO(id_box)
43 gg.setDisplayMode(id_box,1)
44 gg.createAndDisplayGO(id_cut1)
45 gg.setDisplayMode(id_cut1,1)
46 gg.createAndDisplayGO(id_cut2)
47 gg.setDisplayMode(id_cut2,1)
6 from salome.geom
import geomBuilder
7 geompy = geomBuilder.New(salome.myStudy)
8 gg = salome.ImportComponentGUI(
"GEOM")
11 p1 = geompy.MakeVertex(25, 55, 0)
12 p2 = geompy.MakeVertex( 0, 0, 0)
13 v = geompy.MakeVector(p1, p2)
18 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
21 sphere = geompy.MakeSphereR(40)
24 section = geompy.MakeSection(cylinder, sphere)
27 id_section = geompy.addToStudy(section,
"Section")
30 gg.createAndDisplayGO(id_section)
31 gg.setDisplayMode(id_section,1)