Files
OCCT/tests/bugs/step/bug_gh384
Dmitrii Kulikov 413c08272b Data Exchange, STP Import - Fixing missing GDT values (#617)
- Changes type declarations from specific measure types to `Handle(Standard_Transient)` for broader compatibility
- Adds runtime type checking and conversion logic to extract measure values from both supported types
- Includes comprehensive unit tests to validate the new functionality
2025-07-15 11:09:36 +01:00

35 lines
1016 B
Plaintext

puts "===================================="
puts "For some STEP files we fail for geometric tolerances to read the geometric_tolerance.magnitude"
puts "===================================="
pload OCAF
Close D -silent
ReadStep D [locate_data_file bug_gh384.stp]
proc checkEqual {theActualValue theExpectedValue {theTolerance 1.0e-7}} {
# Calculate absolute difference
set aDifference [expr abs($theActualValue - $theExpectedValue)]
# Check if difference is within tolerance
set isEqual [expr {$aDifference <= $theTolerance}]
if {!$isEqual} {
puts "Error: Tolerance data is not correct"
puts "Expected: $theExpectedValue, actual: $theActualValue"
}
}
set aTolerance0 [XGetToleranceValue D "0:1:4:1"]
checkEqual $aTolerance0 0.75
set aTolerance1 [XGetToleranceValue D "0:1:4:5"]
checkEqual $aTolerance1 0.75
set aTolerance2 [XGetToleranceValue D "0:1:4:11"]
checkEqual $aTolerance2 1.25
set aTolerance3 [XGetToleranceValue D "0:1:4:15"]
checkEqual $aTolerance3 0.5