Skip to content

Commit

Permalink
Fix guaranteed line below large cradle base.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRahm committed May 3, 2024
1 parent aece378 commit 38050cb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2602,16 +2602,16 @@ void TreeSupport::generateSupportSkin(
}
Polygons cradle_lines_roof = cradle_support_line_roof_areas[layer_idx].unionPolygons();
Polygons remove_from_next_roof = storage.support.supportLayers[layer_idx].getTotalAreaFromParts(storage.support.supportLayers[layer_idx].support_roof).unionPolygons();
if (! support_free_areas[layer_idx].empty())
{
remove_from_next_roof.add(support_free_areas[layer_idx]);
}
//Remove only already added roof from line areas. Should not be needed, but better safe than sorry.
cradle_lines_roof = cradle_lines_roof.difference(remove_from_next_roof);
cradle_support_line_areas[layer_idx] = cradle_support_line_areas[layer_idx].unionPolygons().difference(remove_from_next_roof);

//Collect remaining parts that non cradle line roof areas may not intersect with.
remove_from_next_roof.add(cradle_line_xy_distance_areas[layer_idx]);
if (! support_free_areas[layer_idx].empty())
{
remove_from_next_roof.add(support_free_areas[layer_idx]);
}
remove_from_next_roof = remove_from_next_roof.unionPolygons();

Polygons remove_from_next_fractional_roof = remove_from_next_roof;
Expand Down
2 changes: 1 addition & 1 deletion src/TreeSupportCradle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,7 +1226,7 @@ void SupportCradleGeneration::pushCradleData(std::vector<std::vector<TreeSupport
}
for (auto [layer_idx, support_free_on_layer] : support_free_areas_ | ranges::views::enumerate)
{
support_free_areas_[layer_idx].add(support_free_on_layer);
support_free_areas[layer_idx].add(support_free_on_layer);
}
}

Expand Down

0 comments on commit 38050cb

Please sign in to comment.