diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index c4c01c3399..914a0ed667 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -1033,18 +1033,20 @@ void TreeSupport::detect_overhangs(bool check_support_necessity/* = false*/) } } + if (layer_nr < blockers.size()) { + // 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_ex. union_ can make these polygons right. + ExPolygons blocker = offset_ex(union_(blockers[layer_nr]), scale_(radius_sample_resolution)); + layer->loverhangs = diff_ex(layer->loverhangs, blocker); + layer->cantilevers = diff_ex(layer->cantilevers, blocker); + sharp_tail_overhangs = diff_ex(sharp_tail_overhangs, blocker); + } + if (support_critical_regions_only && is_auto(stype)) { layer->loverhangs.clear(); // remove oridinary overhangs, only keep cantilevers and sharp tails (added later) append(layer->loverhangs, layer->cantilevers); } - if (layer_nr < blockers.size()) { - Polygons& blocker = blockers[layer_nr]; - // 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_ex. union_ can make these polygons right. - layer->loverhangs = diff_ex(layer->loverhangs, offset_ex(union_(blocker), scale_(radius_sample_resolution))); - } - if (max_bridge_length > 0 && layer->loverhangs.size() > 0 && lower_layer) { // do not break bridge for normal part in TreeHybrid, nor Tree Strong bool break_bridge = !(m_support_params.support_style == smsTreeHybrid && area(layer->loverhangs) > m_support_params.thresh_big_overhang)