Salome HOME
d7e456412942784d0309557ef00b33add55c8eab
[modules/shaper.git] / src / ExchangePlugin / doc / exportFeature.rst
1 .. |export.icon|    image:: images/export.png
2
3 Export
4 ======
5
6 The export feature allows exporting objects from the current study to an external file. The following sections show the different ways to export objects.
7
8 Export PartSet
9 --------------
10
11 To export the full study in SHAPER native format (``*.shaper``) select in the Main Menu *File -> Export -> Part Set...* item.
12 The **Export file** dialog will be opened:
13
14 .. image:: images/ExportNativeFileDlg.png
15    :align: center
16         
17 .. centered::
18    **Dialog box for export to SHAPER native format**
19
20 Specify file name and press **Save** button to export the file. **Cancel** button cancels the operation.
21
22
23 Export Part
24 -----------
25
26 It allows to export the specified results including the sequence of all operations which affect the selected objects.
27 To export results in binary format (``*.shaperpart``) select in the Main Menu *File -> Export -> Part...* item.
28
29 The following property panel will be opened:
30
31 .. image:: images/ExportPart_panel.png
32    :align: center
33         
34 .. centered::
35    **Export Part property panel**
36
37 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:
38
39 .. image:: images/ExportPartFileDlg.png
40    :align: center
41         
42 .. centered::
43    **Dialog box to export part of the model**
44
45 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
46 In case of the list is empty, all active results in the current Part will be exported.
47 If the PartSet is active, only results (construction elements) of this PartSet may be selected for the export, but not results of Parts.
48
49 *Note:* It is forbidden to export features that include references to external elements other than default elements (origin or main axes and planes).
50
51
52 **Apply** button exports the file.
53   
54 **Cancel** button cancels the operation.
55
56 **TUI Command**:
57
58 .. py:function:: model.exportPart(Part_doc, FileNameString, ObjectsList)
59
60     :param part: The current part object
61     :param string: The file name
62     :param list: A list of exporting objects, if necessary
63
64 Result
65 """"""
66
67 The Result of operation is an exported file.
68
69 **See Also** a sample TUI Script of :ref:`tui_export_part` operation.
70
71
72 Export to CAD format
73 --------------------
74
75 It is possible to export objects to files in the following CAD-neutral formats: BREP, STEP, IGES, XAO.
76 To export objects to a file select in the Main Menu *File -> Export -> To CAD  formats...* item.
77
78 The following property panel will be opened:
79
80 .. image:: images/Export_panel.png
81    :align: center
82         
83 .. centered::
84    **Export property panel**
85
86 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. 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:
87
88 .. image:: images/ExportFileDlg.png
89    :align: center
90         
91 .. centered::
92    **Dialog box tp export in CAD-neutral format**
93
94 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
95
96 **Apply** button exports the file.
97   
98 **Cancel** button cancels the operation.
99
100 **TUI Command**:
101
102 .. py:function:: model.exportToFile(Part_doc, FileNameString, ObjectsList)
103
104     :param part: The current part object
105     :param string: The file name
106     :param list: A list of exporting objects
107
108
109 .. py:function:: model.exportToXAO(Part_doc, FileNameString, [ObjectsList, Author, GeometryName])
110
111     :param part: The current part object
112     :param string: The file name
113     :param list: A list of exporting objects, if necessary
114     :param string: The name of the author 
115     :param string: The name for the shape processed in GEOMETRY module
116
117 Result
118 """"""
119
120 The Result of operation is an exported file.
121
122 **See Also** a sample TUI Script of :ref:`tui_export_file` operation.