Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CURA-11875] Fix Tree support going through the model #2118

Merged
merged 2 commits into from
Jul 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 7 additions & 4 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2023,10 +2023,8 @@ void TreeSupport::filterFloatingLines(std::vector<Shape>& support_layer_storage)
return;
}

Shape outer_walls = TreeSupportUtils::toPolylines(support_layer_storage[layer_idx - 1].getOutsidePolygons())
.createTubeShape(
closing_dist,
0); //.unionPolygons(volumes_.getCollision(0, layer_idx - 1, true).offset(-(config.support_line_width+config.xy_min_distance)));
const Shape relevant_forbidden = volumes_.getCollision(0, layer_idx, true);
HellAholic marked this conversation as resolved.
Show resolved Hide resolved
Shape outer_walls = TreeSupportUtils::toPolylines(support_layer_storage[layer_idx - 1].getOutsidePolygons()).createTubeShape(closing_dist, 0);

Shape holes_below;

Expand All @@ -2043,6 +2041,11 @@ void TreeSupport::filterFloatingLines(std::vector<Shape>& support_layer_storage)
{
holes_resting_outside[layer_idx].emplace(idx);
}
else if (hole.intersection(PolygonUtils::clipPolygonWithAABB(relevant_forbidden, hole_aabb)).area() > hole.length() * EPSILON)
{
holes_resting_outside[layer_idx].emplace(
idx); // technically not resting outside, also not valid, but the alternative is potentially having lines go though the model
}
else
{
for (auto [idx2, hole2] : holeparts[layer_idx - 1] | ranges::views::enumerate)
Expand Down
Loading