mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-11-02 04:31:17 -07:00
parent
aa4704a6db
commit
8b0e307941
8 changed files with 70 additions and 8 deletions
|
|
@ -199,8 +199,13 @@ std::vector<SurfaceFill> group_fills(const Layer &layer)
|
|||
// so that internall infill will be aligned over all layers of the current region.
|
||||
params.spacing = layerm.region().flow(*layer.object(), frInfill, layer.object()->config().layer_height, false).spacing();
|
||||
// Anchor a sparse infill to inner perimeters with the following anchor length:
|
||||
params.anchor_length = float(Fill::infill_anchor * 0.01 * params.spacing);
|
||||
params.anchor_length_max = Fill::infill_anchor_max;
|
||||
// Anchor a sparse infill to inner perimeters with the following anchor length:
|
||||
params.anchor_length = float(region_config.infill_anchor);
|
||||
if (region_config.infill_anchor.percent)
|
||||
params.anchor_length = float(params.anchor_length * 0.01 * params.spacing);
|
||||
params.anchor_length_max = float(region_config.infill_anchor_max);
|
||||
if (region_config.infill_anchor_max.percent)
|
||||
params.anchor_length_max = float(params.anchor_length_max * 0.01 * params.spacing);
|
||||
params.anchor_length = std::min(params.anchor_length, params.anchor_length_max);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -756,7 +756,7 @@ static std::vector<std::string> s_Preset_print_options {
|
|||
"bridge_density", "precise_outer_wall", "overhang_speed_classic", "bridge_acceleration",
|
||||
"sparse_infill_acceleration", "internal_solid_infill_acceleration", "tree_support_adaptive_layer_height", "tree_support_auto_brim",
|
||||
"tree_support_brim_width", "gcode_comments", "gcode_label_objects",
|
||||
"initial_layer_travel_speed", "exclude_object", "slow_down_layers"
|
||||
"initial_layer_travel_speed", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max"
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1434,6 +1434,55 @@ void PrintConfigDef::init_fff_params()
|
|||
def->enum_labels.push_back(L("Lightning"));
|
||||
def->set_default_value(new ConfigOptionEnum<InfillPattern>(ipCubic));
|
||||
|
||||
auto def_infill_anchor_min = def = this->add("infill_anchor", coFloatOrPercent);
|
||||
def->label = L("Length of the infill anchor");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. "
|
||||
"If expressed as percentage (example: 15%) it is calculated over infill extrusion width. Slic3r tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment "
|
||||
"shorter than infill_anchor_max is found, the infill line is connected to a perimeter segment at just one side "
|
||||
"and the length of the perimeter segment taken is limited to this parameter, but no longer than anchor_length_max. "
|
||||
"\nSet this parameter to zero to disable anchoring perimeters connected to a single infill line.");
|
||||
def->sidetext = L("mm or %");
|
||||
def->ratio_over = "sparse_infill_line_width";
|
||||
def->max_literal = 1000;
|
||||
def->gui_type = ConfigOptionDef::GUIType::f_enum_open;
|
||||
def->enum_values.push_back("0");
|
||||
def->enum_values.push_back("1");
|
||||
def->enum_values.push_back("2");
|
||||
def->enum_values.push_back("5");
|
||||
def->enum_values.push_back("10");
|
||||
def->enum_values.push_back("1000");
|
||||
def->enum_labels.push_back(L("0 (no open anchors)"));
|
||||
def->enum_labels.push_back("1 mm");
|
||||
def->enum_labels.push_back("2 mm");
|
||||
def->enum_labels.push_back("5 mm");
|
||||
def->enum_labels.push_back("10 mm");
|
||||
def->enum_labels.push_back(L("1000 (unlimited)"));
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(400, true));
|
||||
|
||||
def = this->add("infill_anchor_max", coFloatOrPercent);
|
||||
def->label = L("Maximum length of the infill anchor");
|
||||
def->category = L("Strength");
|
||||
def->tooltip = L("Connect an infill line to an internal perimeter with a short segment of an additional perimeter. "
|
||||
"If expressed as percentage (example: 15%) it is calculated over infill extrusion width. Slic3r tries to connect two close infill lines to a short perimeter segment. If no such perimeter segment "
|
||||
"shorter than this parameter is found, the infill line is connected to a perimeter segment at just one side "
|
||||
"and the length of the perimeter segment taken is limited to infill_anchor, but no longer than this parameter. "
|
||||
"\nIf set to 0, the old algorithm for infill connection will be used, it should create the same result as with 1000 & 0.");
|
||||
def->sidetext = def_infill_anchor_min->sidetext;
|
||||
def->ratio_over = def_infill_anchor_min->ratio_over;
|
||||
def->gui_type = def_infill_anchor_min->gui_type;
|
||||
def->enum_values = def_infill_anchor_min->enum_values;
|
||||
def->max_literal = def_infill_anchor_min->max_literal;
|
||||
def->enum_labels.push_back(L("0 (Simple connect)"));
|
||||
def->enum_labels.push_back("1 mm");
|
||||
def->enum_labels.push_back("2 mm");
|
||||
def->enum_labels.push_back("5 mm");
|
||||
def->enum_labels.push_back("10 mm");
|
||||
def->enum_labels.push_back(L("1000 (unlimited)"));
|
||||
def->mode = comAdvanced;
|
||||
def->set_default_value(new ConfigOptionFloatOrPercent(20, false));
|
||||
|
||||
def = this->add("outer_wall_acceleration", coFloat);
|
||||
def->label = L("Outer wall");
|
||||
def->tooltip = L("Acceleration of outer walls");
|
||||
|
|
|
|||
|
|
@ -780,9 +780,8 @@ PRINT_CONFIG_CLASS_DEFINE(
|
|||
((ConfigOptionFloat, small_perimeter_threshold))
|
||||
((ConfigOptionFloat, top_solid_infill_flow_ratio))
|
||||
((ConfigOptionFloat, bottom_solid_infill_flow_ratio))
|
||||
|
||||
|
||||
|
||||
((ConfigOptionFloatOrPercent, infill_anchor))
|
||||
((ConfigOptionFloatOrPercent, infill_anchor_max))
|
||||
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -831,6 +831,8 @@ bool PrintObject::invalidate_state_by_config_options(
|
|||
|| opt_key == "bottom_surface_pattern"
|
||||
|| opt_key == "external_fill_link_max_length"
|
||||
|| opt_key == "sparse_infill_pattern"
|
||||
|| opt_key == "infill_anchor"
|
||||
|| opt_key == "infill_anchor_max"
|
||||
|| opt_key == "top_surface_line_width"
|
||||
|| opt_key == "initial_layer_line_width") {
|
||||
steps.emplace_back(posInfill);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue