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