diff --git a/src/lib/isosurface_inflator/CGALClippedVolumeMesher.cc b/src/lib/isosurface_inflator/CGALClippedVolumeMesher.cc index 59cad6e..80379b8 100644 --- a/src/lib/isosurface_inflator/CGALClippedVolumeMesher.cc +++ b/src/lib/isosurface_inflator/CGALClippedVolumeMesher.cc @@ -156,7 +156,8 @@ mesh(const SignedDistanceRegion<3> &sdf, // Mesh generation // std::cout << "Making mesh..." << std::endl; BENCHMARK_START_TIMER("make_mesh_3"); - C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, CGAL::parameters::features(domain), + CGAL::parameters::odt(), CGAL::parameters::perturb(0, 20), CGAL::parameters::exude(0, 20)); // CGAL sometimes returns an empty mesh for some patterns due to // insufficient initialization: // https://github.com/CGAL/cgal/issues/2416 diff --git a/src/lib/isosurface_inflator/ConvexHullTriangulation.cc b/src/lib/isosurface_inflator/ConvexHullTriangulation.cc index b2b2fd5..5798328 100644 --- a/src/lib/isosurface_inflator/ConvexHullTriangulation.cc +++ b/src/lib/isosurface_inflator/ConvexHullTriangulation.cc @@ -44,7 +44,7 @@ void convexHullFromTriangulation(const PointCollection &points, for (size_t i = 0; 3 * i < indexBuffer.size(); ++i) { hullElements[i].resize(3); for (size_t lv = 0; lv < 3; ++lv) { - hullElements[i][lv] = newVertexId[indexBuffer[i * lv + lv]]; + hullElements[i][lv] = newVertexId[indexBuffer[i * 3 + lv]]; } } } diff --git a/src/lib/isosurface_inflator/PostProcess.cc b/src/lib/isosurface_inflator/PostProcess.cc index 20e5baa..189ce1d 100644 --- a/src/lib/isosurface_inflator/PostProcess.cc +++ b/src/lib/isosurface_inflator/PostProcess.cc @@ -125,7 +125,8 @@ void postProcess(vector &vertices, << "WARNING: smartSnap3D failed--probably nonsmooth geometry at cell interface. Resorting to dumbSnap3D." << std::endl; std::cerr << "(" << e.what() << ")" << std::endl; - dumbSnap3D(vertices, meshCell, opts.facetDistance); + // dumbSnap3D(vertices, meshCell, opts.facetDistance); + dumbSnap3D(vertices, meshCell, 2 * opts.domainErrorBound); } BBox snappedBB(vertices); if (N == 2) {