0025181: Incrementation of OCCT version up to 6.8.0.dev
[occt.git] / samples / tcl / raytrace.tcl
1 # Script reproducing creation of bottle model as described in OCCT Tutorial
2
3 # make bottle by calling another script
4 source [file join [file dirname [info script]] bottle.tcl]
5
6 # make table and a glass
7 box table -50 -50 -10 100 100 10
8 pcone glass_out 7 9 25
9 pcone glass_in 7 9 25
10 ttranslate glass_in 0 0 0.2
11 bcut glass glass_out glass_in
12 ttranslate glass -30 -30 0
13
14 # show table and glass
15 vsetmaterial bottle aluminium
16 vdisplay table
17 vsetmaterial table bronze
18 vsetmaterial table plastic
19 vsetcolor table coral2
20 vdisplay glass
21 vsetmaterial glass plastic
22 vsetcolor glass brown
23 vsettransparency glass 0.6
24
25 # add light source for shadows
26 vlight new spot pos -100 -100 300
27
28 # set white background and fit view
29 vsetcolorbg 255 255 255
30 vfit
31
32 # set ray tracing
33 puts "Trying raytrace mode..."
34 if { ! [catch {vrenderparams -raytrace -shadows -reflections -fsaa -rayDepth 5}] } {
35   vtextureenv on 1
36 }