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