1 # Script reproducing creation of bottle model as described in OCCT Tutorial
3 # make bottle by calling another script
4 source [file join [file dirname [info script]] bottle.tcl]
6 # make table and a glass
7 box table -50 -50 -10 100 100 10
10 ttranslate glass_in 0 0 0.2
11 bcut glass glass_out glass_in
12 ttranslate glass -30 -30 0
14 # show table and glass
15 vsetmaterial bottle aluminium
17 vsetmaterial table bronze
18 vsetmaterial table plastic
19 vsetcolor table coral2
21 vsetmaterial glass plastic
23 vsettransparency glass 0.6
25 # add light source for shadows
26 vlight new spot pos -100 -100 300
28 # set white background and fit view
29 vsetcolorbg 255 255 255
33 if { [regexp {HAVE_OPENCL} [dversion]] } {
34 puts "Trying raytrace mode..."
35 if { ! [catch {vraytrace 1}] } {
37 vsetraytracemode shad=1 refl=1 aa=1