CommitLineData
77dbd1f1 1puts "============"
2puts "OCC26576"
3puts "============"
4puts ""
5###############################
6## Wrong result obtained by intersection algorithm.
7###############################
8
10
11Open [locate_data_file bug26576_study1_new_geom.cbf] D
12
13GetShape D 0:1:484:1:1:2 b1
14GetShape D 0:1:478:1:1:2 b2
15
16explode b1 f
17explode b2 f
18copy b1_1 b1
19copy b2_2 b2
20donly b1 b2
21
22#Wrong value of Tolerance Reached.
23
24set log [bopcurves b1 b2 -2d]
25regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} \${log} full Tolerance_Reached NbCurv
26
27set GoodNbCurv 2
28
77dbd1f1 30set tol_abs_Tolerance_Reached 1.0e-7
31set tol_rel_Tolerance_Reached 0.0
32checkreal "Tolerance Reached" \${Tolerance_Reached} \${expected_Tolerance_Reached} \${tol_abs_Tolerance_Reached} \${tol_rel_Tolerance_Reached}
33
34if {\${NbCurv} != \${GoodNbCurv}} {
35 puts "Error: \${GoodNbCurv} curves are expected but \${NbCurv} are found!"
36}
37
38#Overlapping intersection curves.
39
40for {set i 1} {\$i < \${NbCurv}} {incr i} {
41 for {set j [expr \$i+1]} {\$j <= \$NbCurv} {incr j} {
42 mkedge e1 c_\$i
43 mkedge e2 c_\$j
44
45 set coe [checkoverlapedges e1 e2 \$Tolerance_Reached]
46
47 puts "c_\$i<->c_\$j: \$coe"
48 if { [regexp "Edges is not overlaped" \$coe] != 1 } {
49 puts "Error: c_\$i and c_\$j are overlaped"
50 }
51 }
52}
53
54smallview
55fit
5747059b 56checkview -screenshot -2d -path \${imagedir}/\${test_image}.png