b311480e |
1 | # Copyright (c) 1999-2012 OPEN CASCADE SAS |
2 | # |
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. |
7 | # |
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. |
10 | # |
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. |
17 | |
7fd59977 |
18 | |
19 | set stationname $tcl_platform(platform) |
20 | if { ${stationname} == "windows" } { |
21 | proc winfo { aTest aWindow } { return False } |
22 | } |
23 | |
24 | |
25 | proc sage { a} { |
26 | global stationname |
27 | if { ${stationname} != "windows" } { |
28 | |
29 | if { ![winfo exists .h ] } { |
30 | toplevel .h -bg azure3 |
31 | wm title .h "INFO DATAEXCHANGE TEST HARNESS" |
32 | wm geometry .h +320+20 |
33 | |
34 | } |
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 |
39 | puts $a |
40 | } else { |
41 | message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\ |
42 | -text $a |
43 | puts $a |
44 | } |
45 | pack .h.m |
46 | update |
47 | } |
48 | } |
49 | |
50 | |
51 | smallview |
52 | if { [winfo exists .h ] } { |
53 | destroy .h |
54 | } |
55 | |
56 | if { [info exists env(CASROOT)] } { |
57 | set thedir [file join $env(CASROOT) src DEResource] |
58 | cd ${thedir} |
59 | } |
60 | |
61 | datadir . |
62 | sage " First, we retrieve a BREP File " |
63 | sage " datadir ." |
64 | sage " restore wing.brep wing" |
65 | sage " " |
66 | datadir . |
67 | restore wing.brep wing |
68 | disp wing |
69 | fit |
70 | sage "Generate the IGES File of this BREP" |
71 | sage " brepiges wing /tmp/wing.igs" |
72 | sage " " |
73 | brepiges wing /tmp/wing.igs |
74 | wait 3 |
75 | sage "we delete all data" |
76 | sage "" |
77 | dall |
78 | sage "Restore this IGES File we have created " |
79 | sage " igesbrep wing.igs new *" |
80 | sage "" |
81 | cd /tmp |
82 | igesbrep wing.igs new * |
83 | disp new |
84 | fit |
85 | if { [winfo exists .h ] } { |
86 | destroy .h |
87 | } |
88 | puts "End IGES Elementary Test " |
89 | sage " " |
90 | unlink /tmp/wing.igs |