0028492: Boolean common does not produce expected result
[occt.git] / tests / bugs / modalg_6 / bug27896
CommitLineData
f73c584c 1puts "============"
2puts "OCC27896"
3puts "============"
4puts ""
5###############################
6## Prm-Prm intersection algo returns wrong result if it is called with start
7## intersection point, which lies in the domain boundary
8###############################
9
10set tol_abs_Tolerance_Reached 1.0e-7
11set tol_rel_Tolerance_Reached 0.1
12set GoodNbCurves 2
13
14restore [locate_data_file bug25319_S1.brep] b1
15restore [locate_data_file bug25319_S2.brep] b2
16explode b1 f
17explode b2 f
18
19# GOOD result before the fix
20set log1 [bopcurves b1_8 b2_17 -2d -p +1.09444207768950010000 +29.00000000000000000000 +0.17740001678466785000 +2.79671571032639710000 -p +0.00000000000000000000 +26.87779254288926400000 +0.17767342824312710000 +2.80622040022304510000]
21
22# BAD result before the fix
23set log2 [bopcurves b1_8 b2_17 -2d -p +1.09444207768949960000 +29.00000000000000000000 +0.17740001678466785000 +2.79671571032639750000 -p +0.00000000000000000000 +26.87779254288926400000 +0.17767342824312710000 +2.80622040022304510000]
24
25regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log1} full Tolerance_Reached1 NbCurv1
26regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log2} full Tolerance_Reached2 NbCurv2
27
28set expected_Tolerance_Reached1 2.2611960020325053e-007
3b6ffeac 29set expected_Tolerance_Reached2 7.6423429413334924e-006
f73c584c 30
31checkreal "Tolerance Reached" ${Tolerance_Reached1} ${expected_Tolerance_Reached1} ${tol_abs_Tolerance_Reached} ${tol_rel_Tolerance_Reached}
32checkreal "Tolerance Reached" ${Tolerance_Reached2} ${expected_Tolerance_Reached2} ${tol_abs_Tolerance_Reached} ${tol_rel_Tolerance_Reached}
33
34if { $NbCurv1 != $GoodNbCurves } {
35 puts "Error in case 1: $GoodNbCurves curve(s) is expected but $NbCurv1 is found"
36}
37
38if { $NbCurv2 != $GoodNbCurves } {
39 puts "Error in case 2: $GoodNbCurves curve(s) is expected but $NbCurv2 is found"
40}