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