1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-09 18:50:54 +03:00
ski 58cf74e0c0 0025945: Make stable checking of shape global properties in tests
- Added function checkprops, set default tolerance parameter to 1.0e-4
- Using "area" instead of "square".
- Options "-equal\notequal" isn't used together with "-s" in blend and offset test cases.
- Correct regressions/differences/improvements and CPU problem (set props tolerance to 0.1)
- Corrected test cases to use checkprops proc.
- Correct image difference
- Updated TODOs in test cases.
- Updated test cases to get correct images of result shape
2015-12-10 16:56:03 +03:00

54 lines
1.2 KiB
Plaintext
Executable File

puts "============"
puts "OCC6334"
puts "============"
puts ""
#####################################################################
# Invalid result of MakeCylindricalHole when input solid is REVERSED
#####################################################################
set BugNumber OCC6334
# 1. Make box
box b 100 100 100
subshape b f 1
offsetshape t b 10 b_1
checkshape t
set bnd_t [bounding t]
set ori [lindex [dtyp t] 2]
puts "Orientation of thick solid is $ori"
# 3. Make hole
hole h t 110 50 50 1 0 0 10
set che [checkshape h]
if { [regexp {Faulty} $che] } {
puts "Faulty ${BugNumber} : checkshape is wrong for h"
}
set bnd_h [bounding h]
renamevar h result
checkprops result -s 117509
checkshape result
checknbshapes result -vertex 30 -edge 51 -wire 27 -face 24 -shell 1 -solid 1 -compsolid 0 -compound 1 -shape 135
# 4. Check thickness of box and hole
set dx_t [expr [lindex $bnd_t 3] - [lindex $bnd_t 0]]
set dx_h [expr [lindex $bnd_h 3] - [lindex $bnd_h 0]]
if { [expr abs($dx_h - $dx_t)] > 1e-5 } {
puts "Thickness of solid = $dx_t"
puts "Thickness of solid with hole = $dx_h"
puts "Invalid result of making a hole"
puts "Faulty ${BugNumber}"
} else {
puts "OK ${BugNumber}"
}
set 2dviewer 0