Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into CEA_2019
[modules/shaper.git] / src / CollectionPlugin / doc / groupSubstractionFeature.rst
1 .. |group_substraction.icon|    image:: images/group_substraction.png
2
3 Group Substraction
4 ==================
5
6 Group substraction produces a group containing all elements of the main groups but not present in the tool groups.
7 To create a Group Substraction in the active part:
8
9 #. select in the Main Menu *Features - > Group Substraction* item  or
10 #. click |group_substraction.icon| **Group Substraction** button in the toolbar:
11
12 The following property panel appears. 
13
14 .. image:: images/group_substraction_property_panel.png
15   :align: center
16
17 .. centered::
18   Create a group substraction operation
19
20 Input fields:
21
22 - **Name** defines the name of the group, by default, it is **GroupSubstraction_n**.
23 - The list of main groups.  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.
24 - The list of tool groups.  Selection approaches are the same as for the main groups.
25
26 Note, that operation is valid only if all the main groups and all the tool groups have the same type.
27
28 **TUI Command**:
29
30 .. py:function:: model.addGroupSubstraction(Part_1_doc,
31                                        [model.selection("COMPOUND", "Group_1"), model.selection("COMPOUND", "Group_2")],
32                                        [model.selection("COMPOUND", "Group_3"), model.selection("COMPOUND", "Group_4")])
33
34     :param part: The current part object
35     :param list: A list of main groups
36     :param list: A list of tool groups
37     :return: Created group.
38
39
40 **See Also** a sample TUI Script of :ref:`tui_create_group_substraction` operation.