0023493: Incorrect QAGetPixelColor usage
[occt.git] / tests / bugs / modalg_2 / bug21909
CommitLineData
809eca9d 1pload QAcommands
2
3puts "============"
4puts "OCC21909"
5puts "============"
6puts ""
7#######################################################################
8# The surface is visualized with rendering errors
9#######################################################################
10
11set BugNumber OCC21909
12
13# Data
14
15set scale 57.547428234801195
809eca9d 16set proj_X -0.25567048788070679
17set proj_Y -0.92769843339920044
18set proj_Z 0.27204453945159912
19set up_X 0.43156850337982178
20set up_Y 0.14228194952011108
21set up_Z 0.89078855514526367
197ac94e 22set at_X 16.2722331487924
23set at_Y -19.463212261103
24set at_Z -16.4505465814645
809eca9d 25
26set x1 190
27
28set y1 216
29set y2 228
30
31#
32restore [locate_data_file OCC21909-render_error.brep] result
33
34vinit
35vdisplay result
36vfit
37
38vsetdispmode 1
39vfit
40
197ac94e 41vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
809eca9d 42
43vmoveto ${x1} ${y1}
44vmoveto ${x1} ${y1}
45
46set status 0
47for {set i ${y1} } {$i <= ${y2} } {incr i} {
ccadc126 48 if { "[vreadpixel ${x1} ${i} rgb name]" == "BLACK" } {
49 incr status
50 puts "Error : rendering x = ${x1} y = ${i}"
809eca9d 51 }
52}
53
54if { ${status} != 0 } {
55 puts "Faulty ${BugNumber}"
56} else {
57 puts "OK ${BugNumber}"
58}
59
60set 3dviewer 0
61