3 \page tui_boolean_operations_page Boolean Operations
11 gg = salome.ImportComponentGUI("GEOM")
13 # create a vertex and a vector
14 p1 = geompy.MakeVertex(25, 55, 0)
15 p2 = geompy.MakeVertex( 0, 0, 0)
16 v = geompy.MakeVector(p1, p2)
21 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
24 sphere = geompy.MakeSphereR(40)
27 fuse = geompy.MakeFuse(cylinder, sphere)
29 # add objects in the study
30 id_cylinder = geompy.addToStudy(cylinder, "Cylinder")
31 id_sphere = geompy.addToStudy(sphere, "Sphere")
32 id_fuse = geompy.addToStudy(fuse, "Fuse")
35 gg.createAndDisplayGO(id_cylinder)
36 gg.setDisplayMode(id_cylinder,1)
37 gg.createAndDisplayGO(id_sphere)
38 gg.setDisplayMode(id_sphere,1)
39 gg.createAndDisplayGO(id_fuse)
40 gg.setDisplayMode(id_fuse,1)
49 gg = salome.ImportComponentGUI("GEOM")
51 # create a vertex and a vector
52 p1 = geompy.MakeVertex(25, 55, 0)
53 p2 = geompy.MakeVertex( 0, 0, 0)
54 v = geompy.MakeVector(p1, p2)
59 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
62 sphere = geompy.MakeSphereR(40)
65 common = geompy.MakeCommon(cylinder, sphere)
67 # add objects in the study
68 id_common = geompy.addToStudy(common, "Common")
71 gg.createAndDisplayGO(id_common)
72 gg.setDisplayMode(id_common,1)
81 gg = salome.ImportComponentGUI("GEOM")
83 # create a vertex and a vector
84 p1 = geompy.MakeVertex(25, 55, 0)
85 p2 = geompy.MakeVertex( 0, 0, 0)
86 v = geompy.MakeVector(p1, p2)
91 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
94 sphere = geompy.MakeSphereR(40)
97 cut = geompy.MakeCut(cylinder, sphere)
99 # add objects in the study
100 id_cut = geompy.addToStudy(cut, "Cut")
102 # display the results
103 gg.createAndDisplayGO(id_cut)
104 gg.setDisplayMode(id_cut,1)
113 gg = salome.ImportComponentGUI("GEOM")
115 # create a vertex and a vector
116 p1 = geompy.MakeVertex(25, 55, 0)
117 p2 = geompy.MakeVertex( 0, 0, 0)
118 v = geompy.MakeVector(p1, p2)
123 cylinder = geompy.MakeCylinder(p1, v, radius1, height)
126 sphere = geompy.MakeSphereR(40)
129 section = geompy.MakeSection(cylinder, sphere)
131 # add objects in the study
132 id_section = geompy.addToStudy(section, "Section")
134 # display the results
135 gg.createAndDisplayGO(id_section)
136 gg.setDisplayMode(id_section,1)