diff --git a/resources/localization/list.txt b/resources/localization/list.txt index f02b017d7..dc30cdcc8 100644 --- a/resources/localization/list.txt +++ b/resources/localization/list.txt @@ -30,6 +30,7 @@ src/slic3r/GUI/Gizmos/GLGizmoScale.cpp src/slic3r/GUI/Gizmos/GLGizmoSeam.cpp src/slic3r/GUI/Gizmos/GLGizmoSeam.hpp src/slic3r/GUI/Gizmos/GLGizmoSimplify.cpp +src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.cpp src/slic3r/GUI/Gizmos/GLGizmoSlaSupports.hpp src/slic3r/GUI/Gizmos/GLGizmosManager.cpp diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 92e0a698e..1611b2325 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -1991,14 +1991,15 @@ void GCodeProcessor::process_tags(const std::string_view comment, bool producers if (comment == reserved_tag(ETags::Layer_Change)) { ++m_layer_id; if (m_spiral_vase_active) { - if (m_result.moves.empty()) - m_result.spiral_vase_layers.push_back({ m_first_layer_height, { 0, 0 } }); + if (m_result.moves.empty() || m_result.spiral_vase_layers.empty()) + // add a placeholder for layer height. the actual value will be set inside process_G1() method + m_result.spiral_vase_layers.push_back({ FLT_MAX, { 0, 0 } }); else { const size_t move_id = m_result.moves.size() - 1; - if (!m_result.spiral_vase_layers.empty() && m_end_position[Z] == m_result.spiral_vase_layers.back().first) + if (!m_result.spiral_vase_layers.empty()) m_result.spiral_vase_layers.back().second.second = move_id; - else - m_result.spiral_vase_layers.push_back({ static_cast(m_end_position[Z]), { move_id, move_id } }); + // add a placeholder for layer height. the actual value will be set inside process_G1() method + m_result.spiral_vase_layers.push_back({ FLT_MAX, { move_id, move_id } }); } } return; @@ -2828,8 +2829,13 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) m_seams_detector.set_first_vertex(m_result.moves.back().position - m_extruder_offsets[m_extruder_id]); } - if (m_spiral_vase_active && !m_result.spiral_vase_layers.empty() && !m_result.moves.empty()) - m_result.spiral_vase_layers.back().second.second = m_result.moves.size() - 1; + if (m_spiral_vase_active && !m_result.spiral_vase_layers.empty()) { + if (m_result.spiral_vase_layers.back().first == FLT_MAX && delta_pos[Z] > 0.0) + // replace layer height placeholder with correct value + m_result.spiral_vase_layers.back().first = static_cast(m_end_position[Z]); + if (!m_result.moves.empty()) + m_result.spiral_vase_layers.back().second.second = m_result.moves.size() - 1; + } // store move #if ENABLE_PROCESS_G2_G3_LINES diff --git a/src/slic3r/GUI/DesktopIntegrationDialog.cpp b/src/slic3r/GUI/DesktopIntegrationDialog.cpp index 81c681bc3..7f99a505c 100644 --- a/src/slic3r/GUI/DesktopIntegrationDialog.cpp +++ b/src/slic3r/GUI/DesktopIntegrationDialog.cpp @@ -10,6 +10,7 @@ #include "libslic3r/Platform.hpp" #include "libslic3r/Config.hpp" +#include #include #include #include @@ -503,4 +504,4 @@ DesktopIntegrationDialog::~DesktopIntegrationDialog() } // namespace GUI } // namespace Slic3r -#endif // __linux__ \ No newline at end of file +#endif // __linux__ diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index 8533854f4..4435f836b 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/src/slic3r/Utils/AppUpdater.cpp b/src/slic3r/Utils/AppUpdater.cpp index 60739ccb3..27f2e34bc 100644 --- a/src/slic3r/Utils/AppUpdater.cpp +++ b/src/slic3r/Utils/AppUpdater.cpp @@ -5,6 +5,7 @@ #include #include +#include #include #include #include @@ -242,7 +243,7 @@ boost::filesystem::path AppUpdater::priv::download_file(const DownloadAppData& d tmp_path += format(".%1%%2%", get_current_pid(), ".download"); try { - boost::filesystem::fstream file(tmp_path, std::ios::out | std::ios::binary | std::ios::trunc); + boost::nowide::fstream file(tmp_path.string(), std::ios::out | std::ios::binary | std::ios::trunc); file.write(body.c_str(), body.size()); file.close(); boost::filesystem::rename(tmp_path, dest_path); diff --git a/tests/libslic3r/test_mutable_priority_queue.cpp b/tests/libslic3r/test_mutable_priority_queue.cpp index 3e99eef08..78c97bc7e 100644 --- a/tests/libslic3r/test_mutable_priority_queue.cpp +++ b/tests/libslic3r/test_mutable_priority_queue.cpp @@ -356,7 +356,7 @@ TEST_CASE("Mutable priority queue - first pop", "[MutableSkipHeapPriorityQueue]" [](MyValue &l, MyValue &r) { return l.val < r.val; }); q.reserve(count); for (size_t id = 0; id < count; id++) { - MyValue mv{ id, rand()}; + MyValue mv{ id, rand() / 100.f }; q.push(mv); } MyValue it = q.top(); // copy