<source>By sizes</source>
<translation>Par tailles</translation>
</message>
+ <message>
+ <source>Through all</source>
+ <translation>À travers tous</translation>
+ </message>
</context>
<context>
<name>ExtrusionCut:base</name>
<source>By sizes</source>
<translation>Par tailles</translation>
</message>
+ <message>
+ <source>Through all</source>
+ <translation>À travers tous</translation>
+ </message>
</context>
<context>
<name>ExtrusionFuse:base</name>
<source>By bounding planes and angles</source>
<translation>En délimitant des plans et des angles</translation>
</message>
+ <message>
+ <source>Through all</source>
+ <translation>À travers tous</translation>
+ </message>
</context>
<context>
<name>RevolutionCut:axis_object</name>
<source>By bounding planes and angles</source>
<translation>En délimitant des plans et des angles</translation>
</message>
+ <message>
+ <source>Through all</source>
+ <translation>À travers tous</translation>
+ </message>
</context>
<context>
<name>RevolutionFuse:axis_object</name>
<source>Select an edge for axis</source>
<translation>Sélectionnez une arête pour l'axe</translation>
</message>
+ <message>
+ <source>Attribute "%1" is not initialized.</source>
+ <translation>L'axe de translation n'est pas sélectionné.</translation>
+ </message>
</context>
<context>
<name>Translation:distance</name>
--- /dev/null
+
+ .. _tui_create_extrusion_cut_through_all:
+
+Create Extrusion Cut through all objects
+========================================
+
+.. literalinclude:: examples/extrusion_cut_through_all.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/extrusion_cut_through_all.py>`
+
--- /dev/null
+
+ .. _tui_create_extrusion_fuse_through_all:
+
+Create Extrusion Fuse through all objects
+========================================
+
+.. literalinclude:: examples/extrusion_fuse_through_all.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/extrusion_fuse_through_all.py>`
+
--- /dev/null
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+ExtrusionCut_1 = model.addExtrusionCut(Part_1_doc,
+ [],
+ model.selection(),
+ [model.selection("SOLID", "Box_1_1")])
+Sketch_1 = model.addSketch(Part_1_doc,
+ model.selection("FACE", "Box_1_1/Top"))
+SketchCircle_1 = Sketch_1.addCircle(5, 0, 2)
+ExtrusionCut_1.setNestedSketch(Sketch_1)
+model.do()
+model.end()
--- /dev/null
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+
+# Objects to be cut
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Box_2 = model.addBox(Part_1_doc, 10, 10, 10)
+Box_3 = model.addBox(Part_1_doc, 20, 20, 20)
+Translation_1 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_2_1")], 20, 10, 0)
+Translation_2 = model.addTranslation(Part_1_doc, [model.selection("SOLID", "Box_3_1")], 40, 20, 0)
+ExtrusionFuse_1_objects_2 = [model.selection("SOLID", "Box_1_1"),
+ model.selection("SOLID", "Translation_1_1"),
+ model.selection("SOLID", "Translation_2_1")]
+
+# Extrusion direction
+Point_1 = model.addPoint(Part_1_doc, 0, 0, 0)
+Point_2 = model.addPoint(Part_1_doc, 60, 40, 20)
+Edge_1 = model.addEdge(Part_1_doc, model.selection("VERTEX", "Point_1"), model.selection("VERTEX", "Point_2"))
+
+# Base object for extrusion
+Sketch_1 = model.addSketch(Part_1_doc, model.selection("FACE", "Box_1_1/Back"))
+SketchCircle_1 = Sketch_1.addCircle(2.13, -2.43, 1.6)
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")])
+
+# Extrusion fuse through all
+ExtrusionFuse_1 = model.addExtrusionFuse(Part_1_doc,
+ [model.selection("FACE", "Face_1_1")],
+ model.selection("EDGE", "Edge_1_1"),
+ ExtrusionFuse_1_objects_2)
+
+model.do()
+model.end()
.. centered::
Start sketch
-There are two variants of the property panel for Extrusion Cut depending on the chosen option:
+There are three variants of the property panel for Extrusion Cut depending on the chosen option:
.. image:: images/extrusion_by_sizes.png
:align: left
:align: left
**By Bounding Planes** extrudes objects by specifying bounding planes and offsets.
+.. image:: images/extrusion_through_all.png
+ :align: left
+**Through All** extrudes base objects through all objects to be cut.
+
By sizes
--------
- **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
- **To size** - size for extrusion in the direction.
- **From size** - size for extrusion in the opposite direction.
-- **Cut from** - contains a list of objects which will be cut from the result of extrusion.
+- **Cut from** - contains a list of objects to be cut by the result of extrusion.
**TUI Commands**:
- **To offset** - offset for extrusion or for a bounding plane, if selected.
- **From plane** - a planar face can be selected to bound extrusion from the other side.
- **From offset** - offset for extrusion or for a bounding plane, if selected.
-- **Cut from** - contains a list of objects which will be cut from the result of extrusion.
+- **Cut from** - contains a list of objects which will be cut by the result of extrusion.
**TUI Commands**:
**Created Extrusion Cut**
**See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_by_bounding_planes` operation.
+
+Through all
+-----------
+
+.. image:: images/ExtrusionCut3.png
+ :align: center
+
+.. centered::
+ Extrusion Cut: definition through all objects
+
+- **Base objects** - contains a list of objects selected in the Object Browser or in the Viewer, which will be extruded.
+- **Axis** - if selected, it will be the direction of extrusion, otherwise objects normals will be used.
+- **Cut from** - contains a list of objects to be cut by the result of extrusion.
+
+**TUI Commands**:
+
+.. py:function:: model.addExtrusionCut(part, objectsToExtrude, objectsToCut)
+
+ :param part: The current part object.
+ :param list: A list of objects for extrusion.
+ :param list: A list of objects to cut from.
+ :return: Created object.
+
+.. py:function:: model.addExtrusionCut(part, objects, direction, objectsToCut)
+
+ :param part: The current part object.
+ :param list: A list of objects for extrusion.
+ :param object: A direction of extrusion
+ :param list: A list of objects to cut from.
+ :return: Created object.
+
+Result
+""""""
+
+The Result of the operation will be an extruded shape:
+
+.. image:: images/extrusion_cut_through_all_result.png
+ :align: center
+
+.. centered::
+ **Created Extrusion Cut**
+
+**See Also** a sample TUI Script of :ref:`tui_create_extrusion_cut_through_all` operation.