diff --git a/src/libslic3r/TreeModelVolumes.hpp b/src/libslic3r/TreeModelVolumes.hpp index 18765be58..efcdc54ae 100644 --- a/src/libslic3r/TreeModelVolumes.hpp +++ b/src/libslic3r/TreeModelVolumes.hpp @@ -575,12 +575,14 @@ private: switch (type) { case AvoidanceType::Fast: return m_avoidance_cache_to_model; case AvoidanceType::Slow: return m_avoidance_cache_to_model_slow; + case AvoidanceType::Count: assert(false); case AvoidanceType::FastSafe: return m_avoidance_cache_holefree_to_model; } } else { switch (type) { case AvoidanceType::Fast: return m_avoidance_cache; case AvoidanceType::Slow: return m_avoidance_cache_slow; + case AvoidanceType::Count: assert(false); case AvoidanceType::FastSafe: return m_avoidance_cache_holefree; } } diff --git a/src/libslic3r/TreeSupport.cpp b/src/libslic3r/TreeSupport.cpp index 0bcab9318..c91824c66 100644 --- a/src/libslic3r/TreeSupport.cpp +++ b/src/libslic3r/TreeSupport.cpp @@ -186,7 +186,9 @@ static std::vector &overhangs, const TreeSupport::TreeSupportSettings &config, const std::vector &object_ids, TreeModelVolumes &volumes) +[[nodiscard]] static LayerIndex precalculate(const Print &print, const std::vector &overhangs, const TreeSupport::TreeSupportSettings &config, const std::vector &object_ids, TreeModelVolumes &volumes) { // calculate top most layer that is relevant for support LayerIndex max_layer = 0; @@ -2450,7 +2452,7 @@ void TreeSupport::generateBranchAreas( else { // try a fuzzy inside as sometimes the point should be on the border, but is not because of rounding errors... Point from = elem->result_on_layer; - Polygons &to = to_polygons(std::move(part)); + Polygons to = to_polygons(std::move(part)); moveInside(to, from, 0); if ((elem->result_on_layer - from).cast().norm() < scaled(0.025)) polygons_with_correct_center = union_(polygons_with_correct_center, to);