mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-31 22:06:59 +00:00
fix test error on Windows ARM64
This commit is contained in:
@@ -17,6 +17,16 @@
|
|||||||
using namespace Slic3r;
|
using namespace Slic3r;
|
||||||
using namespace Slic3r::Test;
|
using namespace Slic3r::Test;
|
||||||
|
|
||||||
|
// Arrange on a finite bed, not an unbounded InfiniteBed: the latter places items
|
||||||
|
// near INT64_MIN/4 (~2.3e18), which reaches ClipperLib's coordinate limit and throws
|
||||||
|
// "Coordinate outside allowed range" on Windows/arm64. A 500x500 bed keeps coordinates
|
||||||
|
// small while still covering large printers.
|
||||||
|
static void arrange_objects_on_test_bed(Model &model, const DynamicPrintConfig &config)
|
||||||
|
{
|
||||||
|
const BoundingBox bed{Point::new_scale(0., 0.), Point::new_scale(500., 500.)};
|
||||||
|
arrange_objects(model, bed, ArrangeParams{scaled(min_object_distance(config))});
|
||||||
|
}
|
||||||
|
|
||||||
SCENARIO("set_speed emits values with fixed-point output.", "[GCodeWriter]") {
|
SCENARIO("set_speed emits values with fixed-point output.", "[GCodeWriter]") {
|
||||||
|
|
||||||
GIVEN("GCodeWriter instance") {
|
GIVEN("GCodeWriter instance") {
|
||||||
@@ -245,8 +255,7 @@ TEST_CASE("Machine envelope emits max limit among used extruders", "[GCodeWriter
|
|||||||
obj2->config.set_key_value("extruder", new ConfigOptionInt(2)); // 0-based index 1
|
obj2->config.set_key_value("extruder", new ConfigOptionInt(2)); // 0-based index 1
|
||||||
|
|
||||||
Print print;
|
Print print;
|
||||||
arrange_objects(model, InfiniteBed{},
|
arrange_objects_on_test_bed(model, config);
|
||||||
ArrangeParams{scaled(min_object_distance(config))});
|
|
||||||
for (auto* mo : model.objects) {
|
for (auto* mo : model.objects) {
|
||||||
mo->ensure_on_bed();
|
mo->ensure_on_bed();
|
||||||
print.auto_assign_extruders(mo);
|
print.auto_assign_extruders(mo);
|
||||||
@@ -358,7 +367,7 @@ TEST_CASE("EXTRUDER_LIMIT per-extruder clamping and max fallback", "[GCodeWriter
|
|||||||
obj2->config.set_key_value("extruder", new ConfigOptionInt(2)); // 0-based index 1
|
obj2->config.set_key_value("extruder", new ConfigOptionInt(2)); // 0-based index 1
|
||||||
|
|
||||||
Print print;
|
Print print;
|
||||||
arrange_objects(model, InfiniteBed{}, ArrangeParams{scaled(min_object_distance(config))});
|
arrange_objects_on_test_bed(model, config);
|
||||||
for (auto* mo : model.objects) {
|
for (auto* mo : model.objects) {
|
||||||
mo->ensure_on_bed();
|
mo->ensure_on_bed();
|
||||||
print.auto_assign_extruders(mo);
|
print.auto_assign_extruders(mo);
|
||||||
@@ -583,7 +592,7 @@ SCENARIO("Change blocks carry consecutive toolchange ordinals without a duplicat
|
|||||||
auto slice_to_gcode = [&]() {
|
auto slice_to_gcode = [&]() {
|
||||||
Print print;
|
Print print;
|
||||||
print.is_BBL_printer() = true;
|
print.is_BBL_printer() = true;
|
||||||
arrange_objects(model, InfiniteBed{}, ArrangeParams{scaled(min_object_distance(config))});
|
arrange_objects_on_test_bed(model, config);
|
||||||
for (auto *mo : model.objects) {
|
for (auto *mo : model.objects) {
|
||||||
mo->ensure_on_bed();
|
mo->ensure_on_bed();
|
||||||
print.auto_assign_extruders(mo);
|
print.auto_assign_extruders(mo);
|
||||||
@@ -644,7 +653,7 @@ SCENARIO("Prime-tower visits without a filament change do not advance the toolch
|
|||||||
|
|
||||||
Print print;
|
Print print;
|
||||||
print.is_BBL_printer() = true;
|
print.is_BBL_printer() = true;
|
||||||
arrange_objects(model, InfiniteBed{}, ArrangeParams{scaled(min_object_distance(config))});
|
arrange_objects_on_test_bed(model, config);
|
||||||
for (auto *mo : model.objects) {
|
for (auto *mo : model.objects) {
|
||||||
mo->ensure_on_bed();
|
mo->ensure_on_bed();
|
||||||
print.auto_assign_extruders(mo);
|
print.auto_assign_extruders(mo);
|
||||||
|
|||||||
Reference in New Issue
Block a user