6b9b7e3c |
1 | puts "==================================================================================" |
2 | puts "0030630: Visualization - wrong visualization of shape with mirrored transformation" |
3 | puts "Check that displaying of non-solid shapes (shells) is not affected by mirror transformation" |
4 | puts "==================================================================================" |
5 | |
6 | pload MODELING VISUALIZATION |
7 | vclear |
8 | vinit View1 |
9 | vaxo |
10 | vrotate 3 0 0 |
11 | vcamera -persp |
12 | |
13 | # Simple box |
14 | box b 1 1 1 |
15 | explode b sh |
16 | renamevar b_1 b |
17 | vdisplay -dispMode 1 b |
18 | vaspects b -setBackFaceColor RED |
19 | vfit |
20 | vdump $imagedir/${casename}_simple.png |
21 | verase b |
22 | |
23 | # Box with mirror transformation |
24 | box a 1 1 1 |
25 | bmirror a 0 0 0 1 0 0 |
26 | explode a sh |
27 | renamevar a_1 a |
28 | vdisplay -dispMode 1 a |
29 | vaspects a -setBackFaceColor RED |
30 | vfit |
31 | box aa -0.5 0.5 0.5 0.1 0.1 0.1 |
32 | vdisplay -dispMode 1 aa |
aaf8d6a9 |
33 | vsetcolor aa BLUE |
6b9b7e3c |
34 | vdump $imagedir/${casename}_mirror.png |
35 | if { [vreadpixel 300 200 rgb name] != "RED2" } { puts "Error: shell of mirrored box should show back faces" } |
36 | verase a |
37 | |
38 | # Box with mirror transformation and reversed face |
39 | box c 1 1 1 |
40 | bmirror c 0 0 0 1 0 0 |
41 | orientation c R |
42 | explode c sh |
43 | renamevar c_1 c |
44 | vdisplay -dispMode 1 c |
45 | vaspects c -setBackFaceColor RED |
46 | vfit |
47 | vdump $imagedir/${casename}_mirrev.png |
48 | if { [vreadpixel 300 200 rgb name] == "RED2" } { puts "Error: shell of reversed mirrored box should show front faces" } |