mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-10-04 22:31:02 +00:00
Belt brim: move the apron bands with the purge plan's layer grid
The purge plan snaps every object onto one layer grid after the brim is built; the per-layer brim bands follow their layers but the apron bands below the first layer carry their own print_z and were left behind, which is why a brim was refused next to a purge tower object. The shift now moves them too and the combination is accepted again.
This commit is contained in:
@@ -322,6 +322,9 @@ void PrintObject::belt_shift_layer_grid(double delta)
|
||||
layer->print_z += delta;
|
||||
for (SupportLayer *layer : m_support_layers)
|
||||
layer->print_z += delta;
|
||||
// The brim's apron bands below the first layer carry their own print_z.
|
||||
for (BeltBrimBand &band : m_belt_brim_prologue)
|
||||
band.print_z += delta;
|
||||
m_slicing_params.belt_floor_z_shift += delta;
|
||||
}
|
||||
|
||||
|
||||
@@ -1420,14 +1420,10 @@ StringObjectException Print::validate(std::vector<StringObjectException> *warnin
|
||||
return { L("Draft shield is not compatible with belt printer mode.") };
|
||||
|
||||
// Belt brim spans many layers and owns the layers below the object, which
|
||||
// neither the belt purge tower nor spiral vase can share (the purge plan moves
|
||||
// objects onto a common layer grid after the brim bands are built). The prime
|
||||
// tower setting alone is no obstacle: it stays on for any multi-filament
|
||||
// project, and belt printers never print the classic tower.
|
||||
// spiral vase cannot share. The prime tower setting is no obstacle: belt
|
||||
// printers never print the classic tower, and the belt purge prism is an
|
||||
// ordinary object that never takes a brim.
|
||||
if (this->has_belt_brim()) {
|
||||
if (this->has_belt_purge_tower())
|
||||
return { L("Brim is not compatible with the belt purge tower. "
|
||||
"Disable one of them.") };
|
||||
if (m_config.spiral_mode.value)
|
||||
return { L("Brim is not compatible with spiral vase mode on a belt printer. "
|
||||
"Disable one of them.") };
|
||||
|
||||
@@ -930,9 +930,9 @@ TEST_CASE("Belt inner-only leading brim does not reject the prime tower or spira
|
||||
CHECK(print.validate().string.empty());
|
||||
CHECK_FALSE(gcode(print).empty());
|
||||
}
|
||||
// An actual purge tower object is different: the purge plan moves objects onto a common
|
||||
// layer grid after the brim bands are built, so the two are still refused together.
|
||||
SECTION("a brim is refused next to a belt purge tower object") {
|
||||
// A purge tower object is accepted too: the purge plan moves every object, apron
|
||||
// bands included, onto one layer grid.
|
||||
SECTION("a brim is accepted next to a belt purge tower object") {
|
||||
DynamicPrintConfig config = belt_brim_multifilament_config(2, {
|
||||
{ "brim_type", "outer_only" },
|
||||
{ "brim_width", 4 },
|
||||
@@ -945,12 +945,11 @@ TEST_CASE("Belt inner-only leading brim does not reject the prime tower or spira
|
||||
Print print;
|
||||
Model model;
|
||||
init_print({ cube(20), cube(20) }, print, model, config, &overrides);
|
||||
CHECK(print.validate().string.empty());
|
||||
|
||||
model.objects.back()->config.set_key_value("belt_purge_tower_object", new ConfigOptionBool(true));
|
||||
print.apply(model, config);
|
||||
REQUIRE(print.has_belt_purge_tower());
|
||||
CHECK_FALSE(print.validate().string.empty());
|
||||
CHECK(print.validate().string.empty());
|
||||
CHECK_FALSE(gcode(print).empty());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user