Skip to content

Commit

Permalink
Fix issue causing support lines to overlap with the model
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRahm committed Jun 5, 2024
1 parent c87105c commit 230c6a1
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit 230c6a1

Please sign in to comment.