diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2019-11-08 11:21:30 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2019-11-08 11:21:30 +0300 |
commit | 4b088658096ad38937795a9153ffd8406ce827a3 (patch) | |
tree | 4362aa549ce2a3a3e618c3cb5da2de6b040073c9 /tests | |
parent | bc3d22348aa6ee03c86aeab93dbdd1d2da7694b9 (diff) |
hollowing params renamed, filtering generalized
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libslic3r/test_hollowing.cpp | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/tests/libslic3r/test_hollowing.cpp b/tests/libslic3r/test_hollowing.cpp index 9a2ea2e72..4264774a3 100644 --- a/tests/libslic3r/test_hollowing.cpp +++ b/tests/libslic3r/test_hollowing.cpp @@ -2,7 +2,7 @@ #include <fstream> #include <catch2/catch.hpp> -#include "libslic3r/OpenVDBUtils.hpp" +#include "libslic3r/SLA/Hollowing.hpp" #include <openvdb/tools/Filter.h> #include "libslic3r/Format/OBJ.hpp" @@ -22,38 +22,13 @@ static Slic3r::TriangleMesh load_model(const std::string &obj_filename) return mesh; } -//static Slic3r::TriangleMesh hollowed_interior(const Slic3r::TriangleMesh &mesh, -// double min_thickness) -//{ -// Slic3r::sla::Contour3D imesh = Slic3r::sla::Contour3D{mesh}; - -// double scale = std::max(1.0, 3. / min_thickness); -// double offset = scale * min_thickness; -// float range = float(std::max(2 * offset, scale)); - -// for (auto &p : imesh.points) p *= scale; -// auto ptr = Slic3r::meshToVolume(imesh, {}, 0.1f * float(offset), range); - -// REQUIRE(ptr); - -// openvdb::tools::Filter<openvdb::FloatGrid>{*ptr}.gaussian(int(scale), 1); - -// double iso_surface = -offset; -// double adaptivity = 0.; -// Slic3r::sla::Contour3D omesh = Slic3r::volumeToMesh(*ptr, iso_surface, adaptivity); - -// for (auto &p : omesh.points) p /= scale; - -// return to_triangle_mesh(omesh); -//} - TEST_CASE("Negative 3D offset should produce smaller object.", "[Hollowing]") { Slic3r::TriangleMesh in_mesh = load_model("20mm_cube.obj"); Benchmark bench; bench.start(); - Slic3r::TriangleMesh out_mesh = hollowed_interior(in_mesh, 0.5); + Slic3r::TriangleMesh out_mesh = Slic3r::sla::generate_interior(in_mesh, 0.5); bench.stop(); |