From: ageay Date: Wed, 8 Feb 2012 16:18:00 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: V6_main_FINAL~877 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=edbe6b3cdc2f0b08eec7f974d0a87dd3eb6afb91;p=tools%2Fmedcoupling.git *** empty log message *** --- diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx index 1fd5075f5..178a184ac 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DQuadraticPolygon.cxx @@ -320,32 +320,32 @@ void QuadraticPolygon::buildFromCrudeDataArray2(const std::map >& colinear1) { std::size_t nbOfSeg=std::distance(descBg,descEnd); - for(std::size_t i=0;i0; - int edgeId=abs(descBg[i])-1; + int edgeId=abs(descBg[i])-1;//current edge id of pol2 bool directos=colinear1[edgeId].empty(); int idIn1=-1; bool direct1;//store is needed the direction in 1 int offset1=0; if(!directos) - { + {// if the current edge of pol2 has one or more colinear edges part into pol1 const std::vector& c=colinear1[edgeId]; std::size_t nbOfEdgesIn1=std::distance(descBg1,descEnd1); for(std::size_t j=0;j0; } + { idIn1=edgeId1; direct1=descBg1[j]>0; }// it exists an edge into pol1 given by tuple (idIn1,direct1) that is colinear at edge 'edgeId' in pol2 else - offset1+=intersectEdges1[edgeId1].size()/2; + offset1+=intersectEdges1[edgeId1].size()/2;//offset1 is used to find the INTERP_KERNEL::Edge * instance into pol1 that will be part of edge into pol2 } directos=(idIn1==-1); } const std::vector& subEdge=intersectEdges[edgeId]; std::size_t nbOfSubEdges=subEdge.size()/2; if(directos) - { + {//no subpart of edge 'edgeId' of pol2 is in pol1 so let's operate the same thing that QuadraticPolygon::buildFromCrudeDataArray method for(std::size_t j=0;j& subEdge1PossiblyAlreadyIn1=intersectEdges1[idIn1]; for(std::size_t j=0;j build new Edge instance Node *start=(*mapp.find(idBg)).second; Node *end=(*mapp.find(idEnd)).second; ElementaryEdge *e=ElementaryEdge::BuildEdgeFromCrudeDataArray(isQuad,true,start,end); pushBack(e); } else - { + {//the current subedge of edge 'edgeId' of pol2 is part of the colinear edge 'idIn1' of pol1 -> reuse Edge instance of pol1 ElementaryEdge *e=pol1[offset1+(direct1?offset2:nbOfSubEdges1-offset2-1)]; Edge *ee=e->getPtr(); ee->incrRef(); ee->declareOn();