1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00
occt/tests/bugs/step/bug29403
kgv 30fa5f6713 0032705: Test - name clashes within temporary files within bugs/caf/bug23766_X
Several test cases writing temporary files have been corrected.
2021-12-02 21:14:57 +03:00

45 lines
1.3 KiB
Plaintext

puts "=========="
puts "OCC29403: Subshapes names are not imported from step"
puts "=========="
puts ""
param read.stepcaf.subshapes.name 1
param write.stepcaf.subshapes.name 1
pload DCAF
ReadStep doc [locate_data_file bug29403_ECOR030312.stp]
set info1 [XStat doc]
regexp {level N 0 +: +([-0-9.+eE]+)} $info1 full l0
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}_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
regexp {level N 1 +: +([-0-9.+eE]+)} $info2 full l1_1
regexp {Total number of labels for shapes in the document += +([-0-9.+eE]+)} $info2 full nb_1
regexp {Number of labels with name += +([-0-9.+eE]+)} $info2 full nbname_1
if { ${l0} != ${l0_1} ||
${l0} != "38" ||
${l1} != ${l1_1} ||
${l1} != "85" ||
${nb} != ${nb_1} ||
${nb} != "123" ||
${nbname} != ${nbname_1} ||
${nbname} != "123"} {
puts "Error : Document is read/written wrong!"
}
Close doc
Close after_doc
param read.stepcaf.subshapes.name 0
param write.stepcaf.subshapes.name 0