0024927: Getting rid of "Persistent" functionality -- Tests
[occt.git] / tests / bugs / xde / bug22982
1 puts "TODO OCC22982 ALL: Error on Record"
2 # errors appear during reading source step file
3 pload QAcommands
4
5 puts "============"
6 puts "OCC22982"
7 puts "============"
8 puts ""
9 ##################################################################
10 # Generic color is overriden in STEPCAFControl_Writer::WriteColors
11 ##################################################################
12
13 set BugNumber OCC22982
14 pload DCAF
15
16 NewDocument D11 BinXCAF
17 UndoLimit D11 100
18
19 # Open a transaction
20 NewCommand D11
21
22 ReadStep D11 [locate_data_file OCC22982-Air.step]
23
24 XUnsetColor D11 0:1:1:1 s
25 XUnsetColor D11 0:1:1:1:1 s
26 XUnsetColor D11 0:1:1:1:2 s
27 XUnsetColor D11 0:1:1:1:3 s
28 XUnsetColor D11 0:1:1:1:4 s
29 XUnsetColor D11 0:1:1:1:5 s
30 XUnsetColor D11 0:1:1:1:6 s
31 XSetColor D11 0:1:1:1 0 0 1
32 XSetColor D11 0:1:1:1:1 1 0 0
33
34 set XRedCoords {2 160 186 204}
35 set XRedCoords [split $XRedCoords " "]
36 set YRedCoords {177 48 162 78}
37 set YRedCoords [split $YRedCoords " "]
38
39 set XBlueCoords {238 315 406 348 370 204 171 62}
40 set XBlueCoords [split $XBlueCoords " "]
41 set YBlueCoords {172 87 188 175 290 271 238 303}
42 set YBlueCoords [split $YBlueCoords " "]
43
44 XShow D11
45 vfit
46
47 # Check colors of document with source shape
48 for {set i 0} {$i < [llength $XRedCoords]} {incr i} {
49     set XCoord [lindex $XRedCoords $i]
50     set YCoord [lindex $YRedCoords $i]
51     checkcolor $XCoord $YCoord 1 0 0
52 }
53 for {set i 0} {$i < [llength $XBlueCoords]} {incr i} {
54     set XCoord [lindex $XBlueCoords $i]
55     set YCoord [lindex $YBlueCoords $i]
56     checkcolor $XCoord $YCoord 0 0 1
57 }
58
59 # Close/Open a transaction
60 NewCommand D11
61
62 file delete -force ${imagedir}/${test_image}.step
63 WriteStep D11 ${imagedir}/${test_image}.step
64
65 NewDocument D2 BinXCAF
66 UndoLimit D2 100
67
68 # Close/Open a transaction
69 NewCommand D2
70
71 ReadStep D2 ${imagedir}/${test_image}.step
72
73 XShow D2
74 vfit 
75
76 # Check colors of document with resulting shape
77 for {set i 0} {$i < [llength $XRedCoords]} {incr i} {
78     set XCoord [lindex $XRedCoords $i]
79     set YCoord [lindex $YRedCoords $i]
80     checkcolor $XCoord $YCoord 1 0 0
81 }
82 for {set i 0} {$i < [llength $XBlueCoords]} {incr i} {
83     set XCoord [lindex $XBlueCoords $i]
84     set YCoord [lindex $YBlueCoords $i]
85     checkcolor $XCoord $YCoord 0 0 1
86 }
87
88 set only_screen 1