0028599: Replacement of old Boolean operations with new ones in BRepProj_Projection...
[occt.git] / samples / tcl / DataExchangeDemo.tcl
CommitLineData
480bf81e 1# Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2#
ab91ab6f 3#Category: Demos
4#Title: Import and export
5#
480bf81e 6# This file is part of Open CASCADE Technology software library.
b311480e 7#
480bf81e 8# This library is free software; you can redistribute it and / or modify it
9# under the terms of the GNU Lesser General Public version 2.1 as published
10# by the Free Software Foundation, with special exception defined in the file
11# OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12# distribution for complete text of the license and disclaimer of any warranty.
b311480e 13#
480bf81e 14# Alternatively, this file may be used under the terms of Open CASCADE
15# commercial license or contractual agreement.
b311480e 16
03392dd2 17# Command to log a message to both command-line and dialog window
7fd59977 18proc sage { a} {
03392dd2 19 if { ![winfo exists .h ] } {
20 toplevel .h -bg azure3
21 wm title .h "INFO TEST HARNESS"
22 wm geometry .h +320+20
23 }
24 if { [winfo exists .h.m ] } {
25 set astring [.h.m cget -text]
26 set newstring "${astring} \n $a"
27 .h.m configure -text $newstring
28 puts $a
29 } else {
30 message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4 -text $a
31 puts $a
32 }
33 pack .h.m
34 update
7fd59977 35}
36
03392dd2 37pload DATAEXCHANGE
7fd59977 38
39smallview
40if { [winfo exists .h ] } {
41 destroy .h
42}
43
03392dd2 44set ddir .
4b3541c6 45if { [info exists env(CSF_OCCTDataPath)] } {
46 set ddir [file join $env(CSF_OCCTDataPath) occ]
63fad07e 47} elseif { [info exists env(CASROOT)] } {
03392dd2 48 set ddir [file join $env(CASROOT) data occ]
49}
50
51set tdir .
52if { [info exist env(TEMP)] } {
53 set tdir $env(TEMP)
7fd59977 54}
55
7fd59977 56sage " First, we retrieve a BREP File "
03392dd2 57sage " restore $ddir/wing.brep wing"
7fd59977 58sage " "
59datadir .
03392dd2 60restore $ddir/wing.brep wing
7fd59977 61disp wing
62fit
03392dd2 63
7fd59977 64sage "Generate the IGES File of this BREP"
03392dd2 65sage " brepiges wing $tdir/wing.igs"
7fd59977 66sage " "
03392dd2 67brepiges wing $tdir/wing.igs
7fd59977 68wait 3
03392dd2 69
70sage "we delete all DRAW data"
7fd59977 71sage ""
72dall
03392dd2 73fit
74wait 3
75
7fd59977 76sage "Restore this IGES File we have created "
03392dd2 77sage " igesbrep $tdir/wing.igs new *"
7fd59977 78sage ""
03392dd2 79igesbrep $tdir/wing.igs new *
7fd59977 80disp new
81fit
03392dd2 82
7fd59977 83puts "End IGES Elementary Test "
84sage " "
03392dd2 85file delete $tdir/wing.igs