Skip to content

Commit

Permalink
Support brim printed only at layer 0
Browse files Browse the repository at this point in the history
  • Loading branch information
saumyaj3 committed Sep 25, 2023
1 parent 3a84955 commit 43955a1
Showing 1 changed file with 20 additions and 16 deletions.
36 changes: 20 additions & 16 deletions src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1232,24 +1232,28 @@ void FffGcodeWriter::processSkirtBrim(const SliceDataStorage& storage, LayerPlan


// Add the support brim after the skirt_brim to gcode_layer
//support brim is only added in layer 0
// For support brim we don't care about the order, because support doesn't need to be accurate.
const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings;
if (extruder_nr == mesh_group_settings.get<ExtruderTrain&>("support_extruder_nr_layer_0").extruder_nr)
if (layer_nr == 0)
{
total_line_count += storage.support_brim.size();
Polygons support_brim_lines = storage.support_brim;
support_brim_lines.toPolylines();
gcode_layer.addLinesByOptimizer(
support_brim_lines,
gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr],
SpaceFillType::PolyLines,
enable_travel_optimization,
wipe_dist,
flow_ratio,
start_close_to,
fan_speed,
reverse_print_direction,
order_requirements = {});
const Settings& mesh_group_settings = Application::getInstance().current_slice->scene.current_mesh_group->settings;
if (extruder_nr == mesh_group_settings.get<ExtruderTrain&>("support_extruder_nr_layer_0").extruder_nr)
{
total_line_count += storage.support_brim.size();
Polygons support_brim_lines = storage.support_brim;
support_brim_lines.toPolylines();
gcode_layer.addLinesByOptimizer(
support_brim_lines,
gcode_layer.configs_storage.skirt_brim_config_per_extruder[extruder_nr],
SpaceFillType::PolyLines,
enable_travel_optimization,
wipe_dist,
flow_ratio,
start_close_to,
fan_speed,
reverse_print_direction,
order_requirements = {});
}
}
}

Expand Down

0 comments on commit 43955a1

Please sign in to comment.