From: esy Date: Mon, 16 Dec 2019 14:08:30 +0000 (+0100) Subject: Fix Elgafieldtosurface bug X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2Fesy%2Ffix_bug;p=tools%2Fmedcoupling.git Fix Elgafieldtosurface bug --- diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index 3e4c6c10d..b6a1759b4 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1158,12 +1158,12 @@ bool QuadraticPolygon::haveIAChanceToBeCompletedBy(const QuadraticPolygon& pol1N // - or (more tricky, see testIntersect2DMeshes11()) that pol1 and pol2 have same orientation but 'this' turns in such // a way that it attaches to pol2 on an edge in opposite orientation. // To sort this out, inspect localisation of next edge in pol2 wrt pol1NotSplitted. - it2.nextLoop(); + it2.previousLoop(); cur=it2.current(); Node *repr=cur->getPtr()->buildRepresentantOfMySelf(); bool ret=pol1NotSplitted.isInOrOut(repr); repr->decrRef(); - direction = ret; + direction = !ret; needCleaning = ret; // if true we are in tricky case 2 above, we know that we will produce two consecutive overlapping edges in result return ret; } @@ -1172,7 +1172,7 @@ bool QuadraticPolygon::haveIAChanceToBeCompletedBy(const QuadraticPolygon& pol1N Node *repr=cur->getPtr()->buildRepresentantOfMySelf(); bool ret=pol1NotSplitted.isInOrOut(repr); repr->decrRef(); - direction = ret; + direction = !ret; return ret; } }