From c5448514ace5bc5329554fb45365b961a903ec89 Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 24 Jul 2018 11:20:29 +0200 Subject: [PATCH 1/2] Fixed an issue with MM and supports layering --- xs/src/libslic3r/GCode/ToolOrdering.hpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/xs/src/libslic3r/GCode/ToolOrdering.hpp b/xs/src/libslic3r/GCode/ToolOrdering.hpp index a7263abda3..4dcf6516ae 100644 --- a/xs/src/libslic3r/GCode/ToolOrdering.hpp +++ b/xs/src/libslic3r/GCode/ToolOrdering.hpp @@ -66,8 +66,10 @@ public: wipe_tower_partitions(0), wipe_tower_layer_height(0.) {} - bool operator< (const LayerTools &rhs) const { return print_z - EPSILON < rhs.print_z; } - bool operator==(const LayerTools &rhs) const { return std::abs(print_z - rhs.print_z) < EPSILON; } + // Changing these operators to epsilon version can make a problem in cases where support and object layers get close to each other. + // In case someone tries to do it, make sure you know what you're doing and test it properly (slice multiple objects at once with supports). + bool operator< (const LayerTools &rhs) const { return print_z < rhs.print_z; } + bool operator==(const LayerTools &rhs) const { return print_z == rhs.print_z; } bool is_extruder_order(unsigned int a, unsigned int b) const; From 21a59ce710e7cf7348e092baccb7a6fdab0c062a Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 24 Jul 2018 12:17:26 +0200 Subject: [PATCH 2/2] Shifted the MM priming lines inside a bit (for the out-of-bed detection) --- xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp index b49c2856b7..f466fc4f65 100644 --- a/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp +++ b/xs/src/libslic3r/GCode/WipeTowerPrusaMM.cpp @@ -490,7 +490,7 @@ WipeTower::ToolChangeResult WipeTowerPrusaMM::prime( // box_coordinates cleaning_box(xy(0.5f, - 1.5f), m_wipe_tower_width, wipe_area); const float prime_section_width = std::min(240.f / tools.size(), 60.f); - box_coordinates cleaning_box(xy(5.f, 0.f), prime_section_width, 100.f); + box_coordinates cleaning_box(xy(5.f, 0.01f + m_perimeter_width/2.f), prime_section_width, 100.f); PrusaMultiMaterial::Writer writer(m_layer_height, m_perimeter_width); writer.set_extrusion_flow(m_extrusion_flow)