]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Create Exchange plugin help pages
authorvsv <vsv@opencascade.com>
Thu, 16 Aug 2018 11:34:19 +0000 (14:34 +0300)
committervsv <vsv@opencascade.com>
Thu, 16 Aug 2018 11:34:19 +0000 (14:34 +0300)
17 files changed:
src/ExchangePlugin/doc/TUI_exportFeature.rst [new file with mode: 0644]
src/ExchangePlugin/doc/TUI_importFeature.rst [new file with mode: 0644]
src/ExchangePlugin/doc/dumpFeature.rst
src/ExchangePlugin/doc/examples/export.py [new file with mode: 0644]
src/ExchangePlugin/doc/examples/import.py [new file with mode: 0644]
src/ExchangePlugin/doc/exportFeature.rst
src/ExchangePlugin/doc/images/DumpFileDlg.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/Dump_panel.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/ExportFileDlg.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/Export_panel.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/FileImported.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/Import_panel.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/OpenFileDlg.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/dump.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/export.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/import.png [new file with mode: 0644]
src/ExchangePlugin/doc/importFeature.rst

diff --git a/src/ExchangePlugin/doc/TUI_exportFeature.rst b/src/ExchangePlugin/doc/TUI_exportFeature.rst
new file mode 100644 (file)
index 0000000..49eecc5
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_export_file:
+
+Export File
+===========
+
+.. literalinclude:: examples/export.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/export.py>` 
+   
diff --git a/src/ExchangePlugin/doc/TUI_importFeature.rst b/src/ExchangePlugin/doc/TUI_importFeature.rst
new file mode 100644 (file)
index 0000000..69ed88a
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_import_file:
+
+Import File
+===========
+
+.. literalinclude:: examples/import.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/import.py>` 
+   
index afdc0240705c7a1f00638ccd70aa145c975e1e9a..3bb2969cdd40e722e9d0e98ec382573a089608cb 100644 (file)
@@ -1,3 +1,38 @@
 
 Dump
 ====
+
+It is possible to dump current study state into a Python script. To dump a study:
+
+#. select in the Main Menu *Part - > Dump* item  or
+#. click **Dump** button in the toolbar.
+
+.. image:: images/dump.png
+   :align: center
+
+.. centered::
+   **Dump**  button 
+
+The following property panel will be opened:
+
+.. image:: images/Dump_panel.png
+   :align: center
+       
+.. centered::
+   **Dump property panel**
+
+In this panel it is necessary to enter a file name directly into input field or press **'...'** button and browse it with help of dump file dialog box:
+
+.. image:: images/DumpFileDlg.png
+   :align: center
+       
+.. centered::
+   **Dump file dialog box**
+  
+**Apply** button writes the dump file.
+  
+**Cancel** button cancels operation.
+
+**TUI Command**: Is not supported.
+
+The Result of the operation is a Python file.
diff --git a/src/ExchangePlugin/doc/examples/export.py b/src/ExchangePlugin/doc/examples/export.py
new file mode 100644 (file)
index 0000000..44e2816
--- /dev/null
@@ -0,0 +1,13 @@
+# -*- 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)
+Export_1 = model.exportToFile(Part_1_doc, "/dn48/newgeom/vsv/test.step",
+                              [model.selection("SOLID", "Box_1_1")])
+model.do()
+model.end()
diff --git a/src/ExchangePlugin/doc/examples/import.py b/src/ExchangePlugin/doc/examples/import.py
new file mode 100644 (file)
index 0000000..d8fe5de
--- /dev/null
@@ -0,0 +1,19 @@
+# -*- coding: utf-8 -*-
+
+from salome.shaper import model
+
+model.begin()
+partSet = model.moduleDocument()
+Part_1 = model.addPart(partSet)
+Part_1_doc = Part_1.document()
+Import_1 = model.addImport(Part_1_doc, "/dn48/newgeom/for_gzy/gzy_data/Compound_2.brep")
+model.do()
+Import_1.setName("Compound_2")
+Import_1.result().setName("Compound_2_1")
+Import_1.result().subResult(0).setName("Compound_2_1_1")
+Import_1.result().subResult(1).setName("Compound_2_1_2")
+Import_1.result().subResult(2).setName("Compound_2_1_3")
+Import_1.result().subResult(3).setName("Compound_2_1_4")
+Import_1.result().subResult(4).setName("Compound_2_1_5")
+model.do()
+model.end()
index a007d400b459ed9c8d92a7285606611192ebcd57..8c91ee5b067fce27c795f4658b845b6dc150b1d5 100644 (file)
@@ -1,3 +1,44 @@
 
 Export
 ======
+
+It is possible to export objects into files in following formats: BREP, STEP, IGES, XAO. To export objects to a file:
+
+#. select in the Main Menu *Part - > Export* item  or
+#. click **Export** button in the toolbar.
+
+.. image:: images/export.png
+   :align: center
+
+.. centered::
+   **Export**  button
+
+The following property panel will be opened:
+
+.. image:: images/Export_panel.png
+   :align: center
+       
+.. centered::
+   **Export property panel**
+
+In this panel it is necessary to select desirable format of export file. It can be **'BREP, STEP, IGES'** or **'XAO'**. In case of first choice the format of exported file will be defined according to file extension. File name and path can be defined in **Export file** field. It can be typed or browsed with help of **'...'** button which opens **Export file** dialog box:
+
+.. image:: images/ExportFileDlg.png
+   :align: center
+       
+.. centered::
+   **Export file dialog box**
+
+Selection list in property panel should contain a list of exporting objects which can be selected in a viewer or objects browser.
+
+**Apply** button exports the file.
+  
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.exportToFile(Part_doc, FileNameString, ObjectsList)*
+
+**Arguments**: Part + file name string + list of objects.
+
+The Result of operation is exported file. There are no any changes in object browser or viewer.
+
+**See Also** a sample TUI Script of a :ref:`tui_export_file` operation.
diff --git a/src/ExchangePlugin/doc/images/DumpFileDlg.png b/src/ExchangePlugin/doc/images/DumpFileDlg.png
new file mode 100644 (file)
index 0000000..127c3e0
Binary files /dev/null and b/src/ExchangePlugin/doc/images/DumpFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/Dump_panel.png b/src/ExchangePlugin/doc/images/Dump_panel.png
new file mode 100644 (file)
index 0000000..7913a59
Binary files /dev/null and b/src/ExchangePlugin/doc/images/Dump_panel.png differ
diff --git a/src/ExchangePlugin/doc/images/ExportFileDlg.png b/src/ExchangePlugin/doc/images/ExportFileDlg.png
new file mode 100644 (file)
index 0000000..57848ab
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ExportFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/Export_panel.png b/src/ExchangePlugin/doc/images/Export_panel.png
new file mode 100644 (file)
index 0000000..d6e0274
Binary files /dev/null and b/src/ExchangePlugin/doc/images/Export_panel.png differ
diff --git a/src/ExchangePlugin/doc/images/FileImported.png b/src/ExchangePlugin/doc/images/FileImported.png
new file mode 100644 (file)
index 0000000..b0af453
Binary files /dev/null and b/src/ExchangePlugin/doc/images/FileImported.png differ
diff --git a/src/ExchangePlugin/doc/images/Import_panel.png b/src/ExchangePlugin/doc/images/Import_panel.png
new file mode 100644 (file)
index 0000000..dca34c1
Binary files /dev/null and b/src/ExchangePlugin/doc/images/Import_panel.png differ
diff --git a/src/ExchangePlugin/doc/images/OpenFileDlg.png b/src/ExchangePlugin/doc/images/OpenFileDlg.png
new file mode 100644 (file)
index 0000000..d0d4e4d
Binary files /dev/null and b/src/ExchangePlugin/doc/images/OpenFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/dump.png b/src/ExchangePlugin/doc/images/dump.png
new file mode 100644 (file)
index 0000000..196cf55
Binary files /dev/null and b/src/ExchangePlugin/doc/images/dump.png differ
diff --git a/src/ExchangePlugin/doc/images/export.png b/src/ExchangePlugin/doc/images/export.png
new file mode 100644 (file)
index 0000000..55ebd45
Binary files /dev/null and b/src/ExchangePlugin/doc/images/export.png differ
diff --git a/src/ExchangePlugin/doc/images/import.png b/src/ExchangePlugin/doc/images/import.png
new file mode 100644 (file)
index 0000000..c1d4175
Binary files /dev/null and b/src/ExchangePlugin/doc/images/import.png differ
index b033d5be553df250f19227010f56e6af6a704fac..0577b49b9320d49f8a86064bcff4e415cb10b955 100644 (file)
@@ -1,3 +1,48 @@
 
 Import
 ======
+
+It is possible to import files in following formats: BREP, STEP, IGES, XAO. To import a file into active part:
+
+#. select in the Main Menu *Part - > Import* item  or
+#. click **Import** button in the toolbar.
+
+.. image:: images/import.png
+   :align: center
+
+.. centered::
+   **Import**  button 
+
+The following property panel will be opened:
+
+.. image:: images/Import_panel.png
+   :align: center
+       
+.. centered::
+   **Import property panel**
+
+In this panel it is possible to enter a file name directly into input field or press **'...'** button and browse it with help of import file dialog box:
+
+.. image:: images/OpenFileDlg.png
+   :align: center
+       
+.. centered::
+   **Import file dialog box**
+  
+**Apply** button imports the file.
+  
+**Cancel** button cancels operation.
+
+**TUI Command**: *model.addImport(Part_doc, FileNameString)*
+
+**Arguments**: Part + file name string.
+
+The Result of the operation depends on content of imported file.
+
+.. image:: images/FileImported.png
+          :align: center
+                  
+.. centered::
+   Import of BREP file.
+
+**See Also** a sample TUI Script of a :ref:`tui_import_file` operation.