From: aml Date: Tue, 16 Feb 2016 15:46:34 +0000 (+0300) Subject: Condition for surface of revolution is changed to fix case bug25892_13. X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=7f6d76dcfbf82262236de32a32ef1347041091c7;p=occt-copy.git Condition for surface of revolution is changed to fix case bug25892_13. --- 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.