3bea4c16 |
1 | puts "TODO OCC11111 ALL: Faulty OCC22188" |
2 | |
3 | puts "============" |
4 | puts "OCC22188" |
3bea4c16 |
5 | puts "============" |
6 | puts "" |
7 | ####################################################################### |
8 | # Visualization of solid fails (in BRepMesh_FastDiscretFace) |
9 | ####################################################################### |
10 | |
11 | set BugNumber OCC22188 |
12 | |
13 | restore [locate_data_file OCC22188.brep] result |
14 | tclean result |
15 | |
16 | vinit |
17 | vdisplay result |
18 | vsetdispmode 1 |
19 | vfit |
20 | |
21 | set tri_info [trinfo result] |
22 | regexp { +([-0-9.+eE]+) +triangles} $tri_info full tri |
23 | regexp { +([-0-9.+eE]+) +nodes} $tri_info full nod |
24 | regexp {Maximal deflection +([-0-9.+eE]+)} $tri_info full defl |
25 | |
26 | if { [string compare $tcl_platform(os) "Windows"] == 0 } { |
27 | set good_tri 6114 |
28 | set good_nod 3080 |
29 | set good_defl 0.50050406431775729 |
30 | } else { |
31 | set good_tri 6148 |
32 | set good_nod 3097 |
33 | set good_defl 0.5153628044287929 |
34 | } |
35 | |
36 | proc GetPercent {Value GoodValue} { |
37 | set Percent 0. |
38 | if {${GoodValue} != 0.} { |
39 | set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.] |
40 | } elseif {${Value} != 0.} { |
41 | set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.] |
42 | } else { |
43 | set Percent 0. |
44 | } |
45 | return ${Percent} |
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 | set square 33561.4 |
79 | |
80 | set nb_v_good 2 |
81 | set nb_e_good 3 |
82 | set nb_w_good 1 |
83 | set nb_f_good 1 |
84 | set nb_sh_good 1 |
85 | set nb_sol_good 1 |
86 | set nb_compsol_good 0 |
87 | set nb_compound_good 0 |
88 | set nb_shape_good 9 |
89 | |
90 | if { ${status} != 0 } { |
91 | puts "Faulty ${BugNumber}" |
92 | } else { |
93 | puts "OK ${BugNumber}" |
94 | } |
95 | |
96 | set only_screen 0 |