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 3, 2024
1 parent d77e87b commit ae25532
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2888,6 +2888,7 @@ void TreeSupport::filterFloatingLines(std::vector<Polygons>& support_layer_stora
return;
}

Polygons relevant_forbidden = volumes_.getCollision(0, layer_idx, true);
Polygons outer_walls
= TreeSupportUtils::toPolylines(support_layer_storage[layer_idx - 1].getOutsidePolygons()).tubeShape(config.support_line_width * config.support_wall_count, 0);

Expand All @@ -2910,6 +2911,10 @@ void TreeSupport::filterFloatingLines(std::vector<Polygons>& support_layer_stora
{
holes_resting_outside[layer_idx].emplace(idx); // technically not resting outside, but valid the same
}
else if(hole.intersection(PolygonUtils::clipPolygonWithAABB(relevant_forbidden, hole_aabb)).area() > hole.polygonLength() * 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

0 comments on commit ae25532

Please sign in to comment.