1a25084d |
1 | puts "============" |
2 | puts "OCC24811" |
3 | puts "============" |
4 | puts "" |
5 | ################################# |
6 | # Intersection is insufficient |
7 | ################################# |
8 | |
9 | set p1_1 -2.22458486160362e-016 |
10 | set p1_2 1 |
11 | set p1_3 0 |
12 | |
13 | set p2_1 0.0202691578002498 |
14 | set p2_2 0.999794559518151 |
15 | set p2_3 0 |
16 | |
17 | restore [locate_data_file bug24811_e1.brep] curve |
18 | restore [locate_data_file bug24811_e2.brep] circle |
19 | |
20 | bop curve circle |
21 | bopcut result |
1a25084d |
22 | |
9526aa6a |
23 | if { [llength [explode result]] != 4 } { |
24 | puts "Error: wrong number of intersections. Should be result_1 result_2 result_3 result_4" |
1a25084d |
25 | } else { |
26 | puts "OK: right number of intersections" |
27 | } |
28 | |
9526aa6a |
29 | explode result_2 |
30 | set info1 [dump result_2_1] |
1a25084d |
31 | regexp {Point 3D +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} $info1 full x1 y1 z1 |
32 | regexp {Tolerance +: +([-0-9.+eE]+)} $info1 full tol1 |
33 | |
34 | if { $p1_1 >= [expr $x1 - $tol1] && $p1_1 <= [expr $x1 + $tol1] } { |
35 | puts "OK: point1_1 is correct" |
36 | } else { |
37 | puts "Error: point1_1 is incorrect" |
38 | } |
39 | if { $p1_2 >= [expr $y1 - $tol1] && $p1_2 <= [expr $y1 + $tol1] } { |
40 | puts "OK: point1_2 is correct" |
41 | } else { |
42 | puts "Error: point1_2 is incorrect" |
43 | } |
44 | if { $p1_3 >= [expr $z1 - $tol1] && $p1_3 <= [expr $z1 + $tol1] } { |
45 | puts "OK: point1_3 is correct" |
46 | } else { |
47 | puts "Error: point1_3 is incorrect" |
48 | } |
49 | |
50 | |
9526aa6a |
51 | set info2 [dump result_2_2] |
1a25084d |
52 | regexp {Point 3D +: +([-0-9.+eE]+), +([-0-9.+eE]+), +([-0-9.+eE]+)} $info2 full x2 y2 z2 |
53 | regexp {Tolerance +: +([-0-9.+eE]+)} $info2 full tol2 |
54 | |
55 | if { $p2_1 >= [expr $x2 - $tol2] && $p2_1 <= [expr $x2 + $tol2] } { |
56 | puts "OK: point2_1 is correct" |
57 | } else { |
58 | puts "Error: point2_1 is incorrect" |
59 | } |
60 | if { $p2_2 >= [expr $y2 - $tol2] && $p2_2 <= [expr $y2 + $tol2] } { |
61 | puts "OK: point2_2 is correct" |
62 | } else { |
63 | puts "Error: point2_2 is incorrect" |
64 | } |
65 | if { $p2_3 >= [expr $z2 - $tol2] && $p2_3 <= [expr $z2 + $tol2] } { |
66 | puts "OK: point2_3 is correct" |
67 | } else { |
68 | puts "Error: point2_3 is incorrect" |
69 | } |
70 | |
5747059b |
71 | checkview -display result -2d -path ${imagedir}/${test_image}.png |