6b9b7e3c |
1 | puts "==================================================================================" |
2 | puts "0030630: Visualization - wrong visualization of shape with mirrored transformation" |
3 | puts "Check that local transformation of visualizated object" |
4 | puts "affects only position, not material place" |
5 | puts "==================================================================================" |
6 | |
7 | pload MODELING VISUALIZATION |
8 | vclear |
9 | vinit View1 |
10 | vaxo |
11 | vrotate 3 0 0 |
12 | vcamera -persp |
13 | |
14 | # Simple box |
15 | box b 1 1 1 |
16 | bmirror b 0 0 0 0 0 1 |
17 | vdisplay -dispMode 1 b |
18 | vaspects b -setBackFaceColor RED |
19 | box bb 0.5 0.5 -0.5 0.1 0.1 0.1 |
20 | vdisplay -dispMode 1 bb |
aaf8d6a9 |
21 | vsetcolor bb BLUE |
6b9b7e3c |
22 | vfit |
23 | vdump $imagedir/${casename}_simple.png |
24 | if { [vreadpixel 195 220 rgb name] != "BLUE2" } { puts "Error: mirrored box should look inside out" } |
25 | |
26 | # Box with rotation transformation |
27 | vlocation b -rotate 0 0 0 1 0 0 90 |
28 | vlocation bb -rotate 0 0 0 1 0 0 90 |
29 | vfit |
30 | vdump $imagedir/${casename}_rotate.png |
31 | if { [vreadpixel 215 230 rgb name] != "BLUE2" } { puts "Error: rotated mirrored box should look inside out" } |
32 | |
33 | # Box with mirror transformation |
34 | vlocation b -reset |
35 | vlocation b -mirror 0 -0.5 0 0 1 0 |
36 | vlocation bb -reset |
37 | vlocation bb -mirror 0 -0.5 0 0 1 0 |
38 | vfit |
39 | vdump $imagedir/${casename}_mirror.png |
40 | if { [vreadpixel 215 230 rgb name] != "BLUE2" } { puts "Error: mirrored mirrored box should look inside out" } |