5 ############################################################################################################
6 # BRepIntCS does not find intersections of an ellipsoid and a line passing through it's apex
7 ###########################################################################################################
12 proc GetPercent {Value GoodValue} {
14 if {${GoodValue} != 0.} {
15 set Percent [expr abs(${Value} - ${GoodValue}) / abs(double(${GoodValue})) * 100.]
16 } elseif {${Value} != 0.} {
17 set Percent [expr abs(${GoodValue} - ${Value}) / abs(double(${Value})) * 100.]
28 line l -0.000001 0.0000000001 -100 0 0 1
31 regexp {.* is a ([A-Za-z0-9]*)} [ whatis brics_1 ] full info1
33 # N.B. multiple result points are to be processed by other algorithms
34 # Now there are 2 result points
35 set info2 [ whatis brics_2 ]
36 set info2 [ whatis brics_2 ]
37 regexp {.* is a ([A-Za-z0-9]*)} [ whatis brics_2 ] full info2
40 set word1 [string compare $info1 "point"]
41 set word2 [string compare $info2 "point"]
44 if { ${word1} == 0 && ${word2} == 0 } {
50 regexp {.* is a ([A-Za-z0-9]*)} [ whatis brics_3 ] full info3
51 set word3 [string compare $info3 "a"]
54 if { ${word3} == 0 } {
58 # N.B. multiple result points are to be processed by other algorithms
62 set dump1 [ dump brics_1 ]
64 regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} $dump1 full x1 y1 z1
66 set good_x1 -1.000000000000000e-06
67 set good_y1 1.000000000000000e-10
68 set good_z1 -1.000000000000000e+02
71 set x1_percent [GetPercent ${x1} ${good_x1}]
72 puts "x1_percent = ${x1_percent}"
73 if { ${x1_percent} > ${percent_max} } {
74 puts "x1: Faulty ${BugNumber}"
77 puts "x1: OK ${BugNumber}"
80 set y1_percent [GetPercent ${y1} ${good_y1}]
81 puts "y1_percent = ${y1_percent}"
82 if { ${y1_percent} > ${percent_max} } {
83 puts "y1: Faulty ${BugNumber}"
86 puts "y1: OK ${BugNumber}"
89 set z1_percent [GetPercent ${z1} ${good_z1}]
90 puts "z1_percent = ${z1_percent}"
91 if { ${z1_percent} > ${percent_max} } {
92 puts "z1: Faulty ${BugNumber}"
95 puts "z1: OK ${BugNumber}"
98 set dump2 [ dump brics_2 ]
99 # N.B. multiple result points are to be processed by other algorithms
100 set dump2 [ dump brics_2 ]
102 regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} $dump2 full x2 y2 z2
104 set good_x2 -1.000000000000000e-06
105 set good_y2 1.000000000000000e-10
106 set good_z2 1.000000000000000e+02
109 set x2_percent [GetPercent ${x2} ${good_x2}]
110 puts "x2_percent = ${x2_percent}"
111 if { ${x2_percent} > ${percent_max} } {
112 puts "x2: Faulty ${BugNumber}"
115 puts "x2: OK ${BugNumber}"
118 set y2_percent [GetPercent ${y2} ${good_y2}]
119 puts "y2_percent = ${y2_percent}"
120 if { ${y2_percent} > ${percent_max} } {
121 puts "y2: Faulty ${BugNumber}"
124 puts "y2: OK ${BugNumber}"
127 set z2_percent [GetPercent ${z2} ${good_z2}]
128 puts "z2_percent = ${z2_percent}"
129 if { ${z2_percent} > ${percent_max} } {
130 puts "z2: Faulty ${BugNumber}"
133 puts "z2: OK ${BugNumber}"
138 if { ${status_point} == 0 && ${status_nb} == 0 && ${status_xyz1} == 0 && ${status_xyz2} == 0 } {
139 puts "OK ${BugNumber}"
141 puts "Faulty ${BugNumber}"