ENABLE_ADAPTIVE_LAYER_HEIGHT_PROFILE -> Smoothing algorithm modified to give more weight close to height limits

This commit is contained in:
Enrico Turri 2019-11-19 14:58:27 +01:00
parent 64830ac827
commit 79d516ca7f
2 changed files with 20 additions and 11 deletions

View file

@ -37,6 +37,10 @@ void SlicingAdaptive::prepare()
m_mesh = m_object->raw_mesh();
const ModelInstance* first_instance = m_object->instances.front();
m_mesh.transform(first_instance->get_matrix(), first_instance->is_left_handed());
for (stl_facet& facet : m_mesh.stl.facet_start)
{
facet.normal.normalize();
}
// 1) Collect faces from mesh.
m_faces.reserve(m_mesh.stl.stats.number_of_facets);