1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00

0032705: Test - name clashes within temporary files within bugs/caf/bug23766_X

Several test cases writing temporary files have been corrected.
This commit is contained in:
kgv 2021-12-01 21:50:48 +03:00 committed by smoskvin
parent 740833a6a8
commit 30fa5f6713
78 changed files with 298 additions and 306 deletions

@ -7,10 +7,8 @@ puts "==========="
Open [locate_data_file BUC60756_Doc.cbf] D
######################################################################
catch {file delete ${imagedir}/Doc2.cbf}
SaveAs D ${imagedir}/Doc2.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
Close D
Open ${imagedir}/Doc2.cbf D
Open $aTmpFile D
file delete -force $aTmpFile

@ -7,11 +7,10 @@ puts "==========="
Open [locate_data_file BUC60756_Doc.std] D
######################################################################
catch {file delete ${imagedir}/Doc2.cbf}
Format D BinOcaf
SaveAs D ${imagedir}/Doc2.cbf
Close D
Open ${imagedir}/Doc2.cbf D
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
Close D
Open $aTmpFile D
file delete -force $aTmpFile

@ -4,12 +4,9 @@ puts "=============="
NewDocument D BinOcaf
##################################################################
if { [catch {set res [SaveAs D ${imagedir}/OCC158.cbf]}] != 0 } {
set aTmpFile ${imagedir}/${casename}.cbf
if { [catch {set res [SaveAs D ${aTmpFile}] }] != 0 } {
puts "OCC158: Error"
} else {
file delete ${imagedir}/OCC158.cbf
}
file delete -force $aTmpFile

@ -3,8 +3,8 @@ puts "OCC170"
puts "(case 3)"
puts "========================"
set docName OCC170
set newDocName OCC170_2
set docName ${casename}
set newDocName ${casename}_2
set str1 "~!@#$%^&*():;'{}\|?/.>,<~!@#$%^&*():;'{}\|?/.>,<#$%#$%$%^&*():;'{}\|$%^&*(@#$%^&*():;'{}\|¦/"
NewDocument $docName XmlOcaf
@ -31,4 +31,3 @@ if {$str1 == $str2} {puts "OCC170 OK"} else {
puts "str2=${str2}"
puts "OCC170 Error"
}

@ -73,13 +73,13 @@ if { ${USA_IsDone} != 0 || ${new_USA_Real}!=${Italian_Real} } {
}
# Store the document
file delete ${imagedir}/OCC1919-M6.xml
SaveAs D ${imagedir}/OCC1919-M6.xml
if { ![file exists ${imagedir}/OCC1919-M6.xml] } {
set aTmpFile ${imagedir}/${casename}.xml
file delete $aTmpFile
SaveAs D $aTmpFile
if { ![file exists $aTmpFile] } {
puts "OCC1919 Error : There is not file"
set IsGood 0
}
catch {exec chmod 777 ${imagedir}/OCC1919-M6.xml}
Close D
# Set en_US locale
@ -91,7 +91,8 @@ if { ${en_US_local} != "en_US" } {
}
# Restore the document
Open ${imagedir}/OCC1919-M6.xml DD
Open $aTmpFile DD
file delete -force $aTmpFile
# Get a value of the attribute
set USA_IsDone [catch {set new_USA_Real [GetReal DD ${USA_Label}]} message]

@ -1,28 +1,22 @@
puts "============"
puts "OCC23306"
puts "OCC23306: F a i l u r e s reading some attributes of BinOcaf document"
puts "============"
puts ""
####################################################################################
# Failures reading some attributes of BinOcaf document
####################################################################################
set BugNumber OCC23306
NewDocument D1 BinOcaf
SetExtStringArray D1 0:1:1 0 1 3 String1 String2 String3
SaveAs D1 ${imagedir}/ocaf1.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D1 $aTmpFile
Close D1
set warn [Open ${imagedir}/ocaf1.cbf D2]
set warn [Open $aTmpFile D2]
set info [lsearch $warn "warning:"]
file delete -force ${aTmpFile}
if { $info == -1 } {
puts "OK ${BugNumber}"
} else {
puts "Faulty ${BugNumber}"
}

@ -51,12 +51,14 @@ if { [regexp "REVERSED" $info2] != 1 } {
}
#4 - test persistence: check orientation after retrieving (to be the same as before)
file delete -force ${imagedir}/bug23766_ttt1.cbf
NewCommand D
SaveAs D ${imagedir}/bug23766_ttt1.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
Close D
##unset D
Open ${imagedir}/bug23766_ttt1.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
GetShape D 0:1:2:1:2 E1
set info3 [whatis E1]
## to be: E1 is a shape EDGE FORWARD Modified Orientable
@ -74,4 +76,3 @@ if { [regexp "REVERSED" $info4] != 1 } {
} else {
puts "OK: orientation of E2 is correct"
}

@ -50,12 +50,15 @@ if { [regexp "REVERSED" $info2] != 1 } {
}
#4 - test persistence: check orientation after retrieving (to be the same as before)
file delete -force ${imagedir}/bug23766_ttt1.cbf
NewCommand D
SaveAs D ${imagedir}/bug23766_ttt1.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
Close D
##unset D
Open ${imagedir}/bug23766_ttt1.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
GetShape D 0:1:2:1:2 E1
set info3 [whatis E1]
## to be: E1 is a shape EDGE FORWARD Modified Orientable

@ -53,12 +53,15 @@ if { [regexp "REVERSED" $info2] != 1 } {
}
#4 - test persistence: check orientation after retrieving (to be the same as before)
file delete -force ${imagedir}/bug23766_ttt1.xml
NewCommand D
SaveAs D ${imagedir}/bug23766_ttt1.xml
set aTmpFile ${imagedir}/${casename}.xml
SaveAs D $aTmpFile
Close D
##unset D
Open ${imagedir}/bug23766_ttt1.xml D
Open $aTmpFile D
file delete -force $aTmpFile
GetShape D 0:1:2:1:2 E1
set info3 [whatis E1]
## to be: E1 is a shape EDGE FORWARD Modified Orientable

@ -23,7 +23,8 @@ GetShape D $F2:2 Box2
NewCommand D
#3 save shape in the document
SaveAs D ${imagedir}/testDoc1.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
#4 close document
set catch_status 0
@ -37,7 +38,8 @@ if { ${catch_status} != 0 } {
}
#5 reopen just saved document with the same name
Open ${imagedir}/testDoc1.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
set catch_status 0
#6 close the document
@ -49,4 +51,4 @@ if { ${catch_status} != 0 } {
puts "Faulty ${BugNumber}"
} else {
puts "OK ${BugNumber}"
}
}

@ -40,7 +40,8 @@ GetRefArray D $Lab5
GetRefArray D $Lab6
#6 save the document
SaveAs D ${imagedir}/testDoc2.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
#7 close the document
set catch_status 0
@ -54,7 +55,8 @@ if { ${catch_status} != 0 } {
}
#8 reopen just saved document with the same name
Open ${imagedir}/testDoc2.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
#9 close the document
if { [catch {Close D} catch_result] } {
@ -66,4 +68,3 @@ if { ${catch_status} != 0 } {
} else {
puts "OK ${BugNumber}"
}

@ -1,18 +1,14 @@
puts "=========="
puts "OCC24852"
puts "OCC24852: C r a s h on storage of an Ocaf document in XML file format"
puts "=========="
puts ""
########################################################
# Crash on storage of an Ocaf document in XML file format
########################################################
NewDocument D XmlOcaf
set File ${imagedir}/bug24852_test.xml
if { [catch {set res [SaveAs D ${File}]}] != 0 } {
set aTmpFile ${imagedir}/${casename}.xml
if { [catch {set res [SaveAs D $aTmpFile]}] != 0 } {
puts "Error : Crash on storage of an Ocaf document in XML file format"
} else {
puts "OK : Storage of an Ocaf document in XML file format is good"
file delete ${File}
}
file delete -force $aTmpFile

@ -50,11 +50,13 @@ set info5 [GetReferenceList D $Lab5]
# output => "List is empty"
# 6. save the Document in external file
SaveAs D ${imagedir}/bug26014_test1.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
Close D
# 7. reopen the Document
Open ${imagedir}/bug26014_test1.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
# 8. Check the restored attributes at the specified labels
set info8 [GetBooleanList D $Lab1]

@ -50,11 +50,13 @@ set info5 [GetReferenceList D $Lab5]
# output => "List is empty"
# 6. save the Document in external file
SaveAs D ${imagedir}/bug26014_test2.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
Close D
# 7. reopen the Document
Open ${imagedir}/bug26014_test2.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
# 8. Check the restored attributes at the specified labels
set info8 [GetBooleanList D $Lab1]

@ -50,11 +50,13 @@ set info5 [GetReferenceList D $Lab5]
# output => "List is empty"
# 6. save the Document in external file
SaveAs D ${imagedir}/bug26014_test3.xml
set aTmpFile ${imagedir}/${casename}.xml
SaveAs D $aTmpFile
Close D
# 7. reopen the Document
Open ${imagedir}/bug26014_test3.xml D
Open $aTmpFile D
file delete -force $aTmpFile
# 8. Check the restored attributes at the specified labels
set info8 [GetBooleanList D $Lab1]

@ -1,10 +1,7 @@
puts "============"
puts "OCC25536"
puts "OCC25536: XmlMDataXtd_GeometryDriver doesn't support TDataXtd_SPLINE, TDataXtd_PLANE and TDataXtd_CYLINDER."
puts "============"
puts ""
#######################################################################
# XmlMDataXtd_GeometryDriver doesn't support TDataXtd_SPLINE, TDataXtd_PLANE and TDataXtd_CYLINDER.
#######################################################################
NewDocument Doc XmlOcaf
@ -16,12 +13,13 @@ SetGeometry Doc 0:2:2 pln
Label Doc 0:2:3
SetGeometry Doc 0:2:3 cyl
set aFile ${imagedir}/bug25536_test.xml
SaveAs Doc ${aFile}
set aTmpFile ${imagedir}/${casename}.xml
SaveAs Doc ${aTmpFile}
Close Doc
# check attributes are correctly restored
Open ${aFile} Doc2
Open ${aTmpFile} Doc2
file delete -force $aTmpFile
set aType [GetGeometryType Doc2 0:2:1]
if {${aType} != "spl"} {
@ -37,4 +35,3 @@ if {${aType} != "cyl"} {
}
Close Doc2

@ -1,10 +1,8 @@
puts "============"
puts "OCC25537"
puts "OCC25537: XmlMPrsStd_PositionDriver::Paste runtime check c r a s h."
puts "============"
puts ""
#######################################################################
# XmlMPrsStd_PositionDriver::Paste runtime check crash.
#######################################################################
pload XDEDRAW
NewDocument Doc XmlXCAF
@ -22,8 +20,9 @@ for {set i 1} {$i < 100} {incr i} {
XSetCentroid Doc $aLab2 $aBigNum $aBigNum $aBigNum
}
set aFile ${imagedir}/bug25537_test.xml
SaveAs Doc ${aFile}
set aTmpFile ${imagedir}/${casename}.xml
SaveAs Doc ${aTmpFile}
## ==> No exception
Close Doc
file delete -force $aTmpFile

@ -25,7 +25,9 @@ Undo D 1
Redo D 1
AISColor D $Lab1 AQUAMARINE4
NewCommand D
SaveAs D $imagedir/bug26290_new_1.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D $aTmpFile
AISErase D $Lab1
## DFBrowse D # - for debug purpose only
@ -36,7 +38,8 @@ Redo D 1
Close D
## reopen just kept file
Open $imagedir/bug26290_new_1.cbf D
Open $aTmpFile D
file delete -force $aTmpFile
## DFBrowse D
AISInitViewer D

@ -27,11 +27,14 @@ Undo D 1
Redo D 1
AISColor D $Lab1 AQUAMARINE4
NewCommand D
SaveAs D $imagedir/bug26290_new_1.cbf
set aTmpFile1 ${imagedir}/${casename}_1.cbf
SaveAs D $aTmpFile1
Close D
# test
Open $imagedir/bug26290_new_1.cbf D
Open $aTmpFile1 D
file delete -force $aTmpFile1
UndoLimit D 100
NewCommand D
@ -53,14 +56,16 @@ NewCommand D
Undo D 1
Redo D 1
SaveAs D $imagedir/bug26290_new_2.cbf
set aTmpFile2 ${imagedir}/${casename}_2.cbf
SaveAs D $aTmpFile2
AISErase D $Lab2
set Lab1 [Label D 0:1:1]
AISErase D $Lab1
NewCommand D
Close D
Open $imagedir/bug26290_new_2.cbf D
Open $aTmpFile2 D
file delete -force $aTmpFile1
## DFBrowse D
AISInitViewer D

@ -6,6 +6,5 @@ NewDocument D BinOcaf
######################################################################
file delete ${imagedir}/OCC267.cbf
SaveAs D ${imagedir}/OCC267.cbf
SaveAs D ${imagedir}/${casename}.cbf
file delete -force ${imagedir}/${casename}.cbf

@ -10,12 +10,12 @@ NewDocument Doc BinOcaf
SetInteger Doc 0:2 100
# Save the document
set aFile ${imagedir}/OCC27433-[file tail [info script]].cbf
file delete ${aFile}
puts ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {
puts "Error: Can not save the file with path to plugins ended with slash"
set aTmpFile ${imagedir}/${casename}.cbf
puts ${aTmpFile}
catch {SaveAs Doc ${aTmpFile}}
if { ![file exists ${aTmpFile}] } {
puts "Error: Can not save the file with path to plugins ended with slash"
}
Close Doc
file delete -force $aTmpFile

@ -11,18 +11,18 @@ pload OCAF MODELING
# just a big shape to fit in memory
restore [locate_data_file $aBigShape] s
file delete ${imagedir}/test.cbf
set aTmpFile ${imagedir}/${casename}.cbf
# store it in the document
NewDocument D BinOcaf
SetShape D "0:2" s
SaveAs D ${imagedir}/test.cbf
SaveAs D $aTmpFile
Close D
# store the memory used before opening a document
set aBefore [meminfo h]
Open ${imagedir}/test.cbf DD
Open $aTmpFile DD
set aDocLoaded [meminfo h]
set aBigDelta [expr $aDocLoaded - $aBefore]
Close DD
@ -39,3 +39,5 @@ puts "After close: $anAfter"
if {[expr $aBigDelta / 20. - $aDelta] < 0} {
puts "Error: the memory is not freed after Open/Close"
}
file delete -force $aTmpFile

@ -1,19 +1,18 @@
puts "==========="
puts "OCC28428"
puts "OCC28428: BinMNaming_NamedShapeDriver f a i l s if there are no nodes in NamedShape"
puts "==========="
puts ""
########################################################################
# BinMNaming_NamedShapeDriver fails if there are no nodes in NamedShape
########################################################################
pload QAcommands
NewDocument D1 BinOcaf
# Create TNaming_Builder on a label without putthing shapes
BuildNamedShape D1 0:1 P
SaveAs D1 $imagedir/bug28428_new.cbf
set aTmpFile ${imagedir}/${casename}.cbf
SaveAs D1 $aTmpFile
Close D1
# This produced a NamedShape driver failure with catching by general driver
# and output a failure message (caught by parse.rules)
Open $imagedir/bug28428_new.cbf D2
Open $aTmpFile D2
Close D2
file delete -force $aTmpFile

@ -6,8 +6,8 @@ puts ""
NewDocument D XmlOcaf
SetExtStringArray D 0:1 0 1 3 Hello hallo Bonjour
set FileV7 ${imagedir}/bug28691_doc7.xml
set FileV9 ${imagedir}/bug28691_doc9.xml
set FileV7 ${imagedir}/${casename}_doc7.xml
set FileV9 ${imagedir}/${casename}_doc9.xml
SetNode D 0:1
AISSet D 0:1 NS
@ -90,3 +90,6 @@ if { [regexp "Bonjour" ${info}] != 1 } {
} else {
puts "OK : there is \"Bonjour\" word in TDataStd_ExtStringArray attribute in old version document"
}
file delete -force ${FileV7}
file delete -force ${FileV9}

@ -6,8 +6,8 @@ puts ""
NewDocument D BinOcaf
SetExtStringArray D 0:1 0 1 3 Hello hallo Bonjour
set FileV7 ${imagedir}/bug29217_doc7.cbf
set FileV10 ${imagedir}/bug29217_doc10.cbf
set FileV7 ${imagedir}/${casename}_doc7.cbf
set FileV10 ${imagedir}/${casename}_doc10.cbf
SetNode D 0:1
AISSet D 0:1 NS
@ -90,3 +90,6 @@ if { [regexp "Bonjour" ${info}] != 1 } {
} else {
puts "OK : there is \"Bonjour\" word in TDataStd_ExtStringArray attribute in old version document"
}
file delete -force ${FileV7}
file delete -force ${FileV10}

@ -8,11 +8,8 @@ pload QAcommands
NewDocument D BinOcaf
######################################################
catch { SaveAs D ${imagedir}/OCC381_1.cbf }
catch { SaveAs D ${imagedir}/${casename}.cbf }
if { [catch { OCC381_Save D } ] } {
puts "OCC381: Error"
} else {
catch { exec chmod 777 ${imagedir}/OCC381_1.cbf }
file delete -force ${imagedir}/OCC381_1.cbf
}
file delete -force ${imagedir}/${casename}.cbf

@ -8,10 +8,7 @@ pload QAcommands
NewDocument D BinOcaf
######################################################
if { [catch { OCC381_SaveAs D ${imagedir}/OCC381_2.cbf}] } {
if { [catch { OCC381_SaveAs D ${imagedir}/${casename}.cbf}] } {
puts "OCC381: Error"
} else {
catch {exec chmod 777 ${imagedir}/OCC381_2.cbf}
file delete -force ${imagedir}/OCC381_2.cbf
}
file delete -force ${imagedir}/${casename}.cbf

@ -23,18 +23,17 @@ SetName D ${aLabel} ${aSetAttr1}
NewCommand D
# Save the document
set aFile ${imagedir}/OCC425.cbf
catch {file delete ${aFile}}
set aFile ${imagedir}/${casename}.cbf
SaveAs D ${aFile}
if { ![file exists ${aFile}] } {
puts "There is not ${aFile} file; SaveAs command: Error"
set IsGood 0
}
catch {exec chmod 777 ${aFile}}
# Restore the document
Close D
Open ${aFile} DD
file delete -force ${aFile}
# Get a value of the attribute
set aGetAttr3 ""

@ -57,19 +57,18 @@ SelectShape D $CylNamLab:11 C_2 C
SelectShape D $CylNamLab:12 C_3 C
# Save the document
set aFile ${imagedir}/OCC9746-Z3.cbf
file delete ${aFile}
set aFile ${imagedir}/${casename}.cbf
SaveAs D ${aFile}
if { ![file exists ${aFile}] } {
puts "There is not ${aFile} file; SaveAs command: Error"
puts "${BugNumber}: ERROR (case 1)"
}
catch {exec chmod 777 ${aFile}}
Close D
# Restore the document
catch {Open ${aFile} DDoc}
file delete -force ${aFile}
#
set BoxNamLab [Label DDoc 0:4]

@ -1,14 +1,10 @@
puts "========"
puts "CR23822"
puts "CR23822: S I G S E G V 'segmentation v i o l a t i o n' during writing IGES"
puts "========"
puts ""
#########################################################
## SIGSEGV 'segmentation violation' during writing IGES
#########################################################
ReadIges D [locate_data_file ball_bearing.igs]
set aFile ${imagedir}/bug23822_new_file.igs
file delete -force ${aFile}
WriteIges D ${aFile}
set aTmpFile ${imagedir}/${casename}.igs
WriteIges D $aTmpFile
file delete -force $aTmpFile

@ -1,19 +1,18 @@
puts "========"
puts "OCC25518"
puts "OCC25518: Colors are not written to IGES 5.3"
puts "========"
puts ""
######################################
# Colors are not written to IGES 5.3
######################################
catch {exec rm ${imagedir}/OCC25518.igs}
psphere s 10
XNewDoc D
XAddShape D s
XSetColor D s 0 0 1
param write.iges.brep.mode 1
WriteIges D ${imagedir}/OCC25518.igs
ReadIges T ${imagedir}/OCC25518.igs
set aTmpFile ${imagedir}/${casename}.igs
WriteIges D $aTmpFile
ReadIges T $aTmpFile
file delete -force ${aTmpFile}
if {[string trim [XGetAllColors T]] != "BLUE"} {
puts "ERROR: OCC25518 is reproduced. Color is lost."
}

@ -1,10 +1,7 @@
puts "============"
puts "OCC25632"
puts "OCC25632: IGES writer looses face orientation"
puts "============"
puts ""
#######################################################################
# IGES writer looses face orientation
#######################################################################
plane p 0 0 0 0 0 1 1 0 0
mkface f p 0 100 0 100
@ -17,13 +14,15 @@ normals f 100
treverse f
normals f 100
xwd ${imagedir}/${test_image}_1.png
xwd ${imagedir}/${casename}_1.png
testwriteiges ${imagedir}/bug25632_f.igs f
testreadiges ${imagedir}/bug25632_f.igs ff
set aTmpFile ${imagedir}/${casename}.igs
testwriteiges $aTmpFile f
testreadiges $aTmpFile ff
file delete -force ${aTmpFile}
donly ff
normals ff 100
xwd ${imagedir}/${test_image}_2.png
xwd ${imagedir}/${casename}_2.png

@ -1,10 +1,7 @@
puts "============"
puts "OCC25632"
puts "OCC25632: IGES writer looses face orientation"
puts "============"
puts ""
#######################################################################
# IGES writer looses face orientation
#######################################################################
plane p 0 0 0 0 0 1 1 0 0
mkface face p 0 100 0 100
@ -21,13 +18,15 @@ mkface f s 10 20 30 40
treverse f
normals f 100
xwd ${imagedir}/${test_image}_1.png
xwd ${imagedir}/${casename}_1.png
testwriteiges ${imagedir}/f_2.igs f
testreadiges ${imagedir}/f_2.igs ff
set aTmpFile ${imagedir}/${casename}.igs
testwriteiges $aTmpFile f
testreadiges $aTmpFile ff
file delete -force ${aTmpFile}
donly ff
normals ff 100
xwd ${imagedir}/${test_image}_2.png
xwd ${imagedir}/${casename}_2.png

@ -1,12 +1,7 @@
puts "========"
puts "OCC25747"
puts "OCC25747: Bad IGES file after import and export with different units"
puts "========"
puts ""
######################################
# Bad IGES file after import and export with different units
######################################
catch {exec rm ${imagedir}/OCC25747.igs}
# default OCCT unit for reading
param xstep.cascade.unit MM
@ -23,10 +18,12 @@ vfit
vsetdispmode 1
vdump ${imagedir}/${casename}_1.png
WriteIges D ${imagedir}/OCC25747.igs
set aTmpFile ${imagedir}/${casename}.igs
WriteIges D $aTmpFile
# bad IGES file after export
ReadIges T ${imagedir}/OCC25747.igs
ReadIges T $aTmpFile
file delete -force ${aTmpFile}
XShow T
vtop

@ -1,12 +1,13 @@
puts "========"
puts "OCC26138"
puts "OCC26138: Problems with writing periodic BSplines into IGES"
puts "========"
puts ""
#####################################################
# Problems with writing periodic BSplines into IGES
#####################################################
igesbrep [locate_data_file OCC26138_Torus.igs] a *
brepiges a ${imagedir}/bug26138.igs
igesbrep ${imagedir}/bug26138.igs b *
set aTmpFile ${imagedir}/${casename}.igs
brepiges a $aTmpFile
igesbrep $aTmpFile b *
file delete -force ${aTmpFile}
checkprops a -s -equal b

@ -1,11 +1,10 @@
puts "========"
puts "OCC26419"
puts "OCC26419: Export of a reversed face leads to c r a s h in 6.9.0 although proceeded in 6.8.0"
puts "========"
puts ""
#####################################################
# [Regression?] Export of a reversed face leads to crash in 6.9.0 although proceeded in 6.8.0
#####################################################
restore [locate_data_file bug26419_a-fwd.brep] af
brepiges af ${imagedir}/bug26419_1.igs
set aTmpFile ${imagedir}/${casename}.igs
brepiges af $aTmpFile
file delete -force ${aTmpFile}

@ -1,11 +1,10 @@
puts "========"
puts "OCC26419"
puts "OCC26419: Export of a reversed face leads to c r a s h in 6.9.0 although proceeded in 6.8.0"
puts "========"
puts ""
#####################################################
# [Regression?] Export of a reversed face leads to crash in 6.9.0 although proceeded in 6.8.0
#####################################################
restore [locate_data_file bug26419_a-rev.brep] ar
brepiges ar ${imagedir}/bug26419_2.igs
set aTmpFile ${imagedir}/${casename}.igs
brepiges ar $aTmpFile
file delete -force ${aTmpFile}

@ -1,11 +1,13 @@
#######################################################################
# OCC26931: [Regression in 6.9.0] Exporting a face throws an exception
puts "OCC26931: Exporting a face throws an e x c e p t i o n"
#######################################################################
# restore initial face
restore [locate_data_file bug26931.brep] face
set square 6416.6
# export face to IGES
brepiges face ${imagedir}/${casename}.igs
set aTmpFile ${imagedir}/${casename}.igs
brepiges face $aTmpFile
# import back to check similarity
igesbrep ${imagedir}/${casename}.igs result *
igesbrep $aTmpFile result *
file delete -force ${aTmpFile}

@ -1,9 +1,12 @@
#########################################################################################
# OCC26989: [Regression in 6.9.0] Export of a reversed face leads to wrong data in 6.9.0
puts "OCC26989: Export of a reversed face leads to wrong data in 6.9.0"
#########################################################################################
restore [locate_data_file bug26989.brep] a
newmodel
brepiges a ${imagedir}/bug26989.igs
igesbrep ${imagedir}/bug26989.igs result *
set aTmpFile ${imagedir}/${casename}.igs
brepiges a $aTmpFile
igesbrep $aTmpFile result *
file delete -force ${aTmpFile}
checkprops result -s 56.5487

@ -1,8 +1,12 @@
#######################################################################
# Data Exchange - Writing face with NaturalRestriction flag to IGES
puts "Data Exchange - Writing face with NaturalRestriction flag to IGES"
#######################################################################
restore [locate_data_file bug28589.brep] face
brepiges face ${imagedir}/${casename}.igs
igesbrep ${imagedir}/${casename}.igs result *
set aTmpFile ${imagedir}/${casename}.igs
brepiges face $aTmpFile
igesbrep $aTmpFile result *
file delete -force ${aTmpFile}
checknbshapes result -shape 10

@ -1,21 +1,19 @@
pload DCAF
pload TOPTEST
pload XDE
puts "========"
puts "OCC26657"
puts "OCC26657: STEP OCAF writers should keep hierarchy and colors when saving non-root elements"
puts "========"
puts ""
##########################################################################
# STEP OCAF writers should keep hierarchy and colors when saving non-root elements
##########################################################################
pload XDEDRAW
ReadStep D1 [locate_data_file bug26657.stp]
WriteStep D1 $imagedir/bug26657_temp.stp a 0:1:1:1:2
if { [catch { Close D11 } catch_result] } {
puts "Document D11 is not exist"
}
ReadStep D11 $imagedir/bug26657_temp.stp
pload DCAF TOPTEST XDE XDEDRAW
ReadStep D1 [locate_data_file bug26657.stp]
set aTmpFile ${imagedir}/${casename}_temp.stp
WriteStep D1 $aTmpFile a 0:1:1:1:2
if { [catch { Close D11 } catch_result] } {
puts "Document D11 is not exist"
}
ReadStep D11 $aTmpFile
file delete -force $aTmpFile
XGetOneShape result D11
checkshape result f
@ -24,5 +22,4 @@ checknbshapes result -solid 3
XShow D11
vfit
vsetdispmode 1
vdump $imagedir/${test_image}.png
vdump $imagedir/${casename}.png

@ -1,10 +1,7 @@
puts "=========="
puts "OCC29403"
puts "OCC29403: Subshapes names are not imported from step"
puts "=========="
puts ""
#########################################################
# Subshapes names are not imported from step
#########################################################
param read.stepcaf.subshapes.name 1
param write.stepcaf.subshapes.name 1
@ -18,9 +15,10 @@ regexp {level N 1 +: +([-0-9.+eE]+)} $info1 full l1
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info1 full nb
regexp {Number of labels with name += +([-0-9.+eE]+)} $info1 full nbname
WriteStep doc $imagedir/doc_subshapes.stp
ReadStep after_doc $imagedir/doc_subshapes.stp
set aTmpFile ${imagedir}/${casename}_subshapes.stp
WriteStep doc $aTmpFile
ReadStep after_doc $aTmpFile
file delete -force $aTmpFile
set info2 [XStat after_doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info2 full l0_1
@ -41,7 +39,6 @@ if { ${l0} != ${l0_1} ||
Close doc
Close after_doc
file delete -force $imagedir/doc_subshapes.stp
param read.stepcaf.subshapes.name 0
param write.stepcaf.subshapes.name 0

@ -12,7 +12,7 @@ if { [catch { ReadStep D ${filename} } result] } {
# Static data
set Transparency 0.5
set TempFilename ${imagedir}/bug31550_temp.stp
set TempFilename ${imagedir}/${casename}_temp.stp
# Get colors
set Colors [XGetAllColors D]
@ -29,9 +29,10 @@ if { [catch { WriteStep D ${TempFilename} } result] } {
if { [catch { ReadStep D1 ${TempFilename} } result] } {
puts "ERROR: Couldn't read ${TempFilename} file"
}
file delete -force $TempFilename
# Get colors
set Colors [XGetAllColors D1]
if { [string first ${Transparency} ${Colors}] == -1 } {
puts "ERROR: OCC31550 is reproduced while STEP export."
}
}

@ -17,11 +17,11 @@ proc CheckName {doc1 doc2 lab} {
}
proc RunTestWithFile {file} {
global imagedir
puts "Testing file $file"
XOpen [locate_data_file $file] d1
WriteStep d1 ${imagedir}/${file}.step
ReadStep d2 ${imagedir}/${file}.step
set aTmpFile ${::imagedir}/${::casename}_${file}.step
WriteStep d1 $aTmpFile
ReadStep d2 $aTmpFile
CheckName d1 d2 0:1:1:1:1
CheckName d1 d2 0:1:1:2:1
@ -29,7 +29,7 @@ proc RunTestWithFile {file} {
Close d1
Close d2
file delete ${imagedir}/${file}.step
file delete -force $aTmpFile
}
RunTestWithFile as1-no-ass-name.xbf

@ -1,17 +1,15 @@
puts "=========="
puts "OCC21802"
puts "OCC21802: Not all names are transferred from STEP to IGES via XDE"
puts "=========="
puts ""
###########################################################
# Not all names are transferred from STEP to IGES via XDE
###########################################################
ReadStep d [locate_data_file bug21802_as1-oc-214.stp]
catch {exec rm ${imagedir}/bug21802_as1-oc-214.igs}
WriteIges d ${imagedir}/bug21802_as1-oc-214.igs
set aTmpFile ${imagedir}/${casename}.igs
WriteIges d $aTmpFile
set is21802fixed "FALSE"
set file21802 [open ${imagedir}/bug21802_as1-oc-214.igs RDONLY]
set file21802 [open $aTmpFile RDONLY]
while {[eof $file21802] == 0} {
set file21802line [string trim [gets $file21802]]
if {[string first "l-bracke" $file21802line] != -1} {
@ -19,6 +17,7 @@ while {[eof $file21802] == 0} {
}
}
close $file21802
file delete -force ${aTmpFile}
if {[string compare $is21802fixed "FALSE"] == 0} {
puts "ERROR: OCC21802 is reproduced"

@ -8,13 +8,16 @@ regexp {level N 1 +: +([-0-9.+eE]+)} $info1 full l1
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info1 full nb
regexp {Number of labels with name += +([-0-9.+eE]+)} $info1 full nbname
set aTmpFile ${imagedir}/${casename}_temp.stp
param write.stepcaf.subshapes.name 1
WriteStep doc $imagedir/doc_subshapes.stp
WriteStep doc $aTmpFile
param read.stepcaf.subshapes.name 1
ReadStep after_doc $imagedir/doc_subshapes.stp
ReadStep after_doc $aTmpFile
file delete -force $aTmpFile
set info2 [XStat after_doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info2 full l0_1
@ -35,4 +38,3 @@ if { ${l0} != ${l0_1} ||
Close doc
Close after_doc
file delete -force $imagedir/doc_subshapes.stp

@ -1,18 +1,16 @@
puts "========"
puts "OCC25910"
puts "OCC25910: The material with 0-density causes e r r o r s during writing STEP files"
puts "========"
puts ""
#######################################################################
# The material with 0-density causes errors during writing STEP files
#######################################################################
pload DCAF
NewDocument D
box b 10 10 10
XSetMaterial D [XAddShape D b] Vacuum 0.
set bug_info [catch {WriteStep D $imagedir/OCC25910.stp}]
if {$bug_info != 0} {
puts "ERROR: OCC25910 is reproduced."
}
set aTmpFile ${imagedir}/${casename}_tmp.stp
set bug_info [catch {WriteStep D $aTmpFile}]
file delete -force $aTmpFile
if {$bug_info != 0} { puts "ERROR: OCC25910 is reproduced." }

@ -17,9 +17,6 @@ set anImageD $imagedir/${casename}_D.png
set anImageD1 $imagedir/${casename}_D1.png
set anImageD2 $imagedir/${casename}_D2.png
catch {exec rm ${aFileD1}}
catch {exec rm ${aFileD2}}
box b 0 0 0 10 10 10
compound b c
NewDocument D
@ -36,6 +33,8 @@ WriteIges D ${aFileD2}
ReadIges D1 ${aFileD1}
ReadIges D2 ${aFileD2}
file delete -force ${aFileD1}
file delete -force ${aFileD2}
XShow D1
vfit

@ -1,10 +1,7 @@
puts "========"
puts "OCC27447"
puts "OCC27447: Add support for long IGES entity names"
puts "========"
puts ""
##########################################
# Add support for long IGES entity names
##########################################
pload OCAF
@ -27,12 +24,12 @@ SetName D [XFindShape D link]:2 "Nut instance 1"
SetName D [XFindShape D link]:3 "Nut instance 2"
# Write IGES file
catch {exec rm ${imagedir}/bug27447_link.igs}
WriteIges D ${imagedir}/bug27447_link.igs
set aTmpFile ${imagedir}/${casename}.igs
WriteIges D $aTmpFile
# Processing of IGES file
set is_bug27447_fixed "FALSE"
set file_27447 [open ${imagedir}/bug27447_link.igs RDONLY]
set file_27447 [open $aTmpFile RDONLY]
while {[eof $file_27447] == 0} {
set file_27447_line [string trim [gets $file_27447]]
if {[string first "Very long link name" $file_27447_line] != -1} {
@ -40,6 +37,7 @@ while {[eof $file_27447] == 0} {
}
}
close $file_27447
file delete -force $aTmpFile
# Results validation
if {[string compare $is_bug27447_fixed "FALSE"] == 0} {

@ -1,18 +1,16 @@
puts "========"
puts "OCC27701"
puts "OCC27701: C r a s h when export empty solid to STEP"
puts "========"
puts ""
#########################################
# Crash when export empty solid to STEP
#########################################
pload DCAF
catch {exec rm ${imagedir}/bug27701.stp}
restore [locate_data_file bug27701.brep] s
NewDocument D
XAddShape D s
XSetColor D 0:1:1:1 1 0 0 s
WriteStep D ${imagedir}/bug27701.stp
set aTmpFile ${imagedir}/${casename}_tmp.stp
WriteStep D $aTmpFile
file delete -force $aTmpFile

@ -1,10 +1,7 @@
puts "========"
puts "OCC28044"
puts "OCC28044: Implement data structures in OCAF for Saved Views."
puts "========"
puts ""
####################################################
# Implement data structures in OCAF for Saved Views.
####################################################
pload OCAF
@ -35,10 +32,12 @@ XSetViewFrontPlaneDistance D_First 0:1:7:1 10
XSetViewVolumeSidesClipping D_First 0:1:7:1 1
set first_view [XDumpView D_First 0:1:7:1]
# Write file
SaveAs D_First ${imagedir}/bug28044.xbf
set aTmpFile ${imagedir}/${casename}.xbf
SaveAs D_First $aTmpFile
Close D_First
# Read document
XOpen ${imagedir}/bug28044.xbf D_Second
XOpen $aTmpFile D_Second
file delete -force $aTmpFile
set second_view [XDumpView D_Second 0:1:7:1]
Close D_Second

@ -24,10 +24,12 @@ vdump $::imagedir/${::casename}_first.png
if { [vreadpixel 300 200 rgb name] != "GRAY63" } { puts "Error: wrong color in 3D Viewer" }
# Write file
SaveAs D_First ${imagedir}/bug28521.xbf
set aTmpFile ${imagedir}/${casename}.xbf
SaveAs D_First $aTmpFile
Close D_First
# Read document
XOpen ${imagedir}/bug28521.xbf D_Second
XOpen $aTmpFile D_Second
file delete -force $aTmpFile
# Results validation
set isOK 1

@ -1,10 +1,8 @@
puts "=========="
puts "OCC29338"
puts "OCC29338: Add Planes for Tolerance zones in Geometric tolerances"
puts "=========="
puts ""
#########################################################
# Add Planes for Tolerance zones in Geometric tolerances
#########################################################
pload ALL
box b 1 1 1
@ -14,9 +12,10 @@ explode b f
XAddGeomTolerance D b_1
plane p 1 2 3 0 1 0
XSetGDTAffectedPlane D 0:1:4:1 p 2
SaveAs D ${imagedir}/bug29338.xbf
set aTmpFile ${imagedir}/${casename}.xbf
SaveAs D $aTmpFile
Close D
XOpen ${imagedir}/bug29338.xbf DD
XOpen $aTmpFile DD
set type [XGetGDTAffectedPlane DD 0:1:4:1 plane]
if {[lindex $type 0] != "orientation"} {
puts "Error: wrong affected plane type"
@ -43,4 +42,4 @@ if {[lindex $check 23] != 0} {
puts "Error: wrong affected plane"
}
Close DD
file delete ${imagedir}/bug29338.xbf
file delete -force $aTmpFile

@ -1,19 +1,16 @@
puts "========="
puts "OCC533"
puts "OCC533: XmlOcaf-Document is not stored in XDEDRAWEXE although stored in TCAF"
puts "========="
puts ""
#######################################################
## XmlOcaf-Document is not stored in XDEDRAWEXE although stored in TCAF
#######################################################
file delete ${imagedir}/A.xml
set aTmpFile ${imagedir}/${casename}.xml
set res 0
catch { NewDocument A XmlOcaf }
if [catch {SaveAs A ${imagedir}/A.xml}] {
puts "OCC533 FAULTY"
if [catch {SaveAs A $aTmpFile}] {
puts "OCC533 FAULTY"
} else {
puts "OCC533 OK"
puts "OCC533 OK"
}
file delete -force $aTmpFile

@ -30,7 +30,7 @@ SetInteger Doc ${aLabel} ${aSetAttr1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -30,7 +30,7 @@ SetReal Doc ${aLabel} ${aSetAttr1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile} }
if { ![file exists ${aFile}] } {

@ -35,7 +35,7 @@ SetRealArray Doc ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -35,7 +35,7 @@ SetIntArray Doc ${aLabel} ${isDelta} ${aFrom1} ${aTo1} ${aSetAttr11} ${aSetAttr1
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -31,7 +31,7 @@ SetName Doc ${aLabel} ${aSetAttr1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -31,7 +31,7 @@ SetComment Doc ${aLabel} ${aSetAttr1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -47,7 +47,7 @@ SetPoint Doc ${aLabel} aPoint1
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -55,7 +55,7 @@ SetAxis Doc ${aLabel} aLine1
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -58,7 +58,7 @@ SetPlane Doc ${aLabel} aPlane1
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -30,7 +30,7 @@ SetUAttribute Doc ${aLabel} ${aSetAttr1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -34,7 +34,7 @@ SetUAttribute Doc ${aLabel} ${aSetAttr2}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -40,7 +40,7 @@ SetShape Doc ${aLabel} aBox1
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -40,7 +40,7 @@ SetReference Doc ${aLabel4} ${aReference1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -46,7 +46,7 @@ SetShape Doc ${aLabel} aBox1
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
#catch {exec chmod 777 ${aFile}}

@ -40,7 +40,7 @@ AISSet Doc ${aLabel} NS
AISDisplay Doc ${aLabel}
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -54,7 +54,7 @@ CopyWithLink Doc1 ${aLabel2} Doc1 ${aLabel1}
NewCommand Doc1
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc1 ${aFile}}
if { ![file exists ${aFile}] } {

@ -37,7 +37,7 @@ SetName Doc ${aChild1} ${aName11}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -30,7 +30,7 @@ SetName Doc ${aLabel1} ${aName1}
NewCommand Doc
# Save the document
set aFile ${imagedir}/OCC1228-[file tail [info script]].cbf
set aFile ${imagedir}/OCC1228-${casename}.cbf
file delete ${aFile}
catch {SaveAs Doc ${aFile}}
if { ![file exists ${aFile}] } {

@ -14,7 +14,7 @@ AISSet D1 0:1 NS
AISDisplay D1 0:1
AISMode D1 0:1 1
set aFile ${imagedir}/testmode.xml
set aFile ${imagedir}/${casename}.xml
file delete ${aFile}
SaveAs D1 ${aFile}
if { ![file exists ${aFile}] } {

@ -19,7 +19,7 @@ box b 1 1 1
SetShape Doc 0:1 b
# SaveAs
set output [SaveAs Doc ${imagedir}/testA1.cbf]
set output [SaveAs Doc ${imagedir}/${casename}_tmp.cbf]
# Close the document
Close Doc

@ -20,7 +20,7 @@ box b 1 1 1
SetShape Doc 0:1 b
# SaveAs
set output [SaveAs Doc ${imagedir}/testA2.xml]
set output [SaveAs Doc ${imagedir}/${casename}_tmp.xml]
# Close the document
Close Doc

@ -39,8 +39,8 @@ NewShape D ${lab7} shape7
NewShape D ${lab8} shape8
# Save document
file delete -force ${imagedir}/2793.cbf
dchrono h restart
SaveAs D ${imagedir}/2793.cbf
SaveAs D ${imagedir}/${casename}.cbf
dchrono h stop counter SaveAs
Close D
Close D
file delete -force ${imagedir}/${casename}.cbf

@ -16,9 +16,12 @@ XNewDoc D
XAddShape D co
puts "Writing STEP model"
WriteStep D .
set aTmpFile ${imagedir}/${casename}_tmp.stp
WriteStep D $aTmpFile
Close D
puts "Destructing model"
#crash
newmodel
file delete -force $aTmpFile

@ -19,6 +19,8 @@ set nz 10
if [info exists D] {Close D}
if [info exists D1] {Close D1}
set aTmpFile ${imagedir}/${casename}_tmp.stp
for {set npass 1} {$npass <= 2} {incr npass} {
set nx [expr $nx0 * $npass]
@ -64,13 +66,13 @@ for {set npass 1} {$npass <= 2} {incr npass} {
puts "Writing STEP model"
chrono cr1 restart
WriteStep D .
WriteStep D $aTmpFile
chrono cr1 stop
Close D
puts "Reading STEP model"
chrono cr2 restart
ReadStep D1 .
ReadStep D1 $aTmpFile
chrono cr2 stop
# check one solid with different locations
@ -93,6 +95,7 @@ for {set npass 1} {$npass <= 2} {incr npass} {
set time_write_$npass [lindex [dchrono cr1 counter "WriteStep_$npass"] end]
set time_read_$npass [lindex [dchrono cr2 counter "ReadStep_$npass"] end]
file delete -force $aTmpFile
}
puts "time_write_1=$time_write_1"