0025024: BSplCLib::PrepareInsertKnots reports incorrect number of poles
[occt.git] / samples / tcl / DataExchangeDemo.tcl
CommitLineData
480bf81e 1# Copyright (c) 1999-2014 OPEN CASCADE SAS
b311480e 2#
480bf81e 3# This file is part of Open CASCADE Technology software library.
b311480e 4#
480bf81e 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.
b311480e 10#
480bf81e 11# Alternatively, this file may be used under the terms of Open CASCADE
12# commercial license or contractual agreement.
b311480e 13
03392dd2 14# Command to log a message to both command-line and dialog window
7fd59977 15proc sage { a} {
03392dd2 16 if { ![winfo exists .h ] } {
17 toplevel .h -bg azure3
18 wm title .h "INFO TEST HARNESS"
19 wm geometry .h +320+20
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
25 puts $a
26 } else {
27 message .h.m -justify left -bg azure2 -width 13c -relief ridge -bd 4 -text $a
28 puts $a
29 }
30 pack .h.m
31 update
7fd59977 32}
33
03392dd2 34pload DATAEXCHANGE
7fd59977 35
36smallview
37if { [winfo exists .h ] } {
38 destroy .h
39}
40
03392dd2 41set ddir .
7fd59977 42if { [info exists env(CASROOT)] } {
03392dd2 43 set ddir [file join $env(CASROOT) data occ]
44}
45
46set tdir .
47if { [info exist env(TEMP)] } {
48 set tdir $env(TEMP)
7fd59977 49}
50
7fd59977 51sage " First, we retrieve a BREP File "
03392dd2 52sage " restore $ddir/wing.brep wing"
7fd59977 53sage " "
54datadir .
03392dd2 55restore $ddir/wing.brep wing
7fd59977 56disp wing
57fit
03392dd2 58
7fd59977 59sage "Generate the IGES File of this BREP"
03392dd2 60sage " brepiges wing $tdir/wing.igs"
7fd59977 61sage " "
03392dd2 62brepiges wing $tdir/wing.igs
7fd59977 63wait 3
03392dd2 64
65sage "we delete all DRAW data"
7fd59977 66sage ""
67dall
03392dd2 68fit
69wait 3
70
7fd59977 71sage "Restore this IGES File we have created "
03392dd2 72sage " igesbrep $tdir/wing.igs new *"
7fd59977 73sage ""
03392dd2 74igesbrep $tdir/wing.igs new *
7fd59977 75disp new
76fit
03392dd2 77
7fd59977 78puts "End IGES Elementary Test "
79sage " "
03392dd2 80file delete $tdir/wing.igs