ENH: put wall order to object level

Jira: [new]

Signed-off-by: qing.zhang <qing.zhang@bambulab.com>
Change-Id: Idda8b1351ac880602f5da518d1146042dcd77795
(cherry picked from commit c6a5c8233bb013f6e272fef4f6e77748549d81e4)
This commit is contained in:
qing.zhang 2023-09-21 15:32:18 +08:00 committed by Lane.Wei
parent e0fbc1738f
commit c5f1c22c51
12 changed files with 107 additions and 40 deletions

View file

@ -1139,8 +1139,7 @@ void PerimeterGenerator::process_classic()
// we continue inwards after having finished the brim
// TODO: add test for perimeter order
bool is_outer_wall_first =
this->print_config->wall_infill_order == WallInfillOrder::OuterInnerInfill ||
this->print_config->wall_infill_order == WallInfillOrder::InfillOuterInner;
this->object_config->wall_sequence == WallSequence::OuterInner;
if (is_outer_wall_first ||
//BBS: always print outer wall first when there indeed has brim.
(this->layer_id == 0 &&
@ -1148,7 +1147,7 @@ void PerimeterGenerator::process_classic()
this->object_config->brim_width.value > 0))
entities.reverse();
//BBS. adjust wall generate seq
else if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill)
else if (this->object_config->wall_sequence == WallSequence::InnerOuterInner)
if (entities.entities.size() > 1){
int last_outer=0;
int outer = 0;
@ -1461,9 +1460,7 @@ void PerimeterGenerator::process_arachne()
int direction = -1;
bool is_outer_wall_first =
this->print_config->wall_infill_order == WallInfillOrder::OuterInnerInfill ||
this->print_config->wall_infill_order == WallInfillOrder::InfillOuterInner ||
this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill;
this->object_config->wall_sequence == WallSequence::OuterInner || this->object_config->wall_sequence == WallSequence::InnerOuterInner;
if (is_outer_wall_first) {
start_perimeter = 0;
end_perimeter = int(perimeters.size());
@ -1590,7 +1587,7 @@ void PerimeterGenerator::process_arachne()
}
}
// BBS. adjust wall generate seq
if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill){
if (this->object_config->wall_sequence == WallSequence::InnerOuterInner) {
if (ordered_extrusions.size() > 2) { // 3 walls minimum needed to do inner outer inner ordering
int position = 0; // index to run the re-ordering for multiple external perimeters in a single island.
int arr_i = 0; // index to run through the walls