File: tiles

package info (click to toggle)
opencascade 7.3.0%2Bdfsg1-5
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 278,376 kB
  • sloc: cpp: 1,136,010; ansic: 81,569; tcl: 14,864; cs: 5,173; java: 1,522; xml: 468; sh: 375; perl: 37; makefile: 25
file content (95 lines) | stat: -rw-r--r-- 4,173 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
puts "========"
puts "Tiled image dump"
puts "========"

set aFontFile ""
catch { set aFontFile [locate_data_file DejaVuSans.ttf] }

pload MODELING VISUALIZATION
box b 2 3 1
box b2 50 20 30

set aLabelFont "Arial"
if { "$aFontFile" != "" } {
  vfont add "$aFontFile" SansFont
  set aLabelFont "SansFont"
}

vclear
vclose ALL
vinit View1
vraytrace 0
vsetgradientbg 180 200 255 180 180 180 2
vsetdispmode 0
vdisplay -dispMode 1 b
vfit
vrotate 0.5 0 0
vzbufftrihedron

catch { vzlayer del 1 }
set aLayerId [vzlayer add]
vzlayer $aLayerId -enable depthClear

vtrihedron trh
vdisplay  -noupdate trh -layer $aLayerId -trihedron topRight 100 100

text2brep tcc "Center" -font $aLabelFont -height 30 -pos -40 0 0
vdisplay  -noupdate tcc -2d center -layer $aLayerId -dispMode 1
polyline  lcc -50 -50 0 -50 50 0 50 50 0 50 0 0 0 -50 0 -50 -50 0
vdisplay  -noupdate lcc -2d center -layer $aLayerId
vsetwidth -noupdate lcc 2

text2brep tbl "Bottom-Left" -font $aLabelFont -height 30 -pos 0 3 5
vdisplay  -noupdate tbl -2d bottomLeft -layer $aLayerId -dispMode 1
polyline  lbl 0 0 0 0 100 0 100 100 0 100 50 0 50 0 0 0 0 0
vdisplay  -noupdate lbl -2d bottomLeft -layer $aLayerId
vsetwidth -noupdate lbl 2

text2brep ttl "Top-Left" -font $aLabelFont -height 30 -pos 0 -30 0
vdisplay  -noupdate ttl -2d topLeft -layer $aLayerId -dispMode 1
polyline  ltl 0 -100 0 0 0 0 100 0 0 100 -50 0 50 -100 0 0 -100 0
vdisplay  -noupdate ltl -2d topLeft -layer $aLayerId
vsetwidth -noupdate ltl 2

text2brep ttr "Top-Right" -font $aLabelFont -height 30 -pos -130 -30 0
vdisplay  -noupdate ttr -2d topRight -layer $aLayerId -dispMode 1
polyline  ltr -100 -100 0 -100 0 0 0 0 0 0 -50 0 -50 -100 0 -100 -100 0
vdisplay  -noupdate ltr -2d topRight -layer $aLayerId
vsetwidth -noupdate ltr 2

text2brep tbr "Bottom-Right" -font $aLabelFont -height 30 -pos -180 3 0
vdisplay  -noupdate tbr -2d bottomRight -layer $aLayerId -dispMode 1
polyline  lbr -100 0 0 -100 100 0 0 100 0 0 50 0 -50 0 0 -100 0 0
vdisplay  -noupdate lbr -2d bottomRight -layer $aLayerId
vsetwidth -noupdate lbr 2

vdrawtext t2 "Label" -pos 1 0 1 -font $aLabelFont
vdisplay b2 -trsfPers zoom -trsfPersPos 1 0 1

vdump $::imagedir/${::casename}_409x409_tile0.png
vdump $::imagedir/${::casename}_409x409_tile128.png  -tileSize 128
vdump $::imagedir/${::casename}_409x409_tile1024.png -tileSize 1024
vdump $::imagedir/${::casename}_1920x1080_tile0.png    -width 1920 -height 1920
vdump $::imagedir/${::casename}_1920x1080_tile128.png  -width 1920 -height 1920 -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_tile1024.png -width 1920 -height 1920 -tileSize 1024
diffimage $::imagedir/${::casename}_409x409_tile0.png $::imagedir/${::casename}_409x409_tile128.png 0 0 0 $::imagedir/${::casename}_409x409_tile128diff.png

# check dump with stereo
vstereo anaglyph
vdump $::imagedir/${::casename}_409x409_stereotile0.png      -stereo blend
vdump $::imagedir/${::casename}_409x409_stereotile128.png    -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_409x409_stereotile1024.png   -stereo blend -tileSize 1024
vdump $::imagedir/${::casename}_1920x1080_stereotile0.png    -width 1920 -height 1920 -stereo blend
vdump $::imagedir/${::casename}_1920x1080_stereotile128.png  -width 1920 -height 1920 -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_stereotile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024
diffimage $::imagedir/${::casename}_409x409_stereotile0.png $::imagedir/${::casename}_409x409_stereotile128.png 0 0 0 $::imagedir/${::casename}_409x409_stereotile128diff.png

# check dump with Ray Tracing
vraytrace 1
vdump $::imagedir/${::casename}_409x409_rttile0.png      -stereo blend
vdump $::imagedir/${::casename}_409x409_rttile128.png    -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_409x409_rttile1024.png   -stereo blend -tileSize 1024
vdump $::imagedir/${::casename}_1920x1080_rttile0.png    -width 1920 -height 1920 -stereo blend
vdump $::imagedir/${::casename}_1920x1080_rttile128.png  -width 1920 -height 1920 -stereo blend -tileSize 128
vdump $::imagedir/${::casename}_1920x1080_rttile1024.png -width 1920 -height 1920 -stereo blend -tileSize 1024
vraytrace 0