Enabling object skirt. (#6487)

Implements individual object skirts, as requested in  **Individual skirts when printing by object. #3486** and  **Skirt around each object when using "by object" sequence #2652**

Now skirt type could be
![image](https://github.com/user-attachments/assets/532ecd91-fe3e-4bdb-b22f-ef28439ab7a6)

This PR based on several refactorings, including  **Configure skirt start point #6490** PR. To make review more easy each step was committed individually. Obviously them could be separated to different PRs or dropped.

I removed `prime_extruder && first_layer && extruder_id == first_extruder_id` as explicit object skirt is available.

Open question : do we need both common and object skirt together, probably with separate loop number?


All four combinations are possible.

Print by layer, common skirt:
![image](https://github.com/user-attachments/assets/5509f10b-ed3b-4243-8763-7ddcb101c67a)

Print by layer, object skirt:
![image](https://github.com/user-attachments/assets/deca3ca6-8bf7-4e5b-a356-2f5dd6e81566)

Print by object , object skirt:
![image](https://github.com/user-attachments/assets/7d1b2ddc-e61f-4d77-9ed4-e33fdd62d290)

Print by object , common skirt (any meaning?):
![image](https://github.com/user-attachments/assets/e7883eb4-b1a3-4158-a7f4-ce0658bc1939)
This commit is contained in:
SoftFever 2024-09-07 23:46:54 +08:00 committed by GitHub
commit 415bedef94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
17 changed files with 342 additions and 381 deletions

View file

@ -449,17 +449,6 @@ void ConfigManipulation::update_print_fff_config(DynamicPrintConfig* config, con
}
}
if (config->opt_enum<PrintSequence>("print_sequence") == PrintSequence::ByObject && config->opt_int("skirt_height") > 1 && config->opt_int("skirt_loops") > 0) {
const wxString msg_text = _(L("While printing by Object, the extruder may collide skirt.\nThus, reset the skirt layer to 1 to avoid that."));
MessageDialog dialog(m_msg_dlg_parent, msg_text, "", wxICON_WARNING | wxOK);
DynamicPrintConfig new_conf = *config;
is_msg_dlg_already_exist = true;
dialog.ShowModal();
new_conf.set_key_value("skirt_height", new ConfigOptionInt(1));
apply(config, &new_conf);
is_msg_dlg_already_exist = false;
}
if (config->opt_enum<SeamScarfType>("seam_slope_type") != SeamScarfType::None &&
config->get_abs_value("seam_slope_start_height") >= layer_height) {
const wxString msg_text = _(L("seam_slope_start_height need to be smaller than layer_height.\nReset to 0."));
@ -572,7 +561,7 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co
bool have_skirt = config->opt_int("skirt_loops") > 0;
toggle_field("skirt_height", have_skirt && config->opt_enum<DraftShield>("draft_shield") != dsEnabled);
for (auto el : { "skirt_distance", "draft_shield"})
for (auto el : {"skirt_type", "skirt_distance", "skirt_start_angle", "draft_shield"})
toggle_field(el, have_skirt);
bool have_brim = (config->opt_enum<BrimType>("brim_type") != btNoBrim);