1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
ski a8676008f7 Adding of testing cases from subgroups 937 940 and 941 of CHL group
Splitting of subgroups bugs/modalg and bugs/moddata to optimise time of testing
Correction of end file in group v3d
Small correction of test case
2013-02-08 15:16:15 +04:00

138 lines
3.3 KiB
Plaintext
Executable File

puts "========"
puts "OCC165"
puts "========"
restore [locate_data_file OCC165-2.brep] f
checkshape f
set IsGood 1
if [catch {mkoffset res1 f 3 10 } result] {
puts "Faulty OCC165 (case 1) : function MKOFFSET works wrongly"
set IsGood 0
} else {
#puts "OCC165 OK (case 1): function MKOFFSET works properly"
mkplane pl1_1 res1_1
checkshape pl1_1
mkplane pl1_2 res1_2
checkshape pl1_2
mkplane pl1_3 res1_3
checkshape pl1_3
}
if [catch {mkoffset res2 f 3 -10 } result] {
puts "Faulty OCC165 (case 2) : function MKOFFSET works wrongly"
set IsGood 0
} else {
#puts "OCC165 OK (case 2): function MKOFFSET works properly"
mkplane pl2_1 res2_1
checkshape pl2_1
mkplane pl2_2 res2_2
checkshape pl2_2
mkplane pl2_3 res2_3
checkshape pl2_3
}
if {$IsGood == 1} {
compound f res1_1 res1_2 res1_3 res2_1 res2_2 res2_3 res
regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_1] full len
set good_len 462.832
set percent_max 0.1
set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
puts "good_len = ${good_len}"
puts "length = ${len}"
puts "percent = ${percent}"
if {${percent} > ${percent_max}} {
puts "Faulty OCC165 (case 3) : function MKOFFSET works wrongly"
set IsGood 0
}
regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_2] full len
set good_len 525.664
set percent_max 0.1
set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
puts "good_len = ${good_len}"
puts "length = ${len}"
puts "percent = ${percent}"
if {${percent} > ${percent_max}} {
puts "Faulty OCC165 (case 4) : function MKOFFSET works wrongly"
set IsGood 0
}
regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_3] full len
set good_len 588.496
set percent_max 0.1
set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
puts "good_len = ${good_len}"
puts "length = ${len}"
puts "percent = ${percent}"
if {${percent} > ${percent_max}} {
puts "Faulty OCC165 (case 5) : function MKOFFSET works wrongly"
set IsGood 0
}
regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_1] full len
set good_len 320
set percent_max 0.1
set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
puts "good_len = ${good_len}"
puts "length = ${len}"
puts "percent = ${percent}"
if {${percent} > ${percent_max}} {
puts "Faulty OCC165 (case 6) : function MKOFFSET works wrongly"
set IsGood 0
}
regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_2] full len
set good_len 240
set percent_max 0.1
set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
puts "good_len = ${good_len}"
puts "length = ${len}"
puts "percent = ${percent}"
if {${percent} > ${percent_max}} {
puts "Faulty OCC165 (case 7) : function MKOFFSET works wrongly"
set IsGood 0
}
regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_3] full len
set good_len 160
set percent_max 0.1
set percent [expr abs(${len} - ${good_len}) / double(${good_len}) * 100.]
puts "good_len = ${good_len}"
puts "length = ${len}"
puts "percent = ${percent}"
if {${percent} > ${percent_max}} {
puts "Faulty OCC165 (case 8) : function MKOFFSET works wrongly"
set IsGood 0
}
if {$IsGood == 1} {
puts "OCC165 OK"
} else {
puts "OCC165 FAULTY"
}
} else {
puts "OCC165 FAULTY"
}