From 80cb837ec97f8cbcab144bc4611485a685a4931d Mon Sep 17 00:00:00 2001 From: Thomas Rahm <67757218+ThomasRahm@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:34:13 +0100 Subject: [PATCH 1/3] Fix tree support fake roof for large areas --- include/sliceDataStorage.h | 3 ++- src/TreeSupportTipGenerator.cpp | 2 +- src/sliceDataStorage.cpp | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/sliceDataStorage.h b/include/sliceDataStorage.h index 6db1cd605a..56a3e264c6 100644 --- a/include/sliceDataStorage.h +++ b/include/sliceDataStorage.h @@ -243,7 +243,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/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; } From f0b9c259f68b2fa423f38bc8eea6d630e142db9e Mon Sep 17 00:00:00 2001 From: Thomas Rahm <67757218+ThomasRahm@users.noreply.github.com> Date: Mon, 20 Nov 2023 08:40:16 +0100 Subject: [PATCH 2/3] Add documentation for the new parameter introduced in previous commit. Also added documentation for the custom_line_distance variable of SupportInfillPart --- include/SupportInfillPart.h | 2 +- include/sliceDataStorage.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 1767847cb7..7b1c94c8f0 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 56a3e264c6..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, From 18ebef6d701ec1a5fccd50b67a5b7850dae8cbbb Mon Sep 17 00:00:00 2001 From: Thomas Rahm <67757218+ThomasRahm@users.noreply.github.com> Date: Wed, 22 Nov 2023 10:00:53 +0100 Subject: [PATCH 3/3] Fix formatting Co-authored-by: Casper Lamboo --- include/SupportInfillPart.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/SupportInfillPart.h b/include/SupportInfillPart.h index 7b1c94c8f0..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;//!< The distance between support infill lines. 0 means use the default line distance instead. + 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);