mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-03 14:10:33 +03:00
0023136: Increase visibility of DRAW samples
Tcl samples moved from src/DrawResources to samples/tcl. Scripts VisualisationDemo.tcl and ModelingDemo.tcl fixed to work on Windows. File wing.brep moved from src/DrawResources to data/occ, and DataExchangeDemo.tcl corrected. OCAFDemo.tcl removed, as it has little sense and referred data files are lost Added sample Tcl script creating a model defined on the 'Open CASCADE challenge' web page
This commit is contained in:
@@ -1,90 +0,0 @@
|
||||
# Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
#
|
||||
# The content of this file is subject to the Open CASCADE Technology Public
|
||||
# License Version 6.5 (the "License"). You may not use the content of this file
|
||||
# except in compliance with the License. Please obtain a copy of the License
|
||||
# at http://www.opencascade.org and read it completely before using this file.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
#
|
||||
# The Original Code and all software distributed under the License is
|
||||
# distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
# Initial Developer hereby disclaims all such warranties, including without
|
||||
# limitation, any warranties of merchantability, fitness for a particular
|
||||
# purpose or non-infringement. Please see the License for the specific terms
|
||||
# and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
if { [info exists env(CASROOT)] } {
|
||||
set thedir [file join $env(CASROOT) src DEResource]
|
||||
cd ${thedir}
|
||||
}
|
||||
|
||||
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
|
@@ -1,133 +0,0 @@
|
||||
# Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
#
|
||||
# The content of this file is subject to the Open CASCADE Technology Public
|
||||
# License Version 6.5 (the "License"). You may not use the content of this file
|
||||
# except in compliance with the License. Please obtain a copy of the License
|
||||
# at http://www.opencascade.org and read it completely before using this file.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
#
|
||||
# The Original Code and all software distributed under the License is
|
||||
# distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
# Initial Developer hereby disclaims all such warranties, including without
|
||||
# limitation, any warranties of merchantability, fitness for a particular
|
||||
# purpose or non-infringement. Please see the License for the specific terms
|
||||
# and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
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 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
|
||||
}
|
||||
sage " Creating a box"
|
||||
sage " box b -10 -10 -10 20 20 20"
|
||||
sage " "
|
||||
box b -10 -10 -10 20 20 20
|
||||
fit
|
||||
nexplode b f
|
||||
erase b
|
||||
sage " Draft of two lateral faces "
|
||||
sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 "
|
||||
sage " nexplode r f"
|
||||
sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 "
|
||||
sage " "
|
||||
depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1
|
||||
clear
|
||||
nexplode r f
|
||||
depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1
|
||||
clear
|
||||
nexplode rr e
|
||||
sage " Fillet on four lateral edges, then on the top and bottom edges "
|
||||
sage " nexplode rr e"
|
||||
sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
|
||||
sage " nexplode result e"
|
||||
sage " blend result result 2 result_11 3 result_12"
|
||||
sage " "
|
||||
blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
|
||||
erase rr
|
||||
erase result
|
||||
nexplode result e
|
||||
blend result result 2 result_11 3 result_12
|
||||
clear
|
||||
nexplode result f
|
||||
sage " Creating a profile on the top face "
|
||||
sage " nexplode result f"
|
||||
sage " profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
|
||||
"
|
||||
sage " "
|
||||
profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
|
||||
sage " Creating a prism"
|
||||
sage " prism rr p 0 0 20"
|
||||
sage " "
|
||||
prism rr p 0 0 20
|
||||
fit
|
||||
sage " Fusion of this prism with the original part "
|
||||
sage " fuse result rr result"
|
||||
sage " "
|
||||
fuse result rr result
|
||||
donl result
|
||||
nexplode result f
|
||||
erase result
|
||||
fit
|
||||
|
||||
sage " Opening the top face"
|
||||
sage " offsetshape r result -1 0.0001 result_17"
|
||||
sage " "
|
||||
|
||||
nexplode result f
|
||||
offsetshape r result -1 0.0001 result_17
|
||||
sage " Creating a cylinder and positionning it"
|
||||
sage " pcylinder cyl 2 300"
|
||||
sage " trotate cyl cyl 0 0 0 1 0 0 45"
|
||||
sage " ttranslate cyl cyl 0 7.5 0"
|
||||
sage " "
|
||||
pcylinder cyl 2 30
|
||||
trotate cyl cyl 0 0 0 1 0 0 45
|
||||
ttranslate cyl cyl 0 7.5 0
|
||||
sage " Display the Shape on Hidden Line Mode "
|
||||
sage " hlr hid r"
|
||||
sage ""
|
||||
donl r
|
||||
hlr hid r
|
||||
sage " Display the Shape on HLR Mode "
|
||||
sage " hlr nohid r"
|
||||
sage " hlr hlr r"
|
||||
sage ""
|
||||
donl r
|
||||
hlr nohid r
|
||||
hlr hlr r
|
||||
sage "Demo completed"
|
||||
|
@@ -1,93 +0,0 @@
|
||||
# Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
#
|
||||
# The content of this file is subject to the Open CASCADE Technology Public
|
||||
# License Version 6.5 (the "License"). You may not use the content of this file
|
||||
# except in compliance with the License. Please obtain a copy of the License
|
||||
# at http://www.opencascade.org and read it completely before using this file.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
#
|
||||
# The Original Code and all software distributed under the License is
|
||||
# distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
# Initial Developer hereby disclaims all such warranties, including without
|
||||
# limitation, any warranties of merchantability, fitness for a particular
|
||||
# purpose or non-infringement. Please see the License for the specific terms
|
||||
# and conditions governing the rights and limitations under the License.
|
||||
|
||||
# first , Opening Document write on Unix
|
||||
puts "First , Opening Document write on Unix "
|
||||
set Data [file join $env(CASROOT) src TCAF]
|
||||
|
||||
set DocName [file join ${Data} FileUnix.std]
|
||||
if [ file exists ${DocName} ] {
|
||||
|
||||
Open ${DocName} Unix
|
||||
DumpDocument Unix
|
||||
} else {
|
||||
puts " ${DocName} does not exist "
|
||||
}
|
||||
|
||||
# first , Opening Document write on WindowsNT
|
||||
puts ""
|
||||
puts "now , Opening Document write on WindowsNT "
|
||||
puts ""
|
||||
|
||||
set DocName [file join ${Data} FileWNT.std]
|
||||
puts "trying to Open : ${DocName} "
|
||||
if [ file exists ${DocName} ] {
|
||||
catch { Open ${DocName} WNT } filesta
|
||||
if { ${filesta} == "" } {
|
||||
DumpDocument WNT
|
||||
} else {
|
||||
puts " Problem when trying to read ${DocName} ==> $filesta "
|
||||
}
|
||||
} else {
|
||||
puts " ${DocName} does not exist "
|
||||
}
|
||||
puts "List the Document in the Session :"
|
||||
ListDocuments
|
||||
|
||||
puts ""
|
||||
puts "now , We create new Document "
|
||||
puts ""
|
||||
NewDocument New MDTV-Standard
|
||||
UndoLimit New 5
|
||||
NewCommand New
|
||||
|
||||
Label New 0:20
|
||||
SetReal New 0:20 .12345
|
||||
|
||||
|
||||
set newName /tmp/New.std
|
||||
if { [info exists env(TEMP)] } {
|
||||
set newName $env(TEMP)/New.std
|
||||
}
|
||||
SaveAs New ${newName}
|
||||
puts " "
|
||||
puts "List the Document in the Session :"
|
||||
ListDocuments
|
||||
puts " "
|
||||
puts "We close it"
|
||||
Close New
|
||||
puts "List the Document in the Session :"
|
||||
ListDocuments
|
||||
|
||||
puts "Verify if the new Document is saved : ${newName} "
|
||||
if [file exists ${newName}] {
|
||||
puts " ... exists : Yes "
|
||||
puts " ... size : [file size ${newName}]"
|
||||
|
||||
puts " "
|
||||
puts " We try to read it :"
|
||||
Open ${newName} ReadDoc
|
||||
DumpDocument ReadDoc
|
||||
puts "List the Document in the Session :"
|
||||
ListDocuments
|
||||
|
||||
} else {
|
||||
puts " ... exists : No "
|
||||
}
|
||||
puts " "
|
||||
puts " "
|
||||
puts "end "
|
@@ -1,173 +0,0 @@
|
||||
# Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
#
|
||||
# The content of this file is subject to the Open CASCADE Technology Public
|
||||
# License Version 6.5 (the "License"). You may not use the content of this file
|
||||
# except in compliance with the License. Please obtain a copy of the License
|
||||
# at http://www.opencascade.org and read it completely before using this file.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
#
|
||||
# The Original Code and all software distributed under the License is
|
||||
# distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
# Initial Developer hereby disclaims all such warranties, including without
|
||||
# limitation, any warranties of merchantability, fitness for a particular
|
||||
# purpose or non-infringement. Please see the License for the specific terms
|
||||
# and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
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 AISViewer"
|
||||
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
|
||||
}
|
||||
}
|
||||
|
||||
if { [winfo exists .h ] } {
|
||||
destroy .h
|
||||
}
|
||||
|
||||
sage " Creating the V3D Viewer"
|
||||
sage " vinit"
|
||||
sage " "
|
||||
vinit
|
||||
vclear
|
||||
clear
|
||||
|
||||
sage " Creating the Topological Viewer"
|
||||
sage " smallview"
|
||||
sage " "
|
||||
smallview
|
||||
sage " Creating a box"
|
||||
sage " box b -10 -10 -10 20 20 20"
|
||||
sage " "
|
||||
box b -10 -10 -10 20 20 20
|
||||
fit
|
||||
sage " Display the box in the V3D Viewer"
|
||||
sage " vdisplay b"
|
||||
sage " "
|
||||
vdisplay b
|
||||
vfit
|
||||
nexplode b f
|
||||
erase b
|
||||
sage " Draft of two lateral faces "
|
||||
sage " nexplode b f"
|
||||
sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 "
|
||||
sage " nexplode r f"
|
||||
sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 "
|
||||
sage " "
|
||||
depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1
|
||||
clear
|
||||
nexplode r f
|
||||
depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1
|
||||
clear
|
||||
nexplode rr e
|
||||
verase b
|
||||
vdisplay rr
|
||||
vfit
|
||||
sage " Fillet on four lateral edges, then on the top and bottom edges "
|
||||
sage " nexplode rr e"
|
||||
sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
|
||||
sage " nexplode result e"
|
||||
sage " blend result result 2 result_11 3 result_12"
|
||||
sage " "
|
||||
blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
|
||||
erase rr
|
||||
erase result
|
||||
nexplode result e
|
||||
blend result result 2 result_11 3 result_12
|
||||
clear
|
||||
nexplode result f
|
||||
verase rr
|
||||
vdisplay result
|
||||
vfit
|
||||
sage " Creating a profile on the top face "
|
||||
sage " nexplode result f"
|
||||
sage " profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
|
||||
"
|
||||
sage " "
|
||||
profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
|
||||
sage " Creating a prism"
|
||||
sage " prism rr p 0 0 20"
|
||||
sage " "
|
||||
prism rr p 0 0 20
|
||||
sage " Change some attributs : MATERIAL , TRANSPARENCY"
|
||||
sage " vsetmaterial rr PLASTIC"
|
||||
sage " vsetcolor rr RED"
|
||||
sage " vsettransparency result 0.5"
|
||||
sage " vsetdispmode 1"
|
||||
sage " "
|
||||
vdisplay rr
|
||||
vsetmaterial rr PLASTIC
|
||||
vsettransparency rr 0.5
|
||||
vsetcolor rr RED
|
||||
vsettransparency result 0.5
|
||||
vsetdispmode 1
|
||||
vfit
|
||||
fit
|
||||
sage " Fusion of this prism with the original part "
|
||||
sage " fuse result rr result"
|
||||
sage " "
|
||||
fuse result rr result
|
||||
donl result
|
||||
vdisplay result
|
||||
vdonly result
|
||||
vfit
|
||||
nexplode result f
|
||||
erase result
|
||||
fit
|
||||
|
||||
sage " Opening the top face"
|
||||
sage " offsetshape r result -1 0.0001 result_17"
|
||||
sage " "
|
||||
nexplode result f
|
||||
|
||||
offsetshape r result -1 0.0001 result_17
|
||||
vdisplay r
|
||||
vdonly r
|
||||
vfit
|
||||
vsetcolor r MATRABLUE
|
||||
vsettransparency r 0
|
||||
|
||||
sage " Creating a cylinder and positionning it"
|
||||
sage " pcylinder cyl 2 300"
|
||||
sage " trotate cyl cyl 0 0 0 1 0 0 45"
|
||||
sage " ttranslate cyl cyl 0 7.5 0"
|
||||
sage " "
|
||||
pcylinder cyl 2 30
|
||||
vdisplay cyl
|
||||
vsetcolor cyl RED
|
||||
vfit
|
||||
trotate cyl cyl 0 0 0 1 0 0 45
|
||||
ttranslate cyl cyl 0 7.5 0
|
||||
vdisplay cyl
|
||||
vsetcolor cyl RED
|
||||
vfit
|
||||
vdisplay cyl
|
||||
vsetcolor cyl RED
|
||||
vfit
|
||||
sage "Demo completed"
|
@@ -1,46 +0,0 @@
|
||||
#!/bin/csh -f
|
||||
#
|
||||
# This is a simple script demo for Draw Module on Unix platform.
|
||||
#
|
||||
# The V.E. CASROOT must be setted to the directory where CasCade 3.0 has been
|
||||
# downloaded.
|
||||
#
|
||||
setenv station `uname`
|
||||
if ( ${station} == "IRIX64" ) setenv station IRIX
|
||||
|
||||
if (! ($?LD_LIBRARY_PATH) ) setenv LD_LIBRARY_PATH ""
|
||||
setenv LD_LIBRARY_PATH "${CASROOT}/${station}/lib:${LD_LIBRARY_PATH}"
|
||||
|
||||
if ( ${station} == "AIX" ) then
|
||||
setenv LIBPATH ${LD_LIBRARY_PATH}
|
||||
endif
|
||||
if ( ${station} == "HP-UX" ) then
|
||||
setenv SHLIB_PATH ${LD_LIBRARY_PATH}
|
||||
endif
|
||||
if ( ${station} == "Linux" ) then
|
||||
setenv LIBPATH "/usr/X11R6/lib:${LD_LIBRARY_PATH}"
|
||||
endif
|
||||
|
||||
#
|
||||
# This is for setting VE used by Draw
|
||||
#
|
||||
# POP : Since C31 Version ; this Varaible are not Mandatory
|
||||
#setenv DRAWHOME $CASROOT/src/DrawResources
|
||||
#setenv DRAWDEFAULT $DRAWHOME/DrawDefault
|
||||
echo ""
|
||||
echo " Running demo using :"
|
||||
echo ""
|
||||
echo "LD_LIBRARY_PATH : $LD_LIBRARY_PATH"
|
||||
echo "CASROOT : $CASROOT"
|
||||
if ($?DRAWHOME) then
|
||||
echo "DRAWHOME : $DRAWHOME"
|
||||
endif
|
||||
if ($?DRAWDEFAULT) then
|
||||
echo "DRAWDEFAULT : $DRAWDEFAULT"
|
||||
endif
|
||||
#
|
||||
# Run the executable.
|
||||
#
|
||||
$CASROOT/${station}/bin/TTOPOLOGY
|
||||
#
|
||||
exit
|
@@ -1,40 +0,0 @@
|
||||
echo ON
|
||||
|
||||
echo " Open CASCADE "
|
||||
|
||||
if not DEFINED CASROOT echo CASROOT is mandatory
|
||||
|
||||
if %PROCESSOR_ARCHITECTURE% EQU x86 Set STATION=Windows_NT
|
||||
|
||||
|
||||
|
||||
rem =========================================
|
||||
rem
|
||||
rem LD_LIBRARY_PATH definition
|
||||
rem
|
||||
rem =========================================
|
||||
|
||||
if NOT DEFINED OLDPATH set OLDPATH=%PATH%
|
||||
|
||||
|
||||
|
||||
set PATH=%PATH%;%CASROOT%\%STATION%\dll;
|
||||
|
||||
rem the Path where Tcl is installed
|
||||
|
||||
set PATH=D:/DevTools/Tcltk/bin/;%PATH%;
|
||||
|
||||
rem ======================================
|
||||
|
||||
|
||||
Set DrawExe=%CASROOT%\%STATION%\bin\TTOPOLOGY.exe
|
||||
|
||||
# POP : Since C31 Version ; this Varaible are not Mandatory
|
||||
rem if not DEFINED DRAWHOME Set DRAWHOME=%CASROOT%/src/DrawResources
|
||||
rem if not DEFINED DRAWDEFAULT set DRAWDEFAULT=%DRAWHOME%\\DrawDefault
|
||||
|
||||
Set MMGT_CLEAR=1
|
||||
%DRAWEXE%
|
||||
|
||||
|
||||
|
@@ -1,133 +0,0 @@
|
||||
# Copyright (c) 1999-2012 OPEN CASCADE SAS
|
||||
#
|
||||
# The content of this file is subject to the Open CASCADE Technology Public
|
||||
# License Version 6.5 (the "License"). You may not use the content of this file
|
||||
# except in compliance with the License. Please obtain a copy of the License
|
||||
# at http://www.opencascade.org and read it completely before using this file.
|
||||
#
|
||||
# The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
|
||||
# main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
|
||||
#
|
||||
# The Original Code and all software distributed under the License is
|
||||
# distributed on an "AS IS" basis, without warranty of any kind, and the
|
||||
# Initial Developer hereby disclaims all such warranties, including without
|
||||
# limitation, any warranties of merchantability, fitness for a particular
|
||||
# purpose or non-infringement. Please see the License for the specific terms
|
||||
# and conditions governing the rights and limitations under the License.
|
||||
|
||||
|
||||
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 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
|
||||
}
|
||||
sage " Creating a box"
|
||||
sage " box b -10 -10 -10 20 20 20"
|
||||
sage " "
|
||||
box b -10 -10 -10 20 20 20
|
||||
fit
|
||||
nexplode b f
|
||||
erase b
|
||||
sage " Draft of two lateral faces "
|
||||
sage " depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1 "
|
||||
sage " nexplode r f"
|
||||
sage " depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1 "
|
||||
sage " "
|
||||
depouille r b 0 0 -1 b_6 -15 10 -10 10 0 0 -1
|
||||
clear
|
||||
nexplode r f
|
||||
depouille rr r 0 0 -1 r_1 -15 -10 -10 10 0 0 -1
|
||||
clear
|
||||
nexplode rr e
|
||||
sage " Fillet on four lateral edges, then on the top and bottom edges "
|
||||
sage " nexplode rr e"
|
||||
sage " blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11"
|
||||
sage " nexplode result e"
|
||||
sage " blend result result 2 result_11 3 result_12"
|
||||
sage " "
|
||||
blend result rr 3 rr_2 3 rr_3 3 rr_10 3 rr_11
|
||||
erase rr
|
||||
erase result
|
||||
nexplode result e
|
||||
blend result result 2 result_11 3 result_12
|
||||
clear
|
||||
nexplode result f
|
||||
sage " Creating a profile on the top face "
|
||||
sage " nexplode result f"
|
||||
sage " profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
|
||||
"
|
||||
sage " "
|
||||
profile p S result_16 F 10 4 D 1 0 C 2 90. Y 8 C 2 90. X -2 C 2 90. Y -8 C 2 90. X 2
|
||||
sage " Creating a prism"
|
||||
sage " prism rr p 0 0 20"
|
||||
sage " "
|
||||
prism rr p 0 0 20
|
||||
fit
|
||||
sage " Fusion of this prism with the original part "
|
||||
sage " fuse result rr result"
|
||||
sage " "
|
||||
fuse result rr result
|
||||
donl result
|
||||
nexplode result f
|
||||
erase result
|
||||
fit
|
||||
|
||||
sage " Opening the top face"
|
||||
sage " offsetshape r result -1 0.0001 result_17"
|
||||
sage " "
|
||||
|
||||
nexplode result f
|
||||
offsetshape r result -1 0.0001 result_17
|
||||
sage " Creating a cylinder and positionning it"
|
||||
sage " pcylinder cyl 2 300"
|
||||
sage " trotate cyl cyl 0 0 0 1 0 0 45"
|
||||
sage " ttranslate cyl cyl 0 7.5 0"
|
||||
sage " "
|
||||
pcylinder cyl 2 30
|
||||
trotate cyl cyl 0 0 0 1 0 0 45
|
||||
ttranslate cyl cyl 0 7.5 0
|
||||
sage " Display the Shape on Hidden Line Mode "
|
||||
sage " hlr hid r"
|
||||
sage ""
|
||||
donl r
|
||||
hlr hid r
|
||||
sage " Display the Shape on HLR Mode "
|
||||
sage " hlr nohid r"
|
||||
sage " hlr hlr r"
|
||||
sage ""
|
||||
donl r
|
||||
hlr nohid r
|
||||
hlr hlr r
|
||||
sage "Demo completed"
|
||||
|
@@ -1,404 +0,0 @@
|
||||
DBRep_DrawableShape
|
||||
|
||||
CASCADE Topology V1, (c) Matra-Datavision
|
||||
Locations 0
|
||||
Curve2ds 16
|
||||
1 0 0 0 1
|
||||
1 0 0 1 0
|
||||
1 1 0 0 1
|
||||
1 0 1 1 0
|
||||
1 0 0 0 1
|
||||
1 0 0 1 0
|
||||
1 1 0 0 1
|
||||
1 0 1 1 0
|
||||
1 0 0 0 1
|
||||
1 0 0 1 0
|
||||
1 1 0 0 1
|
||||
1 0 1 1 0
|
||||
1 0 0 0 1
|
||||
1 0 0 1 0
|
||||
1 1 0 0 1
|
||||
1 0 1 1 0
|
||||
Curves 16
|
||||
7 0 0 1 2 2 3.3500000000000001 0 0.84999599999999997 3.0956649999999999 3.3199999999999998 0.849997
|
||||
0 2 1 2
|
||||
7 0 0 7 8 2 3.3500000000000001 0 0.84999599999999997 2.5594269999999999 0 1.0545310000000001 2.9291839999999998 0 0.94117300000000004 2.224526 0 1.0736730000000001 2.2209889999999999 0 0.96156200000000003 1.9382239999999999 0 0.984595 1.850238 0 0.91910099999999995 1.8500000000000001 0 0.84999999999999998
|
||||
0 8 1 8
|
||||
7 0 0 1 2 2 1.8500000000000001 0 0.84999999999999998 1.7956650000000001 3.3199999999999998 0.84999999999999998
|
||||
0 2 1 2
|
||||
7 0 0 7 8 2 3.0956649999999999 3.3199999999999998 0.849997 2.4105020000000001 3.3199999999999998 1.0272600000000001 2.7309580000000002 3.3199999999999998 0.92901699999999998 2.1202549999999998 3.3199999999999998 1.0438499999999999 2.1171880000000001 3.3199999999999998 0.94668699999999995 1.872126 3.3199999999999998 0.96664899999999998 1.795871 3.3199999999999998 0.909887 1.7956650000000001 3.3199999999999998 0.84999999999999998
|
||||
0 8 1 8
|
||||
7 0 0 1 2 2 1.8500000000000001 0 0.84999999999999998 1.7956650000000001 3.3199999999999998 0.84999999999999998
|
||||
0 2 1 2
|
||||
7 0 0 8 9 2 1.8500000000000001 0 0.84999999999999998 1.8497189999999999 0 0.76831300000000002 2.1391040000000001 0 0.76218600000000003 2.558659 0 0.68765799999999999 2.970672 0 0.84048500000000004 2.512594 0 0.70602500000000001 3.174499 0 0.87292999999999998 3.190143 0 0.84999999999999998 3.3500000000000001 0 0.84999599999999997
|
||||
0 9 1 9
|
||||
7 0 0 1 2 2 3.3500000000000001 0 0.84999599999999997 3.0956649999999999 3.3199999999999998 0.849997
|
||||
0 2 1 2
|
||||
7 0 0 8 9 2 1.7956650000000001 3.3199999999999998 0.84999999999999998 1.7954209999999999 3.3199999999999998 0.77920500000000004 2.0462220000000002 3.3199999999999998 0.773895 2.4098359999999999 3.3199999999999998 0.70930300000000002 2.7669139999999999 3.3199999999999998 0.841754 2.3699129999999999 3.3199999999999998 0.72522200000000003 2.9435639999999998 3.3199999999999998 0.86987300000000001 2.9571230000000002 3.3199999999999998 0.84999999999999998 3.0956649999999999 3.3199999999999998 0.849997
|
||||
0 9 1 9
|
||||
7 0 0 1 2 2 3.0956649999999999 3.3199999999999998 0.849997 2.4870429999999999 4.75 1.180139
|
||||
0 2 1 2
|
||||
7 0 0 7 8 2 3.0956649999999999 3.3199999999999998 0.849997 2.4105020000000001 3.3199999999999998 1.0272600000000001 2.7309580000000002 3.3199999999999998 0.92901699999999998 2.1202549999999998 3.3199999999999998 1.0438499999999999 2.1171880000000001 3.3199999999999998 0.94668699999999995 1.872126 3.3199999999999998 0.96664899999999998 1.795871 3.3199999999999998 0.909887 1.7956650000000001 3.3199999999999998 0.84999999999999998
|
||||
0 8 1 8
|
||||
7 0 0 1 2 2 1.7956650000000001 3.3199999999999998 0.84999999999999998 1.9370430000000001 4.75 1.1801410000000001
|
||||
0 2 1 2
|
||||
7 0 0 7 8 2 2.4870429999999999 4.75 1.180139 2.1971660000000002 4.75 1.2551349999999999 2.3327439999999999 4.75 1.213571 2.0743689999999999 4.75 1.262154 2.0730719999999998 4.75 1.221047 1.969392 4.75 1.229492 1.93713 4.75 1.2054769999999999 1.9370430000000001 4.75 1.1801410000000001
|
||||
0 8 1 8
|
||||
7 0 0 1 2 2 1.7956650000000001 3.3199999999999998 0.84999999999999998 1.9370430000000001 4.75 1.1801410000000001
|
||||
0 2 1 2
|
||||
7 0 0 8 9 2 1.7956650000000001 3.3199999999999998 0.84999999999999998 1.7954209999999999 3.3199999999999998 0.77920500000000004 2.0462220000000002 3.3199999999999998 0.773895 2.4098359999999999 3.3199999999999998 0.70930300000000002 2.7669139999999999 3.3199999999999998 0.841754 2.3699129999999999 3.3199999999999998 0.72522200000000003 2.9435639999999998 3.3199999999999998 0.86987300000000001 2.9571230000000002 3.3199999999999998 0.84999999999999998 3.0956649999999999 3.3199999999999998 0.849997
|
||||
0 9 1 9
|
||||
7 0 0 1 2 2 3.0956649999999999 3.3199999999999998 0.849997 2.4870429999999999 4.75 1.180139
|
||||
0 2 1 2
|
||||
7 0 0 8 9 2 1.9370430000000001 4.75 1.1801410000000001 1.9369400000000001 4.75 1.1501889999999999 2.0430480000000002 4.75 1.147942 2.196885 4.75 1.1206149999999999 2.3479559999999999 4.75 1.176652 2.1799940000000002 4.75 1.1273500000000001 2.4226930000000002 4.75 1.1885479999999999 2.4284289999999999 4.75 1.1801410000000001 2.4870429999999999 4.75 1.180139
|
||||
0 9 1 9
|
||||
Polygon3D 0
|
||||
PolygonOnTriangulations 0
|
||||
Surfaces 4
|
||||
9 0 0 0 0 7 1 8 2 2 2 3.3500000000000001 0 0.84999599999999997 3.0956649999999999 3.3199999999999998 0.849997
|
||||
2.5594269999999999 0 1.0545310000000001 2.4105020000000001 3.3199999999999998 1.0272600000000001
|
||||
2.9291839999999998 0 0.94117300000000004 2.7309580000000002 3.3199999999999998 0.92901699999999998
|
||||
2.224526 0 1.0736730000000001 2.1202549999999998 3.3199999999999998 1.0438499999999999
|
||||
2.2209889999999999 0 0.96156200000000003 2.1171880000000001 3.3199999999999998 0.94668699999999995
|
||||
1.9382239999999999 0 0.984595 1.872126 3.3199999999999998 0.96664899999999998
|
||||
1.850238 0 0.91910099999999995 1.795871 3.3199999999999998 0.909887
|
||||
1.8500000000000001 0 0.84999999999999998 1.7956650000000001 3.3199999999999998 0.84999999999999998
|
||||
|
||||
0 8
|
||||
1 8
|
||||
|
||||
0 2
|
||||
1 2
|
||||
|
||||
9 0 0 0 0 8 1 9 2 2 2 1.8500000000000001 0 0.84999999999999998 1.7956650000000001 3.3199999999999998 0.84999999999999998
|
||||
1.8497189999999999 0 0.76831300000000002 1.7954209999999999 3.3199999999999998 0.77920500000000004
|
||||
2.1391040000000001 0 0.76218600000000003 2.0462220000000002 3.3199999999999998 0.773895
|
||||
2.558659 0 0.68765799999999999 2.4098359999999999 3.3199999999999998 0.70930300000000002
|
||||
2.970672 0 0.84048500000000004 2.7669139999999999 3.3199999999999998 0.841754
|
||||
2.512594 0 0.70602500000000001 2.3699129999999999 3.3199999999999998 0.72522200000000003
|
||||
3.174499 0 0.87292999999999998 2.9435639999999998 3.3199999999999998 0.86987300000000001
|
||||
3.190143 0 0.84999999999999998 2.9571230000000002 3.3199999999999998 0.84999999999999998
|
||||
3.3500000000000001 0 0.84999599999999997 3.0956649999999999 3.3199999999999998 0.849997
|
||||
|
||||
0 9
|
||||
1 9
|
||||
|
||||
0 2
|
||||
1 2
|
||||
|
||||
9 0 0 0 0 7 1 8 2 2 2 3.0956649999999999 3.3199999999999998 0.849997 2.4870429999999999 4.75 1.180139
|
||||
2.4105020000000001 3.3199999999999998 1.0272600000000001 2.1971660000000002 4.75 1.2551349999999999
|
||||
2.7309580000000002 3.3199999999999998 0.92901699999999998 2.3327439999999999 4.75 1.213571
|
||||
2.1202549999999998 3.3199999999999998 1.0438499999999999 2.0743689999999999 4.75 1.262154
|
||||
2.1171880000000001 3.3199999999999998 0.94668699999999995 2.0730719999999998 4.75 1.221047
|
||||
1.872126 3.3199999999999998 0.96664899999999998 1.969392 4.75 1.229492
|
||||
1.795871 3.3199999999999998 0.909887 1.93713 4.75 1.2054769999999999
|
||||
1.7956650000000001 3.3199999999999998 0.84999999999999998 1.9370430000000001 4.75 1.1801410000000001
|
||||
|
||||
0 8
|
||||
1 8
|
||||
|
||||
0 2
|
||||
1 2
|
||||
|
||||
9 0 0 0 0 8 1 9 2 2 2 1.7956650000000001 3.3199999999999998 0.84999999999999998 1.9370430000000001 4.75 1.1801410000000001
|
||||
1.7954209999999999 3.3199999999999998 0.77920500000000004 1.9369400000000001 4.75 1.1501889999999999
|
||||
2.0462220000000002 3.3199999999999998 0.773895 2.0430480000000002 4.75 1.147942
|
||||
2.4098359999999999 3.3199999999999998 0.70930300000000002 2.196885 4.75 1.1206149999999999
|
||||
2.7669139999999999 3.3199999999999998 0.841754 2.3479559999999999 4.75 1.176652
|
||||
2.3699129999999999 3.3199999999999998 0.72522200000000003 2.1799940000000002 4.75 1.1273500000000001
|
||||
2.9435639999999998 3.3199999999999998 0.86987300000000001 2.4226930000000002 4.75 1.1885479999999999
|
||||
2.9571230000000002 3.3199999999999998 0.84999999999999998 2.4284289999999999 4.75 1.1801410000000001
|
||||
3.0956649999999999 3.3199999999999998 0.849997 2.4870429999999999 4.75 1.180139
|
||||
|
||||
0 9
|
||||
1 9
|
||||
|
||||
0 2
|
||||
1 2
|
||||
|
||||
Triangulations 0
|
||||
|
||||
TShapes 41
|
||||
Ve
|
||||
1e-07
|
||||
3.35 0 0.849996
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ve
|
||||
1e-07
|
||||
3.095665 3.32 0.849997
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 1 0 0 1
|
||||
2 1 1 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+41 0 -40 0 *
|
||||
Ve
|
||||
1e-07
|
||||
1.85 0 0.849999999999998
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 2 0 0 1
|
||||
2 2 1 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+41 0 -38 0 *
|
||||
Ve
|
||||
1e-07
|
||||
1.795665 3.32 0.849999999999998
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 3 0 0 1
|
||||
2 3 1 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+38 0 -36 0 *
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 4 0 0 1
|
||||
2 4 1 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+40 0 -36 0 *
|
||||
Wi
|
||||
|
||||
0101100
|
||||
-39 0 +37 0 +35 0 -34 0 *
|
||||
Fa
|
||||
1 1e-07 1 0
|
||||
|
||||
0111000
|
||||
+33 0 *
|
||||
Ve
|
||||
1e-07
|
||||
1.85 0 0.85
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ve
|
||||
1e-07
|
||||
1.795665 3.32 0.85
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 5 0 0 1
|
||||
2 5 2 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+31 0 -30 0 *
|
||||
Ve
|
||||
1e-07
|
||||
3.35000000000001 0 0.849996000000003
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 6 0 0 1
|
||||
2 6 2 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+31 0 -28 0 *
|
||||
Ve
|
||||
1e-07
|
||||
3.09566500000001 3.32 0.849997000000003
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 7 0 0 1
|
||||
2 7 2 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+28 0 -26 0 *
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 8 0 0 1
|
||||
2 8 2 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+30 0 -26 0 *
|
||||
Wi
|
||||
|
||||
0101100
|
||||
-29 0 +27 0 +25 0 -24 0 *
|
||||
Fa
|
||||
1 1e-07 2 0
|
||||
|
||||
0111000
|
||||
+23 0 *
|
||||
Ve
|
||||
1e-07
|
||||
3.095665 3.32 0.849997
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ve
|
||||
1e-07
|
||||
2.487043 4.75 1.180139
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 9 0 0 1
|
||||
2 9 3 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+21 0 -20 0 *
|
||||
Ve
|
||||
1e-07
|
||||
1.79566500000001 3.32 0.850000000000001
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 10 0 0 1
|
||||
2 10 3 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+21 0 -18 0 *
|
||||
Ve
|
||||
1e-07
|
||||
1.93704300000001 4.75 1.180141
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 11 0 0 1
|
||||
2 11 3 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+18 0 -16 0 *
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 12 0 0 1
|
||||
2 12 3 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+20 0 -16 0 *
|
||||
Wi
|
||||
|
||||
0101100
|
||||
-19 0 +17 0 +15 0 -14 0 *
|
||||
Fa
|
||||
1 1e-07 3 0
|
||||
|
||||
0111000
|
||||
+13 0 *
|
||||
Ve
|
||||
1e-07
|
||||
1.795665 3.32 0.85
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ve
|
||||
1e-07
|
||||
1.937043 4.75 1.180141
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 13 0 0 1
|
||||
2 13 4 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+11 0 -10 0 *
|
||||
Ve
|
||||
1e-07
|
||||
3.09566499999999 3.32 0.849997000000002
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 14 0 0 1
|
||||
2 14 4 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+11 0 -8 0 *
|
||||
Ve
|
||||
1e-07
|
||||
2.487043 4.75 1.180139
|
||||
0 0
|
||||
|
||||
0101100
|
||||
*
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 15 0 0 1
|
||||
2 15 4 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+8 0 -6 0 *
|
||||
Ed
|
||||
1e-07 1 1 0
|
||||
1 16 0 0 1
|
||||
2 16 4 0 0 1
|
||||
0
|
||||
|
||||
0101000
|
||||
+10 0 -6 0 *
|
||||
Wi
|
||||
|
||||
0101100
|
||||
-9 0 +7 0 +5 0 -4 0 *
|
||||
Fa
|
||||
1 1e-07 4 0
|
||||
|
||||
0111000
|
||||
+3 0 *
|
||||
Co
|
||||
|
||||
1100000
|
||||
+32 0 +22 0 +12 0 +2 0 *
|
||||
|
||||
+1 0
|
Reference in New Issue
Block a user