db914841 |
1 | puts "==========" |
2 | puts "OCC25368" |
3 | puts "==========" |
4 | puts "" |
5 | ################################################ |
6 | # BREPExtrma DistShapeShape gives wrong result for Sphere and Line |
7 | ################################################ |
8 | |
9 | sphere s 0 0 0 5 |
10 | line l 0 0 0.2 1 1 0 |
11 | trim l l 0 10 |
12 | |
13 | set extrema_res [extrema l s] |
14 | set extrema_length [llength ${extrema_res} ] |
15 | |
16 | #Amount Check |
17 | if {${extrema_length} != 10 } { |
18 | puts "Error: Invalid extrema number in extrema output" |
19 | } |
20 | regexp {Extrema 1 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $extrema_res full x y z |
21 | |
22 | # Point check |
23 | set good_x 3.5327043465311383 |
24 | set good_y 3.5327043465311383 |
25 | set good_z 0.20 |
26 | checkreal "Intersection point x:" ${x} ${good_x} 0.01 0.01 |
27 | checkreal "Intersection point y:" ${y} ${good_y} 0.01 0.01 |
28 | checkreal "Intersection point z:" ${z} ${good_z} 0.01 0.01 |
29 | |