X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_boolean_operations.doc;h=784003c3ceb79d0966c3c03b183b0db96f32d71c;hb=69b2ec02a2002731ceaf0597fa9f4dd9cd57dc91;hp=60563757c190d2880d09ba7d52a2e7c423ed7107;hpb=392885c1a8d50369708bbe5e6b44033ed8b8ba51;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/input/tui_boolean_operations.doc b/doc/salome/gui/GEOM/input/tui_boolean_operations.doc index 60563757c..784003c3c 100644 --- a/doc/salome/gui/GEOM/input/tui_boolean_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_boolean_operations.doc @@ -4,140 +4,18 @@ \anchor tui_fuse

Fuse

- -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a vertex and a vector -p1 = geompy.MakeVertex(25, 55, 0) -p2 = geompy.MakeVertex( 0, 0, 0) -v = geompy.MakeVector(p1, p2) - -# create a cylinder -height = 35 -radius1 = 20 -cylinder = geompy.MakeCylinder(p1, v, radius1, height) - -# create a sphere -sphere = geompy.MakeSphereR(40) - -# fuse -fuse1 = geompy.MakeFuse(cylinder, sphere) -fuse2 = geompy.MakeBoolean(cylinder, sphere, 3) - -# add objects in the study -id_cylinder = geompy.addToStudy(cylinder, "Cylinder") -id_sphere = geompy.addToStudy(sphere, "Sphere") -id_fuse1 = geompy.addToStudy(fuse1, "Fuse_1") -id_fuse2 = geompy.addToStudy(fuse2, "Fuse_2") - -# display results -gg.createAndDisplayGO(id_cylinder) -gg.setDisplayMode(id_cylinder,1) -gg.createAndDisplayGO(id_sphere) -gg.setDisplayMode(id_sphere,1) -gg.createAndDisplayGO(id_fuse1) -gg.setDisplayMode(id_fuse1,1) -gg.createAndDisplayGO(id_fuse2) -gg.setDisplayMode(id_fuse2,1) -\endcode +\tui_script{boolean_operations_ex01.py} \anchor tui_common

Common

- -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a vertex and a vector -p1 = geompy.MakeVertex(25, 55, 0) -p2 = geompy.MakeVertex( 0, 0, 0) -v = geompy.MakeVector(p1, p2) - -# create a cylinder -height = 35 -radius1 = 20 -cylinder = geompy.MakeCylinder(p1, v, radius1, height) - -# create a sphere -sphere = geompy.MakeSphereR(40) - -# make common -common = geompy.MakeCommon(cylinder, sphere) - -# add objects in the study -id_common = geompy.addToStudy(common, "Common") - -# display the results -gg.createAndDisplayGO(id_common) -gg.setDisplayMode(id_common,1) -\endcode +\tui_script{boolean_operations_ex02.py} \anchor tui_cut

Cut

- -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a vertex and a vector -p1 = geompy.MakeVertex(25, 55, 0) -p2 = geompy.MakeVertex( 0, 0, 0) -v = geompy.MakeVector(p1, p2) - -# create a cylinder -height = 35 -radius1 = 20 -cylinder = geompy.MakeCylinder(p1, v, radius1, height) - -# create a sphere -sphere = geompy.MakeSphereR(40) - -#cut -cut = geompy.MakeCut(cylinder, sphere) - -# add objects in the study -id_cut = geompy.addToStudy(cut, "Cut") - -# display the results -gg.createAndDisplayGO(id_cut) -gg.setDisplayMode(id_cut,1) -\endcode +\tui_script{boolean_operations_ex03.py} \anchor tui_section

Section

- -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a vertex and a vector -p1 = geompy.MakeVertex(25, 55, 0) -p2 = geompy.MakeVertex( 0, 0, 0) -v = geompy.MakeVector(p1, p2) - -# create a cylinder -height = 35 -radius1 = 20 -cylinder = geompy.MakeCylinder(p1, v, radius1, height) - -# create a sphere -sphere = geompy.MakeSphereR(40) - -# make a section -section = geompy.MakeSection(cylinder, sphere) - -# add objects in the study -id_section = geompy.addToStudy(section, "Section") - -# display the results -gg.createAndDisplayGO(id_section) -gg.setDisplayMode(id_section,1) -\endcode +\tui_script{boolean_operations_ex04.py} */