diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bb204aa..653128ee 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,11 +1,13 @@ # Changelog +## [0.1.2] - 2022-09-13 +### Improved +- Bad triangles handling ## [0.1.1] - 2022-09-02 ### Fixed - Bad triangles at surface edges - Polygons close to the boundary are defined as 'out of bounds' - ## [0.1.0] - 2022-08-14 First release diff --git a/src/io.cpp b/src/io.cpp index d4786b3d..61102e92 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -376,12 +376,12 @@ bool IO::is_degen(const Mesh& mesh, Mesh::Face_index face) { pts.push_back(mesh.point(index)); } //-- Precondition - check that the points are not the same - if (CGAL::squared_distance(pts[0], pts[1]) < 1e-3 || - CGAL::squared_distance(pts[0], pts[2]) < 1e-3 || - CGAL::squared_distance(pts[1], pts[2]) < 1e-3) { + if (CGAL::squared_distance(pts[0], pts[1]) < 1e-6 || + CGAL::squared_distance(pts[0], pts[2]) < 1e-6 || + CGAL::squared_distance(pts[1], pts[2]) < 1e-6) { return true; } - if (sin(CGAL::approximate_angle(pts[0], pts[1], pts[2]) * M_PI / 180) < 0.00174) { + if (sin(CGAL::approximate_angle(pts[0], pts[1], pts[2]) * M_PI / 180) < 0.000174) { return true; } return false; diff --git a/src/main.cpp b/src/main.cpp index 339ccc72..306e1024 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -29,7 +29,7 @@ #include "io.h" #include "Map3d.h" -std::string CITY4CFD_VERSION = "0.1.1"; +std::string CITY4CFD_VERSION = "0.1.2"; void printWelcome() { auto logo{