| 1 | puts "TODO OCC12345 ALL: triangle: Faulty OCC15519" |
| 2 | puts "TODO OCC12345 ALL: node: Faulty OCC15519" |
| 3 | puts "TODO OCC12345 ALL: deflection: Faulty OCC15519" |
| 4 | puts "TODO OCC12345 ALL: Faulty OCC15519" |
| 5 | puts "============" |
| 6 | puts "OCC15519" |
| 7 | puts "============" |
| 8 | puts "" |
| 9 | ####################################################################### |
| 10 | # Exception while meshing shape |
| 11 | ####################################################################### |
| 12 | |
| 13 | set BugNumber OCC15519 |
| 14 | |
| 15 | proc GetPercent {Value GoodValue} { |
| 16 | set Percent 0. |
| 17 | if {${GoodValue} != 0.} { |
| 18 | set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.] |
| 19 | } elseif {${Value} != 0.} { |
| 20 | set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.] |
| 21 | } else { |
| 22 | set Percent 0. |
| 23 | } |
| 24 | return ${Percent} |
| 25 | } |
| 26 | |
| 27 | restore [locate_data_file OCC15519.brep] result |
| 28 | tclean result |
| 29 | |
| 30 | set Deflection 1. |
| 31 | catch {incmesh result ${Deflection} } |
| 32 | |
| 33 | set InfoList [trinfo result] |
| 34 | regexp { +([-0-9.+eE]+) +triangles} $InfoList full tri |
| 35 | regexp { +([-0-9.+eE]+) +nodes} $InfoList full nod |
| 36 | regexp {Maximal deflection +([-0-9.+eE]+)} $InfoList full defl |
| 37 | |
| 38 | if { [string compare $tcl_platform(platform) "windows"] == 0 } { |
| 39 | set good_tri 96265 |
| 40 | set good_nod 71339 |
| 41 | set good_defl 27.956052399907215 |
| 42 | } else { |
| 43 | set good_tri 95582 |
| 44 | set good_nod 70796 |
| 45 | set good_defl 0.99827404224216676 |
| 46 | } |
| 47 | |
| 48 | set percent_max 0.1 |
| 49 | set status 0 |
| 50 | |
| 51 | set triangle_percent [GetPercent ${tri} ${good_tri}] |
| 52 | puts "triangle_percent = ${triangle_percent}" |
| 53 | if { ${triangle_percent} > ${percent_max} } { |
| 54 | puts "triangle: Faulty ${BugNumber}" |
| 55 | set status 1 |
| 56 | } else { |
| 57 | puts "triangle: OK ${BugNumber}" |
| 58 | } |
| 59 | |
| 60 | set node_percent [GetPercent ${nod} ${good_nod}] |
| 61 | puts "node_percent = ${node_percent}" |
| 62 | if { ${node_percent} > ${percent_max} } { |
| 63 | puts "node: Faulty ${BugNumber}" |
| 64 | set status 1 |
| 65 | } else { |
| 66 | puts "node: OK ${BugNumber}" |
| 67 | } |
| 68 | |
| 69 | set deflection_percent [GetPercent ${defl} ${good_defl}] |
| 70 | puts "deflection_percent = ${deflection_percent}" |
| 71 | if { ${deflection_percent} > ${percent_max} } { |
| 72 | puts "deflection: Faulty ${BugNumber}" |
| 73 | set status 1 |
| 74 | } else { |
| 75 | puts "deflection: OK ${BugNumber}" |
| 76 | } |
| 77 | |
| 78 | # Resume |
| 79 | puts "" |
| 80 | if { ${status} != 0 } { |
| 81 | puts "Faulty ${BugNumber}" |
| 82 | } else { |
| 83 | puts "OK ${BugNumber}" |
| 84 | } |
| 85 | |
| 86 | set 2dviewer 0 |