Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/CURA-12250_refactor…
Browse files Browse the repository at this point in the history
…-the-post-processing-like-algorithms' into CURA-12250_refactor-the-post-processing-like-algorithms
wawanbreton committed Nov 28, 2024
2 parents dbc402e + e9c8413 commit 23a7182
Showing 2 changed files with 18 additions and 20 deletions.
19 changes: 9 additions & 10 deletions src/path_planning/LayerPlan.cpp
Original file line number Diff line number Diff line change
@@ -59,15 +59,14 @@ GCodePath* LayerPlan::getLatestPathWithConfig(
{
return &paths.back();
}
paths.emplace_back(
GCodePath{ .z_offset = z_offset,
.config = config,
.mesh = current_mesh_,
.space_fill_type = space_fill_type,
.flow = flow,
.width_factor = width_factor,
.spiralize = spiralize,
.speed_factor = speed_factor });
paths.emplace_back(GCodePath{ .z_offset = z_offset,
.config = config,
.mesh = current_mesh_,
.space_fill_type = space_fill_type,
.flow = flow,
.width_factor = width_factor,
.spiralize = spiralize,
.speed_factor = speed_factor });

GCodePath* ret = &paths.back();
ret->skip_agressive_merge_hint = mode_skip_agressive_merge_;
@@ -1279,7 +1278,7 @@ std::vector<LayerPlan::PathCoasting>

for (const auto& reversed_chunk : paths | ranges::views::enumerate | ranges::views::reverse
| ranges::views::chunk_by(
[](const auto& path_a, const auto& path_b)
[](const auto&path_a, const auto&path_b)
{
return (! std::get<1>(path_a).isTravelPath()) || std::get<1>(path_b).isTravelPath();
}))
19 changes: 9 additions & 10 deletions src/settings/MeshPathConfigs.cpp
Original file line number Diff line number Diff line change
@@ -131,16 +131,15 @@ MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh, const coord_t lay

for (const auto combine_idx : ranges::views::iota(1, MAX_INFILL_COMBINE + 1))
{
infill_config.emplace_back(
GCodePathConfig{
.type = PrintFeatureType::Infill,
.line_width = static_cast<coord_t>(
mesh.settings.get<coord_t>("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get<ExtruderTrain&>("infill_extruder_nr").extruder_nr_]),
.layer_thickness = layer_thickness,
.flow = mesh.settings.get<Ratio>("infill_material_flow") * (layer_nr == 0 ? mesh.settings.get<Ratio>("material_flow_layer_0") : Ratio{ 1.0 }) * combine_idx,
.speed_derivatives = { .speed = mesh.settings.get<Velocity>("speed_infill"),
.acceleration = mesh.settings.get<Acceleration>("acceleration_infill"),
.jerk = mesh.settings.get<Velocity>("jerk_infill") } });
infill_config.emplace_back(GCodePathConfig{
.type = PrintFeatureType::Infill,
.line_width = static_cast<coord_t>(
mesh.settings.get<coord_t>("infill_line_width") * line_width_factor_per_extruder[mesh.settings.get<ExtruderTrain&>("infill_extruder_nr").extruder_nr_]),
.layer_thickness = layer_thickness,
.flow = mesh.settings.get<Ratio>("infill_material_flow") * (layer_nr == 0 ? mesh.settings.get<Ratio>("material_flow_layer_0") : Ratio{ 1.0 }) * combine_idx,
.speed_derivatives = { .speed = mesh.settings.get<Velocity>("speed_infill"),
.acceleration = mesh.settings.get<Acceleration>("acceleration_infill"),
.jerk = mesh.settings.get<Velocity>("jerk_infill") } });
}
}

0 comments on commit 23a7182

Please sign in to comment.