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