Fix of "Support on build plate only" no longer overridden by support painting (#6863)

This is a regression to a late PrusaSlicer 2.4.0-alpha0 change
	8dfc0422a8
    Faster and hopefully more reliable projection of paint-on support
    blockers and enforcers on a sliced mesh.
    Previous d89f01c717 did not fix it.
This commit is contained in:
Vojtech Bubnik 2021-09-03 11:45:01 +02:00
parent cd4155a890
commit 79784d1a2e

View file

@ -2301,7 +2301,14 @@ void PrintObject::project_and_append_custom_facets(
else {
std::vector<Polygons> projected;
slice_mesh_slabs(custom_facets, zs_from_layers(this->layers()), this->trafo_centered() * mv->get_matrix(), nullptr, &projected, [](){});
append(out, std::move(projected));
// Merge these projections with the output, layer by layer.
assert(! projected.empty());
assert(out.empty() || out.size() == projected.size());
if (out.empty())
out = std::move(projected);
else
for (size_t i = 0; i < out.size(); ++ i)
append(out[i], std::move(projected[i]));
}
}
}