0023136: Increase visibility of DRAW samples
[occt.git] / samples / tcl / challenge.tcl
CommitLineData
03392dd2 1# This script creates a model described at
2# http://www.caddd.org/2010/04/opencascade-challenge.html
3
4pload MODELING VISUALIZATION
5
6# make base
7box b0 0 0 0 12 7 6
8explode b0 e
9blend b01 b0 1 b0_8
10blend b02 b01 1 b0_6
11
12# make cut at bottom
13box b1 3 -1 0 2 9 1.5
14bcut b2 b02 b1
15explode b2 e
16blend b3 b2 1 b2_27
17blend b4 b3 1 b2_30
18
19# make central cut
20box h1 3 -1 2.5 2 9 0.5
21box h2 3 -1 3 2 9 2
22plane p 4 -1 3 0 1 0
23pcylinder c p 1 9
24bcommon h3 h2 c
25bcut b5 b4 h1
26bcut b6 b5 h3
27
28# make side cut
29box b7 9 -1 1 2 9 4
30explode b7 e
31blend b71 b7 1 b7_6
32blend b72 b71 1 b7_8
33bcut b8 b6 b72
34
35# make box for inner cylindrical cut
36box bc1 -1 0 2 9 1 4
37box bc2 2 -1 2 4 3 3
38bcut bc3 bc1 bc2
39explode bc3 e
40blend bc4 bc3 1 bc3_20
41blend bc5 bc4 1 bc3_23
42blend bc6 bc5 1.99 bc3_21
43blend bc7 bc6 1.99 bc3_22
44
45# make inner cylindrical cut
46explode bc7 f
47revol r bc7_1 -1 0 6 1 0 0 100
48bcut b9 b8 r
49
50# make outer cylindrical cut
51plane p2 -1 0 6 1 0 0
52pcylinder c2 p2 6 15
53bcommon res b9 c2
54
55# show result
56donly res
57vinit
58vdisplay res
59vsetdispmode 1
60vfit
61