Removed the PRUS format parser. WIP: admesh eradication:
stl_stats are newly only accessed by TriangleMesh::stats(), most of the direct access to TriangleMesh::stl is gone with the exception of parsing input files (3MF, AMF, obj).
This commit is contained in:
parent
1c6ecd9c1a
commit
58d8ab3dea
22 changed files with 149 additions and 159 deletions
|
@ -39,23 +39,6 @@ LayerPtrs new_layers(
|
|||
return out;
|
||||
}
|
||||
|
||||
//FIXME The admesh repair function may break the face connectivity, rather refresh it here as the slicing code relies on it.
|
||||
// This function will go away once we get rid of admesh from ModelVolume.
|
||||
static indexed_triangle_set get_mesh_its_fix_mesh_connectivity(TriangleMesh mesh)
|
||||
{
|
||||
assert(mesh.repaired && mesh.has_shared_vertices());
|
||||
if (mesh.stl.stats.number_of_facets > 0) {
|
||||
assert(mesh.repaired && mesh.has_shared_vertices());
|
||||
auto nr_degenerated = mesh.stl.stats.degenerate_facets;
|
||||
stl_check_facets_exact(&mesh.stl);
|
||||
if (nr_degenerated != mesh.stl.stats.degenerate_facets)
|
||||
// stl_check_facets_exact() removed some newly degenerated faces. Some faces could become degenerate after some mesh transformation.
|
||||
stl_generate_shared_vertices(&mesh.stl, mesh.its);
|
||||
} else
|
||||
mesh.its.clear();
|
||||
return std::move(mesh.its);
|
||||
}
|
||||
|
||||
// Slice single triangle mesh.
|
||||
static std::vector<ExPolygons> slice_volume(
|
||||
const ModelVolume &volume,
|
||||
|
@ -65,7 +48,7 @@ static std::vector<ExPolygons> slice_volume(
|
|||
{
|
||||
std::vector<ExPolygons> layers;
|
||||
if (! zs.empty()) {
|
||||
indexed_triangle_set its = get_mesh_its_fix_mesh_connectivity(volume.mesh());
|
||||
indexed_triangle_set its = volume.mesh().its;
|
||||
if (its.indices.size() > 0) {
|
||||
MeshSlicingParamsEx params2 { params };
|
||||
params2.trafo = params2.trafo * volume.get_matrix();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue