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/bug33095
dpasukhi 621ed3bc36 0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m
Fixed problem with dimension tolerance values (upper/lower)
 - Update supported type for tolerance measure unit, now we can handle base class
2022-08-11 10:43:32 +03:00

33 lines
991 B
Plaintext

puts "======="
puts "0033095: Data Exchange, Step Import - Wrong PMI values when loading a *.stp file in m"
puts "======="
pload OCAF
catch { Close D_mm }
catch { Close D_m }
# Read file in mm
ReadStep D_mm [locate_data_file bug33095_cad_with_pmi.stp]
set plusMinusTol_mm [XGetDimensionPlusMinusTol D_mm 0:1:4:77]
# Read file in m
XNewDoc D_m
XSetLengthUnit D_m m
ReadStep D_m [locate_data_file bug33095_cad_with_pmi.stp]
set plusMinusTol_m [XGetDimensionPlusMinusTol D_m 0:1:4:77]
# Checking
regexp {lower +([-0-9.+eE]+) +upper +([-0-9.+eE]+)} $plusMinusTol_m full lower_m upper_m
regexp {lower +([-0-9.+eE]+) +upper +([-0-9.+eE]+)} $plusMinusTol_mm full lower_mm upper_mm
set lower_m_to_mm [expr {$lower_m * 1000}]
set upper_m_to_mm [expr {$upper_m * 1000}]
if {[expr {abs($lower_m_to_mm - $lower_mm)}] > 1e-2} {
puts "Error: incorrect scaling lower toleranse value"
}
if {[expr {abs($upper_m_to_mm - $upper_mm)}] > 1e-2} {
puts "Error: incorrect scaling upper toleranse value"
}