3bffef55 |
1 | puts "========" |
2 | puts "Tiled image dump" |
3 | puts "========" |
4 | |
5 | set aFontFile "" |
6 | catch { set aFontFile [locate_data_file DejaVuSans.ttf] } |
7 | |
8 | pload MODELING VISUALIZATION |
9 | box b 2 3 1 |
10 | box b2 50 20 30 |
11 | |
12 | set aLabelFont "Arial" |
13 | if { "$aFontFile" != "" } { |
14 | vfont add "$aFontFile" SansFont |
15 | set aLabelFont "SansFont" |
16 | } |
17 | |
18 | vclear |
8e0a2b19 |
19 | vclose ALL |
3bffef55 |
20 | vinit View1 |
21 | vraytrace 0 |
aaf8d6a9 |
22 | vbackground -gradient B4C8FF B4B4B4 -gradientMode VERTICAL |
3bffef55 |
23 | vsetdispmode 0 |
24 | vdisplay -dispMode 1 b |
25 | vfit |
26 | vrotate 0.5 0 0 |
27 | vzbufftrihedron |
28 | |
29 | catch { vzlayer del 1 } |
7c3ef2f7 |
30 | set aLayerId [vzlayer add] |
1c728f2d |
31 | vzlayer $aLayerId -enable depthClear -disable rayTracing |
3bffef55 |
32 | |
33 | vtrihedron trh |
7c3ef2f7 |
34 | vdisplay -noupdate trh -layer $aLayerId -trihedron topRight 100 100 |
3bffef55 |
35 | |
36 | text2brep tcc "Center" -font $aLabelFont -height 30 -pos -40 0 0 |
7c3ef2f7 |
37 | vdisplay -noupdate tcc -2d center -layer $aLayerId -dispMode 1 |
3bffef55 |
38 | polyline lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0 |
7c3ef2f7 |
39 | vdisplay -noupdate lcc -2d center -layer $aLayerId |
3bffef55 |
40 | vsetwidth -noupdate lcc 2 |
41 | |
42 | text2brep tbl "Bottom-Left" -font $aLabelFont -height 30 -pos 0 3 5 |
7c3ef2f7 |
43 | vdisplay -noupdate tbl -2d bottomLeft -layer $aLayerId -dispMode 1 |
3bffef55 |
44 | polyline lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0 |
7c3ef2f7 |
45 | vdisplay -noupdate lbl -2d bottomLeft -layer $aLayerId |
3bffef55 |
46 | vsetwidth -noupdate lbl 2 |
47 | |
48 | text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0 |
7c3ef2f7 |
49 | vdisplay -noupdate ttl -2d topLeft -layer $aLayerId -dispMode 1 |
3bffef55 |
50 | polyline ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0 |
7c3ef2f7 |
51 | vdisplay -noupdate ltl -2d topLeft -layer $aLayerId |
3bffef55 |
52 | vsetwidth -noupdate ltl 2 |
53 | |
54 | text2brep ttr "Top-Right" -font $aLabelFont -height 30 -pos -130 -30 0 |
7c3ef2f7 |
55 | vdisplay -noupdate ttr -2d topRight -layer $aLayerId -dispMode 1 |
3bffef55 |
56 | polyline ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0 |
7c3ef2f7 |
57 | vdisplay -noupdate ltr -2d topRight -layer $aLayerId |
3bffef55 |
58 | vsetwidth -noupdate ltr 2 |
59 | |
60 | text2brep tbr "Bottom-Right" -font $aLabelFont -height 30 -pos -180 3 0 |
7c3ef2f7 |
61 | vdisplay -noupdate tbr -2d bottomRight -layer $aLayerId -dispMode 1 |
3bffef55 |
62 | polyline lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0 |
7c3ef2f7 |
63 | vdisplay -noupdate lbr -2d bottomRight -layer $aLayerId |
3bffef55 |
64 | vsetwidth -noupdate lbr 2 |
65 | |
66 | vdrawtext t2 "Label" -pos 1 0 1 -font $aLabelFont |
67 | vdisplay b2 -trsfPers zoom -trsfPersPos 1 0 1 |
68 | |
e3d02d1f |
69 | vdump $::imagedir/${::casename}_409x409_tile0.png |
70 | vdump $::imagedir/${::casename}_409x409_tile128.png -tileSize 128 |
71 | vdump $::imagedir/${::casename}_409x409_tile1024.png -tileSize 1024 |
72 | vdump $::imagedir/${::casename}_1920x1080_tile0.png -width 1920 -height 1920 |
73 | vdump $::imagedir/${::casename}_1920x1080_tile128.png -width 1920 -height 1920 -tileSize 128 |
74 | vdump $::imagedir/${::casename}_1920x1080_tile1024.png -width 1920 -height 1920 -tileSize 1024 |
75 | diffimage $::imagedir/${::casename}_409x409_tile0.png $::imagedir/${::casename}_409x409_tile128.png 0 0 0 $::imagedir/${::casename}_409x409_tile128diff.png |
3bffef55 |
76 | |
77 | # check dump with stereo |
78 | vstereo anaglyph |
e3d02d1f |
79 | vdump $::imagedir/${::casename}_409x409_stereotile0.png -stereo blend |
80 | vdump $::imagedir/${::casename}_409x409_stereotile128.png -stereo blend -tileSize 128 |
81 | vdump $::imagedir/${::casename}_409x409_stereotile1024.png -stereo blend -tileSize 1024 |
82 | vdump $::imagedir/${::casename}_1920x1080_stereotile0.png -width 1920 -height 1920 -stereo blend |
83 | vdump $::imagedir/${::casename}_1920x1080_stereotile128.png -width 1920 -height 1920 -stereo blend -tileSize 128 |
84 | vdump $::imagedir/${::casename}_1920x1080_stereotile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024 |
85 | diffimage $::imagedir/${::casename}_409x409_stereotile0.png $::imagedir/${::casename}_409x409_stereotile128.png 0 0 0 $::imagedir/${::casename}_409x409_stereotile128diff.png |
3bffef55 |
86 | |
87 | # check dump with Ray Tracing |
88 | vraytrace 1 |
e3d02d1f |
89 | vdump $::imagedir/${::casename}_409x409_rttile0.png -stereo blend |
90 | vdump $::imagedir/${::casename}_409x409_rttile128.png -stereo blend -tileSize 128 |
91 | vdump $::imagedir/${::casename}_409x409_rttile1024.png -stereo blend -tileSize 1024 |
92 | vdump $::imagedir/${::casename}_1920x1080_rttile0.png -width 1920 -height 1920 -stereo blend |
93 | vdump $::imagedir/${::casename}_1920x1080_rttile128.png -width 1920 -height 1920 -stereo blend -tileSize 128 |
94 | vdump $::imagedir/${::casename}_1920x1080_rttile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024 |
3bffef55 |
95 | vraytrace 0 |