Scarf joint seam enhancement: conditional scarf joint and slowdown for scarf joint only (#4317)

* Allow apply scarf joint seams to perimeters without sharp corners only

* 1. Fix an error when detect whether a loop is smooth
2. Expose scarf_angle_threshold to UI

* fix linux build error

* minor code changes

* Support slowdown speed for scarf joint only

* update tips

* improve the logic a bit

* Fixed a bug that scarf speed may not respected for overhangs

* Add a new scarf flow ratio option
This commit is contained in:
SoftFever 2024-03-08 23:41:59 +08:00 committed by GitHub
parent 6264fe64b4
commit a4bf3dabb4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 144 additions and 4 deletions

View file

@ -3547,7 +3547,45 @@ def = this->add("filament_loading_speed", coFloats);
def->enum_labels.push_back(L("Contour and hole"));
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
def = this->add("seam_slope_conditional", coBool);
def->label = L("Conditional scarf joint");
def->tooltip = L("Apply scarf joints only to smooth perimeters where traditional seams do not conceal the seams at sharp corners effectively.");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionBool(false));
def = this->add("scarf_angle_threshold", coInt);
def->label = L("Conditional angle threshold");
def->tooltip = L(
"This option sets the threshold angle for applying a conditional scarf joint seam.\nIf the maximum angle within the perimeter loop "
"exceeds this value (indicating the absence of sharp corners), a scarf joint seam will be used. The default value is 155°.");
def->mode = comAdvanced;
def->sidetext = L("°");
def->min = 0;
def->max = 180;
def->set_default_value(new ConfigOptionInt(155));
def = this->add("scarf_joint_speed", coFloatOrPercent);
def->label = L("Scarf joint speed");
def->category = L("Quality");
def->tooltip = L(
"This option sets the printing speed for scarf joints. It is recommended to print scarf joints at a slow speed (less than 100 "
"mm/s). It's also advisable to enable 'Extrusion rate smoothing' if the set speed varies significantly from the speed of the "
"outer or inner walls. If the speed specified here is higher than the speed of the outer or inner walls, the printer will default "
"to the slower of the two speeds. When specified as a percentage (e.g., 80%), the speed is calculated based on the respective "
"outer or inner wall speed. The default value is set to 100%.");
def->sidetext = L("mm/s or %");
def->min = 1;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloatOrPercent(100, true));
def = this->add("scarf_joint_flow_ratio", coFloat);
def->label = L("Scarf joint flow ratio");
def->tooltip = L("This factor affects the amount of material for scarf joints.");
def->mode = comAdvanced;
def->max = 2;
def->set_default_value(new ConfigOptionFloat(1));
def = this->add("seam_slope_start_height", coFloatOrPercent);
def->label = L("Scarf start height");
def->tooltip = L("Start height of the scarf.\n"