From 745a41bcdef712064f41ce6579e56a5fab47239e Mon Sep 17 00:00:00 2001 From: Emilie Marchandise <emilie.marchandise@uclouvain.be> Date: Thu, 10 Jun 2010 10:13:50 +0000 Subject: [PATCH] --- Geo/GEdgeLoop.cpp | 4 +++- Geo/GModel.cpp | 12 ++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/Geo/GEdgeLoop.cpp b/Geo/GEdgeLoop.cpp index c29b288a8b..7025cf611d 100644 --- a/Geo/GEdgeLoop.cpp +++ b/Geo/GEdgeLoop.cpp @@ -61,6 +61,7 @@ GEdgeSigned nextOne(GEdgeSigned *thisOne, std::list<GEdge*> &wire) if(v1 == gv) return GEdgeSigned(1, ge); if(v2 == gv) return GEdgeSigned(-1, ge); Msg::Error("Something wrong in edge loop"); + thisOne->print(); } ++it; } @@ -77,6 +78,7 @@ GEdgeSigned nextOne(GEdgeSigned *thisOne, std::list<GEdge*> &wire) if(v1 == gv) return GEdgeSigned(1, ge); if(v2 == gv) return GEdgeSigned(-1, ge); Msg::Error("Something wrong in edge loop"); + thisOne->print(); } ++it; } @@ -107,7 +109,7 @@ GEdgeLoop::GEdgeLoop(const std::list<GEdge*> &cwire) while(wire.size()){ ges = nextOne(prevOne, wire); if(ges.getSign() == 0){ // oops - Msg::Error("Something wrong in edge loop"); + Msg::Error("Something wrong in edge loop, no sign !"); break; } prevOne = ⩾ diff --git a/Geo/GModel.cpp b/Geo/GModel.cpp index bc96d1eab2..45bff1cc86 100644 --- a/Geo/GModel.cpp +++ b/Geo/GModel.cpp @@ -28,6 +28,7 @@ #include "SmoothData.h" #include "Context.h" #include "OS.h" +#include "GEdgeLoop.h" #include "OpenFile.h" #include "CreateFile.h" @@ -1495,6 +1496,17 @@ void GModel::createTopologyFromFaces(std::vector<discreteFace*> &discFaces) (*it)->parametrize(face2Vert, region2Vert); } + //fill edgeLoops of Faces or correct sign of l_edges + // for (std::vector<discreteFace*>::iterator itF = discFaces.begin(); + // itF != discFaces.end(); itF++){ + // //EMI, TODO + // std::list<GEdgeLoop> edgeLoops = (*itF)->edgeLoops; + // edgeLoops.clear(); + // GEdgeLoop el((*itF)->edges()); + // edgeLoops.push_back(el); + // } + + //we need to recreate lines, triangles and tets //that contain those new MEdgeVertices for (std::map<GFace*, std::map<MVertex*, MVertex*, std::less<MVertex*> > >::iterator -- GitLab