Organic: Fix support blocker (#2595)

Expand blockers a little bit to compensate the error in facet projection
This commit is contained in:
Noisyfox 2023-11-03 13:42:30 -05:00 committed by GitHub
parent f1345d276b
commit 528fb630bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,8 +249,12 @@ static std::vector<std::pair<TreeSupportSettings, std::vector<size_t>>> 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,