1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-08 18:40:55 +03:00
occt/tests/bugs/modalg_4/bug745_8
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

46 lines
1.4 KiB
Plaintext
Executable File

puts "========"
puts "OCC745"
puts "========"
puts ""
###################################################
## Exception thrown: Standard_ConstructionError: Offset wire is not closed:
###################################################
restore [locate_data_file BUC60830-face2.brep] f
checkshape f
if { [catch { mkoffset result f 45 -0.042225 } status] } {
puts "Faulty OCC745"
} else {
renamevar result_1 result
set nb_info [nbshapes result]
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full ve
puts [format "Result shape result contains %s vertexes" $ve]
if { $ve == 0 } {
puts [format "Faulty : Result shape is NULL shape"]
} else {
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full wi
if {$wi > 1 } {
set ll [explode result w]
set num [llength $ll]
puts [format "Faulty : Result shape result is COMPOUND and contains %s wires" $num]
foreach {k} $ll {
checkshape $k
regexp {nb alone Vertices : ([-0-9.+eE]+)} [checksection $k] full cs
if { $cs != 0 } {
puts [format "Faulty : Result shape is UNclosed wire !!! " $k]
} else {
puts [format "OK: Result shape is CLOSED wire !!! "]
}
}
}
}
}
checkprops result -l 72.1851
checkshape result
checksection result
set 2dviewer 0