From 7b554e1f5058e69c4e8326566a9bf44884ee17d5 Mon Sep 17 00:00:00 2001 From: thysson2701 Date: Tue, 21 Jul 2026 14:54:25 +0200 Subject: [PATCH] fix(build): fix remaining ImageMap merge type conflicts - ExtrusionEntityCollection: first/last_point() must return const Point& to match the virtual signature in ExtrusionEntity base class - AppConfig: remove ImageMap-specific VERSION_CHECK_URL_LEGACY, VERSION_CHECK_MODE, VERSION_DOWNLOAD_URL constants; simplify methods to use our single Gitea URL - ExtrusionProcessor: restore dimension-bridging in maybe_unscale lambda so 2D polyline points work with the 3D (Linef3) boundary distancer used in the ZAA overhang slowdown path --- src/libslic3r/AppConfig.cpp | 13 +++---------- src/libslic3r/ExtrusionEntityCollection.hpp | 4 ++-- src/libslic3r/GCode/ExtrusionProcessor.hpp | 14 +++++++++++++- 3 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/libslic3r/AppConfig.cpp b/src/libslic3r/AppConfig.cpp index f8eafff97d3..4db522cebcd 100644 --- a/src/libslic3r/AppConfig.cpp +++ b/src/libslic3r/AppConfig.cpp @@ -1607,24 +1607,17 @@ std::string AppConfig::version_check_url() const auto from_settings = get("version_check_url"); if (!from_settings.empty()) return from_settings; - - auto mode = version_check_mode(); - boost::algorithm::to_lower(mode); - if (mode == "platform_json" || mode == "json_platform") - return VERSION_CHECK_URL; - return VERSION_CHECK_URL_LEGACY; + return VERSION_CHECK_URL; } std::string AppConfig::version_check_mode() const { - auto from_settings = get("version_check_mode"); - return from_settings.empty() ? VERSION_CHECK_MODE : from_settings; + return get("version_check_mode"); } std::string AppConfig::version_download_url() const { - auto from_settings = get("version_download_url"); - return from_settings.empty() ? VERSION_DOWNLOAD_URL : from_settings; + return get("version_download_url"); } std::string AppConfig::profile_update_url() const diff --git a/src/libslic3r/ExtrusionEntityCollection.hpp b/src/libslic3r/ExtrusionEntityCollection.hpp index 5cb3d7783ef..26a220a3e87 100644 --- a/src/libslic3r/ExtrusionEntityCollection.hpp +++ b/src/libslic3r/ExtrusionEntityCollection.hpp @@ -157,8 +157,8 @@ public: ExtrusionEntityCollection chained_path_from(const Point &start_near, ExtrusionRole role = erMixed) const { return this->no_sort ? *this : chained_path_from(this->entities, start_near, role); } void reverse() override; - Point first_point() const override { return this->entities.front()->first_point(); } - Point last_point() const override { return this->entities.back()->last_point(); } + const Point& first_point() const override { return this->entities.front()->first_point(); } + const Point& last_point() const override { return this->entities.back()->last_point(); } // Produce a list of 2D polygons covered by the extruded paths, offsetted by the extrusion width. // Increase the offset by scaled_epsilon to achieve an overlap, so a union will produce no gaps. diff --git a/src/libslic3r/GCode/ExtrusionProcessor.hpp b/src/libslic3r/GCode/ExtrusionProcessor.hpp index b282af8f4e9..4b93ee464fa 100644 --- a/src/libslic3r/GCode/ExtrusionProcessor.hpp +++ b/src/libslic3r/GCode/ExtrusionProcessor.hpp @@ -82,7 +82,19 @@ std::vector> estimate_points_properties(const POINTS& if (input_points.empty()) return {}; float boundary_offset = PREV_LAYER_BOUNDARY_OFFSET ? 0.5 * flow_width : 0.0f; - auto maybe_unscale = [](const P& p) -> Vec { return SCALED_INPUT ? unscaled(p) : p.template cast(); }; + auto maybe_unscale = [](const P& p) -> Vec { + if constexpr (P::RowsAtCompileTime == 3 && L::Dim == 2) { + // 3D input point but 2D distancer — project to XY + return SCALED_INPUT ? unscaled(p).template head<2>() : p.template head<2>().template cast(); + } else if constexpr (P::RowsAtCompileTime == 2 && L::Dim == 3) { + // 2D input point but 3D distancer — embed in XY plane (z=0) + Vec v = Vec::Zero(); + v.template head<2>() = SCALED_INPUT ? unscaled(p) : p.template cast(); + return v; + } else { + return SCALED_INPUT ? unscaled(p) : p.template cast(); + } + }; std::vector> points; points.reserve(input_points.size() * (ADD_INTERSECTIONS ? 1.5 : 1));