diff --git a/Geo/gmshEdge.cpp b/Geo/gmshEdge.cpp index 40aadcadc2ebb2121cdf8eb0f17b8c9b403d8eee..0921b05828b5b59161a705f5ee71c90d66b4cc6a 100644 --- a/Geo/gmshEdge.cpp +++ b/Geo/gmshEdge.cpp @@ -22,7 +22,9 @@ gmshEdge::gmshEdge(GModel *m, Curve *edge, GVertex *v1, GVertex *v2) bool gmshEdge::degenerate(int dim) const { - if (c->beg == c->end && c->Typ == MSH_SEGM_LINE){ + if (c->beg == c->end && + c->Typ == MSH_SEGM_LINE && + List_Nbr(c->Control_Points) == 0){ Msg::Info("Model Edge %d is degenerate", tag()); return true; } diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index 7e11458416a9d5019c8c2d1082e829b2e7ff3cbe..a4ff90627599e4ddf1706ddb01381117d9c188d1 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -371,7 +371,10 @@ void meshGEdge::operator() (GEdge *ge) // first compute the length of the curve by integrating one double length; std::vector<IntPoint> Points; - if(ge->geomType() == GEntity::Line && ge->getBeginVertex() == ge->getEndVertex()) + if(ge->geomType() == GEntity::Line && + ge->getBeginVertex() == ge->getEndVertex() && + //do not consider closed lines as degenerated + (ge->position(0.5) - ge->getBeginVertex()->xyz()).norm() < CTX::instance()->geom.tolerance) length = 0.; // special case t avoid infinite loop in integration else length = Integration(ge, t_begin, t_end, F_One, Points, 1.e-8 * CTX::instance()->lc);