Skip to content

Commit

Permalink
Proof-of-concept. Fix partial-layer-height difference for (support) l…
Browse files Browse the repository at this point in the history
…ine-fill.

Part of the partial layer-height support distance proof of concept: CURA-11041
  • Loading branch information
rburema committed Sep 26, 2023
1 parent 09a2ce9 commit b996cd0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3375,6 +3375,9 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay
roof_computation.generate(roof_paths, roof_polygons, roof_lines, roof_extruder.settings, gcode_layer.getLayerNr(), SectionType::SUPPORT);
if ((gcode_layer.getLayerNr() == 0 && wall.empty()) || (gcode_layer.getLayerNr() > 0 && roof_paths.empty() && roof_polygons.empty() && roof_lines.empty()))
{
current_roof_config.z_offset = -leftover_support_distance;
current_roof_config.flow *= Ratio(layer_height - leftover_support_distance, layer_height);

continue; // We didn't create any support roof.
}
generated_something = true; // We _did_ create at least some support roof.
Expand Down Expand Up @@ -3417,7 +3420,7 @@ bool FffGcodeWriter::addSupportRoofsToGCode(const SliceDataStorage& storage, Lay
}
gcode_layer.addLinesByOptimizer(
roof_lines,
gcode_layer.configs_storage.support_roof_config,
current_roof_config,
(pattern == EFillMethod::ZIG_ZAG) ? SpaceFillType::PolyLines : SpaceFillType::Lines);

current_roof_config.z_offset = -leftover_support_distance;
Expand Down

0 comments on commit b996cd0

Please sign in to comment.