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