1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-05 18:16:23 +03:00
occt/tests/bugs/modalg_6/bug27302
nbv b8f67cc236 0027302: Invalid curves number in intersection result
1. In frame of the fix for #27282 issue, we have obtained several prolonged curves, which have common point(s). Fix for this issue joins these curves if it is possible.

2. ElCLib::InPeriod(...) method has been improved. Now it has become more faster (in general cases) and more reliable (in frame of  FLT_OVERFLOW and DIVISION_BY_ZERO cases processing).

Creation of test case for issue #27302
Test case tests\bugs\modalg_6\bug27282_2 has been adjusted in accordance with its new behavior.
2016-04-22 15:21:57 +03:00

48 lines
1.0 KiB
Plaintext

puts "============"
puts "OCC27302"
puts "============"
puts ""
###############################
## Invalid curves number in intersection result
###############################
set MaxTol 9.9579577516847715e-005
set GoodNbCurv 1
restore [locate_data_file CTO900_pro12913a.rle] a
restore [locate_data_file CTO900_pro12913b.rle] b
explode a f
explode b f
smallview
don a_34 b_9
fit
set log [bopcurves a_34 b_9 -2d]
regexp {Tolerance Reached=+([-0-9.+eE]+)\n+([-0-9.+eE]+)} ${log} full Toler NbCurv
checkreal ToleranceReached ${Toler} ${MaxTol} 0.0 0.1
checkview -screenshot -2d -path ${imagedir}/${test_image}.png
if {${NbCurv} != ${GoodNbCurv}} {
puts "Error: Number of curves is bad!"
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
dset dd_val 100.0*${Toler}
distmini dd e1 e2
if { [dval dd_val] > ${Toler} } {
puts "Error: Intersection result is not closed"
}
}
}
} else {
checklength c_1 -l 86.536841230136204
}