Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/CuraEngine.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemco Burema <r.burema@ultimaker.com>2022-05-06 19:33:03 +0300
committerRemco Burema <r.burema@ultimaker.com>2022-05-06 19:33:03 +0300
commite9904958f0f85669216b03dc8ccd5a2d6e15dc6c (patch)
tree8e5354c27cc08dfb8f0630011583e634f6d99c4d
parent988c780f9bdf1ca44827424a184bf1a78768109f (diff)
parent3c409acc58c29578b22a0fd282841f7bf8a7233d (diff)
Merge branch '5.0'
-rw-r--r--src/FffGcodeWriter.cpp25
-rw-r--r--src/pathPlanning/Comb.cpp28
-rw-r--r--src/settings/PathConfigStorage.cpp2
-rw-r--r--src/utils/PolylineStitcher.h2
4 files changed, 34 insertions, 23 deletions
diff --git a/src/FffGcodeWriter.cpp b/src/FffGcodeWriter.cpp
index 4b2532743..4a8654d14 100644
--- a/src/FffGcodeWriter.cpp
+++ b/src/FffGcodeWriter.cpp
@@ -1544,21 +1544,32 @@ bool FffGcodeWriter::processMultiLayerInfill(const SliceDataStorage& storage, La
added_something = true;
setExtruder_addPrime(storage, gcode_layer, extruder_nr);
gcode_layer.setIsInside(true); // going to print stuff inside print object
+
if (!infill_polygons.empty())
{
constexpr bool force_comb_retract = false;
gcode_layer.addTravel(infill_polygons[0][0], force_comb_retract);
gcode_layer.addPolygonsByOptimizer(infill_polygons, mesh_config.infill_config[combine_idx]);
}
- std::optional<Point> near_start_location;
- if (mesh.settings.get<bool>("infill_randomize_start_location"))
+
+ if (!infill_lines.empty())
{
- srand(gcode_layer.getLayerNr());
- near_start_location = infill_lines[rand() % infill_lines.size()][0];
+ std::optional<Point> near_start_location;
+ if (mesh.settings.get<bool>("infill_randomize_start_location"))
+ {
+ srand(gcode_layer.getLayerNr());
+ near_start_location = infill_lines[rand() % infill_lines.size()][0];
+ }
+
+ const bool enable_travel_optimization = mesh.settings.get<bool>("infill_enable_travel_optimization");
+ gcode_layer.addLinesByOptimizer(infill_lines,
+ mesh_config.infill_config[combine_idx],
+ zig_zaggify_infill ? SpaceFillType::PolyLines : SpaceFillType::Lines,
+ enable_travel_optimization,
+ /*wipe_dist = */ 0,
+ /* flow = */ 1.0,
+ near_start_location);
}
- const bool enable_travel_optimization = mesh.settings.get<bool>("infill_enable_travel_optimization");
- gcode_layer.addLinesByOptimizer(infill_lines, mesh_config.infill_config[combine_idx], zig_zaggify_infill ? SpaceFillType::PolyLines : SpaceFillType::Lines, enable_travel_optimization
- , /*wipe_dist = */ 0, /* flow = */ 1.0, near_start_location);
}
}
return added_something;
diff --git a/src/pathPlanning/Comb.cpp b/src/pathPlanning/Comb.cpp
index 329016ba0..efa78dda6 100644
--- a/src/pathPlanning/Comb.cpp
+++ b/src/pathPlanning/Comb.cpp
@@ -65,12 +65,16 @@ Comb::Comb(const SliceDataStorage& storage, const LayerIndex layer_nr, const Pol
, model_boundary(
[&storage, layer_nr]()
{
- const std::vector<bool> extruder_is_used = storage.getExtrudersUsed();
+ /* NOTE/TODO: The commented-out lines in this scope are something that we want to reintroduce, but had to disable for proper PVA supports for now.
+ * See the latest commit message (at time of writing) of those lines or internal ticket CURA-9163 for details.
+ */
+
+// const std::vector<bool> extruder_is_used = storage.getExtrudersUsed();
bool travel_avoid_supports = false;
- for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders)
- {
- travel_avoid_supports |= extruder_is_used[extruder.extruder_nr] && extruder.settings.get<bool>("travel_avoid_other_parts") && extruder.settings.get<bool>("travel_avoid_supports");
- }
+// for (const ExtruderTrain& extruder : Application::getInstance().current_slice->scene.extruders)
+// {
+// travel_avoid_supports |= extruder_is_used[extruder.extruder_nr] && extruder.settings.get<bool>("travel_avoid_other_parts") && extruder.settings.get<bool>("travel_avoid_supports");
+// }
return storage.getLayerOutlines(layer_nr, travel_avoid_supports, travel_avoid_supports);
}
)
@@ -228,11 +232,6 @@ bool Comb::calc(const ExtruderTrain& train, Point start_point, Point end_point,
comb_paths.throughAir = true;
if ( vSize(start_crossing.in_or_mid - end_crossing.in_or_mid) < vSize(start_crossing.in_or_mid - start_crossing.out) + vSize(end_crossing.in_or_mid - end_crossing.out) )
{ // via outside is moving more over the in-between zone
- comb_paths.emplace_back();
- // we are not sure if these paths travel through air or cross a boundary
- // but, they might be so set it to be certain (error on the safe side).
- comb_paths.throughAir = true;
- comb_paths.back().cross_boundary = true;
comb_paths.back().push_back(start_crossing.in_or_mid);
comb_paths.back().push_back(end_crossing.in_or_mid);
}
@@ -246,10 +245,6 @@ bool Comb::calc(const ExtruderTrain& train, Point start_point, Point end_point,
// add combing travel moves if the combing was successful
comb_paths.push_back(tmp_comb_path);
}
- else if (fail_on_unavoidable_obstacles)
- {
- return false;
- }
else
{
// if combing is not possible then move directly to the target destination
@@ -260,6 +255,11 @@ bool Comb::calc(const ExtruderTrain& train, Point start_point, Point end_point,
comb_paths.back().cross_boundary = true;
comb_paths.back().push_back(start_crossing.in_or_mid);
comb_paths.back().push_back(end_crossing.in_or_mid);
+
+ if (fail_on_unavoidable_obstacles)
+ {
+ return false;
+ }
}
}
}
diff --git a/src/settings/PathConfigStorage.cpp b/src/settings/PathConfigStorage.cpp
index b68159d1e..9d16a9504 100644
--- a/src/settings/PathConfigStorage.cpp
+++ b/src/settings/PathConfigStorage.cpp
@@ -107,7 +107,7 @@ PathConfigStorage::MeshPathConfigs::MeshPathConfigs(const SliceMeshStorage& mesh
)
, ironing_config(
PrintFeatureType::Skin
- , mesh.settings.get<coord_t>("skin_line_width")
+ , mesh.settings.get<coord_t>("ironing_line_spacing")
, layer_thickness
, mesh.settings.get<Ratio>("ironing_flow")
, GCodePathConfig::SpeedDerivatives{mesh.settings.get<Velocity>("speed_ironing"), mesh.settings.get<Acceleration>("acceleration_ironing"), mesh.settings.get<Velocity>("jerk_ironing")}
diff --git a/src/utils/PolylineStitcher.h b/src/utils/PolylineStitcher.h
index 5f03a0bda..cab9bf5ee 100644
--- a/src/utils/PolylineStitcher.h
+++ b/src/utils/PolylineStitcher.h
@@ -183,7 +183,7 @@ public:
{
++start_pos;
}
- chain.insert(chain.end(), (*closest.polygons)[closest.poly_idx].rbegin(), (*closest.polygons)[closest.poly_idx].rend());
+ chain.insert(chain.end(), start_pos, (*closest.polygons)[closest.poly_idx].rend());
}
for(size_t i = old_size; i < chain.size(); ++i) //Update chain length.
{