Add Local-Z wipe tower reserve planning and pass ordering

Add startup profiling for GUI initialization
Drop unusable Bonjour sockets and harden socket cleanup
Add /FS to MSVC parallel compile options
This commit is contained in:
Rad
2026-03-10 19:33:36 +01:00
parent 7c7d06a159
commit 153d35ded0
21 changed files with 961 additions and 132 deletions

View File

@@ -11,6 +11,7 @@ add_executable(${_TEST_NAME}_tests
test_elephant_foot_compensation.cpp
test_geometry.cpp
test_mixed_filament.cpp
test_local_z_order_optimizer.cpp
test_placeholder_parser.cpp
test_polygon.cpp
test_mutable_polygon.cpp

View File

@@ -0,0 +1,29 @@
#include <catch2/catch.hpp>
#include "libslic3r/LocalZOrderOptimizer.hpp"
using namespace Slic3r;
TEST_CASE("Local-Z bucket ordering starts with the active extruder when possible", "[LocalZ][GCode]")
{
const std::vector<unsigned int> ordered =
LocalZOrderOptimizer::order_bucket_extruders({1, 2}, 2, 1);
REQUIRE(ordered == std::vector<unsigned int>{2, 1});
}
TEST_CASE("Local-Z pass groups keep a matching active extruder bucket first", "[LocalZ][GCode]")
{
const std::vector<size_t> ordered =
LocalZOrderOptimizer::order_pass_group({{1}, {2}}, 2);
REQUIRE(ordered == std::vector<size_t>{1, 0});
}
TEST_CASE("Local-Z pass groups keep original order when no bucket matches the active extruder", "[LocalZ][GCode]")
{
const std::vector<size_t> ordered =
LocalZOrderOptimizer::order_pass_group({{1}, {2}, {3}}, 0);
REQUIRE(ordered == std::vector<size_t>{0, 1, 2});
}