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:
authorGhostkeeper <rubend@tutanota.com>2021-06-23 11:11:41 +0300
committerRemco Burema <r.burema@ultimaker.com>2021-06-25 14:26:25 +0300
commit01e5e945aef278a1086b0296603e4f5fe0cf1d9f (patch)
treec2671229617c565b665977d6f3d66a6ae0420233
parentaa69bb230031da98d64d024f328ac1c55acdf57c (diff)
Properly round layer counts4.10.04.10
The slicing itself is taking edge cases into account, but the calculation for the number of layers wasn't. Fixes CURA-7901.
-rw-r--r--src/FffPolygonGenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/FffPolygonGenerator.cpp b/src/FffPolygonGenerator.cpp
index 283a07e1e..e935a71f3 100644
--- a/src/FffPolygonGenerator.cpp
+++ b/src/FffPolygonGenerator.cpp
@@ -1,4 +1,4 @@
-//Copyright (c) 2020 Ultimaker B.V.
+//Copyright (c) 2021 Ultimaker B.V.
//CuraEngine is released under the terms of the AGPLv3 or higher.
#include <algorithm>
@@ -131,7 +131,7 @@ bool FffPolygonGenerator::sliceModel(MeshGroup* meshgroup, TimeKeeper& timeKeepe
}
else
{
- slice_layer_count = (storage.model_max.z - initial_layer_thickness) / layer_thickness + 1;
+ slice_layer_count = round_divide(storage.model_max.z - initial_layer_thickness, layer_thickness) + 1;
}
// Model is shallower than layer_height_0, so not even the first layer is sliced. Return an empty model then.