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