From cb127824b2961ce7c560e16e6085b87238aa72f2 Mon Sep 17 00:00:00 2001 From: ifv Date: Tue, 23 Jun 2020 13:55:15 +0300 Subject: [PATCH] 0031616: Modeling algorithm - Section between two shells returns wire with gaps (720) --- src/IntTools/IntTools_TopolTool.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/IntTools/IntTools_TopolTool.cxx b/src/IntTools/IntTools_TopolTool.cxx index 863e0687fc..a6bf5c1a4a 100644 --- a/src/IntTools/IntTools_TopolTool.cxx +++ b/src/IntTools/IntTools_TopolTool.cxx @@ -246,7 +246,22 @@ void IntTools_TopolTool::ComputeSamplePoints() } if(nbsu < 10) nbsu = 10; if(nbsv < 10) nbsv = 10; + // Check anisotropy + Standard_Real anULen = (usup - uinf) / myS->UResolution(1.); + Standard_Real anVLen = (vsup - vinf) / myS->VResolution(1.); + Standard_Real aRatio = anULen / anVLen; + if (aRatio >= 10.) + { + nbsu *= 2; + nbsu = Min(nbsu, aMaxNbSample); + } + else if (aRatio <= 0.1) + { + nbsv *= 2; + nbsv = Min(nbsv, aMaxNbSample); + } } + break; case GeomAbs_SurfaceOfExtrusion: { nbsu = 15;