Files
OCCT/tests/lowalgos/intss/bug26576_1
nbv a6ebe9fc7c 0028493: [Regression vs 7.0.0] Intersection algorithm produces curve with loop
1. New testgrid "lowalgos/intss" has been created. It will contain all test cases on geometrical intersection of two surfaces ("intersect" DRAW-command) and two faces ("bopcurves" DRAW-command).

2. New test case for the issue #28493 has been created because the problem is not reproduced on MASTER.

3. Test case (lowalgos/intss/bug24472) for the issue #29501 has been modified in order to check loops of the resulting intersection curves.
2018-10-30 16:04:24 +03:00

57 lines
1.3 KiB
Plaintext

puts "============"
puts "OCC26576"
puts "============"
puts ""
###############################
## Wrong result obtained by intersection algorithm.
###############################
pload DCAF
Open [locate_data_file bug26576_study1_new_geom.cbf] D
GetShape D 0:1:484:1:1:2 b1
GetShape D 0:1:478:1:1:2 b2
explode b1 f
explode b2 f
copy b1_1 b1
copy b2_2 b2
donly b1 b2
#Wrong value of Tolerance Reached.
set log [bopcurves b1 b2 -2d]
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Tolerance_Reached NbCurv
set GoodNbCurv 2
set expected_Tolerance_Reached 1.2482990218170969e-007
set tol_abs_Tolerance_Reached 1.0e-7
set tol_rel_Tolerance_Reached 0.0
checkreal "Tolerance Reached" ${Tolerance_Reached} ${expected_Tolerance_Reached} ${tol_abs_Tolerance_Reached} ${tol_rel_Tolerance_Reached}
if {${NbCurv} != ${GoodNbCurv}} {
puts "Error: ${GoodNbCurv} curves are expected but ${NbCurv} are found!"
}
#Overlapping intersection curves.
for {set i 1} {$i < ${NbCurv}} {incr i} {
for {set j [expr $i+1]} {$j <= $NbCurv} {incr j} {
mkedge e1 c_$i
mkedge e2 c_$j
set coe [checkoverlapedges e1 e2 $Tolerance_Reached]
puts "c_$i<->c_$j: $coe"
if { [regexp "Edges is not overlaped" $coe] != 1 } {
puts "Error: c_$i and c_$j are overlaped"
}
}
}
smallview
fit
checkview -screenshot -2d -path ${imagedir}/${test_image}.png