1 .. |group_substraction.icon| image:: images/group_substraction.png
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:
9 #. select in the Main Menu *Features - > Group Substraction* item or
10 #. click |group_substraction.icon| **Group Substraction** button in the toolbar:
12 The following property panel appears.
14 .. image:: images/group_substraction_property_panel.png
18 Create a group substraction operation
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.
26 Note, that operation is valid only if all the main groups and all the tool groups have the same type.
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")])
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.
40 **See Also** a sample TUI Script of :ref:`tui_create_group_substraction` operation.