Skip to content
Merged
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: 3 additions & 1 deletion src/FffGcodeWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,7 @@ FffGcodeWriter::ProcessLayerResult FffGcodeWriter::processLayer(const SliceDataS

const Scene& scene = Application::getInstance().current_slice_->scene;

coord_t comb_offset_from_outlines = 0;
coord_t avoid_distance = 0; // minimal avoid distance is zero
const std::vector<bool> extruder_is_used = storage.getExtrudersUsed();
for (size_t extruder_nr = 0; extruder_nr < scene.extruders.size(); extruder_nr++)
Expand All @@ -1181,6 +1182,8 @@ FffGcodeWriter::ProcessLayerResult FffGcodeWriter::processLayer(const SliceDataS
{
avoid_distance = std::max(avoid_distance, extruder.settings_.get<coord_t>("travel_avoid_distance"));
}

comb_offset_from_outlines = std::max(comb_offset_from_outlines, extruder.settings_.get<coord_t>("retraction_combing_avoid_distance"));
}
}

Expand All @@ -1196,7 +1199,6 @@ FffGcodeWriter::ProcessLayerResult FffGcodeWriter::processLayer(const SliceDataS
}
max_inner_wall_width = std::max(max_inner_wall_width, mesh_inner_wall_width);
}
const coord_t comb_offset_from_outlines = max_inner_wall_width * 2;

const size_t first_extruder = findUsedExtruderIndex(storage, layer_nr, false);

Expand Down
4 changes: 2 additions & 2 deletions src/LayerPlan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ Shape LayerPlan::computeCombBoundary(const CombBoundary boundary_type)
switch (boundary_type)
{
case CombBoundary::MINIMUM:
offset = -mesh.settings.get<coord_t>("machine_nozzle_size") / 2 - mesh.settings.get<coord_t>("wall_line_width_0") / 2 - extra_offset;
offset = -(mesh.settings.get<coord_t>("machine_nozzle_size") / 2 + mesh.settings.get<coord_t>("wall_line_width_0") / 2 + extra_offset);
break;
case CombBoundary::PREFERRED:
offset = -mesh.settings.get<coord_t>("machine_nozzle_size") * 3 / 2 - mesh.settings.get<coord_t>("wall_line_width_0") / 2 - extra_offset;
offset = -(mesh.settings.get<coord_t>("retraction_combing_avoid_distance") + mesh.settings.get<coord_t>("wall_line_width_0") / 2 + extra_offset);
break;
default:
offset = 0;
Expand Down
Loading