7faaccfd |
1 | puts "TODO OCC11111 ALL: Faulty OCC22502" |
2 | |
3 | puts "============" |
4 | puts "OCC22502" |
5 | puts "============" |
6 | puts "" |
7 | ####################################################################### |
8 | # Triangulation cannot be built on valid face |
9 | ####################################################################### |
10 | |
11 | set BugNumber OCC22502 |
12 | |
13 | pload ALL |
14 | |
15 | restore [locate_data_file OCC22502-bug601_noshading.brep] result |
16 | checkshape result |
17 | tolerance result |
18 | tclean result |
19 | |
20 | set Deflection 0.001 |
21 | incmesh result ${Deflection} |
22 | |
23 | set tri_info [trinfo result] |
24 | regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri |
25 | regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod |
26 | regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl |
27 | |
28 | set good_tri 170 |
29 | set good_nod 172 |
30 | set good_defl 0.00061201255663038154 |
31 | |
32 | proc GetPercent {Value GoodValue} { |
33 | set Percent 0. |
34 | if {${GoodValue} != 0.} { |
35 | set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.] |
36 | } elseif {${Value} != 0.} { |
37 | set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.] |
38 | } else { |
39 | set Percent 0. |
40 | } |
41 | return ${Percent} |
42 | } |
43 | |
44 | set percent_max 0.1 |
45 | set status 0 |
46 | |
47 | set triangle_percent [GetPercent ${tri} ${good_tri}] |
48 | puts "triangle_percent = ${triangle_percent}" |
49 | if { ${triangle_percent} > ${percent_max} } { |
50 | puts "triangle: Faulty ${BugNumber}" |
51 | set status 1 |
52 | } else { |
53 | puts "triangle: OK ${BugNumber}" |
54 | } |
55 | |
56 | set node_percent [GetPercent ${nod} ${good_nod}] |
57 | puts "node_percent = ${node_percent}" |
58 | if { ${node_percent} > ${percent_max} } { |
59 | puts "node: Faulty ${BugNumber}" |
60 | set status 1 |
61 | } else { |
62 | puts "node: OK ${BugNumber}" |
63 | } |
64 | |
65 | set deflection_percent [GetPercent ${defl} ${good_defl}] |
66 | puts "deflection_percent = ${deflection_percent}" |
67 | if { ${deflection_percent} > ${percent_max} } { |
68 | puts "deflection: Faulty ${BugNumber}" |
69 | set status 1 |
70 | } else { |
71 | puts "deflection: OK ${BugNumber}" |
72 | } |
73 | |
74 | # Resume |
75 | puts "" |
76 | if { ${status} != 0 } { |
77 | puts "Faulty ${BugNumber}" |
78 | } else { |
79 | puts "OK ${BugNumber}" |
80 | } |
81 | |
82 | vinit |
83 | vdisplay result |
84 | vfit |
85 | |
86 | vsetdispmode 1 |
87 | |
88 | set only_screen 1 |