Salome HOME
Task 3.3. Recovering Compsolids and Compounds
authorazv <azv@opencascade.com>
Wed, 29 May 2019 10:21:05 +0000 (13:21 +0300)
committervsv <vsv@opencascade.com>
Mon, 3 Jun 2019 10:32:11 +0000 (13:32 +0300)
Update documentation of Recover feature.

15 files changed:
src/FeaturesPlugin/doc/TUI_recoverCompoundFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/TUI_recoverDefaultFeature.rst [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/recover_compound.py [new file with mode: 0644]
src/FeaturesPlugin/doc/examples/recover_default.py [new file with mode: 0644]
src/FeaturesPlugin/doc/images/Recover.png [deleted file]
src/FeaturesPlugin/doc/images/recover.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/recover_compound_32x32.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/recover_default_32x32.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/recover_mode_compound.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/recover_mode_default.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/recover_res_compound.png [new file with mode: 0644]
src/FeaturesPlugin/doc/images/recover_res_default.png [new file with mode: 0644]
src/FeaturesPlugin/doc/recoverFeature.rst
src/FeaturesPlugin/icons/recover_compound_32x32.png
src/FeaturesPlugin/icons/recover_default_32x32.png

diff --git a/src/FeaturesPlugin/doc/TUI_recoverCompoundFeature.rst b/src/FeaturesPlugin/doc/TUI_recoverCompoundFeature.rst
new file mode 100644 (file)
index 0000000..330932f
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_recover_compound:
+
+Recover
+=======
+
+.. literalinclude:: examples/recover_compound.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/recover_compound.py>` 
+   
diff --git a/src/FeaturesPlugin/doc/TUI_recoverDefaultFeature.rst b/src/FeaturesPlugin/doc/TUI_recoverDefaultFeature.rst
new file mode 100644 (file)
index 0000000..24b9ef6
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_recover_default:
+
+Recover
+=======
+
+.. literalinclude:: examples/recover_default.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/recover_default.py>` 
+   
diff --git a/src/FeaturesPlugin/doc/examples/recover_compound.py b/src/FeaturesPlugin/doc/examples/recover_compound.py
new file mode 100644 (file)
index 0000000..781a871
--- /dev/null
@@ -0,0 +1,13 @@
+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)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Box_1_1")], [model.selection("FACE", "Plane_1")])
+Split_2 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Split_1_1_1")], [model.selection("FACE", "Plane_2")])
+Recover_1 = model.addRecover(Part_1_doc, Split_2, [Split_1.result()], True)
+model.end()
diff --git a/src/FeaturesPlugin/doc/examples/recover_default.py b/src/FeaturesPlugin/doc/examples/recover_default.py
new file mode 100644 (file)
index 0000000..ce6b035
--- /dev/null
@@ -0,0 +1,13 @@
+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)
+Plane_4 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Left"), model.selection("FACE", "Box_1_1/Right"))
+Plane_5 = model.addPlane(Part_1_doc, model.selection("FACE", "Box_1_1/Front"), model.selection("FACE", "Box_1_1/Back"))
+Split_1 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Box_1_1")], [model.selection("FACE", "Plane_1")])
+Split_2 = model.addSplit(Part_1_doc, [model.selection("SOLID", "Split_1_1_1")], [model.selection("FACE", "Plane_2")])
+Recover_1 = model.addRecover(Part_1_doc, Split_2, [Split_1.result().subResult(0)])
+model.end()
diff --git a/src/FeaturesPlugin/doc/images/Recover.png b/src/FeaturesPlugin/doc/images/Recover.png
deleted file mode 100644 (file)
index ecf06df..0000000
Binary files a/src/FeaturesPlugin/doc/images/Recover.png and /dev/null differ
diff --git a/src/FeaturesPlugin/doc/images/recover.png b/src/FeaturesPlugin/doc/images/recover.png
new file mode 100644 (file)
index 0000000..ddcc1b0
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover.png differ
diff --git a/src/FeaturesPlugin/doc/images/recover_compound_32x32.png b/src/FeaturesPlugin/doc/images/recover_compound_32x32.png
new file mode 100644 (file)
index 0000000..011658a
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover_compound_32x32.png differ
diff --git a/src/FeaturesPlugin/doc/images/recover_default_32x32.png b/src/FeaturesPlugin/doc/images/recover_default_32x32.png
new file mode 100644 (file)
index 0000000..4e49a37
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover_default_32x32.png differ
diff --git a/src/FeaturesPlugin/doc/images/recover_mode_compound.png b/src/FeaturesPlugin/doc/images/recover_mode_compound.png
new file mode 100644 (file)
index 0000000..22797dc
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover_mode_compound.png differ
diff --git a/src/FeaturesPlugin/doc/images/recover_mode_default.png b/src/FeaturesPlugin/doc/images/recover_mode_default.png
new file mode 100644 (file)
index 0000000..f7370f1
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover_mode_default.png differ
diff --git a/src/FeaturesPlugin/doc/images/recover_res_compound.png b/src/FeaturesPlugin/doc/images/recover_res_compound.png
new file mode 100644 (file)
index 0000000..9bcc7f7
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover_res_compound.png differ
diff --git a/src/FeaturesPlugin/doc/images/recover_res_default.png b/src/FeaturesPlugin/doc/images/recover_res_default.png
new file mode 100644 (file)
index 0000000..7026429
Binary files /dev/null and b/src/FeaturesPlugin/doc/images/recover_res_default.png differ
index 8370449c051f83c4acdd7a53a2d0a64e99e8e943..18ae83f59d68a0675b951833df75adf60cb54f0f 100644 (file)
@@ -1,9 +1,85 @@
- Recover
- =======
+Recover
+=======
 
+**Recover** feature restores some objects used in previous operations.
 
-.. image:: images/Recover.png
-  :align: center
+To recover in the active part:
+
+#. select in the Main Menu *Features - > Recover* item or
+#. click **Recover** button in the toolbar
+
+.. image:: images/recover.png
+   :align: center
 
 .. centered::
-  Recover operation
+   **Recover** button
+
+The feature has the following options:
+
+.. image:: images/recover_default_32x32.png
+   :align: left
+restore only the objects used in the operation
+
+.. image:: images/recover_compound_32x32.png
+   :align: left
+restore full compound/compsolid if the operation used one or more of its sub-shapes
+
+
+Recover objects
+---------------
+
+.. image:: images/recover_mode_default.png
+   :align: center
+
+.. centered::
+   Recover objects used in operation
+
+- **Feature** field contains one of the previous operations;
+- **List of recovered** objects contains all the shapes used in the operation. Need to enable checkbox to restore a shape.
+
+**TUI Command**: *model.addRecover(Part_doc, feature, [recovering_results])*
+
+**Arguments**: part + the name of the feature + list of results used in the feature.
+
+Result
+""""""
+
+Result of restoring the shape used in Split operation in compsolid is a single solid.
+
+.. image:: images/recover_res_default.png
+   :align: center
+
+.. centered::
+   Recover a solid
+
+**See also** a sample TUI script of ref:`tui_recover_default` operation.
+
+
+Recover top-level objects
+-------------------------
+
+.. image:: images/recover_mode_compound.png
+   :align: center
+
+.. centered::
+   Recover top-level compounds/compsolids of objects used in operation
+
+- **Feature** field contains one of the previous operations;
+- **List of recovered** objects contains all top-level shapes (compounds/compsolids) of the shapes used in the operation. Need to enable checkbox to restore a shape.
+
+**TUI Command**: *model.addRecover(Part_doc, feature, [recovering_results], True)*
+
+**Arguments**: part + the name of the feature + list of results used in the feature + *True* to specify restoring compounds.
+
+Result
+""""""
+
+Result of restoring the shape used in Split operation in compsolid is a full compsolid.
+
+.. image:: images/recover_res_compound.png
+   :align: center
+
+.. centered::
+   Recover a compsolid
+
+**See also** a sample TUI script of ref:`tui_recover_compound` operation.
index 88b4752d1f61b144ed4acf43ac37d0e9c5244f65..011658a27296638a34d8330341cb4c138ce7f1cb 100644 (file)
Binary files a/src/FeaturesPlugin/icons/recover_compound_32x32.png and b/src/FeaturesPlugin/icons/recover_compound_32x32.png differ
index caf03179b3382b1c5e9164f957c28eb72eea194c..4e49a37363c4e38e83422c88eec68efd0f913dea 100644 (file)
Binary files a/src/FeaturesPlugin/icons/recover_default_32x32.png and b/src/FeaturesPlugin/icons/recover_default_32x32.png differ