Skip to content

Commit

Permalink
Fix crash in proof-of-concept code.
Browse files Browse the repository at this point in the history
part of CURA-11041
  • Loading branch information
rburema committed Sep 22, 2023
1 parent 7bdbe9a commit 16d1a84
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/support.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1805,7 +1805,7 @@ void AreaSupport::generateSupportRoof(SliceDataStorage& storage, const SliceMesh
const double minimum_roof_area = mesh.settings.get<double>("minimum_roof_area");

std::vector<SupportLayer>& support_layers = storage.support.supportLayers;
for (LayerIndex layer_idx = static_cast<int>(support_layers.size() - z_distance_top); layer_idx >= 0; --layer_idx)
for (LayerIndex layer_idx = static_cast<int>(support_layers.size() - z_distance_top) - 1; layer_idx >= 0; --layer_idx)
{
const LayerIndex top_layer_idx_above{
std::min(LayerIndex{ support_layers.size() - 1 }, LayerIndex{ layer_idx + roof_layer_count + z_distance_top })
Expand Down

0 comments on commit 16d1a84

Please sign in to comment.