2019-10-29 15:27:53 +00:00
|
|
|
#include <iostream>
|
2019-10-31 13:36:33 +00:00
|
|
|
#include <fstream>
|
|
|
|
#include <catch2/catch.hpp>
|
2019-10-29 15:27:53 +00:00
|
|
|
|
2019-11-08 08:21:30 +00:00
|
|
|
#include "libslic3r/SLA/Hollowing.hpp"
|
2020-01-23 09:57:51 +00:00
|
|
|
|
2020-12-17 15:38:04 +00:00
|
|
|
TEST_CASE("Hollow two overlapping spheres") {
|
|
|
|
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();
|
|
|
|
|
|
|
|
sla::hollow_mesh(sphere1, sla::HollowingConfig{}, sla::HollowingFlags::hfRemoveInsideTriangles);
|
|
|
|
|
|
|
|
sphere1.WriteOBJFile("twospheres.obj");
|
2019-11-05 13:48:00 +00:00
|
|
|
}
|
2020-01-23 09:57:51 +00:00
|
|
|
|