0023148: Error in stepstrcmp
[occt.git] / src / DrawResources / DataExchangeDemo.tcl
CommitLineData
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
19set stationname $tcl_platform(platform)
20if { ${stationname} == "windows" } {
21 proc winfo { aTest aWindow } { return False }
22}
23
24
25proc 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
51smallview
52if { [winfo exists .h ] } {
53 destroy .h
54}
55
56if { [info exists env(CASROOT)] } {
57 set thedir [file join $env(CASROOT) src DEResource]
58 cd ${thedir}
59}
60
61datadir .
62sage " First, we retrieve a BREP File "
63sage " datadir ."
64sage " restore wing.brep wing"
65sage " "
66datadir .
67restore wing.brep wing
68disp wing
69fit
70sage "Generate the IGES File of this BREP"
71sage " brepiges wing /tmp/wing.igs"
72sage " "
73brepiges wing /tmp/wing.igs
74wait 3
75sage "we delete all data"
76sage ""
77dall
78sage "Restore this IGES File we have created "
79sage " igesbrep wing.igs new *"
80sage ""
81cd /tmp
82igesbrep wing.igs new *
83disp new
84fit
85if { [winfo exists .h ] } {
86 destroy .h
87}
88puts "End IGES Elementary Test "
89sage " "
90unlink /tmp/wing.igs