1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-05-26 11:05:31 +03:00

0032796: Modeling Data - Calculation of distance between two circles crashes

Modified:
- Extrema_ExtCC.cxx, the method PrepareParallelResult() - angular tolerance is increased.

Added:
- A test: lowalgos extcc bug32796
This commit is contained in:
vro 2022-02-22 17:00:09 +03:00 committed by kgv
parent da9cb57f57
commit 3c61e8f7e0
2 changed files with 16 additions and 2 deletions

View File

@ -674,7 +674,7 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
// myIsParallel = TRUE and only the least distance will be returned.
//4. Arcs are not parallel. Then several (or single) extremas will be returned.
if (aRng.Delta() > Precision::Angular())
if (aRng.Delta() > Precision::Confusion())
{
Standard_Real aPar = 0.0;
aRng.GetIntermediatePoint(0.5, aPar);
@ -714,7 +714,6 @@ void Extrema_ExtCC::PrepareParallelResult(const Standard_Real theUt11,
break;
}
}
//Nearer solution can be found
}
else if (!aRng.IsVoid())

View File

@ -0,0 +1,15 @@
puts "============"
puts "OCC32796: Modeling Data - Calculation of distance between two circles crashes"
puts "============"
puts ""
restore [locate_data_file bug32796e1.brep] e1
restore [locate_data_file bug32796e2.brep] e2
mkcurve c1 e1
mkcurve c2 e2
if [catch { extrema c1 c2 }] {
puts "Calculation of distance between two circles crashes"
} else {
puts "Calculation of distance between two circles is OK"
}