0024413: Visualization - get rid of projection shift from orthographic camera definition
[occt.git] / tests / bugs / modalg_2 / bug21909
1 pload QAcommands
2
3 puts "============"
4 puts "OCC21909"
5 puts "============"
6 puts ""
7 #######################################################################
8 # The surface is visualized with rendering errors
9 #######################################################################
10
11 set BugNumber OCC21909
12
13 # Data
14
15 set scale    57.547428234801195
16 set proj_X   -0.25567048788070679
17 set proj_Y   -0.92769843339920044
18 set proj_Z   0.27204453945159912
19 set up_X     0.43156850337982178
20 set up_Y     0.14228194952011108
21 set up_Z     0.89078855514526367
22 set at_X     16.2722331487924
23 set at_Y     -19.463212261103
24 set at_Z     -16.4505465814645
25
26 set x1 190
27
28 set y1 216
29 set y2 228
30
31 #
32 restore [locate_data_file OCC21909-render_error.brep] result
33
34 vinit
35 vdisplay result
36 vfit
37
38 vsetdispmode 1
39 vfit
40
41 vviewparams -scale ${scale} -proj ${proj_X} ${proj_Y} ${proj_Z} -up ${up_X} ${up_Y} ${up_Z} -at ${at_X} ${at_Y} ${at_Z}
42
43 vmoveto ${x1} ${y1}
44 vmoveto ${x1} ${y1}
45
46 set status 0
47 for {set i ${y1} } {$i <= ${y2} } {incr i} {
48     set Color1 [QAGetPixelColor ${x1} ${i}]
49
50     set R1 [lindex ${Color1} 2]
51     set G1 [lindex ${Color1} 5]
52     set B1 [lindex ${Color1} 8]
53
54     puts "x = ${x1}   y = ${i}   R = ${R1}   G = ${G1}   B = ${B1}"
55
56     if { ${R1} == 0 && ${G1} == 0 && ${B1} == 0 } {
57         incr status
58         puts "Error : rendering  x = ${x1}  y = ${i}"
59     }
60 }
61
62 if { ${status} != 0 } {
63     puts "Faulty ${BugNumber}"
64 } else {
65     puts "OK ${BugNumber}"
66 }
67
68 set 3dviewer 0
69