Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/TreeSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ class TreeSupport
*/
void finalizeInterfaceAndSupportAreas(
std::vector<Shape>& support_layer_storage,
std::vector<Shape>& support_roof_storage,
std::vector<Shape>& support_layer_storage_fractional,
const std::vector<Shape>& support_roof_storage,
const std::vector<Shape>& support_layer_storage_fractional,
const CenterGrid& center_locator_per_layer,
SliceDataStorage& storage);

Expand Down
33 changes: 17 additions & 16 deletions src/TreeSupport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2193,8 +2193,8 @@ void TreeSupport::filterFloatingLines(std::vector<Shape>& support_layer_storage)

void TreeSupport::finalizeInterfaceAndSupportAreas(
std::vector<Shape>& support_layer_storage,
std::vector<Shape>& support_roof_storage,
std::vector<Shape>& support_layer_storage_fractional,
const std::vector<Shape>& support_roof_storage,
const std::vector<Shape>& support_layer_storage_fractional,
const CenterGrid& center_locator_per_layer,
SliceDataStorage& storage)
{
Expand Down Expand Up @@ -2309,6 +2309,19 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(
{
constexpr bool convert_every_part = true; // Convert every part into a SingleShape for the support.

// This only works because fractional support is always just projected upwards regular support or skin.
// Also technically violates skin height, but there is no good way to prevent that.
Shape fractional_support;

if (layer_idx > 0)
{
fractional_support = support_layer_storage_fractional[layer_idx].intersection(support_layer_storage[layer_idx - 1]);
}
else
{
fractional_support = support_layer_storage_fractional[layer_idx];
}

const auto* center_locator = center_locator_per_layer[layer_idx].get();
for (const SingleShape& support_part : support_layer_storage[layer_idx].splitIntoParts())
{
Expand All @@ -2331,20 +2344,8 @@ void TreeSupport::finalizeInterfaceAndSupportAreas(

// Clamp wall-thickness to configured values, and draw the support part with the calculated wall-thickness.
const auto wall_thickness = std::clamp(weighted_average, config.support_wall_thickness, config.support_enlarged_wall_thickness);
storage.support.supportLayers[layer_idx].fillInfillParts(support_part, config.support_line_width, wall_thickness, false, convert_every_part);
}

// This only works because fractional support is always just projected upwards regular support or skin.
// Also technically violates skin height, but there is no good way to prevent that.
Shape fractional_support;

if (layer_idx > 0)
{
fractional_support = support_layer_storage_fractional[layer_idx].intersection(support_layer_storage[layer_idx - 1]);
}
else
{
fractional_support = support_layer_storage_fractional[layer_idx];
storage.support.supportLayers[layer_idx]
.fillInfillParts(support_part.difference(fractional_support), config.support_line_width, wall_thickness, false, convert_every_part);
Comment thread
wawanbreton marked this conversation as resolved.
}

storage.support.supportLayers[layer_idx].fillInfillParts(fractional_support, config.support_line_width, config.support_wall_thickness, true, convert_every_part);
Expand Down
Loading