Correction of testing case for issue 24374
[occt.git] / tests / bugs / xde / bug22982
CommitLineData
3bea4c16 1puts "TODO ?OCC11111 ALL: Error on Record"
2puts "TODO ?OCC11111 ALL: Error : Colors are not equal"
5d1833ef 3puts "TODO ?OCC11111 ALL: \\*\\* Exception"
3bea4c16 4puts "TODO ?OCC11111 ALL: Faulty : colors are not equal."
65263f37 5puts "TODO ?OCC11111 ALL: Tcl Exception"
3bea4c16 6puts "TODO ?OCC11111 ALL: TEST INCOMPLETE"
7
8pload QAcommands
9
10puts "============"
11puts "OCC22982"
12puts "============"
13puts ""
14##################################################################
15# Generic color is overriden in STEPCAFControl_Writer::WriteColors
16##################################################################
17
18set BugNumber OCC22982
19pload DCAF
20
21NewDocument D11 MDTV-XCAF
22UndoLimit D11 100
23
24# Open a transaction
25NewCommand D11
26
27set fileNameAir [locate_data_file OCC22982-Air.step]
28
29set status 0
30
31if { [catch { ReadStep D11 $fileNameAir } catch_result] } {
32 puts "Faulty ${BugNumber} : there is reading problem"
33 set status 1
34}
35
36XSetColor D11 0:1:1:1 0 0 1
37XSetColor D11 0:1:1:1:1 1 0 0
38XUnsetColor D11 0:1:1:1:2 s
39XUnsetColor D11 0:1:1:1:3 s
40
41set XRedCoords {2 148 179 204}
42set XRedCoords [split $XRedCoords " "]
43set YRedCoords {177 54 166 78}
44set YRedCoords [split $YRedCoords " "]
45
46set XBlueCoords {238 315 406 347 369 204 171 62}
47set XBlueCoords [split $XBlueCoords " "]
48set YBlueCoords {171 87 188 174 290 286 237 303}
49set YBlueCoords [split $YBlueCoords " "]
50
51XShow D11
52vfit
53
54for {set i 0} {$i < [llength $XRedCoords]} {incr i} {
55 set XCoord [lindex $XRedCoords $i]
56 set YCoord [lindex $YRedCoords $i]
57 checkcolor $XCoord $YCoord 1 0 0
58}
59
60# Close/Open a transaction
61NewCommand D11
62
63if { [catch { WriteStep D11 ${imagedir}/${test_image}.step } catch_result] } {
64 puts "Faulty ${BugNumber} : there is writing problem"
65 set status 1
66}
67
68NewDocument D2 MDTV-XCAF
69UndoLimit D2 100
70
71# Close/Open a transaction
72NewCommand D2
73
74if { [catch { ReadStep D2 ${imagedir}/${test_image}.step } catch_result] } {
75 puts "Faulty ${BugNumber} : there is reading problem"
76 set status 1
77}
78
79XShow D2
80vfit
81for {set i 0} {$i < [llength $XBlueCoords]} {incr i} {
82 set XCoord [lindex $XBlueCoords $i]
83 set YCoord [lindex $YBlueCoords $i]
84 checkcolor $XCoord $YCoord 0 0 1
85}
86
87if { $status != 0 } {
88 puts "Faulty ${BugNumber}"
89} else {
90 puts "OK ${BugNumber}"
91}
92
93set 3dviewer 0