<source>Recover</source>
<translation>Récupérer</translation>
</message>
+ <message>
+ <source>Copy</source>
+ <translation>Copie</translation>
+ </message>
<message>
<source>Remove Sub-Shapes</source>
<translation>Supprimer les sous-formes</translation>
</message>
</context>
+ <!-- Copy -->
+ <context>
+ <name>Copy</name>
+ <message>
+ <source>Copy</source>
+ <translation>Copie</translation>
+ </message>
+ <message>
+ <source>Copies results or sub-results</source>
+ <translation>Copie les résultats ou les sous-résultats</translation>
+ </message>
+ </context>
+ <context>
+ <name>Recover:objects</name>
+ <message>
+ <source>Sources:</source>
+ <translation>Sources:</translation>
+ </message>
+ <message>
+ <source>Select copied objects</source>
+ <translation>Sélectionnez les objets copiés</translation>
+ </message>
+ </context>
+ <context>
+ <name>Recover:number</name>
+ <message>
+ <source>Nb copies</source>
+ <translation>Nb de copies</translation>
+ </message>
+ <message>
+ <source>Number of copies</source>
+ <translation>Nombre de copies</translation>
+ </message>
+ </context>
+
<!-- Remove_SubShapes -->
<context>
<name>Remove_SubShapes</name>
aFactory = ModelAPI_Session.get().validators()
assert(aFactory.validate(Group_1.feature()))
selectionList = Group_1.feature().selectionList("group_list")
-assert(selectionList.size() == 1) # still the same solid
+assert(selectionList.size() == 2) # still the same solid + the copied and filleted
-assert(selectionList.value(0).namingName() == "Fillet_1_1_1")
+assert(selectionList.value(0).namingName() == "Extrusion_1_1_1")
+assert(selectionList.value(1).namingName() == "Fillet_1_1_1")
assert(model.checkPythonDump())
angularCopyFeature.rst
chamferFeature.rst
commonFeature.rst
+ copyFeature.rst
cutFeature.rst
extrusionCutFeature.rst
extrusionFeature.rst
--- /dev/null
+
+ .. _tui_create_copy:
+
+Create Copy
+============
+
+.. literalinclude:: examples/copy.py
+ :linenos:
+ :language: python
+
+:download:`Download this script <examples/copy.py>`
+
--- /dev/null
+.. |copy_btn.icon| image:: images/copy_btn.png
+
+Copy
+=====
+
+Copy feature makes duplicates of the selected features, results, sub-results and sub-shapes. For the whole feature selected
+all results of this feature are copied. The referenced arguments of this feature are not concealed. The history behavior of
+copy is specific: *Move to the End* of groups will move to all copy-results. For an example, if a face of a box was selected
+for a group and a copy of this box was done, the *Move to the End* of this group will cause two faces appeared in this Group:
+the original one and the copy.
+
+
+To create a Copy in the active part:
+
+#. select in the Main Menu *Features - > Copy* item or
+#. click |copy_btn.icon| **Copy** button in the toolbar
+
+The following property panel will be opened:
+
+.. image:: images/Copy.png
+ :align: center
+
+.. centered::
+ **Copy operation**
+
+Here it is necessary to select some objects. Only results and sub-results and their sub-shapes located in the folder **Results** can be selected and copied.
+Also it is possible to increase the number of resulting copies.
+
+**Apply** button creates a copy.
+
+**Cancel** button cancels the operation.
+
+**TUI Command**:
+
+.. py:function:: model.addCopy(Part_doc, objects, number_of_copies)
+
+ :param part: The current part object.
+ :param objects: A list of objects.
+ :param number_of_copies: A number of resulting copies.
+ :return: Result feature Copy.
+
+Result
+""""""
+
+The Result of the operation will be one or several copies of the selected shapes located in the same place:
+
+.. image:: images/CreatedCopy.png
+ :align: center
+
+.. centered::
+ **Copy created**
+
+**See Also** a sample TUI Script of :ref:`tui_create_copy` operation.
--- /dev/null
+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"))
+SketchCircle_1 = Sketch_1.addCircle(7, 11, 2)
+model.do()
+Extrusion_1 = model.addExtrusion(Part_1_doc, [model.selection("FACE", "Sketch_1/Face-SketchCircle_1_2r")], model.selection(), 10, 0)
+Extrusion_1.result().setTransparency(0.75)
+Copy_1 = model.addCopy(Part_1_doc, [model.selection("FACE", "Extrusion_1_1/From_Face"), model.selection("FACE", "Extrusion_1_1/To_Face")], 2)
+Copy_1.result().setColor(0, 170, 0)
+Copy_1.results()[1].setColor(0, 170, 0)
+Copy_1.results()[2].setColor(0, 170, 0)
+Copy_1.results()[3].setColor(0, 170, 0)
+
+model.end()
.. py:function:: model.addUnion(Part_doc, objects)
:param part: The current part object.
- :param list: A list of objects.
+ :param objects: A list of objects.
:return: Result object.
Result