3798da68 |
1 | puts "=========" |
2 | puts "OCC21898" |
3 | puts "=========" |
4 | puts "" |
5 | ########################################################################### |
6 | # Empty result of intersection between a surface of revolution and a line |
7 | ########################################################################### |
8 | |
9 | restore [locate_data_file bug21898_intersect_1.brep] a |
10 | explode a |
11 | mksurface s a_1 |
12 | mkcurve l a_2 |
13 | mkcurve l1 a_3 |
14 | |
15 | intersect r l s |
16 | regexp {Point +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [dump r] full pnt1_x pnt1_y pnt1_z |
17 | if { $pnt1_x == 0 || $pnt1_y == 0 || $pnt1_z == 0 } { |
18 | puts "Error: there is not intersection between surface and first curve" |
19 | } |
20 | |
21 | intersect r1 l1 s |
22 | regexp {Point +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} [dump r1] full pnt2_x pnt2_y pnt2_z |
23 | if { $pnt2_x == 0 || $pnt2_y == 0 || $pnt2_z == 0 } { |
24 | puts "Error: there is not intersection between surface and second curve" |
25 | } |
26 | |
27 | vertex v r |
28 | distmini d v a_1 |
29 | regexp {([-0-9.+eE]+)} [dump d_val] full dist1 |
30 | |
31 | vertex v1 r1 |
32 | distmini d v1 a_1 |
33 | regexp {([-0-9.+eE]+)} [dump d_val] full dist2 |
34 | |
35 | if { $dist1 > 1.e-7 || $dist2 > 1.e-7} { |
36 | puts "Error: Wrong 3d point between surface and curve" |
37 | } else { |
38 | puts "OK: Correct 3d point between surface and curve" |
39 | } |
40 | |
41 | axo |
42 | set only_screen_axo 1 |