From 317c7e24da39f0b7c8febccc50fcb56ef570c91d Mon Sep 17 00:00:00 2001 From: ageay Date: Tue, 30 Oct 2012 07:33:14 +0000 Subject: [PATCH] Imp1 --- .../InterpKernelGeo2DQuadraticPolygon.cxx | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index b5c3f8716..ea89d0b5c 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -1136,9 +1136,10 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std:: bool found=false; std::set notUsedInPol1L(notUsedInPol1); IteratorOnComposedEdge it(const_cast(&pol1)); + int sz=pol1.size(); if(it.current()->getLoc()==FULL_ON_1) { - while(!found) + for(int iii=0;iiigetLoc()!=FULL_ON_1; @@ -1157,7 +1158,7 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std:: while(!notUsedInPol1L.empty()) { QuadraticPolygon *tmp1=new QuadraticPolygon; - while(it.current()->getLoc()==FULL_ON_1) + for(int iii=0;iiigetLoc()==FULL_ON_1;iii++) { Edge *ee=it.current()->getPtr(); ee->incrRef(); @@ -1218,7 +1219,16 @@ void QuadraticPolygon::ComputeResidual(const QuadraticPolygon& pol1, const std:: break; } if(!found) - throw INTERP_KERNEL::Exception("Deep mismatch of edges ! Internal Error !"); + { + if((*it1)->getStartNode()==(*it1)->getEndNode() && pol2Zip.empty()) + { + (*it1)->appendCrudeData(mapp,0.,0.,1.,offset,addCoordsQuadratic,conn,connI); nb1.push_back(idThis); nb2.push_back(-1); + SoftDelete(*it1); + continue; + } + else + throw INTERP_KERNEL::Exception("Deep mismatch of edges ! Internal Error !"); + } QuadraticPolygon *ret=BuildClosedPolygonFrom(*it1,*it2,found1); ret->appendCrudeData(mapp,0.,0.,1.,offset,addCoordsQuadratic,conn,connI); nb1.push_back(idThis); nb2.push_back(-1); delete ret; -- 2.39.2