1 # Copyright (c) 1999-2012 OPEN CASCADE SAS
3 # The content of this file is subject to the Open CASCADE Technology Public
4 # License Version 6.5 (the "License"). You may not use the content of this file
5 # except in compliance with the License. Please obtain a copy of the License
6 # at http://www.opencascade.org and read it completely before using this file.
8 # The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
9 # main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
11 # The Original Code and all software distributed under the License is
12 # distributed on an "AS IS" basis, without warranty of any kind, and the
13 # Initial Developer hereby disclaims all such warranties, including without
14 # limitation, any warranties of merchantability, fitness for a particular
15 # purpose or non-infringement. Please see the License for the specific terms
16 # and conditions governing the rights and limitations under the License.
19 set stationname $tcl_platform(platform)
20 if { ${stationname} == "windows" } {
21 proc winfo { aTest aWindow } { return False }
27 if { ${stationname} != "windows" } {
29 if { ![winfo exists .h ] } {
30 toplevel .h -bg azure3
31 wm title .h "INFO TEST HARNESS"
32 wm geometry .h +320+20
35 if { [winfo exists .h.m ] } {
36 set astring [.h.m cget -text]
37 set newstring "${astring} \n $a"
38 .h.m configure -text $newstring
41 message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
52 if { [winfo exists .h ] } {
55 sage " Creating a box"
56 sage " box b -10 -10 -10 20 20 20"
58 box b -10 -10 -10 20 20 20
62 sage " Draft of two lateral faces "
63 sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 "
65 sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 "
67 depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1
70 depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1
73 sage " Fillet on four lateral edges, then on the top and bottom edges "
75 sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
76 sage " nexplode result e"
77 sage " blend result result 2 result_11 3 result_12"
79 blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
83 blend result result 2 result_11 3 result_12
86 sage " Creating a profile on the top face "
87 sage " nexplode result f"
88 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
91 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
92 sage " Creating a prism"
93 sage " prism rr p 0 0 20"
97 sage " Fusion of this prism with the original part "
98 sage " fuse result rr result"
100 fuse result rr result
106 sage " Opening the top face"
107 sage " offsetshape r result -1 0.0001 result_17"
111 offsetshape r result -1 0.0001 result_17
112 sage " Creating a cylinder and positionning it"
113 sage " pcylinder cyl 2 300"
114 sage " trotate cyl cyl 0 0 0 1 0 0 45"
115 sage " ttranslate cyl cyl 0 7.5 0"
118 trotate cyl cyl 0 0 0 1 0 0 45
119 ttranslate cyl cyl 0 7.5 0
120 sage " Display the Shape on Hidden Line Mode "
125 sage " Display the Shape on HLR Mode "
132 sage "Demo completed"