1 puts "================"
3 puts "================"
5 #######################################################################################
6 # Wrong calculation of bnd box for edge if edge has polygon of triangulation
7 #######################################################################################
9 proc GetPercent {Value GoodValue} {
11 if {${GoodValue} != 0.} {
12 set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
13 } elseif {${Value} != 0.} {
14 set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
21 set BugNumber OCC12661
23 restore [locate_data_file OCC12661.brep] result
24 set res [bounding result]
26 set x1 [lindex ${res} 0]
27 set y1 [lindex ${res} 1]
28 set z1 [lindex ${res} 2]
29 set x2 [lindex ${res} 3]
30 set y2 [lindex ${res} 4]
31 set z2 [lindex ${res} 5]
33 set good_x1 -6.3659273065258741
34 set good_y1 0.7051405053395956
35 set good_z1 -2.5792617865186296
36 set good_x2 6.3659273065258795
37 set good_y2 7.6599592236605769
38 set good_z2 3.0815250146676485
43 set x1_percent [GetPercent ${x1} ${good_x1}]
44 set y1_percent [GetPercent ${y1} ${good_y1}]
45 set z1_percent [GetPercent ${z1} ${good_z1}]
46 set x2_percent [GetPercent ${x2} ${good_x2}]
47 set y2_percent [GetPercent ${y2} ${good_y2}]
48 set z2_percent [GetPercent ${z2} ${good_z2}]
50 if {${x1_percent} > ${percent_max}} {
51 puts "Faulty ${BugNumber} : x1 is wrong"
54 if {${y1_percent} > ${percent_max}} {
55 puts "Faulty ${BugNumber} : y1 is wrong"
58 if {${z1_percent} > ${percent_max}} {
59 puts "Faulty ${BugNumber} : z1 is wrong"
62 if {${x2_percent} > ${percent_max}} {
63 puts "Faulty ${BugNumber} : x2 is wrong"
66 if {${y2_percent} > ${percent_max}} {
67 puts "Faulty ${BugNumber} : y2 is wrong"
70 if {${z2_percent} > ${percent_max}} {
71 puts "Faulty ${BugNumber} : z2 is wrong"
75 if { ${status} == 0 } {
76 puts "${BugNumber}: OK"
78 puts "${BugNumber}: Faulty"