From 528fb630bc486d4387d762543fa10c0376045033 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Fri, 3 Nov 2023 13:42:30 -0500 Subject: [PATCH] Organic: Fix support blocker (#2595) Expand blockers a little bit to compensate the error in facet projection --- src/libslic3r/Support/TreeSupport.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 5831a1d61e7..a228296451a 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -249,8 +249,12 @@ static std::vector>> group_me raw_overhangs = overhangs; raw_overhangs_calculated = true; } - if (! (enforced_layer || blockers_layers.empty() || blockers_layers[layer_id].empty())) - overhangs = diff(overhangs, blockers_layers[layer_id], ApplySafetyOffset::Yes); + if (! (enforced_layer || blockers_layers.empty() || blockers_layers[layer_id].empty())) { + Polygons &blocker = blockers_layers[layer_id]; + // Arthur: union_ is a must because after mirroring, the blocker polygons are in left-hand coordinates, ie clockwise, + // which are not valid polygons, and will be removed by offset. union_ can make these polygons right. + overhangs = diff(overhangs, offset(union_(blocker), scale_(g_config_tree_support_collision_resolution)), ApplySafetyOffset::Yes); + } if (config.bridge_no_support) { for (const LayerRegion *layerm : current_layer.regions()) remove_bridges_from_contacts(print_config, lower_layer, *layerm,