Skip to content

Commit

Permalink
Possible fix for "Floating islands inside of support"
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasRahm committed Jan 4, 2023
1 parent 6217ebf commit 8bd759a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ std::vector<TreeSupport::LineInformation> TreeSupport::convertLinesToInternal(Po
// NOTE: The volumes below (on which '.inside(p, true)' is called each time below) are the same each time. The values being calculated here are strictly local as well.
// So they could in theory be pre-calculated here (outside of the loop). However, when I refatored it to be that way, it seemed to cause deadlocks each time for some settings.
// NOTE2: When refactoring ensure that avoidance to buildplate is only requested when support_rest_preference == RestPreference::BUILDPLATE as otherwise it has not been precalculated (causing long delays while it is calculated when requested here).

std::vector<LineInformation> result;
// Also checks if the position is valid, if it is NOT, it deletes that point
for (const auto& line : polylines)
Expand Down Expand Up @@ -2679,7 +2679,7 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(std::vector<Polygons>& suppor
support_layer_storage.size(),
[&](const LayerIndex layer_idx)
{
support_layer_storage[layer_idx] = config.simplifier.polygon(support_layer_storage[layer_idx].unionPolygons().smooth(FUDGE_LENGTH));
support_layer_storage[layer_idx] = config.simplifier.polygon(support_layer_storage[layer_idx].unionPolygons().smooth(FUDGE_LENGTH)).getOutsidePolygons();
// ^^^ Most of the time in this function is this union call. It can take a relatively long time when a lot of areas are to be unioned.
// Also simplify a bit, to ensure the output does not contain outrageous amounts of vertices. Should not be necessary, just a precaution.

Expand Down

0 comments on commit 8bd759a

Please sign in to comment.