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-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c0641560eeb79c03c57d8cd42bd3fa4e309675a3;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 bc7016198..4289d7a24 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1202,6 +1202,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