X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_blocks_operations.doc;h=58a761a42b0ea332b48cb9d398a6d19c361435d3;hb=97d9c2c6b1eb1b8c37b74e9409ebdb89c42c8c27;hp=8544667f1a313091211e21fda409264e2b28dc10;hpb=239f8109c64fa0c5a2e1d87a420bad5529b57f48;p=modules%2Fgeom.git diff --git a/doc/salome/gui/GEOM/input/tui_blocks_operations.doc b/doc/salome/gui/GEOM/input/tui_blocks_operations.doc index 8544667f1..58a761a42 100644 --- a/doc/salome/gui/GEOM/input/tui_blocks_operations.doc +++ b/doc/salome/gui/GEOM/input/tui_blocks_operations.doc @@ -4,95 +4,14 @@ \anchor tui_multi_transformation

Multi Transformation

- -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create vertices -p_25_25_50 = geompy.MakeVertex(25., 25., 50.) -p_50_25_25 = geompy.MakeVertex(50., 25., 25.) -p_25_50_25 = geompy.MakeVertex(25., 50., 25.) - -box = geompy.MakeBoxDXDYDZ(50, 50, 50) - -top_face = geompy.GetFaceNearPoint(box, p_25_25_50) -yz_face = geompy.GetFaceNearPoint(box, p_50_25_25) -xz_face = geompy.GetFaceNearPoint(box, p_25_50_25) - -top_face_ind = geompy.GetSubShapeID(box, top_face) -yz_face_ind = geompy.GetSubShapeID(box, yz_face) -xz_face_ind = geompy.GetSubShapeID(box, xz_face) - -# Multi-transformate block and glue the result -box_tr1 = geompy.MakeMultiTransformation1D(box, yz_face_ind, top_face_ind, 3) -box_tr2 = geompy.MakeMultiTransformation2D(box, xz_face_ind, yz_face_ind, 3, top_face_ind, 0, 2) - -# add objects in the study -id_box = geompy.addToStudy(box, "Box") -id_box_tr1 = geompy.addToStudy(box_tr1, "Multi-transformed Block 1D") -id_box_tr2 = geompy.addToStudy(box_tr2, "Multi-transformed Block 2D") - -# display the results -gg.createAndDisplayGO(id_box) -gg.setDisplayMode(id_box,1) -gg.createAndDisplayGO(id_box_tr1) -gg.createAndDisplayGO(id_box_tr2) -\endcode +\tui_script{blocks_operations_ex01.py} \anchor tui_explode_on_blocks

Explode on Blocks

- -\code -import geompy -import salome -gg = salome.ImportComponentGUI("GEOM") - -# create a box and a sphere -box = geompy.MakeBoxDXDYDZ(200, 200, 200) -sphere = geompy.MakeSphereR(100) - -# make a compound -compound = geompy.MakeCompound([box, sphere]) - -# get all the blocks of the given compound, by criteria: min_nb_faces <= nb. of faces <= max_nb_faces -min_nb_faces = 6 -max_nb_faces = 6 -make_block_explode = geompy.MakeBlockExplode(compound, min_nb_faces, max_nb_faces) - -# add objects in the study -id_compound = geompy.addToStudy(compound, "Compound") -id_make_block_explode = geompy.addToStudyInFather(compound, make_block_explode[0], "MakeBlockExplode") - -# display the results -gg.createAndDisplayGO(id_compound) -gg.createAndDisplayGO(id_make_block_explode) -gg.setDisplayMode(id_make_block_explode,1) -\endcode +\tui_script{blocks_operations_ex02.py} \anchor tui_propagate

Propagate

+\tui_script{blocks_operations_ex03.py} -\code -import geompy -import salome - -# create a box -box = geompy.MakeBoxDXDYDZ(200, 200, 200) - -# build all possible propagation groups -listChains = geompy.Propagate(check_box) - -# add objects in the study -geompy.addToStudy(check_box, "Box") -ii = 1 -for chain in listChains: - geompy.addToStudyInFather(check_box, chain, "propagation chain " + `ii`) - ii = ii + 1 - pass - -salome.sg.updateObjBrowser(1) -\endcode - -*/ \ No newline at end of file +*/