Salome HOME
Issue #3145: Update Import/Export help pages
authorazv <azv@opencascade.com>
Thu, 27 Feb 2020 15:31:00 +0000 (18:31 +0300)
committerazv <azv@opencascade.com>
Thu, 27 Feb 2020 15:31:00 +0000 (18:31 +0300)
13 files changed:
src/ExchangePlugin/doc/TUI_exportPart.rst [new file with mode: 0644]
src/ExchangePlugin/doc/examples/export_part.py [new file with mode: 0644]
src/ExchangePlugin/doc/exportFeature.rst
src/ExchangePlugin/doc/images/ExportFileDlg.png
src/ExchangePlugin/doc/images/ExportNativeFileDlg.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/ExportPartFileDlg.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/ExportPart_panel.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/ImportPartFileDlg.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/ImportPart_panel.png [new file with mode: 0644]
src/ExchangePlugin/doc/images/Import_panel.png
src/ExchangePlugin/doc/images/OpenFileDlg.png
src/ExchangePlugin/doc/importFeature.rst
src/ExchangePlugin/plugin-Exchange.xml

diff --git a/src/ExchangePlugin/doc/TUI_exportPart.rst b/src/ExchangePlugin/doc/TUI_exportPart.rst
new file mode 100644 (file)
index 0000000..58e70a7
--- /dev/null
@@ -0,0 +1,12 @@
+
+  .. _tui_export_part:
+
+Export File
+===========
+
+.. literalinclude:: examples/export_part.py
+    :linenos:
+    :language: python
+
+:download:`Download this script <examples/export_part.py>` 
+   
diff --git a/src/ExchangePlugin/doc/examples/export_part.py b/src/ExchangePlugin/doc/examples/export_part.py
new file mode 100644 (file)
index 0000000..72dc439
--- /dev/null
@@ -0,0 +1,10 @@
+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)
+Box_1 = model.addBox(Part_1_doc, 10, 10, 10)
+Export_1 = model.exportPart(Part_1_doc, "~/box.shaperpart", [model.selection("SOLID", "Box_1_1")])
+model.end()
index 55799e4e97830624c594b2b74e440436e853bd18..d7e456412942784d0309557ef00b33add55c8eab 100644 (file)
@@ -3,12 +3,77 @@
 Export
 ======
 
-The  export feature allows exporting objects from the current study to an external file.
+The export feature allows exporting objects from the current study to an external file. The following sections show the different ways to export objects.
 
-It is possible to export objects to files in the following formats: BREP, STEP, IGES, XAO. To export objects to a file:
+Export PartSet
+--------------
 
-#. select in the Main Menu *Part - > Export* item  or
-#. click |export.icon| **Export** button in the toolbar.
+To export the full study in SHAPER native format (``*.shaper``) select in the Main Menu *File -> Export -> Part Set...* item.
+The **Export file** dialog will be opened:
+
+.. image:: images/ExportNativeFileDlg.png
+   :align: center
+       
+.. centered::
+   **Dialog box for export to SHAPER native format**
+
+Specify file name and press **Save** button to export the file. **Cancel** button cancels the operation.
+
+
+Export Part
+-----------
+
+It allows to export the specified results including the sequence of all operations which affect the selected objects.
+To export results in binary format (``*.shaperpart``) select in the Main Menu *File -> Export -> Part...* item.
+
+The following property panel will be opened:
+
+.. image:: images/ExportPart_panel.png
+   :align: center
+       
+.. centered::
+   **Export Part property panel**
+
+The file name and path can be defined in **Export file** field by direct input or browsing with **'...'** button, which opens **Export file** dialog box:
+
+.. image:: images/ExportPartFileDlg.png
+   :align: center
+       
+.. centered::
+   **Dialog box to export part of the model**
+
+Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
+In case of the list is empty, all active results in the current Part will be exported.
+If the PartSet is active, only results (construction elements) of this PartSet may be selected for the export, but not results of Parts.
+
+*Note:* It is forbidden to export features that include references to external elements other than default elements (origin or main axes and planes).
+
+
+**Apply** button exports the file.
+  
+**Cancel** button cancels the operation.
+
+**TUI Command**:
+
+.. py:function:: model.exportPart(Part_doc, FileNameString, ObjectsList)
+
+    :param part: The current part object
+    :param string: The file name
+    :param list: A list of exporting objects, if necessary
+
+Result
+""""""
+
+The Result of operation is an exported file.
+
+**See Also** a sample TUI Script of :ref:`tui_export_part` operation.
+
+
+Export to CAD format
+--------------------
+
+It is possible to export objects to files in the following CAD-neutral formats: BREP, STEP, IGES, XAO.
+To export objects to a file select in the Main Menu *File -> Export -> To CAD  formats...* item.
 
 The following property panel will be opened:
 
@@ -24,7 +89,7 @@ In this panel, it is necessary to select desirable format of export file. It can
    :align: center
        
 .. centered::
-   **Export file dialog box**
+   **Dialog box tp export in CAD-neutral format**
 
 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
 
@@ -40,6 +105,15 @@ Selection list in the property panel contains a list of exported objects which c
     :param string: The file name
     :param list: A list of exporting objects
 
+
+.. py:function:: model.exportToXAO(Part_doc, FileNameString, [ObjectsList, Author, GeometryName])
+
+    :param part: The current part object
+    :param string: The file name
+    :param list: A list of exporting objects, if necessary
+    :param string: The name of the author 
+    :param string: The name for the shape processed in GEOMETRY module
+
 Result
 """"""
 
index 57848ab1a6d54977d33458c5e46e1b37ec29f9ca..357cc1de3c595b3a06f9c86ab5033f7aa11cf0d7 100644 (file)
Binary files a/src/ExchangePlugin/doc/images/ExportFileDlg.png and b/src/ExchangePlugin/doc/images/ExportFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/ExportNativeFileDlg.png b/src/ExchangePlugin/doc/images/ExportNativeFileDlg.png
new file mode 100644 (file)
index 0000000..9674be4
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ExportNativeFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/ExportPartFileDlg.png b/src/ExchangePlugin/doc/images/ExportPartFileDlg.png
new file mode 100644 (file)
index 0000000..06428c5
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ExportPartFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/ExportPart_panel.png b/src/ExchangePlugin/doc/images/ExportPart_panel.png
new file mode 100644 (file)
index 0000000..f2a1ad1
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ExportPart_panel.png differ
diff --git a/src/ExchangePlugin/doc/images/ImportPartFileDlg.png b/src/ExchangePlugin/doc/images/ImportPartFileDlg.png
new file mode 100644 (file)
index 0000000..06428c5
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ImportPartFileDlg.png differ
diff --git a/src/ExchangePlugin/doc/images/ImportPart_panel.png b/src/ExchangePlugin/doc/images/ImportPart_panel.png
new file mode 100644 (file)
index 0000000..c2b23ce
Binary files /dev/null and b/src/ExchangePlugin/doc/images/ImportPart_panel.png differ
index dca34c15b2b87d3bdf7a3ab4595837ea58de3884..c22176e77e563cfcbf33db7c5d208c19e9076206 100644 (file)
Binary files a/src/ExchangePlugin/doc/images/Import_panel.png and b/src/ExchangePlugin/doc/images/Import_panel.png differ
index d0d4e4d476b3331da03925233facb07024e189dd..d30531905c5f655faed93113c5a2dbc40ebcd6f5 100644 (file)
Binary files a/src/ExchangePlugin/doc/images/OpenFileDlg.png and b/src/ExchangePlugin/doc/images/OpenFileDlg.png differ
index 937562ca483e43553c6909aa6d286be409cd4509..3d6d0e302bcb0a06fabf878ab77dacca5c14caf3 100644 (file)
@@ -5,10 +5,63 @@ Import
 
 The Import feature allows importing an external file into a current study.
 
-It is possible to import files in the following formats: BREP, STEP, IGES, XAO. To import a file into active part:
+Import PartSet
+--------------
 
-#. select in the Main Menu *Part - > Import* item  or
-#. click |import.icon| **Import** button in the toolbar.
+To open a study previously saved in SHAPER native format, select in the Main Menu *File -> Import -> Part Set...* item.
+The current study will be closed, so the action dialog will be opened to choose whether the changes should be saved.
+After that the following open file dialog will be opened:
+
+.. image:: images/ImportPartFileDlg.png
+   :align: center
+       
+.. centered::
+   **Dialog box to open SHAPER native file**
+
+Select file and press **Open** button to load the file. **Cancel** button cancels the operation.
+
+
+Import Part
+-----------
+
+To import the previously stored file in the current part, select in the Main Menu *File -> Import -> Part...* item.
+
+The following property panel will be opened:
+
+.. image:: images/ImportPart_panel.png
+   :align: center
+       
+.. centered::
+   **Import Part property panel**
+
+In this panel it is possible to enter a file name directly or press **'...'** button and browse it with help of import file dialog box:
+
+.. image:: images/ImportPartFileDlg.png
+   :align: center
+       
+.. centered::
+   **Dialog box to import Part**
+
+The import will be performed within the active part. If no part is active, the possible targets to import will be proposed in **Import to** combobox, which contains the list of existing parts, PartSet or a new part creation option.
+  
+**Apply** button imports the file.
+  
+**Cancel** button cancels the operation.
+
+**TUI Command**:
+
+.. py:function:: model.importPart(Doc, FileNameString, [PrevFeature])
+
+    :param part: The current part object
+    :param string: A file name string
+    :param reference: The feature after which the imported entities should be inserted
+
+
+Import from CAD formats
+-----------------------
+
+It is possible to import files in the following CAD-neutral formats: BREP, STEP, IGES, XAO.
+To import a file into active part select in the Main Menu *File -> Import -> From CAD format...* item.
 
 The following property panel will be opened:
 
@@ -18,13 +71,15 @@ The following property panel will be opened:
 .. centered::
    **Import property panel**
 
+The **Import to** combobox provides the list of destinations (PartSet, existing Part or a new Part).
+
 In this panel it is possible to enter a file name directly or press **'...'** button and browse it with help of import file dialog box:
 
 .. image:: images/OpenFileDlg.png
    :align: center
        
 .. centered::
-   **Import file dialog box**
+   **Dialog box to import CAD-neutral format**
   
 **Apply** button imports the file.
   
index d47c5cd83339c116ac1519f626dfda6363872f1b..7f240ba69c9701cf2dfd59fcbdaf181bda666b8e 100644 (file)
@@ -46,7 +46,7 @@
       </feature>
 
       <feature id="ImportPart" title="Import part" tooltip="Import features from file" icon="icons/Exchange/import_part.png"
-               helpfile="importPart.html"
+               helpfile="importFeature.html"
                internal="1">
         <file_selector id="file_path" title="Import file" path="">
           <validator id="ExchangePlugin_ImportFormat" parameters="shaperpart:Part" />
@@ -57,7 +57,7 @@
                 tooltip="Select the part to import the document" />
       </feature>
       <feature id="ExportPart" title="Export part" tooltip="Export structure of the Part to file" icon="icons/Exchange/export_part.png"
-               helpfile="exportPart.html"
+               helpfile="exportFeature.html"
                internal="1">
         <export_file_selector id="file_path"
                               type="save"