#280 new setting: fill_angle_increment. rotate every infill by this angle, multiplied by the layer id.

This commit is contained in:
supermerill 2020-08-18 01:14:07 +02:00
parent ef2b6d3633
commit f1fdcf4243
6 changed files with 22 additions and 1 deletions

View File

@ -123,6 +123,7 @@ group:sidetext_width$3:Advanced
line:Angle
setting:label_width$6:width$5:fill_angle
setting:label_width$6:width$5:bridge_angle
setting:label_width$6:width$5:label$increment:fill_angle_increment
end_line
line:Anchor solid infill by X mm
setting:label_width$6:width$5:external_infill_margin

View File

@ -303,6 +303,7 @@ void make_fill(LayerRegion &layerm, ExtrusionEntityCollection &out)
f->z = layerm.layer()->print_z;
if (is_denser)f->angle = 0;
else f->angle = float(Geometry::deg2rad(layerm.region()->config().fill_angle.value));
f->angle += PI * (layerm.region()->config().fill_angle_increment.value * layerm.layer()->id()) / 180.;
// Maximum length of the perimeter segment linking two infill lines.
f->link_max_length = (coord_t)scale_(link_max_length);
// Used by the concentric infill pattern to clip the loops to create extrusion paths.

View File

@ -1329,6 +1329,19 @@ void PrintConfigDef::init_fff_params()
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(45));
def = this->add("fill_angle_increment", coFloat);
def->label = L("Fill");
def->full_label = L("Fill angle increment");
def->category = OptionCategory::infill;
def->tooltip = L("Add this angle each layer to the base angle for infill. "
"May be useful for art, or to be sure to hit every object's feature even with very low infill. "
"Still experiemental, tell me what makes it useful, or the problems that arise using it.");
def->sidetext = L("°");
def->min = 0;
def->max = 360;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));
def = this->add("fill_density", coPercent);
def->gui_type = "f_enum_open";
def->gui_flags = "show_value";

View File

@ -639,6 +639,7 @@ public:
ConfigOptionBool extra_perimeters_overhangs;
ConfigOptionBool only_one_perimeter_top;
ConfigOptionFloat fill_angle;
ConfigOptionFloat fill_angle_increment;
ConfigOptionPercent fill_density;
ConfigOptionEnum<InfillPattern> fill_pattern;
ConfigOptionPercent fill_top_flow_ratio;
@ -726,6 +727,7 @@ protected:
OPT_PTR(extra_perimeters_overhangs);
OPT_PTR(only_one_perimeter_top);
OPT_PTR(fill_angle);
OPT_PTR(fill_angle_increment);
OPT_PTR(fill_density);
OPT_PTR(fill_pattern);
OPT_PTR(fill_top_flow_ratio);

View File

@ -709,6 +709,7 @@ bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_
|| opt_key == "solid_fill_pattern"
|| opt_key == "enforce_full_fill_volume"
|| opt_key == "fill_angle"
|| opt_key == "fill_angle_increment"
|| opt_key == "fill_pattern"
|| opt_key == "fill_top_flow_ratio"
|| opt_key == "fill_smooth_width"

View File

@ -456,7 +456,10 @@ const std::vector<std::string>& Preset::print_options()
, "top_fill_pattern"
, "bottom_fill_pattern"
, "solid_fill_pattern",
"infill_every_layers", "infill_only_where_needed", "solid_infill_every_layers", "fill_angle", "bridge_angle",
"infill_every_layers", "infill_only_where_needed", "solid_infill_every_layers",
"fill_angle",
"fill_angle_increment",
"bridge_angle",
"solid_infill_below_area", "only_retract_when_crossing_perimeters", "infill_first",
"max_print_speed",
"max_volumetric_speed",