Salome HOME
Ameliorate help pages
[modules/shaper.git] / src / FeaturesPlugin / doc / commonFeature.rst
1 .. |bool_common.icon|    image:: images/bool_common.png
2
3 Common
4 ======
5
6 Common feature implements a Boolean operation for extraction of a common part from a set of selected shapes.
7
8 To perform a Common operation in the active part:
9
10 #. select in the Main Menu *Features - > Common* item  or
11 #. click |bool_common.icon| **Common** button in the toolbar
12
13 There are 2 options for creation of a Common:
14
15 .. image:: images/bool_common_simple.png
16    :align: left
17 **Simple** common part between all selected objects.
18
19 .. image:: images/bool_common_advanced.png
20    :align: left
21 **Advanced** common part for each object between this object and all tools.
22
23
24 Simple
25 ------
26
27 .. image:: images/boolean_common_simple_property_panel.png
28    :align: center
29
30 .. centered::
31    **Simple**
32
33 - **Objects** contains a list of objects selected in the Object Browser or in the Viewer.
34   If a subshape that belongs to a compsolid/compound was selected, other shapes of this compsolid/compound will be ignored.
35 - **See preview** button shows a result of the operation.
36
37 **TUI Command**:
38
39 .. py:function:: model.addCommon(Part_doc, objects)
40
41     :param part: The current part object
42     :param list: A list of objects.
43     :return: Created object
44
45 Result
46 """"""
47
48 The Result of the operation will be a shape which is a common for all selected shapes:
49
50 .. image:: images/CreatedCommon.png
51            :align: center
52
53 .. centered::
54    **Common created**
55
56 **See Also** a sample TUI Script of :ref:`tui_create_common` operation.
57
58 Advanced
59 --------
60
61 .. image:: images/boolean_common_advanced_property_panel.png
62    :align: center
63
64 .. centered::
65    **Advanced**
66
67 - **Objects** contains a list of objects selected in the Object Browser or in the Viewer.
68   If a subshape that belongs to a compsolid/compound was selected, other shapes of this compsolid/compound will be cut from
69   other objects (to avoid self-intersection) and added to the result.
70 - **Tools** contains a list of objects selected in the Object Browser or in the Viewer, which will be fused with tool objects.
71   If a subshape that belongs to a compsolid/compound was selected, other shapes of this compsolid/compound  will be ignored.
72 - **See preview** button shows a result of the operation.
73
74 **TUI Command**:
75
76 .. py:function:: model.addCommon(Part_doc, objects, tools)
77
78     :param part: The current part object
79     :param list: A list of objects.
80     :param list: A list of tools.
81     :return: Created object
82
83 Result
84 """"""
85
86 For each selected object, the common part between this object and all tools will be found:
87
88 .. image:: images/boolean_common_result.png
89            :align: center
90
91 .. centered::
92    **Created common**
93
94 **See Also** a sample TUI Script of :ref:`tui_create_common` operation.