--- /dev/null
+
+ .. _tui_create_subshape:
+
+Create Sub-shapes
+=================
+
+.. literalinclude:: examples/subshapes.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/subshapes.py >`
+
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sketch_1 = model.addSketch(Part_1_doc, model.defaultPlane("XOY"))
+SketchLine_1 = Sketch_1.addLine(-56.65008576329333, 13.33962264150944, 9.528301886792452, 66.69811320754719)
+SketchLine_1.result().setColor(225, 0, 0)
+SketchLine_2 = Sketch_1.addLine(9.528301886792452, 66.69811320754719, 78.47855917667239, -27.54545454545455)
+SketchLine_2.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_1 = Sketch_1.setCoincident(SketchLine_1.endPoint(), SketchLine_2.startPoint())
+SketchLine_3 = Sketch_1.addLine(78.47855917667239, -27.54545454545455, 7.795883361921087, -89.2195540308748)
+SketchLine_3.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_2 = Sketch_1.setCoincident(SketchLine_2.endPoint(), SketchLine_3.startPoint())
+SketchLine_4 = Sketch_1.addLine(7.795883361921087, -89.2195540308748, 12.64665523156088, -20.9622641509434)
+SketchLine_4.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_3 = Sketch_1.setCoincident(SketchLine_3.endPoint(), SketchLine_4.startPoint())
+SketchLine_5 = Sketch_1.addLine(12.64665523156088, -20.9622641509434, -56.65008576329333, 13.33962264150944)
+SketchLine_5.result().setColor(225, 0, 0)
+SketchConstraintCoincidence_4 = Sketch_1.setCoincident(SketchLine_4.endPoint(), SketchLine_5.startPoint())
+SketchConstraintCoincidence_5 = Sketch_1.setCoincident(SketchLine_5.endPoint(), SketchLine_1.startPoint())
+model.do()
+Face_1 = model.addFace(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchLine_1r-SketchLine_2r-SketchLine_3r-SketchLine_4r-SketchLine_5r")])
+SubShapes_1 = model.addSubShapes(Part_1_doc, model.selection("FACE", "Face_1_1"), [model.selection("EDGE", "Sketch_1/Edge-SketchLine_5"), model.selection("EDGE", "Sketch_1/Edge-SketchLine_4")])
+model.do()
+model.end()
:align: center
.. centered::
- Create a polyline
+ Polyline property panel
Input fields:
- **Points and vertices** panel contains list of points and vertices selected in 3D OCC viewer. Polyline consequently connects points;
-- **Closed** check-box turns on/off connection of the start and end points to make polyline closed.
+- **Closed** check-box turns on/off connection of the start and end points to make polyline closed/opened.
**TUI Commands**: *model.addPolyline3D(Part_1_doc, Polyline_objects, Key)*
Sub-shapes
==========
+The feature **Sub-shapes** creates sub-shapes of selected entity.
+
+To create Sub-shapes in the active part:
+
+#. select in the Main Menu *Build - > Sub-shapes* item or
+#. click **Sub-shapes** button in the toolbar
+
+.. image:: images/feature_subshapes.png
+ :align: center
+
+.. centered::
+ **Sub-shapes** button
+
+The following property panel appears.
.. image:: images/SubShapes.png
:align: center
.. centered::
- Create sub-shapes
+ Sub-shapes property panel
+
+Input fields:
+
+- **Shape** panel contains shape to be modified. Shape is selected in 3D OCC viewer or object browser;
+- **Sub-shapes** panel contains list of sub-shapes of given shape to be included into result. Sub-shapes are selected in 3D OCC viewer.
+
+**TUI Command**: *model.addSubShapes(Part_doc, shape, sub-shapes)*
+
+**Arguments**: 1 part + shape in format *model.selection(TYPE, shape)* + list of sub-shapes in format *model.selection(TYPE, subshape)*.
+
+Result
+""""""
+Result of operation is shown below.
+
+.. image:: images/SubShapes.png
+ :align: center
+
+.. centered::
+ Sub-shapes
+
+**See Also** a sample TUI Script of a :ref:`tui_create_subshape` operation.
+
+
+
+
--- /dev/null
+
+ .. _tui_create_angularcopy:
+
+Create Angular copy
+===================
+
+.. literalinclude:: examples/angularcopy.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/angularcopy.py >`
+
--- /dev/null
+
+ .. _tui_create_fillet1:
+
+Create Fillet by fixed radius
+=============================
+
+.. literalinclude:: examples/fillet1.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fillet1.py >`
+
--- /dev/null
+
+ .. _tui_create_fillet2:
+
+Create Fillet by variable radius
+================================
+
+.. literalinclude:: examples/fillet2.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/fillet2.py >`
+
--- /dev/null
+
+ .. _tui_create_linearcopy:
+
+Create Linear copy
+==================
+
+.. literalinclude:: examples/linearcopy.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/linearcopy.py >`
Angular copy
============
+The feature **Angular copy** makes a compound of several rotated shapes basing on the initial shape.
+
+To create Angular copy in the active part:
+
+#. select in the Main Menu *Part - > Angular copy* item or
+#. click **Angular copy** button in the toolbar
+
+.. image:: images/multirotation.png
+ :align: center
+
+.. centered::
+ **Angular copy** button
+
+The following property panel appears.
.. image:: images/AngularCopy.png
:align: center
.. centered::
- Angular copy definition
+ Angular copy property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be rotated. Shapes are selected in 3D OCC viewer or object browser;
+- **Vector of rotation** defines the axis of rotation. Vector is edge, axis selected in 3D OCC viewer or object browser;
+- **Angular Step** check-box turns on/off definition of the angle by which the object is rotated. By default (if the checkbox is not checked), **Angular Step** = 2 * PI / NbTimes;
+- **Nb. Copies** defines the number of rotated shape copies in the resulting compound. If **Nb. Copies** = 1, the result contains only the initial shape.
+
+**TUI Command**: *model.addMultiRotation(Part_doc, [shape], axis, step, Nb)*
+
+**Arguments**: 1 part + list of shapes in format *model.selection(TYPE, shape)* + axis in format *model.selection(TYPE, shape)*+ real (step value) + integer (Nb. Copies).
+
+Result
+""""""
+Result of cylinder rotation is compound.
+
+.. image:: images/angularcopy.png
+ :align: center
+
+.. centered::
+ Angular copy
+
+**See Also** a sample TUI Script of a :ref:`tui_create_angularcopy` operation.
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Cylinder_1 = model.addCylinder(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), model.selection("EDGE", "PartSet/OZ"), 5, 10)
+AngularCopy_1 = model.addMultiRotation(Part_1_doc, [model.selection("SOLID", "Cylinder_1_1")], model.selection("EDGE", "PartSet/OY"), 90, 3)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+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)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("FACE", "Box_1_1/Front"), model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 2)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+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)
+Fillet_1 = model.addFillet(Part_1_doc, [model.selection("EDGE", "Box_1_1/Left&Box_1_1/Top")], 1, 3)
+model.do()
+model.end()
--- /dev/null
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Sphere_1 = model.addSphere(Part_1_doc, model.selection("VERTEX", "PartSet/Origin"), 10)
+LinearCopy_1 = model.addMultiTranslation(Part_1_doc, [model.selection("SOLID", "Sphere_1_1")], model.selection("EDGE", "PartSet/OX"), 30, 3, model.selection("EDGE", "PartSet/OY"), 30, 2)
+model.do()
+model.end()
Fillet
======
+The feature **Fillet** creates fillets on the edges of a shape.
-.. image:: images/Fillet.png
+To create Fillet in the active part:
+
+#. select in the Main Menu *Feature - > Fillet* item or
+#. click **Fillet** button in the toolbar
+
+.. image:: images/fillet.png
+ :align: center
+
+.. centered::
+ **Fillet** button
+
+There are 2 types of fillet:
+
+ .. image:: images/fillet_fixed_radius.png
+ :align: left
+ fillet by fixed radius
+
+ .. image:: images/fillet_var_radius.png
+ :align: left
+ fillet by variable radius
+
+Fillet by fixed radius
+----------------------
+
+The property panel is shown below.
+
+.. image:: images/FilletFixed.png
:align: center
.. centered::
- Fillet by fixed radius
+ Fillet by fixed radius property panel
+
+Input fields:
+
+- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Radius** defines fillet radius.
+
+**TUI Command**: *model.addFillet(Part_doc, [face,edge], radius)*
+
+**Arguments**: 1 part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + real (radius value).
+
+Result
+""""""
+
+Result of **Fillet by fixed radius** is shown below.
+.. image:: images/fillet_fix_rad.png
+ :align: center
-.. image:: images/Fillet2.png
+.. centered::
+ Fillet by fixed radius
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet1` operation.
+
+Fillet by variable radius
+-------------------------
+
+Alternatively, there is a possibility to create a fillet with a variable radius.
+
+.. image:: images/FilletVarious.png
:align: center
.. centered::
- Fillet by varyable radius
+ Fillet by variable radius
+
+Input fields:
+
+- **Faces or/and edges** panel contains faces and edges on which fillet is done. All edges of face are subjected to fillet operation. Faces and edges are selected in 3D OCC viewer;
+- **Start radius** defines the fillet radius at the start of the selected edge(s);
+- **End radius** defines the fillet radius at the end of the selected edge(s).
+
+**TUI Command**: *model.addFillet(Part_doc, [face,edge], R1, R2)*
+
+**Arguments**: 1 part + list of faces and edges subjected to fillet operation in format *model.selection(TYPE, shape)* + 2 reals (start and end radius values).
+
+Result
+""""""
+
+Result of **Fillet by variable radius** is shown below.
+
+.. image:: images/fillet_var_rad.png
+ :align: center
+
+.. centered::
+ Fillet by variable radius
+
+**See Also** a sample TUI Script of a :ref:`tui_create_fillet2` operation.
Linear copy
===========
+The feature **Linear copy** makes several translations of a selected shape in one or two directions.
+
+To create Linear copy in the active part:
+
+#. select in the Main Menu *Part - > Linear copy* item or
+#. click **Linear copy** button in the toolbar
+
+.. image:: images/multitranslation.png
+ :align: center
+
+.. centered::
+ **Linear copy** button
+
+The following property panel appears.
.. image:: images/LinearCopy.png
:align: center
.. centered::
- Linear copy
+ Linear copy property panel
+
+Input fields:
+
+- **Main objects** panel contains shapes to be translated. Shapes are selected in 3D OCC viewer or object browser;
+- **First direction** defines translation in the first direction:
+
+ - **Vector of translation** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+ - **Step** defines the distance between the shape copies;
+ - **Nb. Copies** is the number of shape copies;
+
+- **Second direction** check-box turns on/off translation in the second direction:
+
+ - **Vector of translation** defines vector along which the object will be translated. Vector is edge, axis selected in 3D OCC viewer or object browser;
+ - **Step** defines the distance between the shape copies;
+ - **Nb. Copies** defines the number of shape copies.
+
+**TUI Command**: *model.addMultiTranslation(Part_doc, [shape], axis1, step1, Nb1, axis2, step2, Nb2)*
+
+**Arguments**: 1 part + list of shapes in format *model.selection(TYPE, shape)* + 2 axis in format *model.selection(TYPE, shape)*+ 2 real (step values) + 2 integers (Nb. Copies).
+
+Result
+""""""
+Result of operation is compound.
+
+.. image:: images/linearcopy.png
+ :align: center
+
+.. centered::
+ Sub-shapes
+
+**See Also** a sample TUI Script of a :ref:`tui_create_linearcopy` operation.
\ No newline at end of file