diff options
author | Vojtech Bubnik <bubnikv@gmail.com> | 2021-09-20 18:12:22 +0300 |
---|---|---|
committer | Vojtech Bubnik <bubnikv@gmail.com> | 2021-09-20 18:12:22 +0300 |
commit | 8a2a9dba2f8f94da0106b60df613cd04ada4d595 (patch) | |
tree | 6997d6e42ad455cfcca787a514245a4fbfe0eee7 /tests/libslic3r | |
parent | f484953a5a1fecd878242ca8d2f5175151b81678 (diff) |
Eradicated admesh from TriangleMesh:
TriangleMesh newly only holds indexed_triangle_set and
TriangleMeshStats. TriangleMeshStats contains an excerpt of stl_stats.
TriangleMeshStats are updated when initializing with indexed_triangle_set.
Admesh triangle mesh fixing is newly only used when loading an STL.
AMF / 3MF / OBJ file formats are already indexed triangle sets, thus
they are no more converted to admesh stl_file format, nor fixed
through admesh repair machinery. When importing AMF / 3MF / OBJ files,
volume is calculated and if negative, all faces are flipped. Also
a bounding box and number of open edges is calculated.
Implemented its_number_of_patches(), its_num_open_edges()
Optimized its_split(), its_is_splittable() using a visitor pattern.
Reworked QHull integration into TriangleMesh:
1) Face normals were not right.
2) Indexed triangle set is newly emitted instead of duplicating
vertices for each face.
Fixed cut_mesh(): Orient the triangulated faces correctly.
Diffstat (limited to 'tests/libslic3r')
-rw-r--r-- | tests/libslic3r/test_3mf.cpp | 3 | ||||
-rw-r--r-- | tests/libslic3r/test_aabbindirect.cpp | 1 | ||||
-rw-r--r-- | tests/libslic3r/test_hollowing.cpp | 1 | ||||
-rw-r--r-- | tests/libslic3r/test_marchingsquares.cpp | 1 |
4 files changed, 0 insertions, 6 deletions
diff --git a/tests/libslic3r/test_3mf.cpp b/tests/libslic3r/test_3mf.cpp index 5ab000d04..0ebe47a07 100644 --- a/tests/libslic3r/test_3mf.cpp +++ b/tests/libslic3r/test_3mf.cpp @@ -65,10 +65,7 @@ SCENARIO("Export+Import geometry to/from 3mf file cycle", "[3mf]") { // compare meshes TriangleMesh src_mesh = src_model.mesh(); - src_mesh.repair(); - TriangleMesh dst_mesh = dst_model.mesh(); - dst_mesh.repair(); bool res = src_mesh.its.vertices.size() == dst_mesh.its.vertices.size(); if (res) { diff --git a/tests/libslic3r/test_aabbindirect.cpp b/tests/libslic3r/test_aabbindirect.cpp index c0792a943..3b834c442 100644 --- a/tests/libslic3r/test_aabbindirect.cpp +++ b/tests/libslic3r/test_aabbindirect.cpp @@ -9,7 +9,6 @@ using namespace Slic3r; TEST_CASE("Building a tree over a box, ray caster and closest query", "[AABBIndirect]") { TriangleMesh tmesh = make_cube(1., 1., 1.); - tmesh.repair(); auto tree = AABBTreeIndirect::build_aabb_tree_over_indexed_triangle_set(tmesh.its.vertices, tmesh.its.indices); REQUIRE(! tree.empty()); diff --git a/tests/libslic3r/test_hollowing.cpp b/tests/libslic3r/test_hollowing.cpp index 1f5ca3845..ad4f8f296 100644 --- a/tests/libslic3r/test_hollowing.cpp +++ b/tests/libslic3r/test_hollowing.cpp @@ -13,7 +13,6 @@ TEST_CASE("Hollow two overlapping spheres") { sphere2.translate( 5.f, 0.f, 0.f); sphere1.merge(sphere2); - sphere1.require_shared_vertices(); sla::hollow_mesh(sphere1, sla::HollowingConfig{}, sla::HollowingFlags::hfRemoveInsideTriangles); diff --git a/tests/libslic3r/test_marchingsquares.cpp b/tests/libslic3r/test_marchingsquares.cpp index a0b27f6d8..3553697ac 100644 --- a/tests/libslic3r/test_marchingsquares.cpp +++ b/tests/libslic3r/test_marchingsquares.cpp @@ -319,7 +319,6 @@ static void recreate_object_from_rasters(const std::string &objname, float lh) { mesh.translate(tr.x(), tr.y(), tr.z()); bb = mesh.bounding_box(); - assert(mesh.has_shared_vertices()); std::vector<ExPolygons> layers = slice_mesh_ex(mesh.its, grid(float(bb.min.z()) + lh, float(bb.max.z()), lh)); sla::RasterBase::Resolution res{2560, 1440}; |