Salome HOME
Copyright update 2022
[modules/shaper.git] / src / FeaturesPlugin / doc / extrusionCutFeature.rst
1 .. |extrusion_cut_btn.icon|    image:: images/extrusion_cut_btn.png
2
3 Extrusion Cut
4 =============
5
6 Extrusion Cut feature extrudes selected objects along their normals or selected axis and cuts the result from other objects.
7
8 To perform Extrusion Cut in the active part:
9
10 #. select in the Main Menu *Features - > Extrusion Cut* item  or
11 #. click |extrusion_cut_btn.icon| **Extrusion Cut** button in the toolbar
12
13 The following property panel will be opened:
14
15 .. figure:: images/StartSketch.png
16    :align: center
17
18    Start sketch
19
20 There are three variants of the property panel for Extrusion Cut depending on the chosen option:
21
22 .. figure:: images/extrusion_by_sizes.png
23    :align: left
24    :height: 24px
25
26 **By Sizes** extrudes objects by specifying sizes.
27
28 .. figure:: images/extrusion_by_bounding_planes.png
29    :align: left
30    :height: 24px
31
32 **By Bounding Planes** extrudes objects by specifying bounding planes and offsets.
33
34 .. figure:: images/extrusion_through_all.png
35    :align: left
36    :height: 24px
37
38 **Through All** extrudes base objects through all objects to be cut.
39
40 --------------------------------------------------------------------------------
41
42 By sizes
43 --------
44
45 .. figure:: images/ExtrusionCut1.png
46    :align: center
47
48    Extrusion Cut: definition by sizes
49
50 - **Base objects** - contains a list of objects selected in the Object Browser or in the Viewer, which will be extruded.
51 - **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
52 - **To size**  - size for extrusion in the direction.
53 - **From size** - size for extrusion in the opposite direction.
54 - **Cut from** - contains a list of objects to be cut by the result of extrusion.
55
56 **TUI Commands**:  
57
58 .. py:function:: model.addExtrusionCut(part, objectsToExtrude, size, objectsToCut)
59
60     :param part: The current part object.
61     :param list: A list of objects for extrusion.
62     :param number: Size of extrucion.
63     :param list: A list of objects to cut from.
64     :return: Created object.
65
66 .. py:function:: model.addExtrusionCut(part, objects, direction, size, objectsToCut)
67
68     :param part: The current part object.
69     :param list: A list of objects for extrusion.
70     :param object: A direction of extrusion
71     :param number: Size of extrucion.
72     :param list: A list of objects to cut from.
73     :return: Created object.
74
75 .. py:function:: model.addExtrusionCut(part, objects, toSize, fromSize, objectsToCut)
76
77     :param part: The current part object.
78     :param list: A list of objects for extrusion.
79     :param number: "Size to" value.
80     :param number: "Size from" value.
81     :param list: A list of objects to cut from.
82     :return: Created object.
83
84 .. py:function:: model.addExtrusionCut(part, objects, direction, toSize, fromSize, objectsToCut)
85
86     :param part: The current part object.
87     :param list: A list of objects for extrusion.
88     :param object: A direction of extrusion
89     :param number: "Size to" value.
90     :param number: "Size from" value.
91     :param list: A list of objects to cut from.
92     :return: Created object.
93
94 Result
95 """"""
96
97 The Result of the operation will be an extruded shape:
98
99 .. figure:: images/extrusion_cut_by_sizes_result.png
100    :align: center
101
102    **Created Extrusion Cut**
103
104 **See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_by_sizes` operation.
105
106 By bounding planes
107 ------------------
108
109 .. figure:: images/ExtrusionCut2.png
110    :align: center
111
112    Extrusion Cut: definition by bounding planes
113
114 - **Base objects** - contains a list of objects selected in the Object Browser or in the Viewer, which will be extruded.
115 - **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
116 - **To plane** - a planar face can be selected to bound extrusion from one side.
117 - **To offset** - offset for extrusion or for a bounding plane, if selected.
118 - **From plane** - a planar face can be selected to bound extrusion from the other side.
119 - **From offset** - offset for extrusion or for a bounding plane, if selected.
120 - **Cut from** - contains a list of objects which will be cut by the result of extrusion.
121
122 **TUI Commands**:
123
124 .. py:function:: model.addExtrusionCut(part, objects, toObject, toOffset, fromObject, fromOffset, objectsToCut)
125
126     :param part: The current part object.
127     :param list: A list of objects for extrusion.
128     :param object: "To object".
129     :param number: "Offset to" value.
130     :param object: "From object".
131     :param number: "Offset from" value.
132     :param list: A list of objects to cut from.
133     :return: Created object.
134
135 .. py:function:: model.addExtrusionCut(part, objects, direction, toObject, toOffset, fromObject, fromOffset, objectsToCut)
136
137     :param part: The current part object.
138     :param list: A list of objects for extrusion.
139     :param object: A direction of extrusion
140     :param object: "To object".
141     :param number: "Offset to" value.
142     :param object: "From object".
143     :param number: "Offset from" value.
144     :param list: A list of objects to cut from.
145     :return: Created object.
146
147 Result
148 """"""
149
150 The Result of the operation will be an extruded shape:
151
152 .. figure:: images/extrusion_cut_by_bounding_planes_result.png
153    :align: center
154
155    **Created Extrusion Cut**
156
157 **See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_by_bounding_planes` operation.
158
159 Through all
160 -----------
161
162 .. figure:: images/ExtrusionCut3.png
163    :align: center
164
165    Extrusion Cut: definition through all objects
166
167 - **Base objects** - contains a list of objects selected in the Object Browser or in the Viewer, which will be extruded.
168 - **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
169 - **Cut from** - contains a list of objects to be cut by the result of extrusion.
170
171 **TUI Commands**:  
172
173 .. py:function:: model.addExtrusionCut(part, objectsToExtrude, objectsToCut)
174
175     :param part: The current part object.
176     :param list: A list of objects for extrusion.
177     :param list: A list of objects to cut from.
178     :return: Created object.
179
180 .. py:function:: model.addExtrusionCut(part, objects, direction, objectsToCut)
181
182     :param part: The current part object.
183     :param list: A list of objects for extrusion.
184     :param object: A direction of extrusion
185     :param list: A list of objects to cut from.
186     :return: Created object.
187
188 Result
189 """"""
190
191 The Result of the operation will be an extruded shape:
192
193 .. figure:: images/extrusion_cut_through_all_result.png
194    :align: center
195
196    **Created Extrusion Cut**
197
198 **See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_through_all` operation.