aacbabe1 |
1 | puts "============" |
2 | puts "CR26435" |
3 | puts "============" |
4 | puts "" |
5 | ####################################################################### |
6 | # Visualization - V3d_View::ConvertToGrid returns wrong coordinates for non-orthogonal projection |
7 | ####################################################################### |
8 | |
9 | vinit View1 w=400 h=400 |
10 | vgrid r l 0 0 5 5 0 |
11 | |
12 | # 1. Check convert to grid for axonometric projection. Grid is at origin. |
13 | vaxo |
14 | set output [vconvert 200 200 grid] |
15 | |
16 | checkreal "vconvert axo - grid origin" [lindex $output 2] 5.0 1e-7 0.0 |
17 | checkreal "vconvert axo - grid origin" [lindex $output 3] -5.0 1e-7 0.0 |
18 | checkreal "vconvert axo - grid origin" [lindex $output 4] 0.0 1e-7 0.0 |
19 | |
20 | # 2. Check convert to grid for top projection. Grid is at origin. |
21 | vtop |
22 | set output [vconvert 200 200 grid] |
23 | |
24 | checkreal "vconvert top - grid origin" [lindex $output 2] 0.0 1e-7 0.0 |
25 | checkreal "vconvert top - grid origin" [lindex $output 3] -5.0 1e-7 0.0 |
26 | checkreal "vconvert top - grid origin" [lindex $output 4] 0.0 1e-7 0.0 |
27 | |
28 | # 3. Check convert to grid for axonometric projection. Grid is not at origin. |
29 | vpriviledgedplane 0.0 0.0 10.0 0 0 1 1 0 0 |
30 | |
31 | vaxo |
32 | set output [vconvert 200 200 grid] |
33 | |
34 | checkreal "vconvert axo - grid lifted" [lindex $output 2] 15.0 1e-7 0.0 |
35 | checkreal "vconvert axo - grid lifted" [lindex $output 3] -15.0 1e-7 0.0 |
36 | checkreal "vconvert axo - grid lifted" [lindex $output 4] 10.0 1e-7 0.0 |
37 | |
38 | # 4. Check convert to grid for top projection. Grid is not at origin. |
39 | vtop |
40 | set output [vconvert 200 200 grid] |
41 | |
42 | checkreal "vconvert top - grid lifted" [lindex $output 2] 0.0 1e-7 0.0 |
43 | checkreal "vconvert top - grid lifted" [lindex $output 3] -5.0 1e-7 0.0 |
44 | checkreal "vconvert top - grid lifted" [lindex $output 4] 10.0 1e-7 0.0 |
45 | |
46 | # do not save any image |
5747059b |
47 | checkview -screenshot -3d -path ${imagedir}/${test_image}.png |