FIX: blockers not working for sharp tails of tree support

also change default style to tree organic

jira: STUDIO-6801
Change-Id: Iab1d8c6117139c9a7a4c1fa71de0a13bcb356dd5
(cherry picked from commit d2c4efad58f16b23bef49bd47d3b70bf322d6f55)
(cherry picked from commit cd9305e3e061b67903ed8f5cd05d0136d608ee01)
This commit is contained in:
Arthur 2024-04-12 19:46:04 +08:00 committed by Noisyfox
parent 6e05d9ef84
commit 36f2df3339

View file

@ -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)