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