From 7fc615ed2e044b7bd68d24af1e62bd92a79161be Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 10 Oct 2025 08:54:57 +0200 Subject: [PATCH 1/2] Adhere to max resolution setting rather than absolute minimum. We don't have to do the whole simplify thing here, since all points will be on a single line anyway -- maybe this is too big (I'd argue not, since this _is_ what the user asked for, though maybe you could say 'inter'line isn't the same), but _just_ using the 'any points within 5 micron are the same' rule here is not even close to enough to prevent zits. done as part of CURA-12774 -- plz test carefully, this might change a bunch of things --- src/LayerPlan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index dcaff54d00..a082c6d86a 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -925,7 +925,7 @@ void LayerPlan::addWallLine( double distance_to_bridge_start, const bool travel_to_z) { - constexpr coord_t min_line_len = 5; // we ignore lines less than 5um long + const coord_t min_line_len = settings.get("meshfix_maximum_resolution"); // all points will be on the line anyway, so there is no deviation to take into account constexpr double acceleration_segment_len = MM2INT(1); // accelerate using segments of this length constexpr double acceleration_factor = 0.75; // must be < 1, the larger the value, the slower the acceleration constexpr bool spiralize = false; From 35be5d97e5ab2345ca5f4c754d3204f8a8d5e74a Mon Sep 17 00:00:00 2001 From: Remco Burema Date: Fri, 10 Oct 2025 08:58:31 +0200 Subject: [PATCH 2/2] Don't chop up lines stradling roofing/normal areas too much. This may result in zits in areas that are _just_ on the border between meeting the requirements for top surfaces and normal areas -- of which there may be a lot on certain combinations of curved models and settings. part of CURA-12774 --- src/LayerPlan.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/LayerPlan.cpp b/src/LayerPlan.cpp index a082c6d86a..d8568baf9b 100644 --- a/src/LayerPlan.cpp +++ b/src/LayerPlan.cpp @@ -1087,13 +1087,17 @@ void LayerPlan::addWallLine( return vSize2(a.front() - p0) < vSize2(b.front() - p0); }); + auto pt0 = p0.toPoint2LL(); + Point2LL& last_placed = pt0; + // add intersected line segments, alternating between roofing and default_config for (const auto& line_poly : skin_line_segments) { // This is only relevant for the very fist iteration of the loop // if the start of the line segment is not at minimum distance from p0 - if (vSize2(line_poly.front() - p0) > min_line_len * min_line_len) + if (vSize2(line_poly.front() - last_placed) > min_line_len * min_line_len) { + last_placed = line_poly.front(); addExtrusionMove( line_poly.front(), default_config, @@ -1106,6 +1110,12 @@ void LayerPlan::addWallLine( travel_to_z); } + if (vSize2(line_poly.back() - last_placed) < min_line_len * min_line_len) + { + continue; + } + last_placed = line_poly.back(); + addExtrusionMove(line_poly.back(), config, SpaceFillType::Polygons, flow, width_factor, spiralize, 1.0_r, GCodePathConfig::FAN_SPEED_DEFAULT, travel_to_z); }