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
path: root/src
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2022-07-26 04:20:53 +0300
committersupermerill <merill@free.fr>2022-08-10 23:56:17 +0300
commita16466ab6ff3c2c9023bc46fdecc7dcef9003811 (patch)
tree33f55bc62e65609297dc2fc9fbdb0b6ab45cb6f3 /src
parent13eed2372b708772c591bd4f3e433c46b4d54881 (diff)
Fix spiral_vase (from 2.4 merge: multithreading issue)
Diffstat (limited to 'src')
-rw-r--r--src/libslic3r/GCode.cpp6
-rw-r--r--src/libslic3r/GCode.hpp2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp
index c02757a69..7de2f0b6d 100644
--- a/src/libslic3r/GCode.cpp
+++ b/src/libslic3r/GCode.cpp
@@ -2694,6 +2694,10 @@ GCode::LayerResult GCode::process_layer(
}
}
result.spiral_vase_enable = enable;
+ if (enable)
+ m_spiral_vase_layer = std::abs(m_spiral_vase_layer) + 1;
+ else
+ m_spiral_vase_layer = -std::abs(m_spiral_vase_layer);
// If we're going to apply spiralvase to this layer, disable loop clipping.
m_enable_loop_clipping = !enable;
}
@@ -3663,7 +3667,7 @@ void GCode::split_at_seam_pos(ExtrusionLoop& loop, std::unique_ptr<EdgeGrid::Gri
// or randomize if requested
Point last_pos = this->last_pos();
//for first spiral, choose the seam, as the position will be very relevant.
- if (m_config.spiral_vase && !m_spiral_vase->is_transition_layer()) {
+ if (m_spiral_vase_layer > 1 /* spiral vase is printign and it's after the transition layer (that one can find a good spot)*/) {
loop.split_at(last_pos, false);
/*} else {
const EdgeGrid::Grid* edge_grid_ptr = (lower_layer_edge_grid && *lower_layer_edge_grid)
diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp
index 5e0a182b5..a2555ed77 100644
--- a/src/libslic3r/GCode.hpp
+++ b/src/libslic3r/GCode.hpp
@@ -459,6 +459,8 @@ private:
std::unique_ptr<CoolingBuffer> m_cooling_buffer;
std::unique_ptr<SpiralVase> m_spiral_vase;
+ //to know the current spiral layer. Only for process_layer. began at 1, 0 means no spiral. Negative means disbaled spiral.
+ int32_t m_spiral_vase_layer = 0;
std::unique_ptr<GCodeFindReplace> m_find_replace;
#ifdef HAS_PRESSURE_EQUALIZER
std::unique_ptr<PressureEqualizer> m_pressure_equalizer;