From ae0752755609b310ba768f2d2741d25c70d7b24b Mon Sep 17 00:00:00 2001 From: PDN <> Date: Thu, 19 May 2011 10:48:19 +0000 Subject: [PATCH] OCC22318 Regression (since OCCT 6.3.1): bad shading of small cylinder (forum thread 20083) --- src/BRepMesh/BRepMesh_FastDiscret.cxx | 26 +------------------------- 1 file changed, 1 insertion(+), 25 deletions(-) diff --git a/src/BRepMesh/BRepMesh_FastDiscret.cxx b/src/BRepMesh/BRepMesh_FastDiscret.cxx index ae972f2b5d..4404ee594c 100755 --- a/src/BRepMesh/BRepMesh_FastDiscret.cxx +++ b/src/BRepMesh/BRepMesh_FastDiscret.cxx @@ -872,35 +872,11 @@ void BRepMesh_FastDiscret::Add( const TopoDS_Edge& theEdge, Standard_True); } - // Creation des polygones sur triangulation: + // Creation of polygons on triangulation: Standard_Real puv; Standard_Integer i; - Standard_Real aEdgeLen = 0., a2dEdgeLen = 0.; - gp_Pnt P3dPrev; - gp_Pnt2d uvPrev; - GT.Value(cons, theGFace, 1, puv, P3dPrev, uvPrev); - for (i = 2; i <= GT.NbPoints(); i++) - { - // Record 3d point - GT.Value(cons, theGFace, i, puv, P3d, uv); - aEdgeLen += P3d.SquareDistance(P3dPrev); - a2dEdgeLen += uv.SquareDistance(uvPrev); - P3dPrev = P3d; - uvPrev = uv; - } - Standard_Integer nbnodes = GT.NbPoints(); - Standard_Real aMinToler = Min(theDefEdge, myDeflection); - if(aEdgeLen < aMinToler*aMinToler) - { - //check 2D resolution - Standard_Real ddu = theGFace->UResolution(aMinToler); - Standard_Real ddv = theGFace->VResolution(aMinToler); - Standard_Real aMin = Min(ddu, ddv); - if(a2dEdgeLen < aMin*aMin) - nbnodes = 2; - } TColStd_Array1OfInteger Nodes(1, nbnodes); TColStd_Array1OfInteger NodInStruct(1, nbnodes); TColStd_Array1OfReal Param(1, nbnodes);