Partial sacrificial bridge anchor fix (#13052)

* Partial sacrificial bridge anchor fix

Co-Authored-By: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>

* Simplification

---------

Co-authored-by: Rodrigo Faselli <162915171+RF47@users.noreply.github.com>
This commit is contained in:
Ian Bassi
2026-04-24 03:53:53 -03:00
committed by GitHub
parent 8bff921ade
commit 6f1b1b8767

View File

@@ -1870,6 +1870,20 @@ void PerimeterGenerator::process_no_bridge(Surfaces& all_surfaces, coord_t perim
bridges_temp = diff_ex(bridges_temp, unbridgeable);
unsupported_filtered = offset_ex(bridges_temp, offset_to_do);
unsupported_filtered = intersection_ex(unsupported_filtered, reference);
// Normalize anchor size for partial bridges:
// derive the bridge core first, then add a fixed overlap into support.
const coordf_t anchor_overlap = bridged_infill_margin;
ExPolygons bridge_core = diff_ex(unsupported_filtered, support, ApplySafetyOffset::Yes);
if (bridge_core.empty()) {
bridge_core = unsupported_filtered;
}
ExPolygons anchor_overlap_area = intersection_ex(
offset_ex(bridge_core, anchor_overlap),
support,
ApplySafetyOffset::Yes);
unsupported_filtered = union_ex(bridge_core, anchor_overlap_area);
unsupported_filtered = intersection_ex(unsupported_filtered, reference);
// } else {
// ExPolygons unbridgeable = intersection_ex(unsupported, diff_ex(unsupported_filtered, offset_ex(bridgeable_simplified, ext_perimeter_width / 2)));
// unbridgeable = offset2_ex(unbridgeable, -ext_perimeter_width, ext_perimeter_width);