]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Intersec bug fix: ComputeResidual buggy for quad polyg with 2 edges.
authorabn <adrien.bruneton@cea.fr>
Mon, 22 Oct 2018 14:57:40 +0000 (16:57 +0200)
committerabn <adrien.bruneton@cea.fr>
Mon, 22 Oct 2018 14:58:37 +0000 (16:58 +0200)
src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx

index ef169e3d6a616bef3f6ee495bc21e433c7db0d25..bbd3d0097e254033c35e02d2ecf18432bc644897 100644 (file)
@@ -1218,6 +1218,8 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std::
   for(std::list<QuadraticPolygon *>::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<maxNbOfTurn && ((!pol1Zip.empty() || !edgesInPol2OnBoundaryL.empty())))
     {