From: abn Date: Mon, 22 Oct 2018 14:57:40 +0000 (+0200) Subject: Intersec bug fix: ComputeResidual buggy for quad polyg with 2 edges. X-Git-Tag: V9_2_0a2~5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=768b3d44d03cab84e57e2588d461489d7a01fc76;p=tools%2Fmedcoupling.git Intersec bug fix: ComputeResidual buggy for quad polyg with 2 edges. --- diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index ef169e3d6..bbd3d0097 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1218,6 +1218,8 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std:: for(std::list::const_iterator itMNT=pol1Zip.begin();itMNT!=pol1Zip.end();itMNT++,iiMNT++) nbOfTurn+=(*itMNT)->size(); maxNbOfTurn=maxNbOfTurn*nbOfTurn; maxNbOfTurn*=maxNbOfTurn; + // [ABN] at least 3 turns for very small cases (typically one (quad) edge against one (quad or lin) edge forming a new cell)! + maxNbOfTurn = maxNbOfTurn<3 ? 3 : maxNbOfTurn; nbOfTurn=0; while(nbOfTurn