81b47143 |
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 1. The curve is from the edge b2_3 |
21 | # 1.1 The face b1 is based on untrimmed surface |
22 | |
23 | set log [OCC26525 p b2_3 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 48.4205 |
34 | set expected_y1 -22.5336 |
35 | set expected_z1 82.7431 |
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 32.5621 |
44 | set expected_y2 -5.89907 |
45 | set expected_z2 82.7431 |
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 | } |