From 61d2951f1145d2bc8aab5cc0566de59004c6265d Mon Sep 17 00:00:00 2001 From: Pierre Kraemer Date: Thu, 18 Oct 2012 11:40:05 +0200 Subject: [PATCH] =?UTF-8?q?creation=20des=20nouvelles=20cellules=20pour=20?= =?UTF-8?q?les=20operateurs=20de=20EmbeddedMap3=20qui=20cr=C3=A9ent=20des?= =?UTF-8?q?=20nouvelles=20orbites?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/Topology/generic/attributeHandler.hpp | 8 +-- include/Topology/map/embeddedMap2.h | 11 ----- src/Topology/map/embeddedMap2.cpp | 49 ------------------- src/Topology/map/embeddedMap3.cpp | 12 ++++- 4 files changed, 15 insertions(+), 65 deletions(-) diff --git a/include/Topology/generic/attributeHandler.hpp b/include/Topology/generic/attributeHandler.hpp index ffe725ed2..68decd279 100644 --- a/include/Topology/generic/attributeHandler.hpp +++ b/include/Topology/generic/attributeHandler.hpp @@ -136,10 +136,10 @@ inline T& AttributeHandler::operator[](Dart d) { assert(valid || !"Invalid AttributeHandler") ; unsigned int a = m_map->getEmbedding(d) ; -/* - if (a == EMBNULL) - a = m_map->setOrbitEmbeddingOnNewCell(d) ; -*/ + +// if (a == EMBNULL) +// a = m_map->setOrbitEmbeddingOnNewCell(d) ; + return m_attrib->operator[](a) ; } diff --git a/include/Topology/map/embeddedMap2.h b/include/Topology/map/embeddedMap2.h index a9b3d21c2..3524e18b4 100644 --- a/include/Topology/map/embeddedMap2.h +++ b/include/Topology/map/embeddedMap2.h @@ -87,17 +87,6 @@ public: * */ virtual void swapEdges(Dart d, Dart e); -// /** -// * The attributes attached to the vertex of dart d are kept on the resulting vertex -// * The attributes attached to the face of dart d are overwritten on the face of dart e -// */ -// virtual void insertEdgeInVertex(Dart d, Dart e); -// -// /** -// * The attributes attached to the vertex of dart d are kept on the resulting vertex -// * The attributes attached to the face of dart d are overwritten on the face of dart e -// */ -// virtual void removeEdgeFromVertex(Dart d); /** * The attributes attached to the vertices of the edge of d are kept on the vertices of the resulting edge diff --git a/src/Topology/map/embeddedMap2.cpp b/src/Topology/map/embeddedMap2.cpp index 1ea862d8b..3ecab981a 100644 --- a/src/Topology/map/embeddedMap2.cpp +++ b/src/Topology/map/embeddedMap2.cpp @@ -244,55 +244,6 @@ void EmbeddedMap2::swapEdges(Dart d, Dart e) setOrbitEmbeddingOnNewCell(d); } -//void EmbeddedMap2::insertEdgeInVertex(Dart d, Dart e) -//{ -// Map2::insertEdgeInVertex(d, e); -// -// if (isOrbitEmbedded()) -// { -// copyDartEmbedding(e, d) ; -// } -// -// if (isOrbitEmbedded()) -// { -// if(!sameFace(d,e)) -// { -// setOrbitEmbeddingOnNewCell(e); -// copyCell(e, d) ; -// } -// else -// { -// setOrbitEmbedding(d, getEmbedding(d)) ; -// } -// } -//} -// -//void EmbeddedMap2::removeEdgeFromVertex(Dart d) -//{ -// Dart dPrev = alpha_1(d); -// -// Map2::removeEdgeFromVertex(d); -// -// if (isOrbitEmbedded()) -// { -// setOrbitEmbeddingOnNewCell(d); -// copyCell(d, dPrev); -// } -// -// if (isOrbitEmbedded()) -// { -// if(!sameFace(d, dPrev)) -// { -// setOrbitEmbeddingOnNewCell(d); -// copyCell(d, dPrev) ; -// } -// else -// { -// setOrbitEmbedding(d, getEmbedding(d)) ; -// } -// } -//} - void EmbeddedMap2::sewFaces(Dart d, Dart e, bool withBoundary) { if (!withBoundary) diff --git a/src/Topology/map/embeddedMap3.cpp b/src/Topology/map/embeddedMap3.cpp index f4f8d45b7..26538092c 100644 --- a/src/Topology/map/embeddedMap3.cpp +++ b/src/Topology/map/embeddedMap3.cpp @@ -45,7 +45,7 @@ Dart EmbeddedMap3::splitVertex(std::vector& vd) if(isOrbitEmbedded()) { - + initOrbitEmbeddingNewCell(dres) ; // TODO : check if dres is a dart of the new edge } if(isOrbitEmbedded()) @@ -76,6 +76,11 @@ Dart EmbeddedMap3::cutEdge(Dart d) { Dart nd = Map3::cutEdge(d); + if(isOrbitEmbedded()) + { + initOrbitEmbeddingNewCell(nd) ; + } + if(isOrbitEmbedded()) { // embed the new darts created in the cut edge @@ -255,6 +260,11 @@ void EmbeddedMap3::splitFace(Dart d, Dart e) setDartEmbedding(phi_1(dd), vEmb2); } + if(isOrbitEmbedded()) + { + initOrbitEmbeddingNewCell(phi_1(d)) ; + } + if(isOrbitEmbedded()) { copyDartEmbedding(phi_1(d), d) ; -- GitLab