Salome HOME
2e3b45828ab3cf0674d2fce36972cb2afc3ffc1a
[modules/shaper.git] / src / FeaturesPlugin / doc / smashFeature.rst
1 .. |bool_smash.icon|    image:: images/bool_smash.png
2    :height: 16px
3
4 .. _featureSmash:
5
6 Smash
7 =====
8
9 Smash feature implements a boolean operation for smashing a set of main objects by a set of tool objects.
10
11 To create a Smash in the active part:
12
13 #. select in the Main Menu *Features - > Smash* item  or
14 #. click |bool_smash.icon| **Smash** button in the toolbar
15
16 The following property panel will be opened:
17
18 .. figure:: images/Smash.png
19    :align: center
20
21    **Smash operation**
22
23 - **Main Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be smashed by tool objects.
24   If a subshape that belongs to a compsolid/compound was selected, other shapes of this compsolid/compound will be cut from
25   other objects (to avoid self intersection) and added to the result.
26 - **Tool Objects** contains a list of objects selected in the Object Browser or in the Viewer, which will be smashed into main objects.
27   If a subshape that belongs to a compsolid/compound was selected, other shapes of this compsolid/compound will be ignored.
28 - **See preview** button shows a result of the operation.
29
30 Main objects and Tools objects should have the same dimension. There are supported 2-dimensional (face) or 3-dimensional (solid, compsolid) arguments.
31
32 **TUI Command**:
33
34 .. py:function:: model.addSmash(Part_doc, mainObjects, toolObjects)
35
36     :param part: The current part object.
37     :param list: A list of main objects.
38     :param list: A list of tool objects.
39     :return: Rotated object.
40
41 Result
42 """"""
43
44 The Result of the operation will be a shape which is a smash of tool objects from main objects:
45
46 .. figure:: images/CreatedSmash.png
47    :align: center
48
49    **Smash created**
50
51 **See Also** a sample TUI Script of :ref:`tui_create_smash` operation.