mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-07-23 02:42:08 +00:00
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:
@@ -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
|
||||
|
||||
29
tests/libslic3r/test_local_z_order_optimizer.cpp
Normal file
29
tests/libslic3r/test_local_z_order_optimizer.cpp
Normal 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});
|
||||
}
|
||||
Reference in New Issue
Block a user