Skip to content

Commit

Permalink
Fractional(-support)-layers: Prevent nozzle from impacting build-plate.
Browse files Browse the repository at this point in the history
part of CURA-10407
  • Loading branch information
rburema committed Oct 13, 2023
1 parent 8c3740d commit 830c56a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ void AreaSupport::splitGlobalSupportAreasIntoSupportInfillParts(
continue;
}

const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() ? Polygons() : global_support_areas_per_layer[layer_nr + 1];
const Polygons& global_support_areas_above = (layer_nr + 1) >= global_support_areas_per_layer.size() || layer_nr <= 0 ? Polygons() : global_support_areas_per_layer[layer_nr + 1];
const auto all_support_areas_in_layer = { global_support_areas.intersection(global_support_areas_above), global_support_areas.difference(global_support_areas_above) };
bool use_fractional_config = false;
for (auto& support_areas : all_support_areas_in_layer)
Expand Down Expand Up @@ -1822,7 +1822,10 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh
Polygons roofs;
generateSupportInterfaceLayer(global_support_areas_per_layer[layer_idx], mesh_outlines, roof_line_width, roof_outline_offset, minimum_roof_area, roofs);
support_layers[layer_idx].support_roof.add(roofs);
support_layers[layer_idx].support_fractional_roof.add(roofs.difference(support_layers[layer_idx + 1].support_roof));
if (layer_idx > 0)
{
support_layers[layer_idx].support_fractional_roof.add(roofs.difference(support_layers[layer_idx + 1].support_roof));
}
scripta::log("support_interface_roofs", roofs, SectionType::SUPPORT, layer_idx);
}

Expand Down

0 comments on commit 830c56a

Please sign in to comment.