0033661: Data Exchange, Step Import - Tessellated GDTs are not imported
[occt.git] / tests / caf / basic / F5
1 #INTERFACE CAF
2 # Basic attributes
3 #
4 # Testing attributes: TDataStd_Tick TDataStd_Directory TDataStd_NoteBook TDataXtd_Axis TDataXtd_Placement TDataXtd_Plane TDataXtd_Point TDataXtd_Shape 
5 #
6 # Testing command:   SetEmptyAttribute
7 # XmlOcaf format open/save with these attributes
8
9 NewDocument DX XmlOcaf
10 UndoLimit DX 2
11
12 Label DX 0:2
13
14 set IsGood 1
15
16 NewCommand DX
17 SetEmptyAttribute DX 0:2 TDataXtd_Axis
18 SetEmptyAttribute DX 0:2 TDataXtd_Placement
19 SetEmptyAttribute DX 0:2 TDataXtd_Plane
20 SetEmptyAttribute DX 0:2 TDataXtd_Point
21 SetEmptyAttribute DX 0:2 TDataXtd_Shape 
22 SetEmptyAttribute DX 0:2 TDataStd_Tick
23 SetEmptyAttribute DX 0:2 TDataStd_Directory
24 SetEmptyAttribute DX 0:2 TDataStd_NoteBook
25 CommitCommand DX
26
27 set aLen1 [llength [Attributes DX 0:2]]
28 if { ${aLen1} != 8 } {
29    set IsGood 0
30    puts "Not all attributes were added aLen1=${aLen1}"
31 }
32
33 Undo DX
34
35 set aLen2 [llength [Attributes DX 0:2]]
36 if { ${aLen2} != 0 } {
37    set IsGood 0
38    puts "Not all attributes were removed on Undo aLen2=${aLen2}"
39 }
40
41 Redo DX
42
43 set aLen3 [llength [Attributes DX 0:2]]
44 if { ${aLen3} != 8 } {
45    set IsGood 0
46    puts "Not all attributes were restored by Redo aLen3=${aLen3}"
47 }
48
49 set aFile ${imagedir}/caf001-F5.xml
50 file delete ${aFile}
51 SaveAs DX ${aFile}
52 if { ![file exists ${aFile}] } {
53         puts "There is not ${aFile} file; SaveAs command: Error"
54         return
55 }
56 Close DX
57
58 Open ${aFile} DDX
59
60 set aLen4 [llength [Attributes DDX 0:2]]
61 if { ${aLen4} != 8 } {
62    set IsGood 0
63    puts "Not all attributes were restored on Open aLen4=${aLen4}"
64 }
65
66 if { ${IsGood} == 0} {
67   puts "Set empty attributes: Error"
68 } else {
69   puts "Set empty attributes: OK"
70 }