c5a10cf7 |
1 | puts "================" |
2 | puts "0027059" |
3 | puts "================" |
4 | puts "" |
5 | ############################################################## |
6 | # Point->Curve Projection/Extrema fails. |
7 | # (No extrema found) |
8 | ############################################################## |
9 | |
10 | set absTol 1.0e-6 |
11 | set relTol 0.001 |
c5a10cf7 |
12 | set exp_x 12.700000 |
13 | set exp_y 16.8949999999593 |
14 | set exp_z 0.534684851975074 |
15 | |
16 | restore [locate_data_file bug27059.brep] aC |
17 | explode aC |
18 | mkcurve curve aC_2 |
19 | |
20 | # case 1: Curve |
21 | # existence check |
22 | set info1 [proj curve 12.699999 16.8949999999593 0.534684851975074] |
23 | |
24 | if {![regexp {ext_1} $info1]} { |
25 | puts "Error: No extrema found in case 1" |
26 | } |
27 | # length check |
3ad6d001 |
28 | checklength ext_1 -l 1.0e-6 |
c5a10cf7 |
29 | |
30 | # case 2: Curve |
31 | # existence check |
32 | set info2 [proj curve 12.700001 16.8949999999593 0.534684851975074] |
33 | |
34 | if {![regexp {ext_1} $info2]} { |
35 | puts "Error: No extrema found in case 2" |
36 | } |
37 | # length check |
3ad6d001 |
38 | checklength ext_1 -l 1.0e-6 |
c5a10cf7 |
39 | |
40 | #case 3: Point |
41 | # existence check |
42 | set info3 [proj curve 12.700000 16.8949999999593 0.534684851975074] |
43 | if {![regexp {ext_1} $info3]} { |
44 | puts "Error: No extrema found in case 3" |
45 | } |
46 | # point coords check |
47 | set case3Info [dump ext_1] |
48 | regexp {Point : ([-0-9.+eE]+), ([-0-9.+eE]+), ([-0-9.+eE]+)} $case3Info full x y z |
49 | checkreal "case 3 coord X" $x $exp_x $absTol $relTol |
50 | checkreal "case 3 coord Y" $y $exp_y $absTol $relTol |
51 | checkreal "case 3 coord Z" $z $exp_z $absTol $relTol |