0026310: Very slow boolean cut operations on cylinders
[occt.git] / tests / bugs / modalg_5 / bug25368_2
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 4.5
10 rotate s 0 0.5 1 1 1 0.5 34.9
11 line l -0.79 0.88 1.22 0.579 1.765 0.576
12
13 set extrema_res [extrema l s]
14 set extrema_length [llength ${extrema_res} ]
15
16 # Amount check
17 if {${extrema_length} != 18 } {
18   puts "Error: expected only two lines as result of extrema!"
19 }
20
21 # Distance check on ext_1
22 set info [dump ext_1]
23 regexp {Extrema 1 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $extrema_res full x1 y1 z1
24 # Point check
25 set good_x1 -2.2838350838816694
26 set good_y1 -3.6737459810900646
27 set good_z1 -0.2660950057268425
28 checkreal "Intersection point x:" ${x1} ${good_x1} 0.01 0.01
29 checkreal "Intersection point y:" ${y1} ${good_y1} 0.01 0.01
30 checkreal "Intersection point z:" ${z1} ${good_z1} 0.01 0.01
31
32
33 # Distance check on ext_2
34 regexp {Extrema 2 is point : +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $extrema_res full x2 y2 z2
35 # Point check
36 set good_x2 0.29086178559218934
37 set good_y2 4.1748550113475211
38 set good_z2 2.2952614654595873
39 checkreal "Intersection point x:" ${x2} ${good_x2} 0.01 0.01
40 checkreal "Intersection point y:" ${y2} ${good_y2} 0.01 0.01
41 checkreal "Intersection point z:" ${z2} ${good_z2} 0.01 0.01