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

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2020-06-18 04:54:55 +0300
committersupermerill <merill@free.fr>2020-06-18 05:22:25 +0300
commita8b28db75d9e69861c11e67ab68d9d0b408c3c58 (patch)
treee50f2da18edbbeee1681836bc6c6420d7fa4fc8b
parent6235ae1c171ab8b10684bb29c17a18e3b525e783 (diff)
Fix bug where perimeters could be printed last because they start by a thin walls.2.2.51.2
Now all thin walls are printed after their perimeters.
-rw-r--r--src/libslic3r/PerimeterGenerator.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp
index 41c0943f5..1c58e2291 100644
--- a/src/libslic3r/PerimeterGenerator.cpp
+++ b/src/libslic3r/PerimeterGenerator.cpp
@@ -938,11 +938,18 @@ ExtrusionEntityCollection PerimeterGenerator::_traverse_loops(
//little check: if you have external holes with only one extrusion and internal things, please draw the internal first, just in case it can help print the hole better.
std::vector<std::pair<size_t, bool>> better_chain;
for (const std::pair<size_t, bool>& idx : chain) {
- if (idx.first >= loops.size() || !loops[idx.first].is_external() || (!loops[idx.first].is_contour && !loops[idx.first].children.empty()))
- better_chain.push_back(idx);
+ if(idx.first < loops.size())
+ if (!loops[idx.first].is_external() || (!loops[idx.first].is_contour && !loops[idx.first].children.empty()))
+ better_chain.push_back(idx);
+ }
+ for (const std::pair<size_t, bool>& idx : chain) {
+ if (idx.first < loops.size())
+ if (idx.first < loops.size() && loops[idx.first].is_external() && !(!loops[idx.first].is_contour && !loops[idx.first].children.empty()))
+ better_chain.push_back(idx);
}
+ //thin walls always last!
for (const std::pair<size_t, bool>& idx : chain) {
- if (idx.first < loops.size() && loops[idx.first].is_external() && !(!loops[idx.first].is_contour && !loops[idx.first].children.empty()))
+ if (idx.first >= loops.size())
better_chain.push_back(idx);
}