1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
puts "========"
puts "OCC165"
puts "Bug regression in BRepOffsetAPI_MakeOffset class (offsetting in OY direction)"
puts "========"
restore [locate_data_file offset_wire_019.brep] a
checkshape a
mkplane f a
checkshape f
set IsGood 1
if [catch {mkoffset res1 f 1 4.8 } result] {
set IsGood 0
} else {
puts "OCC165 OK (case 1): function MKOFFSET works properly"
checkshape res1_1
mkplane pl1 res1_1
checkshape pl1
}
if [catch {mkoffset res2 f 1 -2.9 } result] {
set IsGood 0
} else {
puts "OCC165 OK (case 2): function MKOFFSET works properly"
checkshape res2_1
mkplane pl2 res2_1
checkshape pl2
}
if {$IsGood == 1} {
compound a res1_1 res2_1 res
regexp {Mass +: +([-0-9.+eE]+)} [lprops res1_1] full len
set good_len 1112.29
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}} {
set IsGood 0
}
regexp {Mass +: +([-0-9.+eE]+)} [lprops res2_1] full len
set good_len 1063.91
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}} {
set IsGood 0
}
if {$IsGood == 1} {
puts "OCC165 OK"
} else {
puts "OCC165 Faulty"
}
} else {
puts "OCC165 Faulty"
}
|