Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortamasmeszaros <meszaros.q@gmail.com>2021-05-26 17:41:34 +0300
committertamasmeszaros <meszaros.q@gmail.com>2021-06-08 11:28:23 +0300
commite6f97358bc4b4d1ace8af6d26ff05c88503f1231 (patch)
tree065c452a9741a96e44be78f3dd49fe5f5d11155c /tests/libslic3r
parentf12187b53dea73bb60e045c91c1e73e7a4af2ef7 (diff)
Refactored hollowing backend to use indexed_triangle_mesh
Diffstat (limited to 'tests/libslic3r')
-rw-r--r--tests/libslic3r/test_hollowing.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/libslic3r/test_hollowing.cpp b/tests/libslic3r/test_hollowing.cpp
index 1f5ca3845..5662d8b0d 100644
--- a/tests/libslic3r/test_hollowing.cpp
+++ b/tests/libslic3r/test_hollowing.cpp
@@ -20,3 +20,23 @@ TEST_CASE("Hollow two overlapping spheres") {
sphere1.WriteOBJFile("twospheres.obj");
}
+TEST_CASE("Split its") {
+ using namespace Slic3r;
+
+ TriangleMesh sphere1 = make_sphere(10., 2 * PI / 20.), sphere2 = sphere1;
+
+ sphere1.translate(-5.f, 0.f, 0.f);
+ sphere2.translate( 5.f, 0.f, 0.f);
+
+ sphere1.merge(sphere2);
+ sphere1.require_shared_vertices();
+
+ std::vector<indexed_triangle_set> parts;
+ its_split(sphere1.its, std::back_inserter(parts));
+
+ size_t part_idx = 0;
+ for (auto &part_its : parts) {
+ its_write_obj(part_its, (std::string("part_its") + std::to_string(part_idx++) + ".obj").c_str());
+ }
+}
+