diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 1767847cb7..354e37fe73 100644 --- a/include/SupportInfillPart.h +++ b/include/SupportInfillPart.h @@ -33,7 +33,7 @@ class SupportInfillPart // for infill_areas[x][n], x means the density level and n means the thickness std::vector wall_toolpaths; //!< Any walls go here, not in the areas, where they could be combined vertically (don't combine walls). Binned by inset_idx. - coord_t custom_line_distance; + coord_t custom_line_distance; //!< The distance between support infill lines. 0 means use the default line distance instead. bool use_fractional_config; //!< Request to use the configuration used to fill a partial layer height here, instead of the normal full layer height configuration. SupportInfillPart(const PolygonsPart& outline, coord_t support_line_width, bool use_fractional_config, int inset_count_to_generate = 0, coord_t custom_line_distance = 0); diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 6db1cd605a..e4cef05de3 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -236,6 +236,7 @@ class SupportLayer * \param wall_line_count Wall-line count around the fill. * \param grow_layer_above (optional, default to 0) In cases where support shrinks per layer up, an appropriate offset may be nescesary. * \param unionAll (optional, default to false) Wether to 'union all' for the split into parts bit. + * \param custom_line_distance (optional, default to 0) Distance between lines of the infill pattern. custom_line_distance of 0 means use the default instead. */ void fillInfillParts( const LayerIndex layer_nr, @@ -243,7 +244,8 @@ class SupportLayer const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above = 0, - const bool unionAll = false); + const bool unionAll = false, + const coord_t custom_line_distance = 0); }; class SupportStorage diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp index a42d12889d..e9694634f8 100644 --- a/src/FffGcodeWriter.cpp +++ b/src/FffGcodeWriter.cpp @@ -929,9 +929,35 @@ void FffGcodeWriter::processRaft(const SliceDataStorage& storage) skip_some_zags, zag_skip_count, pocket_size); + std::vector raft_paths; // Should remain empty, since we have no walls. infill_comp.generate(raft_paths, raft_polygons, raft_lines, surface_settings, layer_nr, SectionType::ADHESION); - gcode_layer.addLinesByOptimizer(raft_lines, gcode_layer.configs_storage.raft_surface_config, SpaceFillType::Lines, false, 0, 1.0, last_planned_position); + + const auto wipe_dist = 0; + const auto spiralize = false; + const auto flow_ratio = 1.0_r; + const auto enable_travel_optimization = false; + const auto always_retract = false; + const auto reverse_order = false; + + gcode_layer.addLinesByOptimizer( + raft_lines, + gcode_layer.configs_storage.raft_surface_config, + SpaceFillType::Lines, + enable_travel_optimization, + wipe_dist, + flow_ratio, + last_planned_position); + gcode_layer.addPolygonsByOptimizer( + raft_polygons, + gcode_layer.configs_storage.raft_surface_config, + ZSeamConfig(), + wipe_dist, + spiralize, + flow_ratio, + always_retract, + reverse_order, + gcode_layer.getLastPlannedPositionOrStartingPosition()); raft_polygons.clear(); raft_lines.clear(); diff --git a/src/TreeSupportTipGenerator.cpp b/src/TreeSupportTipGenerator.cpp index 094a819544..8227a3b001 100644 --- a/src/TreeSupportTipGenerator.cpp +++ b/src/TreeSupportTipGenerator.cpp @@ -1165,7 +1165,7 @@ void TreeSupportTipGenerator::generateTips( if (use_fake_roof) { storage.support.supportLayers[layer_idx] - .fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, support_roof_line_distance, config.maximum_move_distance); + .fillInfillParts(layer_idx, support_roof_drawn, config.support_line_width, 0, config.maximum_move_distance, false, support_roof_line_distance); placed_support_lines_support_areas[layer_idx].add(TreeSupportUtils::generateSupportInfillLines( support_roof_drawn[layer_idx], config, diff --git a/src/sliceDataStorage.cpp b/src/sliceDataStorage.cpp index 0dddecb5b7..03cd345f01 100644 --- a/src/sliceDataStorage.cpp +++ b/src/sliceDataStorage.cpp @@ -721,7 +721,8 @@ void SupportLayer::fillInfillParts( const coord_t support_line_width, const coord_t wall_line_count, const coord_t grow_layer_above /*has default 0*/, - const bool unionAll /*has default false*/) + const bool unionAll /*has default false*/, + const coord_t custom_line_distance /*has default 0*/) { const Polygons& support_this_layer = support_fill_per_layer[layer_nr]; const Polygons& support_layer_above @@ -732,7 +733,7 @@ void SupportLayer::fillInfillParts( { for (const PolygonsPart& island_outline : support_areas.splitIntoParts(unionAll)) { - support_infill_parts.emplace_back(island_outline, support_line_width, use_fractional_config, wall_line_count); + support_infill_parts.emplace_back(island_outline, support_line_width, use_fractional_config, wall_line_count, custom_line_distance); } use_fractional_config = false; }