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 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
puts "============"
puts "OCC9490"
puts "============"
puts ""
#######################################################################
# Increasing of tolerance in loop test for IGES
#######################################################################
set BugNumber OCC9490
set IsOk 1
set filepath [locate_data_file support_bobine.igs]
if {[catch {igesread $filepath OCC9490a *}]} {
puts "Faulty ${BugNumber} : here is reading problem"
set IsOk 0
}
file delete ${imagedir}/OCC9490tmp.igs
if {[catch {brepiges OCC9490a ${imagedir}/OCC9490tmp.igs}]} {
puts "Faulty ${BugNumber} : here is conversation to brep problem"
set IsOk 0
}
catch {exec chmod 777 ${imagedir}/OCC9490tmp.igs}
if {[catch {igesread ${imagedir}/OCC9490tmp.igs OCC9490b *}]} {
puts "Faulty ${BugNumber} : here is 2nd reading problem"
set IsOk 0
}
if { ${IsOk} == 1} {
set aTokList {= }
set Tol1 [lindex [split [tolerance OCC9490a] ${aTokList}] 2]
set Tol2 [lindex [split [tolerance OCC9490b] ${aTokList}] 2]
set percent_max 0.1
set Tolerance_percent [GetPercent ${Tol1} ${Tol2}]
puts "Tolerance_percent = ${Tolerance_percent} %"
if { ${Tolerance_percent} > ${percent_max} } {
set IsOk 0
}
set good_square 36259
set good_vertex 1770
set good_edge 1237
set good_wire 140
set good_face 123
set good_shell 0
set good_solid 0
set good_compsolid 0
set good_compound 1
set good_shape 3271
set nb_info [nbshapes OCC9490a]
regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9490a] full sq1
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v1
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e1
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w1
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f1
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh1
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol1
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol1
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound1
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape1
if {$sq1 != $good_square
|| $nb_v1 != $good_vertex
|| $nb_e1 != $good_edge
|| $nb_w1 != $good_wire
|| $nb_f1 != $good_face
|| $nb_sh1 != $good_shell
|| $nb_sol1 != $good_solid
|| $nb_compsol1 != $good_compsolid
|| $nb_compound1 != $good_compound
|| $nb_shape1 != $good_shape } {
set IsOk 0
}
set nb_info [nbshapes OCC9490b]
regexp {Mass +: +([-0-9.+eE]+)} [sprops OCC9490b] full sq2
regexp {VERTEX +: +([-0-9.+eE]+)} $nb_info full nb_v2
regexp {EDGE +: +([-0-9.+eE]+)} $nb_info full nb_e2
regexp {WIRE +: +([-0-9.+eE]+)} $nb_info full nb_w2
regexp {FACE +: +([-0-9.+eE]+)} $nb_info full nb_f2
regexp {SHELL +: +([-0-9.+eE]+)} $nb_info full nb_sh2
regexp {SOLID +: +([-0-9.+eE]+)} $nb_info full nb_sol2
regexp {COMPSOLID +: +([-0-9.+eE]+)} $nb_info full nb_compsol2
regexp {COMPOUND +: +([-0-9.+eE]+)} $nb_info full nb_compound2
regexp {SHAPE +: +([-0-9.+eE]+)} $nb_info full nb_shape2
if {$sq2 != $good_square
|| $nb_v2 != $good_vertex
|| $nb_e2 != $good_edge
|| $nb_w2 != $good_wire
|| $nb_f2 != $good_face
|| $nb_sh2 != $good_shell
|| $nb_sol2 != $good_solid
|| $nb_compsol2 != $good_compsolid
|| $nb_compound2 != $good_compound
|| $nb_shape2 != $good_shape } {
set IsOk 0
}
if { ${IsOk} == 0 } {
puts "${BugNumber}: Faulty"
} else {
puts "${BugNumber}: OK"
}
}
renamevar OCC9490b result
set 2dviewer 0
|