diff --git a/include/Topology/generic/genericmap.hpp b/include/Topology/generic/genericmap.hpp index 890821a579d276c1df7048c9f5356fac199a1183..cb56571b52434a4cc467b9726be51d6df7e733d0 100644 --- a/include/Topology/generic/genericmap.hpp +++ b/include/Topology/generic/genericmap.hpp @@ -397,12 +397,12 @@ inline void GenericMap::copyCell(Dart d, Dart e) assert(isOrbitEmbedded() || !"Invalid parameter: orbit not embedded"); unsigned int dE = getEmbedding(d) ; unsigned int eE = getEmbedding(e) ; -// if(eE != EMBNULL) // if the source is NULL, nothing to copy -// { -// if(dE == EMBNULL) // if the dest is NULL, create a new cell -// dE = setOrbitEmbeddingOnNewCell(d) ; + if(eE != EMBNULL) // if the source is NULL, nothing to copy + { + if(dE == EMBNULL) // if the dest is NULL, create a new cell + dE = setOrbitEmbeddingOnNewCell(d) ; m_attribs[ORBIT].copyLine(dE, eE) ; // copy the data -// } + } } template @@ -538,18 +538,9 @@ void GenericMap::addEmbedding() AttributeMultiVector* amv = dartCont.addAttribute(oss.str()) ; m_embeddings[ORBIT] = amv ; - FunctorInitEmb fsetemb(*this); - DartMarker dm(*this); - for(Dart d = this->begin(); d != this->end(); this->next(d)) - { - if(!dm.isMarked(d)) - { - dm.markOrbit(d); - unsigned int em = newCell(); - fsetemb.changeEmb(em); - foreach_dart_of_orbit(d, fsetemb); - } - } + // set new embedding to EMBNULL for all the darts of the map + for(unsigned int i = dartCont.begin(); i < dartCont.end(); dartCont.next(i)) + (*amv)[i] = EMBNULL ; } /****************************************