Salome HOME
1522bf7e0fe059036628439fb0bfdd13fb616c0a
[modules/shaper.git] / src / CollectionPlugin / doc / groupFeature.rst
1 .. |shape_group.icon|    image:: images/shape_group.png
2 .. |plus.icon|  image:: images/add.png
3 .. |minus.icon|  image:: images/reverce.png
4 .. |delete.icon|  image:: images/delete.png
5
6 Group
7 =====
8
9 A group is a set of geometrical entities created by selection of sub-shapes of the same type.
10 To create a Group in the active part:
11
12 #. select in the Main Menu *Features - > Group* item  or
13 #. click |shape_group.icon| **Group** button in the toolbar:
14
15 The following property panel appears. 
16
17 .. image:: images/group_property_panel.png
18   :align: center
19
20 .. centered::
21   Create a group
22
23 Input fields:
24
25 - **Name** defines the name of the group, by default, it is **Group_n**.
26 - **Type** buttons select geometrical entities to be included in group:
27   
28     .. image:: images/group_property_panel_vertice.png
29          :align: left
30     Vertices;
31   
32     .. image:: images/group_property_panel_edge.png
33          :align: left
34     Edges;
35
36     .. image:: images/group_property_panel_face.png
37          :align: left
38     Faces;
39
40     .. image:: images/group_property_panel_solid.png
41          :align: left          
42     Solids;
43  
44 - The list of selected entities of the given type.  Multiple selection can be done manually in OCC 3D Viewer by mouse click with Shift button pressed or by rectangle selection. To delete entities from the list, select them and call pop-up menu *Delete* item.
45
46 - **Selection by filters** button opens "selection by filters" property panel and allows to select entities by set of selected filters.
47
48 - **Show only** button allows to hide all other objects and shapes and show only selected ones.
49
50 - Control **Add elements that share the same topology** allows to add automatically all elements laying on the same topology that was selected and remove these elements if they have disappeared due to the parametrical update. They will be represented as one line in the list of selection and managed in the viewer as one object if this flag is enabled. If flag becomes disabled when such elements are already in the list, they will become divided in one line per one shape.
51
52 **Selection by filters**
53
54 If user presses this button then following property panel appears.
55
56 .. image:: images/selection_by_filters.png
57   :align: center
58
59 .. centered::
60   Selection by filters property panel
61
62 In this panel:
63
64 - **Filters** a panel for added filters.
65
66 - **Add new filter** combo box. It contains accessible filters according to the selection mode defined in **Group** property panel. When user selects an item from this combo box a filter item appears in **Filters** panel like in the following example:
67
68 .. image:: images/selection_by_filters_added.png
69   :align: center
70
71 .. centered::
72   Filters **Horizontal faces** and **On plane** added to the property panel.
73   
74 Each filter item can be deleted with help of |delete.icon| button. A filter can be reverced with help of toggle button |plus.icon|/|minus.icon|. Also a filter could have input fields in case
75 if the filter has arguments.
76
77 - **Select** button traverces all objects of a current document and selects entities acceptable by currently defined set of filters. All selected entities will be shown in viewer 3d with
78 blue semi-transparent color. Any modification in filters clears current selection.
79
80 - **Number of selected objects** shows number currently selected entities.
81
82 - **Show only** check box lets to hide all non-selected objects.
83
84 **Accept** button in the **Selection by filters** property panel reopens **Group** property panel again and transfers all selected entities to the corresponded list.
85
86 **TUI Command**:
87
88 .. py:function:: model.addGroup(Part_1_doc, [model.selection("EDGE", "Cone_1_1/Face_1&Cone_1_1/Face_2"), model.selection("EDGE", "Cone_1_1/Face_1")])
89
90     :param part: The current part object
91     :param list: A list of selected entities with type
92     :return: Created object.
93
94 Result
95 """"""
96
97 Created Group appears in the view.
98
99 .. image:: images/group_res.png
100            :align: center
101
102 .. centered::
103    Created group
104
105 **See Also** a sample TUI Script of :ref:`tui_create_group` operation.