0022627: Change OCCT memory management defaults
[occt.git] / src / DrawResources / ModelingDemo.tcl
CommitLineData
7fd59977 1
2set stationname $tcl_platform(platform)
3if { ${stationname} == "windows" } {
4 proc winfo { aTest aWindow } { return False }
5}
6
7
8proc sage { a} {
9 global stationname
10 if { ${stationname} != "windows" } {
11
12 if { ![winfo exists .h ] } {
13 toplevel .h -bg azure3
14 wm title .h "INFO TEST HARNESS"
15 wm geometry .h +320+20
16
17 }
18 if { [winfo exists .h.m ] } {
19 set astring [.h.m cget -text]
20 set newstring "${astring} \n $a"
21 .h.m configure -text $newstring
22 puts $a
23 } else {
24 message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
25 -text $a
26 puts $a
27 }
28 pack .h.m
29 update
30 }
31}
32
33
34smallview
35if { [winfo exists .h ] } {
36 destroy .h
37}
38sage " Creating a box"
39sage " box b -10 -10 -10 20 20 20"
40sage " "
41box b -10 -10 -10 20 20 20
42fit
43nexplode b f
44erase b
45sage " Draft of two lateral faces "
46sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 "
47sage " nexplode r f"
48sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 "
49sage " "
50depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1
51clear
52nexplode r f
53depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1
54clear
55nexplode rr e
56sage " Fillet on four lateral edges, then on the top and bottom edges "
57sage " nexplode rr e"
58sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
59sage " nexplode result e"
60sage " blend result result 2 result_11 3 result_12"
61sage " "
62blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
63erase rr
64erase result
65nexplode result e
66blend result result 2 result_11 3 result_12
67clear
68nexplode result f
69sage " Creating a profile on the top face "
70sage " nexplode result f"
71sage " profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
72"
73sage " "
74profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
75sage " Creating a prism"
76sage " prism rr p 0 0 20"
77sage " "
78prism rr p 0 0 20
79fit
80sage " Fusion of this prism with the original part "
81sage " fuse result rr result"
82sage " "
83fuse result rr result
84donl result
85nexplode result f
86erase result
87fit
88
89sage " Opening the top face"
90sage " offsetshape r result -1 0.0001 result_17"
91sage " "
92
93nexplode result f
94offsetshape r result -1 0.0001 result_17
95sage " Creating a cylinder and positionning it"
96sage " pcylinder cyl 2 300"
97sage " trotate cyl cyl 0 0 0 1 0 0 45"
98sage " ttranslate cyl cyl 0 7.5 0"
99sage " "
100pcylinder cyl 2 30
101trotate cyl cyl 0 0 0 1 0 0 45
102ttranslate cyl cyl 0 7.5 0
103sage " Display the Shape on Hidden Line Mode "
104sage " hlr hid r"
105sage ""
106donl r
107hlr hid r
108sage " Display the Shape on HLR Mode "
109sage " hlr nohid r"
110sage " hlr hlr r"
111sage ""
112donl r
113hlr nohid r
114hlr hlr r
115sage "Demo completed"
116