Skip to content

Commit

Permalink
Fix uncomplete higher skirt line
Browse files Browse the repository at this point in the history
  • Loading branch information
wawanbreton committed Mar 29, 2024
1 parent 84252c8 commit 1bcc4b6
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1346,6 +1346,12 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan
{
total_line_count += line.closed_polygons.size();
total_line_count += line.open_polylines.size();

// For layer_nr != 0 add only the innermost brim line (which is only the case if skirt_height > 1)
if (layer_nr != 0)
{
break;
}
}
Polygons all_brim_lines;

Expand Down Expand Up @@ -1383,6 +1389,12 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan
}
}
}

// For layer_nr != 0 add only the innermost brim line (which is only the case if skirt_height > 1)
if (layer_nr != 0)
{
break;
}
}

const auto smart_brim_ordering = train.settings_.get<bool>("brim_smart_ordering") && train.settings_.get<EPlatformAdhesion>("adhesion_type") == EPlatformAdhesion::BRIM;
Expand Down Expand Up @@ -1442,12 +1454,8 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan

if (! all_brim_lines.empty())
{
// For layer_nr != 0 add only the innermost brim line (which is only the case if skirt_height > 1)
Polygons inner_brim_line;
inner_brim_line.add(all_brim_lines[0]);

gcode_layer.addLinesByOptimizer(
layer_nr == 0 ? all_brim_lines : inner_brim_line,
all_brim_lines,
gcode_layer.configs_storage_.skirt_brim_config_per_extruder[extruder_nr],
SpaceFillType::PolyLines,
enable_travel_optimization,
Expand Down

0 comments on commit 1bcc4b6

Please sign in to comment.