1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-03 17:56:21 +03:00

0029680: Tests - command checkprops does not work for negative values

DRAW command checkprops is corrected to handle properly negative reference values.

Test case offset faces_face_i E5 is corrected (improvement due to #28903)
This commit is contained in:
abv 2018-04-08 18:52:31 +03:00 committed by bugmaster
parent 11af6cddf5
commit 9b74e2071c
2 changed files with 5 additions and 7 deletions

View File

@ -595,12 +595,10 @@ proc checkprops {shape args} {
if { $m == 0 } {
puts "Error : The command is not valid. The $prop is 0."
}
if { $mass > 0 } {
puts "The expected $prop is $mass"
}
#check of change of area is < 1%
if { ($mass != 0 && [expr 1.*abs($mass - $m)/$mass] > $depsilon) || ($mass == 0 && $m != 0) } {
puts "Error : The $prop of result shape is $m"
# check of change of area is < 1%
if { ($mass != 0 && abs (($mass - $m) / double($mass)) > $depsilon) ||
($mass == 0 && $m != 0) } {
puts "Error : The $prop of result shape is $m, expected $mass"
}
} else {
if { $m != 0 } {

View File

@ -2,4 +2,4 @@ ptorus s 20 5 270
OFFSETSHAPE 1 {s_2 s_3} $calcul $type
checkprops result -v -3702.54
checkprops result -v 3256.97