diff --git a/Geo/Geo.cpp b/Geo/Geo.cpp index 944db841d3c25fe6cf8a762805c783d931c227a6..e96b5896eca6423af640b41a766a318a5f422d7e 100644 --- a/Geo/Geo.cpp +++ b/Geo/Geo.cpp @@ -523,14 +523,6 @@ Curve *Create_Curve(int Num, int Typ, int Order, List_T *Liste, pC->k = NULL; if(Liste) { - if(Typ == MSH_SEGM_LINE && List_Nbr(Liste) == 2){ - int iPnt0, iPnt1; - List_Read(Liste, 0, &iPnt0); - List_Read(Liste, 1, &iPnt1); - if(iPnt0 == iPnt1) - Msg::Error("Zero-length straight line from point %d to point %d", - iPnt0, iPnt1); - } pC->Control_Points = List_Create(List_Nbr(Liste), 1, sizeof(Vertex *)); for(int j = 0; j < List_Nbr(Liste); j++) { int iPnt; diff --git a/Mesh/meshGEdge.cpp b/Mesh/meshGEdge.cpp index 78b5cc06ccc13e4d29faaee6a54498c669c7f54c..b7d9e2b34947089382ed4b33c3c660e930bbfa96 100644 --- a/Mesh/meshGEdge.cpp +++ b/Mesh/meshGEdge.cpp @@ -267,16 +267,21 @@ void meshGEdge::operator() (GEdge *ge) double t_end = bounds.high(); // first compute the length of the curve by integrating one + double length; std::vector<IntPoint> Points; - double length = Integration(ge, t_begin, t_end, F_One, Points, 1.e-8 * CTX::instance()->lc); + if(ge->geomType() == GEntity::Line && ge->getBeginVertex() == ge->getEndVertex()) + 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); ge->setLength(length); Points.clear(); - if(length == 0.0) + if(length == 0. && CTX::instance()->mesh.toleranceEdgeLength == 0.) + Msg::Error("Curve %d has a zero length", ge->tag()); + else Msg::Debug("Curve %d has a zero length", ge->tag()); - // TEST - if (length < CTX::instance()->mesh.toleranceEdgeLength) ge->setTooSmall(true); + if(length < CTX::instance()->mesh.toleranceEdgeLength) ge->setTooSmall(true); // Integrate detJ/lc du double a; diff --git a/benchmarks/stl/artery_GEO.geo b/benchmarks/stl/artery_GEO.geo new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/doc/VERSIONS.txt b/doc/VERSIONS.txt index 315f9010552a20a70fe3447a02b655bf2fe2177e..e5a5f39ebb687809a63c0b28b4ece852e971d3d6 100644 --- a/doc/VERSIONS.txt +++ b/doc/VERSIONS.txt @@ -1,6 +1,8 @@ -2.4.3 (?): new client/server visualization mode; new option to force -the type of views dynamically; small bug fixes and usability -improvements. +2.5.0 (?): new client/server visualization mode; new compound +geometrical entities (useful for remeshing); new option to force the +type of views dynamically; bumped mesh version format to 2.2 (change +in the meaning of the partion tags; this only affect partioned +meshes); small bug fixes and usability improvements. 2.4.2 (Sep 21, 2009): solver code refactoring + better IDE integration.