0026310: Very slow boolean cut operations on cylinders
[occt.git] / tests / bugs / modalg_5 / bug24404
CommitLineData
1ccc9700 1puts "========="
2puts "OCC24404"
3puts "========="
4puts ""
5######################################################################
6# The function BRepTools::UVBounds gives wrong result for the face
7######################################################################
8
9# case 1
10box b1 1500 1500 1500
11explode b1 f
12copy b1_4 b1
13don b1
14regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
15if { $x1 > 1.e-10 || $y1 != 1500 || $x2 > 1.e-10 || $y2 != 1500} {
16 puts "Error: Case1: Wrong boundaries of the face"
17} else {
18 puts "OK: Case1: Correct boundaries of the face"
19}
20
21# case 2
22circle c1 1361.60462531413 1500 275.105307765905 0 1 0 182.781239888725
23mkedge e c1
24wire w e
25mkplane b2 w
26bcut b1 b1 b2
27explode b1 f
28copy b1_1 b1
29don b1
30regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
31if { $x1 > 1.e-10 || $y1 != 1500 || $x2 > 1.e-10 || $y2 != 1500} {
32 puts "Error: Case2: Wrong boundaries of the face"
33} else {
34 puts "OK: Case2: Correct boundaries of the face"
35}
36
37# case 3
38circle c2 398.623694869499 1500 5.77182937332096 0 1 0 181.948898616306
39mkedge e c2
40wire w e
41mkplane b2 w
42bcut b1 b1 b2
43explode b1 f
44copy b1_1 b1
45don b1
46regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
47if { $x1 > 1.e-10 || $y1 != 1500 || $x2 > 1.e-10 || $y2 != 1500} {
48 puts "Error: Case3: Wrong boundaries of the face"
49} else {
50 puts "OK: Case3: Correct boundaries of the face"
51}
52
53# case 4
54circle c3 66.2457890511211 1500 832.500519113239 0 1 0 176.393473166564
55mkedge e c3
56wire w e
57mkplane b2 w
58bcut b1 b1 b2
59explode b1 f
60copy b1_1 b1
61don b1
62regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
63if { $x1 > 1.e-10 || $y1 != 1500 || $x2 > 1.e-10 || $y2 != 1500} {
64 puts "Error: Case4: Wrong boundaries of the face"
65} else {
66 puts "OK: Case4: Correct boundaries of the face"
67}
68
69# case 5
70circle c4 1177.73545803307 1500 1406.03245550006 0 1 0 150.768085993996
71mkedge e c4
72wire w e
73mkplane b2 w
74bcut b1 b1 b2
75explode b1 f
76copy b1_1 b1
77don b1
78regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
79if { $x1 > 1.e-10 || $y1 != 1500 || $x2 > 1.e-10 || $y2 != 1500} {
80 puts "Error: Case4: Wrong boundaries of the face"
81} else {
82 puts "OK: Case4: Correct boundaries of the face"
83}