From 7f6d76dcfbf82262236de32a32ef1347041091c7 Mon Sep 17 00:00:00 2001 From: aml Date: Tue, 16 Feb 2016 18:46:34 +0300 Subject: [PATCH] Condition for surface of revolution is changed to fix case bug25892_13. --- src/ProjLib/ProjLib_CompProjectedCurve.cxx | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/ProjLib/ProjLib_CompProjectedCurve.cxx b/src/ProjLib/ProjLib_CompProjectedCurve.cxx index 2105dd09c2..9fd1059cae 100644 --- a/src/ProjLib/ProjLib_CompProjectedCurve.cxx +++ b/src/ProjLib/ProjLib_CompProjectedCurve.cxx @@ -1622,11 +1622,17 @@ void ProjLib_CompProjectedCurve::UpdateTripleByTrapCriteria(gp_Pnt &thePoint) co // Check possible traps cases: // 25892 bug. - if (mySurface->GetType() == GeomAbs_SurfaceOfRevolution && - (Abs (thePoint.Z() - mySurface->FirstVParameter()) < Precision::PConfusion() || - Abs (thePoint.Z() - mySurface->LastVParameter() ) < Precision::PConfusion() )) + if (mySurface->GetType() == GeomAbs_SurfaceOfRevolution) { - isProblemsPossible = Standard_True; + // Compute maximal deviation from 3D and choose the biggest one. + Standard_Real aVRes = mySurface->VResolution(Precision::Confusion()); + Standard_Real aMaxTol = Max(Precision::PConfusion(), aVRes); + + if (Abs (thePoint.Z() - mySurface->FirstVParameter()) < aMaxTol || + Abs (thePoint.Z() - mySurface->LastVParameter() ) < aMaxTol ) + { + isProblemsPossible = Standard_True; + } } // 27135 bug. Trap on degenerated edge. -- 2.39.5