From e64622331f0d16e29689c51f3fff6be638af2092 Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 17 May 2016 07:24:57 +0300 Subject: [PATCH] 0027493: [Regression relative to OCCT 7.0.0] Extrema_ExtCC does not set flag "IsParallel" equal to true for the overlapped curves Check for infinite solutions now starts from two solutions. Test case is added. --- src/Extrema/Extrema_GenExtCC.gxx | 3 +-- tests/bugs/moddata_3/bug27493 | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 tests/bugs/moddata_3/bug27493 diff --git a/src/Extrema/Extrema_GenExtCC.gxx b/src/Extrema/Extrema_GenExtCC.gxx index 2c9c4ed187..1b2d45a19a 100644 --- a/src/Extrema/Extrema_GenExtCC.gxx +++ b/src/Extrema/Extrema_GenExtCC.gxx @@ -335,8 +335,7 @@ void Extrema_GenExtCC::Perform() // Avoid mark parallel case when have duplicates out of tolerance. // Bad conditioned task: bug25635_1, bug23706_10, bug23706_13. - const Standard_Integer aMinNbInfSol = 100; - if (aPnts.Size() >= aMinNbInfSol) + if (aPnts.Size() >= 2) { isParallel = Standard_True; for(Standard_Integer anIdx = aPnts.Lower(); anIdx <= aPnts.Upper() - 1; anIdx++) diff --git a/tests/bugs/moddata_3/bug27493 b/tests/bugs/moddata_3/bug27493 new file mode 100644 index 0000000000..ec8195e6bd --- /dev/null +++ b/tests/bugs/moddata_3/bug27493 @@ -0,0 +1,25 @@ +puts "============" +puts "OCC27493" +puts "============" +puts "" +######################################################################### +# [Regression relative to OCCT 7.0.0] Extrema_ExtCC does not set flag "IsParallel" equal to true for the overlapped curves +######################################################################### + +restore [locate_data_file bug27493.brep] anEdges +explode anEdges +mkcurve c1 anEdges_1 +mkcurve c2 anEdges_2 + +# Check infinite solutions flag value +set info [extrema c1 c2] +if { [regexp "Infinite number of extremas" ${info}] != 1 } { + puts "Error : Infinite solution flag have incorrect value" +} + +# Check extrema distance +regexp {distance = +([-0-9.+eE]+)} $info full aDist +set absTol 1.0e-9 +set relTol 0.001 +set aDist_Exp 0.0 +checkreal "Distance value check" $aDist $aDist_Exp $absTol $relTol