mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
New inner-outer-inner/infill mode
This commit is contained in:
parent
ff2cf17a73
commit
e022c5ad5b
6 changed files with 25 additions and 13 deletions
|
@ -5519,6 +5519,9 @@ msgstr "内圈墙/外圈墙/填充的打印顺序"
|
||||||
msgid "inner/outer/infill"
|
msgid "inner/outer/infill"
|
||||||
msgstr "内墙/外墙/填充"
|
msgstr "内墙/外墙/填充"
|
||||||
|
|
||||||
|
msgid "inner-outer-inner/infill"
|
||||||
|
msgstr "内墙/外墙/内墙/填充"
|
||||||
|
|
||||||
msgid "outer/inner/infill"
|
msgid "outer/inner/infill"
|
||||||
msgstr "外墙/内墙/填充"
|
msgstr "外墙/内墙/填充"
|
||||||
|
|
||||||
|
|
Binary file not shown.
|
@ -3304,7 +3304,8 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
||||||
if (!m_config.spiral_mode && description == "perimeter") {
|
if (!m_config.spiral_mode && description == "perimeter") {
|
||||||
assert(m_layer != nullptr);
|
assert(m_layer != nullptr);
|
||||||
bool is_outer_wall_first = m_config.wall_infill_order == WallInfillOrder::OuterInnerInfill
|
bool is_outer_wall_first = m_config.wall_infill_order == WallInfillOrder::OuterInnerInfill
|
||||||
|| m_config.wall_infill_order == WallInfillOrder::InfillOuterInner;
|
|| m_config.wall_infill_order == WallInfillOrder::InfillOuterInner
|
||||||
|
|| m_config.wall_infill_order == WallInfillOrder::InnerOuterInnerInfill;
|
||||||
m_seam_placer.place_seam(m_layer, loop, is_outer_wall_first, this->last_pos());
|
m_seam_placer.place_seam(m_layer, loop, is_outer_wall_first, this->last_pos());
|
||||||
} else
|
} else
|
||||||
loop.split_at(last_pos, false);
|
loop.split_at(last_pos, false);
|
||||||
|
|
|
@ -673,14 +673,15 @@ void PerimeterGenerator::process()
|
||||||
// TODO: add test for perimeter order
|
// TODO: add test for perimeter order
|
||||||
bool is_outer_wall_first =
|
bool is_outer_wall_first =
|
||||||
this->print_config->wall_infill_order == WallInfillOrder::OuterInnerInfill ||
|
this->print_config->wall_infill_order == WallInfillOrder::OuterInnerInfill ||
|
||||||
this->print_config->wall_infill_order == WallInfillOrder::InfillOuterInner;
|
this->print_config->wall_infill_order == WallInfillOrder::InfillOuterInner ||
|
||||||
|
this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill;
|
||||||
if (is_outer_wall_first ||
|
if (is_outer_wall_first ||
|
||||||
//BBS: always print outer wall first when there indeed has brim.
|
//BBS: always print outer wall first when there indeed has brim.
|
||||||
(this->layer_id == 0 &&
|
(this->layer_id == 0 &&
|
||||||
this->object_config->brim_type == BrimType::btOuterOnly &&
|
this->object_config->brim_type == BrimType::btOuterOnly &&
|
||||||
this->object_config->brim_width.value > 0))
|
this->object_config->brim_width.value > 0))
|
||||||
{
|
{
|
||||||
//entities.reverse();
|
if (this->print_config->wall_infill_order == WallInfillOrder::InnerOuterInnerInfill) {
|
||||||
if (entities.entities.size() > 1) {
|
if (entities.entities.size() > 1) {
|
||||||
std::vector<int> extPs;
|
std::vector<int> extPs;
|
||||||
for (int i = 0; i < entities.entities.size(); ++i) {
|
for (int i = 0; i < entities.entities.size(); ++i) {
|
||||||
|
@ -688,12 +689,15 @@ void PerimeterGenerator::process()
|
||||||
extPs.push_back(i);
|
extPs.push_back(i);
|
||||||
}
|
}
|
||||||
for (int i = 0; i < extPs.size(); ++i) {
|
for (int i = 0; i < extPs.size(); ++i) {
|
||||||
if (extPs[i] == 0 || extPs[i] - 1 == extPs[i - 1])
|
if (extPs[i] == 0 || (i > 0 && extPs[i] - 1 == extPs[i - 1]))
|
||||||
continue;
|
continue;
|
||||||
std::swap(entities.entities[extPs[i]], entities.entities[extPs[i] - 1]);
|
std::swap(entities.entities[extPs[i]], entities.entities[extPs[i] - 1]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
entities.reverse();
|
||||||
|
}
|
||||||
// append perimeters for this slice as a collection
|
// append perimeters for this slice as a collection
|
||||||
if (! entities.empty())
|
if (! entities.empty())
|
||||||
this->loops->append(entities);
|
this->loops->append(entities);
|
||||||
|
|
|
@ -159,6 +159,7 @@ CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(IroningType)
|
||||||
static t_config_enum_values s_keys_map_WallInfillOrder {
|
static t_config_enum_values s_keys_map_WallInfillOrder {
|
||||||
{ "inner wall/outer wall/infill", int(WallInfillOrder::InnerOuterInfill) },
|
{ "inner wall/outer wall/infill", int(WallInfillOrder::InnerOuterInfill) },
|
||||||
{ "outer wall/inner wall/infill", int(WallInfillOrder::OuterInnerInfill) },
|
{ "outer wall/inner wall/infill", int(WallInfillOrder::OuterInnerInfill) },
|
||||||
|
{ "inner-outer-inner wall/infill", int(WallInfillOrder::InnerOuterInnerInfill) },
|
||||||
{ "infill/inner wall/outer wall", int(WallInfillOrder::InfillInnerOuter) },
|
{ "infill/inner wall/outer wall", int(WallInfillOrder::InfillInnerOuter) },
|
||||||
{ "infill/outer wall/inner wall", int(WallInfillOrder::InfillOuterInner) }
|
{ "infill/outer wall/inner wall", int(WallInfillOrder::InfillOuterInner) }
|
||||||
};
|
};
|
||||||
|
@ -1000,10 +1001,12 @@ void PrintConfigDef::init_fff_params()
|
||||||
def->enum_values.push_back("outer wall/inner wall/infill");
|
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/inner wall/outer wall");
|
||||||
def->enum_values.push_back("infill/outer wall/inner 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("inner/outer/infill"));
|
||||||
def->enum_labels.push_back(L("outer/inner/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/inner/outer"));
|
||||||
def->enum_labels.push_back(L("infill/outer/inner"));
|
def->enum_labels.push_back(L("infill/outer/inner"));
|
||||||
|
def->enum_labels.push_back(L("inner-outer-inner/infill"));
|
||||||
def->mode = comAdvanced;
|
def->mode = comAdvanced;
|
||||||
def->set_default_value(new ConfigOptionEnum<WallInfillOrder>(WallInfillOrder::InnerOuterInfill));
|
def->set_default_value(new ConfigOptionEnum<WallInfillOrder>(WallInfillOrder::InnerOuterInfill));
|
||||||
|
|
||||||
|
|
|
@ -75,6 +75,7 @@ enum class WallInfillOrder {
|
||||||
OuterInnerInfill,
|
OuterInnerInfill,
|
||||||
InfillInnerOuter,
|
InfillInnerOuter,
|
||||||
InfillOuterInner,
|
InfillOuterInner,
|
||||||
|
InnerOuterInnerInfill,
|
||||||
Count,
|
Count,
|
||||||
};
|
};
|
||||||
//BBS
|
//BBS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue