X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FINTERP_KERNEL%2FGeometric2D%2FInterpKernelGeo2DNode.cxx;h=47ec4e8887dd0ac856753f9b21285046fb081480;hb=aafcf704892f03308a84407e898d9e8b19496a1c;hp=76d4efeac3e8cda6ab3d83cde86178282f31e8e7;hpb=9a3f48daeedcc6e06bcc731f1c885d07cb15a1be;p=tools%2Fmedcoupling.git diff --git a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx index 76d4efeac..47ec4e888 100644 --- a/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx +++ b/src/INTERP_KERNEL/Geometric2D/InterpKernelGeo2DNode.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2016 CEA/DEN, EDF R&D +// Copyright (C) 2007-2022 CEA/DEN, EDF R&D // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -148,19 +148,19 @@ void Node::unApplySimilarity(double xBary, double yBary, double dimChar) /*! * Called by QuadraticPolygon::splitAbs method. */ -void Node::fillGlobalInfoAbs(const std::map& mapThis, const std::map& mapOther, int offset1, int offset2, double fact, double baryX, double baryY, - std::vector& addCoo, std::map& mapAddCoo, int *nodeId) const +void Node::fillGlobalInfoAbs(const std::map& mapThis, const std::map& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY, + std::vector& addCoo, std::map& mapAddCoo, mcIdType *nodeId) const { - std::map::const_iterator it=mapThis.find(const_cast(this)); - if(it!=mapThis.end()) + std::map::const_iterator it=mapOther.find(const_cast(this)); + if(it!=mapOther.end()) // order matters, try in mapOther first. { - *nodeId=(*it).second; + *nodeId=(*it).second+offset1; return; } - it=mapOther.find(const_cast(this)); - if(it!=mapOther.end()) + it=mapThis.find(const_cast(this)); + if(it!=mapThis.end()) { - *nodeId=(*it).second+offset1; + *nodeId=(*it).second; return; } it=mapAddCoo.find(const_cast(this)); @@ -179,22 +179,21 @@ void Node::fillGlobalInfoAbs(const std::map& mapThis, /*! * Called by QuadraticPolygon::splitAbs method. */ -void Node::fillGlobalInfoAbs2(const std::map& mapThis, const std::map& mapOther, int offset1, int offset2, double fact, double baryX, double baryY, - std::vector& addCoo, std::map& mapAddCoo, std::vector& pointsOther) const +void Node::fillGlobalInfoAbs2(const std::map& mapThis, const std::map& mapOther, mcIdType offset1, mcIdType offset2, double fact, double baryX, double baryY, + std::vector& addCoo, std::map& mapAddCoo, std::vector& pointsOther) const { - int tmp; + mcIdType tmp; std::size_t sz1=addCoo.size(); fillGlobalInfoAbs(mapThis,mapOther,offset1,offset2,fact,baryX,baryY,addCoo,mapAddCoo,&tmp); - if(sz1!=addCoo.size() - || (tmp >= offset2 + if(sz1!=addCoo.size() // newly created point + || (tmp >= offset2 // or previously created point merged with a neighbour && (pointsOther.size() == 0 || pointsOther.back() != tmp))) { pointsOther.push_back(tmp); return ; } - std::vector::const_iterator it=std::find(pointsOther.begin(),pointsOther.end(),tmp); + std::vector::const_iterator it=std::find(pointsOther.begin(),pointsOther.end(),tmp); if(it!=pointsOther.end()) return ; - if(tmp