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

Fix Tree-support lines overlapping with the model #2088

Closed
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
6 changes: 6 additions & 0 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2023,6 +2023,7 @@ void TreeSupport::filterFloatingLines(std::vector<Shape>& support_layer_storage)
return;
}

Shape relevant_forbidden = volumes_.getCollision(0, layer_idx, true);
Shape outer_walls = TreeSupportUtils::toPolylines(support_layer_storage[layer_idx - 1].getOutsidePolygons())
.createTubeShape(
closing_dist,
Expand All @@ -2043,6 +2044,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)).offset(-config.xy_min_distance / 2).empty())
{
// technically not resting outside, also not valid, but the alternative is potentially having lines go through the model
holes_resting_outside[layer_idx].emplace(idx);
}
else
{
for (auto [idx2, hole2] : holeparts[layer_idx - 1] | ranges::views::enumerate)
Expand Down
Loading