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