mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-06 14:37:36 -06:00
Apply single_loop_draft_shield also to skirt (#9298)
This commit is contained in:
parent
82bc52cbcc
commit
69df9420c1
3 changed files with 8 additions and 10 deletions
|
@ -3539,13 +3539,11 @@ std::string GCode::generate_skirt(const Print &print,
|
|||
Flow layer_skirt_flow = print.skirt_flow().with_height(float(m_skirt_done.back() - (m_skirt_done.size() == 1 ? 0. : m_skirt_done[m_skirt_done.size() - 2])));
|
||||
double mm3_per_mm = layer_skirt_flow.mm3_per_mm();
|
||||
// Decide where to start looping:
|
||||
// - If it’s the first layer or if we do NOT want a single-wall draft shield,
|
||||
// - If it’s the first layer or if we do NOT want a single-wall skirt/draft shield,
|
||||
// start from loops.first (all loops).
|
||||
// - Otherwise, if single_loop_draft_shield == true and draft_shield == true (and not the first layer),
|
||||
// - Otherwise, if single_loop_draft_shield == true (and not the first layer),
|
||||
// start from loops.second - 1 (just one loop).
|
||||
bool single_loop_draft_shield = print.m_config.single_loop_draft_shield &&
|
||||
(print.m_config.draft_shield == dsEnabled);
|
||||
const size_t start_idx = (first_layer || !single_loop_draft_shield)
|
||||
const size_t start_idx = (first_layer || !print.m_config.single_loop_draft_shield)
|
||||
? loops.first
|
||||
: (loops.second - 1);
|
||||
|
||||
|
@ -3565,7 +3563,7 @@ std::string GCode::generate_skirt(const Print &print,
|
|||
//FIXME using the support_speed of the 1st object printed.
|
||||
gcode += this->extrude_loop(loop, "skirt", m_config.support_speed.value);
|
||||
// If we only want a single wall on non-first layers, break now
|
||||
if (!first_layer && single_loop_draft_shield) {
|
||||
if (!first_layer && print.m_config.single_loop_draft_shield) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4299,8 +4299,8 @@ void PrintConfigDef::init_fff_params()
|
|||
def->set_default_value(new ConfigOptionInt(1));
|
||||
|
||||
def = this->add("single_loop_draft_shield", coBool);
|
||||
def->label = L("Single loop draft shield");
|
||||
def->tooltip = L("Limits the draft shield loops to one wall after the first layer. This is useful, on occasion, to conserve filament but may cause the draft shield to warp / crack.");
|
||||
def->label = L("Single loop after first layer");
|
||||
def->tooltip = L("Limits the skirt/draft shield loops to one wall after the first layer. This is useful, on occasion, to conserve filament but may cause the draft shield/skirt to warp / crack.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(false));
|
||||
|
||||
|
|
|
@ -2311,11 +2311,11 @@ page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only v
|
|||
optgroup->append_single_option_line("min_skirt_length");
|
||||
optgroup->append_single_option_line("skirt_distance");
|
||||
optgroup->append_single_option_line("skirt_start_angle");
|
||||
optgroup->append_single_option_line("skirt_height");
|
||||
optgroup->append_single_option_line("skirt_speed");
|
||||
optgroup->append_single_option_line("skirt_height");
|
||||
optgroup->append_single_option_line("draft_shield");
|
||||
optgroup->append_single_option_line("single_loop_draft_shield");
|
||||
|
||||
|
||||
optgroup = page->new_optgroup(L("Brim"), L"param_adhension");
|
||||
optgroup->append_single_option_line("brim_type", "auto-brim");
|
||||
optgroup->append_single_option_line("brim_width", "auto-brim#manual");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue