5 ############################################################################################################
6 # BRepIntCS does not find intersections of an ellipsoid and a line passing through it's apex
7 ###########################################################################################################
9 # Test was corrected. See:
11 # http://tracker.dev.opencascade.org/view.php?id=23248
14 # The checking can not provide stable result because there is no guarantee that coordinates
15 # for brics_1 will always be {x1, y1, z1} but not {x2, y2, z2} and
16 # for brics_42 will always be {x2, y2, z2} but not {x1, y1, z1}.
17 # The coordinates of brics_1 can be both {x1, y1, z1} and {x2, y2, z2}
18 # The coordinates of brics_42 can be both {x1, y1, z1} and {x2, y2, z2}
20 ###########################################################################################################
22 set BugNumber OCC22809
29 regexp {.* is a ([A-Za-z0-9]*)} [ whatis brics_1 ] full info1
31 # N.B. multiple result points are to be processed by other algorithms
32 # Now there are 130 result points
33 regexp {.* is a ([A-Za-z0-9]*)} [ whatis brics_23 ] full info2
35 set word1 [string compare $info1 "point"]
36 set word2 [string compare $info2 "point"]
39 if { ${word1} == 0 && ${word2} == 0 } {
45 regexp {.* is a ([A-Za-z0-9]*)} [ whatis brics_3 ] full info3
46 set word3 [string compare $info3 "a"]
49 if { ${word3} == 0 } {
53 # N.B. multiple result points are to be processed by other algorithms
57 set good_x1 0.000000000000000e+00
58 set good_y1 0.000000000000000e+00
59 set good_z1 -1.000000000000000e+02
61 set good_x2 0.000000000000000e+00
62 set good_y2 0.000000000000000e+00
63 set good_z2 1.000000000000000e+02
65 set dump1 [ dump brics_1 ]
67 regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} $dump1 full x1 y1 z1
69 checkreal "x1" ${x1} ${good_x1} 0 0.001
70 checkreal "y1" ${y1} ${good_y1} 0 0.001
72 if { abs ($z1 - $good_z1) > 0.001 * abs ($good_z1) } {
73 checkreal "z1" ${z1} ${good_z2} 0 0.001
76 set dump2 [ dump brics_2 ]
77 # N.B. multiple result points are to be processed by other algorithms
78 set dump2 [ dump brics_23 ]
79 regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} $dump2 full x2 y2 z2
81 checkreal "x2" ${x2} ${good_x2} 0 0.001
82 checkreal "y2" ${y2} ${good_y2} 0 0.001
84 if { abs ($z2 - $good_z2) > 0.001 * abs ($good_z2) } {
85 checkreal "z2" ${z2} ${good_z1} 0 0.001
88 if { ${status_point} == 0 && ${status_nb} == 0 } {
89 puts "OK ${BugNumber}"
91 puts "Faulty ${BugNumber}"