1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0024327: Wrong result obtained by Exterma Curve/Curve

Increased number of nodes  in Extrema_CurveCache::Extrema_CurveCache.
Test case for issue CR24327
This commit is contained in:
aml 2013-11-21 13:47:46 +04:00 committed by bugmaster
parent 5c573e69d3
commit aa094b3e6e
2 changed files with 36 additions and 2 deletions

View File

@ -57,9 +57,9 @@ Extrema_CurveCache::Extrema_CurveCache(const Curve& theC,
myTrimFirst = myFirst = theUFirst;
myTrimLast = myLast = theULast;
Standard_Integer Nbp = 2;
Standard_Integer Nbp = 3;
if (2 * Coeff < 10000.0)
Nbp = (Standard_Integer) (2 * Coeff);
Nbp = Max((Standard_Integer) (2 * Coeff), Nbp);
myNbSamples = (EndIndex - StartIndex)*Nbp + 1;
const Standard_Integer aNbSTresh = 10000;

View File

@ -0,0 +1,34 @@
puts "============"
puts "OCC24327"
puts "============"
puts ""
#################################################
# Wrong result obtained by Exterma Curve/Curve
#################################################
restore [locate_data_file bug24200_c1] c1
restore [locate_data_file bug24200_c2] c2
trim c1t c1 0. 1260.
trim c2t c2 0. 6142.
set info_1 [extrema c1t c2t]
set extrema_N [llength ${info_1}]
if { ${extrema_N} < 1 } {
puts "Error : Extrema is wrong"
} else {
for { set i 1 } { ${i} <= ${extrema_N} } { incr i } {
set info_2 [length ext_${i}]
regexp { is +([-0-9.+eE]+)} ${info_2} full edge_length
if { ${i} == 1 } {
set min_length ${edge_length}
}
if { ${min_length} > ${edge_length} } {
set min_length ${edge_length}
}
}
set expected_length 2.8421709430404007e-13
set tol_abs_length 1.0e-07
set tol_rel_length 0.01
checkreal "Minimal length" ${min_length} ${expected_length} ${tol_abs_length} ${tol_rel_length}
}