ENH: apply scarf seam on auto compensation circles
Jira: none Signed-off-by: qing.zhang <qing.zhang@bambulab.com> Change-Id: I339acf82ec1af9ed0a8f973e76b73c0eae608767
This commit is contained in:
parent
53a70e539e
commit
03607bd975
|
@ -4595,6 +4595,9 @@ std::string GCode::extrude_loop(ExtrusionLoop loop, std::string description, dou
|
|||
// get paths
|
||||
ExtrusionPaths paths;
|
||||
bool set_holes_and_compensation_speed = loop.get_customize_flag() && !loop.has_overhang_paths();
|
||||
if (set_holes_and_compensation_speed && m_config.apply_scarf_seam_on_circles.value) {
|
||||
enable_seam_slope = true;
|
||||
}
|
||||
loop.clip_end(clip_length, &paths);
|
||||
if (paths.empty()) return "";
|
||||
|
||||
|
|
|
@ -881,7 +881,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"elefant_foot_compensation", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower",
|
||||
"prime_tower_width", "prime_tower_brim_width", "prime_tower_skip_points",
|
||||
"prime_tower_rib_wall","prime_tower_extra_rib_length","prime_tower_rib_width","prime_tower_fillet_wall",
|
||||
"enable_circle_compensation", "circle_compensation_speed", "circle_compensation_manual_offset",
|
||||
"enable_circle_compensation", "circle_compensation_speed", "circle_compensation_manual_offset", "apply_scarf_seam_on_circles",
|
||||
"counter_coef_1", "counter_coef_2", "counter_coef_3", "hole_coef_1", "hole_coef_2", "hole_coef_3",
|
||||
"counter_limit_min", "counter_limit_max", "hole_limit_min", "hole_limit_max", "diameter_limit",
|
||||
"wipe_tower_no_sparse_layers", "compatible_printers", "compatible_printers_condition", "inherits",
|
||||
|
|
|
@ -1114,6 +1114,19 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
|
|||
}
|
||||
}
|
||||
|
||||
{ //check scarf seam setting
|
||||
const auto &o = model.objects;
|
||||
const bool has_scarf_joint_seam = std::any_of(o.begin(), o.end(), [&new_full_config](ModelObject *obj) {
|
||||
return obj->get_config_value<ConfigOptionBool>(new_full_config, "apply_scarf_seam_on_circles")->value;
|
||||
});
|
||||
|
||||
if (has_scarf_joint_seam) {
|
||||
new_full_config.set("has_scarf_joint_seam", true);
|
||||
}
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << ", has_scarf_joint_seam:" << has_scarf_joint_seam;
|
||||
}
|
||||
|
||||
//apply extruder related values
|
||||
std::vector<int> print_variant_index;
|
||||
if (!extruder_applied) {
|
||||
|
|
|
@ -4201,6 +4201,12 @@ void PrintConfigDef::init_fff_params()
|
|||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloat(0.0));
|
||||
|
||||
def = this->add("apply_scarf_seam_on_circles", coBool);
|
||||
def->label = L("Scarf Seam On Compensation Circles");
|
||||
def->tooltip = L("Enable to apply scarf seam on the circle to have better assemble.");
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionBool(true));
|
||||
|
||||
def = this->add("circle_compensation_speed", coFloats);
|
||||
def->label = L("Circle Compensation Speed");
|
||||
def->tooltip = L("circle_compensation_speed");
|
||||
|
|
|
@ -829,6 +829,7 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
//BBS auto hole contour compensation
|
||||
((ConfigOptionBool, enable_circle_compensation))
|
||||
((ConfigOptionFloat, circle_compensation_manual_offset))
|
||||
((ConfigOptionBool, apply_scarf_seam_on_circles))
|
||||
((ConfigOptionBool, flush_into_objects))
|
||||
// BBS
|
||||
((ConfigOptionBool, flush_into_infill))
|
||||
|
|
|
@ -923,7 +923,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "inner_wall_line_width"
|
||||
|| opt_key == "infill_wall_overlap"
|
||||
|| opt_key == "enable_circle_compensation"
|
||||
|| opt_key == "circle_compensation_manual_offset") {
|
||||
|| opt_key == "circle_compensation_manual_offset"
|
||||
|| opt_key == "apply_scarf_seam_on_circles") {
|
||||
steps.emplace_back(posPerimeters);
|
||||
} else if (opt_key == "gap_infill_speed" || opt_key == "filter_out_gap_fill") {
|
||||
// Return true if gap-fill speed has changed from zero value to non-zero or from non-zero value to zero.
|
||||
|
|
|
@ -2034,9 +2034,11 @@ void TabPrint::build()
|
|||
optgroup->append_single_option_line("enable_arc_fitting", "acr-move");
|
||||
optgroup->append_single_option_line("xy_hole_compensation", "xy-hole-contour-compensation");
|
||||
optgroup->append_single_option_line("xy_contour_compensation", "xy-hole-contour-compensation");
|
||||
optgroup->append_single_option_line("elefant_foot_compensation", "parameter/elephant-foot");
|
||||
optgroup->append_single_option_line("enable_circle_compensation");
|
||||
optgroup->append_single_option_line("circle_compensation_manual_offset");
|
||||
|
||||
optgroup->append_single_option_line("elefant_foot_compensation", "parameter/elephant-foot");
|
||||
|
||||
optgroup->append_single_option_line("precise_z_height");
|
||||
|
||||
optgroup = page->new_optgroup(L("Ironing"), L"param_ironing");
|
||||
|
|
Loading…
Reference in New Issue