Salome HOME
08e87586c25df7ccdc1c98f917e262069a6c4115
[modules/shaper.git] / src / FeaturesPlugin / doc / cutFeature.rst
1 .. _featureCut:
2 .. |bool_cut.icon|    image:: images/bool_cut.png
3    :height: 16px
4
5 Cut
6 ===
7
8 Cut feature implements a Boolean operation to cut tool objects from main objects.
9
10 To perform a Cut operationin the active part:
11
12 #. select in the Main Menu *Features - > Cut* item  or
13 #. click |bool_cut.icon| **Cut** button in the toolbar
14
15 The following property panel will be opened:
16
17 .. figure:: images/boolean_cut_property_panel.png
18    :align: center
19
20    **Cut operation**
21
22 - **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be cut by tool objects.
23   Any kind of shape can be selected, including subshapes of compsolids/compounds.
24   In this case only selected subshapes will be cut, others will stay untouched (as much as possible).
25 - **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will cut main objects.
26   Any kind of shape can be selected, including subshapes of compsolids/compounds.
27   Non-selected subshapes from compsolids/compounds will be ignored.
28 - **See preview** button shows a result of the operation.
29
30 **TUI Command**:
31
32 .. py:function:: model.addCut(Part_doc, mainObjects, toolObjects)
33
34     :param part: The current part object
35     :param list: A list of main objects.
36     :param list: A list of tool objects.
37     :return: Created object
38
39 Result
40 """"""
41
42 A result shape which is a cut by tool objects from main object, will be produced for each selected object:
43
44 .. figure:: images/CreatedCut.png
45    :align: center
46
47    **Created cut**
48
49 If a subsolid (yellow wireframe) of a compsolid was selected:
50
51 .. figure:: images/boolean_cut_subsolids_arguments.png
52    :align: center
53
54    **Cut arguments**
55
56 it will be cut in the result and not selected subsolids will be added to it:
57
58 .. figure:: images/boolean_cut_subsolids_result.png
59    :align: center
60
61    **Cut subsolid result**
62
63
64 **See Also** a sample TUI Script of :ref:`tui_create_cut` operation.