diff --git a/src/Extrema/Extrema_ExtCC.cxx b/src/Extrema/Extrema_ExtCC.cxx index def27cbe5e..0466dc2ec1 100644 --- a/src/Extrema/Extrema_ExtCC.cxx +++ b/src/Extrema/Extrema_ExtCC.cxx @@ -411,7 +411,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, if (((aType1 != GeomAbs_Line) && (aType1 != GeomAbs_Circle)) || ((aType2 != GeomAbs_Line) && (aType2 != GeomAbs_Circle))) { - mySqDist.Append(theSqDist); + //mySqDist.Append(theSqDist); myDone = Standard_True; myIsParallel = Standard_True; return; @@ -432,11 +432,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11, !isReversed ? theUt21 : theUt11, !isReversed ? theUt22 : theUt12); - if (ExtPLin.IsDone()) - { - mySqDist.Append(theSqDist); - } - else + if (!ExtPLin.IsDone()) { myIsParallel = Standard_False; } @@ -837,7 +833,9 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ExtElC& AlgExt, if (myIsParallel) { PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance()); } - else { + + if(mypoints.IsEmpty()) + { NbExt = AlgExt.NbExt(); for (i = 1; i <= NbExt; i++) { // Verification de la validite des parametres @@ -911,7 +909,7 @@ void Extrema_ExtCC::PrepareResults(const Extrema_ECC& AlgExt, { PrepareParallelResult(Ut11, Ut12, Ut21, Ut22, AlgExt.SquareDistance()); } - else + if(mypoints.IsEmpty()) { NbExt = AlgExt.NbExt(); for (i = 1; i <= NbExt; i++) diff --git a/tests/bugs/modalg_7/bug24909_4 b/tests/bugs/modalg_7/bug24909_4 new file mode 100644 index 0000000000..d2fc6cc878 --- /dev/null +++ b/tests/bugs/modalg_7/bug24909_4 @@ -0,0 +1,15 @@ +puts "========" +puts "0024909: Modeling Algorithms - SIGSEGV in buildsweep" +puts "========" +puts "" + +pload ALL +circle c1 0 0 0 40 +mkedge e1 c1 +wire w1 e1 +line l1 0 0 0 0 0 20 +mkedge e2 l1 0 10 +wire w2 e2 +mksweep w1 +addsweep w2 +buildsweep sw1