summaryrefslogtreecommitdiff
path: root/src/DrawResources/DataExchangeDemo.tcl
blob: 8c160b81532875332934e44d5c359d334154386c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

set stationname $tcl_platform(platform)
if { ${stationname} == "windows" } {
   proc winfo { aTest aWindow } { return False }
}


proc sage { a} {
    global stationname 
    if { ${stationname} != "windows" } {
	
	if { ![winfo exists .h ] } {
	    toplevel .h -bg azure3
	    wm title .h "INFO DATAEXCHANGE TEST HARNESS"
	    wm geometry .h +320+20
	    
	} 
	if { [winfo exists .h.m ] } {
	    set astring [.h.m cget  -text]
	    set newstring "${astring} \n $a"
	    .h.m configure -text $newstring 
	    puts $a
	} else {
	    message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4\
		    -text $a
	    puts $a
	} 
	pack .h.m
	update
   }
}


smallview
if { [winfo exists .h ] } {
    destroy .h
}

set thedir [file join [file dirname [file dirname [info script]] DEResource]
if { [file isdirectory ${thedir}] } {
    cd ${thedir}
} else {
    cd [file dirname [info script]]
}

datadir .
sage " First, we retrieve a BREP File "
sage "    datadir ."
sage "    restore wing.brep wing"
sage " "
datadir .
restore wing.brep wing
disp wing
fit
sage "Generate the IGES File of this BREP"
sage "   brepiges wing /tmp/wing.igs"
sage " "
brepiges wing /tmp/wing.igs
wait 3
sage "we delete all data"
sage ""
dall
sage "Restore this IGES File we have created " 
sage "   igesbrep wing.igs new *"
sage ""
cd /tmp
igesbrep wing.igs new *
disp new
fit
if { [winfo exists .h ] } {
    destroy .h
}
puts "End IGES Elementary Test " 
sage " "
unlink /tmp/wing.igs