7fd59977 |
1 | |
2 | set stationname $tcl_platform(platform) |
3 | if { ${stationname} == "windows" } { |
4 | proc winfo { aTest aWindow } { return False } |
5 | } |
6 | |
7 | |
8 | proc 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 | |
34 | smallview |
35 | if { [winfo exists .h ] } { |
36 | destroy .h |
37 | } |
38 | sage " Creating a box" |
39 | sage " box b -10 -10 -10 20 20 20" |
40 | sage " " |
41 | box b -10 -10 -10 20 20 20 |
42 | fit |
43 | nexplode b f |
44 | erase b |
45 | sage " Draft of two lateral faces " |
46 | sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 " |
47 | sage " nexplode r f" |
48 | sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 " |
49 | sage " " |
50 | depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 |
51 | clear |
52 | nexplode r f |
53 | depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 |
54 | clear |
55 | nexplode rr e |
56 | sage " Fillet on four lateral edges, then on the top and bottom edges " |
57 | sage " nexplode rr e" |
58 | sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11" |
59 | sage " nexplode result e" |
60 | sage " blend result result 2 result_11 3 result_12" |
61 | sage " " |
62 | blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11 |
63 | erase rr |
64 | erase result |
65 | nexplode result e |
66 | blend result result 2 result_11 3 result_12 |
67 | clear |
68 | nexplode result f |
69 | sage " Creating a profile on the top face " |
70 | sage " nexplode result f" |
71 | sage " 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 | " |
73 | sage " " |
74 | 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 |
75 | sage " Creating a prism" |
76 | sage " prism rr p 0 0 20" |
77 | sage " " |
78 | prism rr p 0 0 20 |
79 | fit |
80 | sage " Fusion of this prism with the original part " |
81 | sage " fuse result rr result" |
82 | sage " " |
83 | fuse result rr result |
84 | donl result |
85 | nexplode result f |
86 | erase result |
87 | fit |
88 | |
89 | sage " Opening the top face" |
90 | sage " offsetshape r result -1 0.0001 result_17" |
91 | sage " " |
92 | |
93 | nexplode result f |
94 | offsetshape r result -1 0.0001 result_17 |
95 | sage " Creating a cylinder and positionning it" |
96 | sage " pcylinder cyl 2 300" |
97 | sage " trotate cyl cyl 0 0 0 1 0 0 45" |
98 | sage " ttranslate cyl cyl 0 7.5 0" |
99 | sage " " |
100 | pcylinder cyl 2 30 |
101 | trotate cyl cyl 0 0 0 1 0 0 45 |
102 | ttranslate cyl cyl 0 7.5 0 |
103 | sage " Display the Shape on Hidden Line Mode " |
104 | sage " hlr hid r" |
105 | sage "" |
106 | donl r |
107 | hlr hid r |
108 | sage " Display the Shape on HLR Mode " |
109 | sage " hlr nohid r" |
110 | sage " hlr hlr r" |
111 | sage "" |
112 | donl r |
113 | hlr nohid r |
114 | hlr hlr r |
115 | sage "Demo completed" |
116 | |