Salome HOME
675c285068509e7f386bf1f1859efc8de6616f03
[modules/shaper.git] / src / ExchangePlugin / doc / importFeature.rst
1 .. |import.icon|    image:: images/import.png
2
3 Import
4 ======
5
6 The Import feature allows importing an external file into the current study.
7
8 Import PartSet
9 --------------
10
11 To open a study previously saved in SHAPER native format, select in the Main Menu *File -> Import -> Part Set...* item.
12 The current study will be closed, so the action dialog will be opened to choose whether the changes should be saved.
13 After that the following open file dialog will be opened:
14
15 .. image:: images/ImportPartFileDlg.png
16    :align: center
17         
18 .. centered::
19    **Dialog box to open SHAPER native file**
20
21 Select file and press **Open** button to load the file. **Cancel** button cancels the operation.
22
23
24 Import Part
25 -----------
26
27 To import the previously stored file in the current part, select in the Main Menu *File -> Import -> Part...* item.
28
29 The following property panel will be opened:
30
31 .. image:: images/ImportPart_panel.png
32    :align: center
33         
34 .. centered::
35    **Import Part property panel**
36
37 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:
38
39 .. image:: images/ImportPartFileDlg.png
40    :align: center
41         
42 .. centered::
43    **Dialog box to import Part**
44
45 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.
46   
47 **Apply** button imports the file.
48   
49 **Cancel** button cancels the operation.
50
51 **TUI Command**:
52
53 .. py:function:: model.importPart(Doc, FileNameString, [PrevFeature])
54
55     :param part: The current part object
56     :param string: A file name string
57     :param reference: The feature after which the imported entities should be inserted
58
59
60 Import from CAD formats
61 -----------------------
62
63 It is possible to import files in the following CAD-neutral formats: BREP, STEP, IGES, XAO.
64 To import a file into active part select in the Main Menu *File -> Import -> From CAD format...* item.
65
66 The following property panel will be opened:
67
68 .. image:: images/Import_panel.png
69    :align: center
70         
71 .. centered::
72    **Import property panel**
73
74 The **Import to** combobox provides the list of destinations (one of existing Parts or a new Part).
75
76 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:
77
78 .. image:: images/OpenFileDlg.png
79    :align: center
80         
81 .. centered::
82    **Dialog box to import CAD-neutral format**
83   
84 **Apply** button imports the file.
85   
86 **Cancel** button cancels the operation.
87
88 **TUI Command**:
89
90 .. py:function:: model.addImport(Part_doc, FileNameString)
91
92     :param part: The current part object
93     :param string: A file name string.
94
95 Result
96 """"""
97
98 The Result of the operation depends on the imported file content.
99
100 .. image:: images/FileImported.png
101            :align: center
102                    
103 .. centered::
104    Import of BREP file.
105
106 **See Also** a sample TUI Script of :ref:`tui_import_file` operation.