Salome HOME
Debug and documentation for STL export
[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 .. figure:: images/ExportNativeFileDlg.png
15    :align: center
16
17    **Dialog box for export to SHAPER native format**
18
19 Specify file name and press **Save** button to export the file. **Cancel** button cancels the operation.
20
21
22 Export Part
23 -----------
24
25 It allows to export the specified results including the sequence of all operations which affect the selected objects.
26 To export results in binary format (``*.shaperpart``) select in the Main Menu *File -> Export -> Part...* item.
27
28 The following property panel will be opened:
29
30 .. figure:: images/ExportPart_panel.png
31    :align: center
32
33    **Export Part property panel**
34
35 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:
36
37 .. figure:: images/ExportPartFileDlg.png
38    :align: center
39
40    **Dialog box to export part of the model**
41
42 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
43 In case of the list is empty, all active results in the current Part will be exported.
44 If the PartSet is active, only results (construction elements) of this PartSet may be selected for the export, but not results of Parts.
45
46 *Note:* It is forbidden to export features that include references to external elements other than default elements (origin or main axes and planes).
47
48
49 **Apply** button exports the file.
50   
51 **Cancel** button cancels the operation.
52
53 **TUI Command**:
54
55 .. py:function:: model.exportPart(Part_doc, FileNameString, ObjectsList)
56
57     :param part: The current part object
58     :param string: The file name
59     :param list: A list of exporting objects, if necessary
60
61 Result
62 """"""
63
64 The Result of operation is an exported file.
65
66 **See Also** a sample TUI Script of :ref:`tui_export_part` operation.
67
68
69 Export to CAD format
70 --------------------
71
72 It is possible to export objects to files in the following CAD-neutral formats: BREP, STEP, IGES, XAO, STL.
73 To export objects to a file select in the Main Menu *File -> Export -> To CAD  formats...* item.
74
75
76 The following property panel will be opened:
77
78 .. figure:: images/Export_panel.png
79    :align: center
80
81    **Export property panel**
82
83 In this panel, it is necessary to select desirable format of export file. It can be **'BREP, STEP, IGES'** , **'XAO'** or **'STL'** . 
84
85
86 Export to BREP, STEP, IGES
87 """"""""""""""""""""""""""
88
89 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:
90
91 .. figure:: images/ExportFileDlg.png
92    :align: center
93
94    **Dialog box to export in CAD-neutral format**
95
96 Selection list in the property panel contains a list of exported objects which can be selected in a viewer or object browser.
97
98
99 **Apply** button exports the file.
100   
101 **Cancel** button cancels the operation.
102
103 **TUI Command**:
104
105 .. py:function:: model.exportToFile(Part_doc, FileNameString, ObjectsList)
106
107     :param part: The current part object
108     :param string: The file name
109     :param list: A list of exporting objects
110
111
112 .. py:function:: model.exportToXAO(Part_doc, FileNameString, [ObjectsList, Author, GeometryName])
113
114     :param part: The current part object
115     :param string: The file name
116     :param list: A list of exporting objects, if necessary
117     :param string: The name of the author 
118     :param string: The name for the shape processed in GEOMETRY module
119
120 Result
121 """"""
122
123 The Result of operation is an exported file.
124
125 **See Also** a sample TUI Script of :ref:`tui_export_file` operation.
126
127 Result
128 """"""
129
130 The Result of operation is an exported file.
131
132 **See Also** a sample TUI Script of :ref:`tui_export_file` operation.
133
134 Export to STL
135 """""""""""""
136 In this case, the following property panel will be opened:
137
138 .. figure:: images/ExportSTL.png
139    :align: center
140
141    **Dialog box to export in STL format**
142
143
144 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.
145
146 **Object** field contains an exported object which can be selected in a viewer or object browser.
147
148 **Deflection** (**Relative** or **Absolute**) has to be chosen and defined in the corresponding field as well as the **File type** which can defined as **Binary** or as **ASCII**. 
149
150
151 **Apply** button exports the file.
152   
153 **Cancel** button cancels the operation.
154
155 **TUI Command**:
156
157 .. py:function:: model.exportToSTL(Part_doc, FileNameString, selectedShape, relative, absolute, isRelative, isASCII)
158
159     :param part: The current part object
160     :param string: The file name
161     :param object: An exporting object
162     :param real: value of the relative deflection
163     :param real: value of the absolute deflection
164     :param boolean: indicate if use deflection relative
165     :param boolean: indicate if the file is in ASCII type 
166
167 Result
168 """"""
169
170 The Result of operation is an exported STL file.
171
172 **See Also** a sample TUI Script of :ref:`tui_export_file_STL` operation.