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
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -82,7 +82,19 @@ std::vector<ExtendedPoint<L::Dim>> 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<double>(); };
|
||||
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<double>();
|
||||
} 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<double>();
|
||||
return v;
|
||||
} else {
|
||||
return SCALED_INPUT ? unscaled(p) : p.template cast<double>();
|
||||
}
|
||||
};
|
||||
|
||||
std::vector<ExtendedPoint<L::Dim>> points;
|
||||
points.reserve(input_points.size() * (ADD_INTERSECTIONS ? 1.5 : 1));
|
||||
|
||||
Reference in New Issue
Block a user