Fixed full statistics calculation

(calculate sum of volume and part_count only for solid parts)
This commit is contained in:
YuSanka 2019-05-03 13:09:42 +02:00
parent d2107fad2f
commit 4be4dc623c
4 changed files with 19 additions and 15 deletions
src/libslic3r

View file

@ -1467,17 +1467,18 @@ stl_stats ModelObject::get_object_stl_stats() const
const stl_stats& stats = volume->mesh.stl.stats;
// initialize full_stats (for repaired errors)
full_stats.degenerate_facets+= stats.degenerate_facets;
full_stats.edges_fixed += stats.edges_fixed;
full_stats.facets_removed += stats.facets_removed;
full_stats.facets_added += stats.facets_added;
full_stats.facets_reversed += stats.facets_reversed;
full_stats.backwards_edges += stats.backwards_edges;
full_stats.degenerate_facets += stats.degenerate_facets;
full_stats.edges_fixed += stats.edges_fixed;
full_stats.facets_removed += stats.facets_removed;
full_stats.facets_added += stats.facets_added;
full_stats.facets_reversed += stats.facets_reversed;
full_stats.backwards_edges += stats.backwards_edges;
// another used satistics value
if (volume->is_model_part())
full_stats.volume += stats.volume;
full_stats.number_of_parts += stats.number_of_parts;
if (volume->is_model_part()) {
full_stats.volume += stats.volume;
full_stats.number_of_parts += stats.number_of_parts;
}
}
return full_stats;