From: vsv Date: Thu, 16 Aug 2018 11:34:19 +0000 (+0300) Subject: Create Exchange plugin help pages X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a9d4c7c9f269bdd6eed53e024e09f92d20d3fddf;p=modules%2Fshaper.git Create Exchange plugin help pages --- diff --git a/src/ExchangePlugin/doc/TUI_exportFeature.rst b/src/ExchangePlugin/doc/TUI_exportFeature.rst new file mode 100644 index 000000000..49eecc5aa --- /dev/null +++ b/src/ExchangePlugin/doc/TUI_exportFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_export_file: + +Export File +=========== + +.. literalinclude:: examples/export.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ExchangePlugin/doc/TUI_importFeature.rst b/src/ExchangePlugin/doc/TUI_importFeature.rst new file mode 100644 index 000000000..69ed88ab6 --- /dev/null +++ b/src/ExchangePlugin/doc/TUI_importFeature.rst @@ -0,0 +1,12 @@ + + .. _tui_import_file: + +Import File +=========== + +.. literalinclude:: examples/import.py + :linenos: + :language: python + +:download:`Download this script ` + diff --git a/src/ExchangePlugin/doc/dumpFeature.rst b/src/ExchangePlugin/doc/dumpFeature.rst index afdc02407..3bb2969cd 100644 --- a/src/ExchangePlugin/doc/dumpFeature.rst +++ b/src/ExchangePlugin/doc/dumpFeature.rst @@ -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 index 000000000..44e2816a9 --- /dev/null +++ b/src/ExchangePlugin/doc/examples/export.py @@ -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 index 000000000..d8fe5de4a --- /dev/null +++ b/src/ExchangePlugin/doc/examples/import.py @@ -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() diff --git a/src/ExchangePlugin/doc/exportFeature.rst b/src/ExchangePlugin/doc/exportFeature.rst index a007d400b..8c91ee5b0 100644 --- a/src/ExchangePlugin/doc/exportFeature.rst +++ b/src/ExchangePlugin/doc/exportFeature.rst @@ -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 index 000000000..127c3e00d 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 index 000000000..7913a59ba 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 index 000000000..57848ab1a 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 index 000000000..d6e0274c9 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 index 000000000..b0af4536f 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 index 000000000..dca34c15b 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 index 000000000..d0d4e4d47 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 index 000000000..196cf55dd 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 index 000000000..55ebd4526 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 index 000000000..c1d417542 Binary files /dev/null and b/src/ExchangePlugin/doc/images/import.png differ diff --git a/src/ExchangePlugin/doc/importFeature.rst b/src/ExchangePlugin/doc/importFeature.rst index b033d5be5..0577b49b9 100644 --- a/src/ExchangePlugin/doc/importFeature.rst +++ b/src/ExchangePlugin/doc/importFeature.rst @@ -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.