X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=doc%2Fsalome%2Fgui%2FGEOM%2Finput%2Ftui_working_with_groups.doc;h=e21cb55884a678eb0f970f97232e037472862b39;hb=97d9c2c6b1eb1b8c37b74e9409ebdb89c42c8c27;hp=786e818166a1bf66ca338d933d0de241b4e714e9;hpb=239f8109c64fa0c5a2e1d87a420bad5529b57f48;p=modules%2Fgeom.git
diff --git a/doc/salome/gui/GEOM/input/tui_working_with_groups.doc b/doc/salome/gui/GEOM/input/tui_working_with_groups.doc
index 786e81816..e21cb5588 100644
--- a/doc/salome/gui/GEOM/input/tui_working_with_groups.doc
+++ b/doc/salome/gui/GEOM/input/tui_working_with_groups.doc
@@ -2,109 +2,32 @@
\page tui_working_with_groups_page Working with Groups
-
Creation of a group
+
+\anchor tui_create_groups_anchor
+Creation of a group
+\tui_script{working_with_groups_ex01.py}
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create two vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-Box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a group from the faces of the box
-group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
-# add objects to the group
-SubFaceList = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
-for i in [0, 3, 5] :
- FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
- geompy.AddObject(group, FaceID)
-
-# add all selected shapes from the list to the group
-# (the program doesn't raise error, if some shapes are already included)
-geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
-
-# remove an object from the group
-geompy.RemoveObject(group, FaceID)
-
-# remove all selected shapes from the group
-# (the program doesn't raise error, if some shapes are not included)
-geompy.DifferenceList(group, [SubFaceList[2], SubFaceList[3], SubFaceList[4]])
-id_group1 = geompy.addToStudy(group, "Group1")
-
-# display the contents of the group
-gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(1)
-\endcode
+\anchor tui_edit_groups_anchor
Adding an object to the group
-
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create two vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-Box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a group from the faces of the box
-group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
-# add objects to the group
-SubFaceList = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
-for i in [0, 3, 5] :
- FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
- geompy.AddObject(group, FaceID)
-id_group1 = geompy.addToStudy(group, "Group1")
-
-# display the contents of the group
-gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(1)
-\endcode
+\tui_script{working_with_groups_ex02.py}
Removing an object from the group
+\tui_script{working_with_groups_ex03.py}
-\code
-import geompy
-import salome
-gg = salome.ImportComponentGUI("GEOM")
-
-# create two vertices
-p0 = geompy.MakeVertex(0. , 0. , 0. )
-p200 = geompy.MakeVertex(200., 200., 200.)
-
-# create a box from two points
-Box = geompy.MakeBoxTwoPnt(p0, p200)
-
-# create a group from the faces of the box
-group = geompy.CreateGroup(Box, geompy.ShapeType["FACE"])
-
-# add objects to the group
-SubFaceList = geompy.SubShapeAllSorted(Box, geompy.ShapeType["FACE"])
-for i in [0, 3, 5] :
- FaceID = geompy.GetSubShapeID(Box, SubFaceList[i])
- geompy.AddObject(group, FaceID)
-
-# add all selected shapes from the list to the group
-# (the program doesn't raise errors, if some shapes are already included)
-geompy.UnionList(group, [SubFaceList[0], SubFaceList[2], SubFaceList[5]])
+
+\anchor tui_union_groups_anchor
+Union Groups
+\tui_script{working_with_groups_ex04.py}
-# remove an object from the group
-geompy.RemoveObject(group, FaceID)
-id_group1 = geompy.addToStudy(group, "Group1")
+
+\anchor tui_intersect_groups_anchor
+Intersect Groups
+\tui_script{working_with_groups_ex05.py}
-# display the contents of the group
-gg.createAndDisplayGO(id_group1)
-salome.sg.updateObjBrowser(1)
-\endcode
+
+\anchor tui_cut_groups_anchor
+Cut Groups
+\tui_script{working_with_groups_ex06.py}
-*/
\ No newline at end of file
+*/