0025124: [Feature request] Removal of continuity checks for offset geometries
[occt.git] / tests / bugs / modalg_5 / bug24404
1 puts "========="
2 puts "OCC24404"
3 puts "========="
4 puts ""
5 ######################################################################
6 # The function BRepTools::UVBounds gives wrong result for the face
7 ######################################################################
8
9 # case 1
10 box b1 1500 1500 1500
11 explode b1 f
12 copy b1_4 b1
13 don b1
14 regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
15 if { $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
22 circle c1 1361.60462531413 1500 275.105307765905 0 1 0 182.781239888725
23 mkedge e c1
24 wire w e
25 mkplane b2 w
26 bcut b1 b1 b2
27 explode b1 f
28 copy b1_1 b1
29 don b1
30 regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
31 if { $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
38 circle c2 398.623694869499 1500 5.77182937332096 0 1 0 181.948898616306
39 mkedge e c2
40 wire w e
41 mkplane b2 w
42 bcut b1 b1 b2
43 explode b1 f
44 copy b1_1 b1
45 don b1
46 regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
47 if { $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
54 circle c3 66.2457890511211 1500 832.500519113239 0 1 0 176.393473166564
55 mkedge e c3
56 wire w e
57 mkplane b2 w
58 bcut b1 b1 b2
59 explode b1 f
60 copy b1_1 b1
61 don b1
62 regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
63 if { $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
70 circle c4 1177.73545803307 1500 1406.03245550006 0 1 0 150.768085993996
71 mkedge e c4
72 wire w e
73 mkplane b2 w
74 bcut b1 b1 b2
75 explode b1 f
76 copy b1_1 b1
77 don b1
78 regexp {([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)\n([-0-9.+eE]+)} [xbounds b1] dump x1 y1 x2 y2
79 if { $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 }