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:
Vojtech Bubnik 2021-09-14 11:58:07 +02:00
parent 1c6ecd9c1a
commit 58d8ab3dea
22 changed files with 149 additions and 159 deletions

View file

@ -288,9 +288,12 @@ void GLGizmoFdmSupports::select_facets_by_angle(float threshold_deg, bool block)
// Now calculate dot product of vert_direction and facets' normals.
int idx = -1;
for (const stl_facet &facet : mv->mesh().stl.facet_start) {
++idx;
if (facet.normal.dot(down) > dot_limit) {
const indexed_triangle_set &its = mv->mesh().its;
for (stl_triangle_vertex_indices face : its.indices) {
stl_vertex vertex[3] = { its.vertices[face[0]], its.vertices[face[1]], its.vertices[face[2]] };
stl_vertex n = (vertex[2] - vertex[1]).cross(vertex[3] - vertex[2]).normalized();
++ idx;
if (n.dot(down) > dot_limit) {
m_triangle_selectors[mesh_id]->set_facet(idx, block ? EnforcerBlockerType::BLOCKER : EnforcerBlockerType::ENFORCER);
m_triangle_selectors.back()->request_update_render_data();
}