1 # Copyright (c) 1999-2014 OPEN CASCADE SAS
3 # This file is part of Open CASCADE Technology software library.
5 # This library is free software; you can redistribute it and / or modify it
6 # under the terms of the GNU Lesser General Public version 2.1 as published
7 # by the Free Software Foundation, with special exception defined in the file
8 # OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
9 # distribution for complete text of the license and disclaimer of any warranty.
11 # Alternatively, this file may be used under the terms of Open CASCADE
12 # commercial license or contractual agreement.
14 # Command to log a message to both command-line and dialog window
16 if { ![winfo exists .h ] } {
17 toplevel .h -bg azure3
18 wm title .h "INFO TEST HARNESS"
19 wm geometry .h +320+20
21 if { [winfo exists .h.m ] } {
22 set astring [.h.m cget -text]
23 set newstring "${astring} \n $a"
24 .h.m configure -text $newstring
27 message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4 -text $a
37 if { [winfo exists .h ] } {
40 sage " Creating a box"
41 sage " box b -10 -10 -10 20 20 20"
43 box b -10 -10 -10 20 20 20
47 sage " Draft of two lateral faces "
48 sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 "
50 sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 "
52 depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1
55 depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1
58 sage " Fillet on four lateral edges, then on the top and bottom edges "
60 sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
61 sage " nexplode result e"
62 sage " blend result result 2 result_11 3 result_12"
64 blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
68 blend result result 2 result_11 3 result_12
71 sage " Creating a profile on the top face "
72 sage " nexplode result f"
73 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
76 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
77 sage " Creating a prism"
78 sage " prism rr p 0 0 20"
82 sage " Fusion of this prism with the original part "
83 sage " fuse result rr result"
91 sage " Opening the top face"
92 sage " offsetshape r result -1 0.0001 result_17"
96 offsetshape r result -1 0.0001 result_17
97 sage " Creating a cylinder and positionning it"
98 sage " pcylinder cyl 2 300"
99 sage " trotate cyl cyl 0 0 0 1 0 0 45"
100 sage " ttranslate cyl cyl 0 7.5 0"
103 trotate cyl cyl 0 0 0 1 0 0 45
104 ttranslate cyl cyl 0 7.5 0
105 sage " Display the Shape on Hidden Line Mode "
110 sage " Display the Shape on HLR Mode "
117 sage "Demo completed"