0027015: Sewing returns invalid shape if some faces are nearly plane cones
[occt.git] / tests / bugs / modalg_6 / bug26525_4
CommitLineData
81b47143 1puts "================"
2puts "OCC26525"
3puts "================"
4puts ""
5#######################################################################
6# Wrong result obtained by curve / surface intersection algorithm.
7#######################################################################
8
9pload QAcommands
10
11restore [locate_data_file bug26525_a.brep] b1
12restore [locate_data_file bug26525_b.brep] b2
13
14mksurface sb1 b1
15trimv sb1t sb1 -30000 30000
16mkface b1t sb1t
17
18explode b2 e
19
20# Case 2. The curve is from the edge: b2_1
21#
22# 2.2 The face b1 is based on trimmed surface
23
24set log [OCC26525 pt b2_1 b1t]
25
26regexp {([-0-9]+)} $log full Number
27
28if { $Number == 2} {
29 set tol_abs 0.0001
30 set tol_rel 0.01
31
32 regexp {point pt_1 +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $log full x1 y1 z1
33
34 set expected_x1 39.0504
35 set expected_y1 -12.8696
36 set expected_z1 82.6099
37
38 checkreal "x1" ${x1} ${expected_x1} ${tol_abs} ${tol_rel}
39 checkreal "y1" ${y1} ${expected_y1} ${tol_abs} ${tol_rel}
40 checkreal "z1" ${z1} ${expected_z1} ${tol_abs} ${tol_rel}
41
42 regexp {point pt_2 +([-0-9.+eE]+) +([-0-9.+eE]+) +([-0-9.+eE]+)} $log full x2 y2 z2
43
44 set expected_x2 43.1172
45 set expected_y2 -17.16
46 set expected_z2 82.6048
47
48 checkreal "x2" ${x2} ${expected_x2} ${tol_abs} ${tol_rel}
49 checkreal "y2" ${y2} ${expected_y2} ${tol_abs} ${tol_rel}
50 checkreal "z2" ${z2} ${expected_z2} ${tol_abs} ${tol_rel}
51} else {
52 puts "Error: Bad Number of intersection points"
53}