0024927: Getting rid of "Persistent" functionality -- Documentation
[occt.git] / dox / dev_guides / upgrade / upgrade.md
CommitLineData
c6f11ec0 1Upgrade from older OCCT versions {#occt_dev_guides__upgrade}
2================================
3
4@tableofcontents
5
6@section occt_upgrade_intro Introduction
7
8This document provides technical details on upgrading user applications using previous versions of OCCT, to the current one.
9
10@subsection occt_upgrade_700 Upgrade to OCCT 7.0.0
11
12@subsubsection occt_upgrade_700_persist Removal of legacy persistence
13
14Legacy persistence for shapes and OCAF data based on Storage_Schema (toolkits TKShapeShcema, TLStdLSchema, TKStdSchema, TKXCAFSchema) has been removed in OCCT 7.0.0.
15Applications that used these persistence tools for their data need to be updated to use other persistence mechanisms.
16
17The existing data files in standard formats can be converted using OCCT 6.9.0 or previous, as follows.
18
19#### CSFDB files
20
21Files in CSFDB format (usually with extension .csfdb) contain OCCT shape data that can be converted to BRep format.
22The easiest way to do that is to use ImportExport sample provided with OCCT 6.9.0 (or earlier):
23
24- Start ImportExport sample
25- Select File / New
26- Select File / Import / CSFDB... and specify the file to be converted
27- Drag mouse with right button pressed across the view to select all shapes by rectangle
28- Select File / Export / BREP... and specify location and name for the resulting file
29
30#### OCAF and XCAF documents
31
32Files containing OCAF data saved in old format usually have extensions .std or .sgd or .dxc (XDE documents).
33These files can be converted to XML or binary OCAF formats using DRAW Test Harness commands available in OCCT 6.9.0 or earlier.
34
35For that, start *DRAWEXE* and perform the following commands:
36
37 * for the conversion of the "*.std" and "*.sgd" file formats to the binary format "*.cbf" (Created document should be in **BinOcaf** format instead of **MDTV-Standard**):
38
39 @code
40 Draw[]> pload ALL
41 Draw[]> Open [path to *.std or *.sgd file] Doc
42 Draw[]> Format Doc BinOcaf
43 Draw[]> SaveAs Doc [path to the new file]
44 @endcode
45
46 * for the conversion of the "*.dxc" file format to the binary format "*.xbf" (Created document should be in **BinXCAF** format instead of **MDTV-XCAF**):
47
48 @code
49 Draw[]> pload ALL
50 Draw[]> XOpen [path to *.dxc file] Doc
51 Draw[]> Format Doc BinXCAF
52 Draw[]> XSave Doc [path to the new file]
53 @endcode
54
55On Windows, be careful to replace back slashes in the file path by either direct slash or pairs of back slashes.
56Use "XmlOcaf" or "XmlXCAF" instead of "BinOcaf" and "BinXCAF", respectively, to save in XML format instead of binary one.
57