mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
ENH: inner-out-inner wal seq
Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: Idd2205f2b72a8f471927c9e3a38415013548f09e
This commit is contained in:
parent
e144fce341
commit
db873eb99b
3 changed files with 27 additions and 1 deletions
|
@ -959,6 +959,17 @@ void PerimeterGenerator::process_classic()
|
|||
this->object_config->brim_type == BrimType::btOuterOnly &&
|
||||
this->object_config->brim_width.value > 0))
|
||||
entities.reverse();
|
||||
//BBS. adjust wall generate seq
|
||||
else if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill)
|
||||
if (entities.entities.size() > 1){
|
||||
int last_outer=0;
|
||||
int outer = 0;
|
||||
for (; outer < entities.entities.size(); ++outer)
|
||||
if (entities.entities[outer]->role() == erExternalPerimeter && outer - last_outer > 1) {
|
||||
std::swap(entities.entities[outer], entities.entities[outer - 1]);
|
||||
last_outer = outer;
|
||||
}
|
||||
}
|
||||
// append perimeters for this slice as a collection
|
||||
if (! entities.empty())
|
||||
this->loops->append(entities);
|
||||
|
@ -1279,6 +1290,17 @@ void PerimeterGenerator::process_arachne()
|
|||
}
|
||||
}
|
||||
}
|
||||
// BBS. adjust wall generate seq
|
||||
if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill)
|
||||
if (ordered_extrusions.size() > 1) {
|
||||
int last_outer = 0;
|
||||
int outer = 0;
|
||||
for (; outer < ordered_extrusions.size(); ++outer)
|
||||
if (ordered_extrusions[outer].extrusion->inset_idx == 0 && outer - last_outer > 1) {
|
||||
std::swap(ordered_extrusions[outer], ordered_extrusions[outer - 1]);
|
||||
last_outer = outer;
|
||||
}
|
||||
}
|
||||
|
||||
if (ExtrusionEntityCollection extrusion_coll = traverse_extrusions(*this, ordered_extrusions); !extrusion_coll.empty())
|
||||
this->loops->append(extrusion_coll);
|
||||
|
|
|
@ -148,7 +148,8 @@ static t_config_enum_values s_keys_map_WallInfillOrder {
|
|||
{ "inner wall/outer wall/infill", int(WallInfillOrder::InnerOuterInfill) },
|
||||
{ "outer wall/inner wall/infill", int(WallInfillOrder::OuterInnerInfill) },
|
||||
{ "infill/inner wall/outer wall", int(WallInfillOrder::InfillInnerOuter) },
|
||||
{ "infill/outer wall/inner wall", int(WallInfillOrder::InfillOuterInner) }
|
||||
{ "infill/outer wall/inner wall", int(WallInfillOrder::InfillOuterInner) },
|
||||
{ "inner-outer-inner wall/infill", int(WallInfillOrder::InnerOuterInnerInfill)}
|
||||
};
|
||||
CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(WallInfillOrder)
|
||||
|
||||
|
@ -1015,10 +1016,12 @@ void PrintConfigDef::init_fff_params()
|
|||
def->enum_values.push_back("outer wall/inner wall/infill");
|
||||
def->enum_values.push_back("infill/inner wall/outer wall");
|
||||
def->enum_values.push_back("infill/outer wall/inner wall");
|
||||
def->enum_values.push_back("inner-outer-inner wall/infill");
|
||||
def->enum_labels.push_back(L("inner/outer/infill"));
|
||||
def->enum_labels.push_back(L("outer/inner/infill"));
|
||||
def->enum_labels.push_back(L("infill/inner/outer"));
|
||||
def->enum_labels.push_back(L("infill/outer/inner"));
|
||||
def->enum_labels.push_back(L("inner-outer-inner/infill"));
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionEnum<WallInfillOrder>(WallInfillOrder::InnerOuterInfill));
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ enum class WallInfillOrder {
|
|||
OuterInnerInfill,
|
||||
InfillInnerOuter,
|
||||
InfillOuterInner,
|
||||
InnerOuterInnerInfill,
|
||||
Count,
|
||||
};
|
||||
//BBS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue