Skip to content
Open
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
11 changes: 7 additions & 4 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2595,6 +2595,7 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets(
}
}
}
Shape non_support_outlines_below = outlines_below;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Shape non_support_outlines_below = outlines_below;


const coord_t layer_height = mesh_config.inset0_config.getLayerThickness();

Expand Down Expand Up @@ -2684,18 +2685,19 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets(
}

const Shape fully_supported_region = outlines_below.offset(-half_outer_wall_width);
const Shape model_supported_region = non_support_outlines_below.offset(-half_outer_wall_width);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
const Shape model_supported_region = non_support_outlines_below.offset(-half_outer_wall_width);
const Shape model_supported_region = outlines_below.offset(-half_outer_wall_width);

const Shape part_print_region = part.outline.offset(-half_outer_wall_width);

const auto get_supported_region = [&fully_supported_region, &layer_height](const AngleDegrees& overhang_angle) -> Shape
const auto get_supported_region = [&fully_supported_region, &model_supported_region, &layer_height](const AngleDegrees& overhang_angle, bool full = true) -> Shape
{
// the overhang mask is set to the area of the current part's outline minus the region that is considered to be supported
// the supported region is made up of those areas that really are supported by either model or support on the layer below
// the supported region is made up of those areas that really are supported by (either) the model (or support, if 'full') on the layer below
// expanded to take into account the overhang angle, the greater the overhang angle, the larger the supported area is
// considered to be
if (overhang_angle < 90.0)
{
const coord_t overhang_width = layer_height * std::tan(AngleRadians(overhang_angle));
return fully_supported_region.offset(overhang_width + 10);
return (full ? fully_supported_region : model_supported_region).offset(overhang_width + 10);
}

return Shape();
Expand Down Expand Up @@ -2758,7 +2760,8 @@ FffGcodeWriter::InsetsPreprocessResult FffGcodeWriter::preProcessInsets(
const AngleDegrees seam_overhang_angle = mesh.settings.get<AngleDegrees>("seam_overhang_angle");
if (seam_overhang_angle < 90.0)
{
const Shape supported_region_seam = get_supported_region(seam_overhang_angle);
constexpr bool not_full = false; // Do not take support into account for the seam overhang.
const Shape supported_region_seam = get_supported_region(seam_overhang_angle, not_full);
gcode_layer.setSeamOverhangMask(part_print_region.difference(supported_region_seam).offset(10));
}
else
Expand Down
Loading