Move many speed settings to PrintRegionConfig
This commit is contained in:
parent
ad99b2a0fd
commit
ac0a91a162
2 changed files with 37 additions and 29 deletions
|
@ -125,7 +125,7 @@ sub make_perimeters {
|
|||
)};
|
||||
|
||||
# look for gaps
|
||||
if ($self->print->config->gap_fill_speed > 0 && $self->config->fill_density > 0) {
|
||||
if ($self->region->config->gap_fill_speed > 0 && $self->config->fill_density > 0) {
|
||||
# not using safety offset here would "detect" very narrow gaps
|
||||
# (but still long enough to escape the area threshold) that gap fill
|
||||
# won't be able to fill but we'd still remove from infill area
|
||||
|
|
|
@ -105,6 +105,7 @@ class PrintConfigDef
|
|||
|
||||
Options["bridge_speed"].type = coFloat;
|
||||
Options["bridge_speed"].label = "Bridges";
|
||||
Options["bridge_speed"].category = "Speed";
|
||||
Options["bridge_speed"].tooltip = "Speed for printing bridges.";
|
||||
Options["bridge_speed"].sidetext = "mm/s";
|
||||
Options["bridge_speed"].cli = "bridge-speed=f";
|
||||
|
@ -161,6 +162,7 @@ class PrintConfigDef
|
|||
|
||||
Options["external_perimeter_speed"].type = coFloatOrPercent;
|
||||
Options["external_perimeter_speed"].label = "External perimeters";
|
||||
Options["external_perimeter_speed"].category = "Speed";
|
||||
Options["external_perimeter_speed"].tooltip = "This separate setting will affect the speed of external perimeters (the visible ones). If expressed as percentage (for example: 80%) it will be calculated on the perimeters speed setting above.";
|
||||
Options["external_perimeter_speed"].sidetext = "mm/s or %";
|
||||
Options["external_perimeter_speed"].cli = "external-perimeter-speed=s";
|
||||
|
@ -357,6 +359,7 @@ class PrintConfigDef
|
|||
|
||||
Options["gap_fill_speed"].type = coFloat;
|
||||
Options["gap_fill_speed"].label = "Gap fill";
|
||||
Options["gap_fill_speed"].category = "Speed";
|
||||
Options["gap_fill_speed"].tooltip = "Speed for filling small gaps using short zigzag moves. Keep this reasonably low to avoid too much shaking and resonance issues. Set zero to disable gaps filling.";
|
||||
Options["gap_fill_speed"].sidetext = "mm/s";
|
||||
Options["gap_fill_speed"].cli = "gap-fill-speed=f";
|
||||
|
@ -431,6 +434,7 @@ class PrintConfigDef
|
|||
|
||||
Options["infill_speed"].type = coFloat;
|
||||
Options["infill_speed"].label = "Infill";
|
||||
Options["infill_speed"].category = "Speed";
|
||||
Options["infill_speed"].tooltip = "Speed for printing the internal fill.";
|
||||
Options["infill_speed"].sidetext = "mm/s";
|
||||
Options["infill_speed"].cli = "infill-speed=f";
|
||||
|
@ -546,6 +550,7 @@ class PrintConfigDef
|
|||
|
||||
Options["perimeter_speed"].type = coFloat;
|
||||
Options["perimeter_speed"].label = "Perimeters";
|
||||
Options["perimeter_speed"].category = "Speed";
|
||||
Options["perimeter_speed"].tooltip = "Speed for perimeters (contours, aka vertical shells).";
|
||||
Options["perimeter_speed"].sidetext = "mm/s";
|
||||
Options["perimeter_speed"].cli = "perimeter-speed=f";
|
||||
|
@ -666,6 +671,7 @@ class PrintConfigDef
|
|||
|
||||
Options["small_perimeter_speed"].type = coFloatOrPercent;
|
||||
Options["small_perimeter_speed"].label = "Small perimeters";
|
||||
Options["small_perimeter_speed"].category = "Speed";
|
||||
Options["small_perimeter_speed"].tooltip = "This separate setting will affect the speed of perimeters having radius <= 6.5mm (usually holes). If expressed as percentage (for example: 80%) it will be calculated on the perimeters speed setting above.";
|
||||
Options["small_perimeter_speed"].sidetext = "mm/s or %";
|
||||
Options["small_perimeter_speed"].cli = "small-perimeter-speed=s";
|
||||
|
@ -712,6 +718,7 @@ class PrintConfigDef
|
|||
|
||||
Options["solid_infill_speed"].type = coFloatOrPercent;
|
||||
Options["solid_infill_speed"].label = "Solid infill";
|
||||
Options["solid_infill_speed"].category = "Speed";
|
||||
Options["solid_infill_speed"].tooltip = "Speed for printing solid regions (top/bottom/internal horizontal shells). This can be expressed as a percentage (for example: 80%) over the default infill speed above.";
|
||||
Options["solid_infill_speed"].sidetext = "mm/s or %";
|
||||
Options["solid_infill_speed"].cli = "solid-infill-speed=s";
|
||||
|
@ -889,6 +896,7 @@ class PrintConfigDef
|
|||
|
||||
Options["top_solid_infill_speed"].type = coFloatOrPercent;
|
||||
Options["top_solid_infill_speed"].label = "Top solid infill";
|
||||
Options["top_solid_infill_speed"].category = "Speed";
|
||||
Options["top_solid_infill_speed"].tooltip = "Speed for printing top solid layers (it only applies to the uppermost external layers and not to their internal solid layers). You may want to slow down this to get a nicer surface finish. This can be expressed as a percentage (for example: 80%) over the solid infill speed above.";
|
||||
Options["top_solid_infill_speed"].sidetext = "mm/s or %";
|
||||
Options["top_solid_infill_speed"].cli = "top-solid-infill-speed=s";
|
||||
|
@ -1047,70 +1055,98 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
|||
{
|
||||
public:
|
||||
ConfigOptionInt bottom_solid_layers;
|
||||
ConfigOptionFloat bridge_speed;
|
||||
ConfigOptionFloatOrPercent external_perimeter_speed;
|
||||
ConfigOptionBool extra_perimeters;
|
||||
ConfigOptionInt fill_angle;
|
||||
ConfigOptionPercent fill_density;
|
||||
ConfigOptionEnum<InfillPattern> fill_pattern;
|
||||
ConfigOptionFloat gap_fill_speed;
|
||||
ConfigOptionInt infill_extruder;
|
||||
ConfigOptionFloatOrPercent infill_extrusion_width;
|
||||
ConfigOptionInt infill_every_layers;
|
||||
ConfigOptionFloat infill_speed;
|
||||
ConfigOptionBool overhangs;
|
||||
ConfigOptionInt perimeter_extruder;
|
||||
ConfigOptionFloatOrPercent perimeter_extrusion_width;
|
||||
ConfigOptionFloat perimeter_speed;
|
||||
ConfigOptionInt perimeters;
|
||||
ConfigOptionFloatOrPercent small_perimeter_speed;
|
||||
ConfigOptionEnum<InfillPattern> solid_fill_pattern;
|
||||
ConfigOptionFloat solid_infill_below_area;
|
||||
ConfigOptionFloatOrPercent solid_infill_extrusion_width;
|
||||
ConfigOptionInt solid_infill_every_layers;
|
||||
ConfigOptionFloatOrPercent solid_infill_speed;
|
||||
ConfigOptionBool thin_walls;
|
||||
ConfigOptionFloatOrPercent top_infill_extrusion_width;
|
||||
ConfigOptionInt top_solid_layers;
|
||||
ConfigOptionFloatOrPercent top_solid_infill_speed;
|
||||
|
||||
PrintRegionConfig() : StaticPrintConfig() {
|
||||
this->bottom_solid_layers.value = 3;
|
||||
this->bridge_speed.value = 60;
|
||||
this->external_perimeter_speed.value = 70;
|
||||
this->external_perimeter_speed.percent = true;
|
||||
this->extra_perimeters.value = true;
|
||||
this->fill_angle.value = 45;
|
||||
this->fill_density.value = 40;
|
||||
this->fill_pattern.value = ipHoneycomb;
|
||||
this->gap_fill_speed.value = 20;
|
||||
this->infill_extruder.value = 1;
|
||||
this->infill_extrusion_width.value = 0;
|
||||
this->infill_extrusion_width.percent = false;
|
||||
this->infill_every_layers.value = 1;
|
||||
this->infill_speed.value = 60;
|
||||
this->overhangs.value = true;
|
||||
this->perimeter_extruder.value = 1;
|
||||
this->perimeter_extrusion_width.value = 0;
|
||||
this->perimeter_extrusion_width.percent = false;
|
||||
this->perimeter_speed.value = 30;
|
||||
this->perimeters.value = 3;
|
||||
this->small_perimeter_speed.value = 30;
|
||||
this->small_perimeter_speed.percent = false;
|
||||
this->solid_fill_pattern.value = ipRectilinear;
|
||||
this->solid_infill_below_area.value = 70;
|
||||
this->solid_infill_extrusion_width.value = 0;
|
||||
this->solid_infill_extrusion_width.percent = false;
|
||||
this->solid_infill_every_layers.value = 0;
|
||||
this->solid_infill_speed.value = 60;
|
||||
this->solid_infill_speed.percent = false;
|
||||
this->thin_walls.value = true;
|
||||
this->top_infill_extrusion_width.value = 0;
|
||||
this->top_infill_extrusion_width.percent = false;
|
||||
this->top_solid_infill_speed.value = 50;
|
||||
this->top_solid_infill_speed.percent = false;
|
||||
this->top_solid_layers.value = 3;
|
||||
};
|
||||
|
||||
ConfigOption* option(const t_config_option_key opt_key, bool create = false) {
|
||||
if (opt_key == "bottom_solid_layers") return &this->bottom_solid_layers;
|
||||
if (opt_key == "bridge_speed") return &this->bridge_speed;
|
||||
if (opt_key == "external_perimeter_speed") return &this->external_perimeter_speed;
|
||||
if (opt_key == "extra_perimeters") return &this->extra_perimeters;
|
||||
if (opt_key == "fill_angle") return &this->fill_angle;
|
||||
if (opt_key == "fill_density") return &this->fill_density;
|
||||
if (opt_key == "fill_pattern") return &this->fill_pattern;
|
||||
if (opt_key == "gap_fill_speed") return &this->gap_fill_speed;
|
||||
if (opt_key == "infill_extruder") return &this->infill_extruder;
|
||||
if (opt_key == "infill_extrusion_width") return &this->infill_extrusion_width;
|
||||
if (opt_key == "infill_every_layers") return &this->infill_every_layers;
|
||||
if (opt_key == "infill_speed") return &this->infill_speed;
|
||||
if (opt_key == "overhangs") return &this->overhangs;
|
||||
if (opt_key == "perimeter_extruder") return &this->perimeter_extruder;
|
||||
if (opt_key == "perimeter_extrusion_width") return &this->perimeter_extrusion_width;
|
||||
if (opt_key == "perimeter_speed") return &this->perimeter_speed;
|
||||
if (opt_key == "perimeters") return &this->perimeters;
|
||||
if (opt_key == "small_perimeter_speed") return &this->small_perimeter_speed;
|
||||
if (opt_key == "solid_fill_pattern") return &this->solid_fill_pattern;
|
||||
if (opt_key == "solid_infill_below_area") return &this->solid_infill_below_area;
|
||||
if (opt_key == "solid_infill_extrusion_width") return &this->solid_infill_extrusion_width;
|
||||
if (opt_key == "solid_infill_every_layers") return &this->solid_infill_every_layers;
|
||||
if (opt_key == "solid_infill_speed") return &this->solid_infill_speed;
|
||||
if (opt_key == "thin_walls") return &this->thin_walls;
|
||||
if (opt_key == "top_infill_extrusion_width") return &this->top_infill_extrusion_width;
|
||||
if (opt_key == "top_solid_infill_speed") return &this->top_solid_infill_speed;
|
||||
if (opt_key == "top_solid_layers") return &this->top_solid_layers;
|
||||
|
||||
return NULL;
|
||||
|
@ -1126,7 +1162,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionFloat bridge_acceleration;
|
||||
ConfigOptionInt bridge_fan_speed;
|
||||
ConfigOptionFloat bridge_flow_ratio;
|
||||
ConfigOptionFloat bridge_speed;
|
||||
ConfigOptionFloat brim_width;
|
||||
ConfigOptionBool complete_objects;
|
||||
ConfigOptionBool cooling;
|
||||
|
@ -1134,7 +1169,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionInt disable_fan_first_layers;
|
||||
ConfigOptionFloat duplicate_distance;
|
||||
ConfigOptionString end_gcode;
|
||||
ConfigOptionFloatOrPercent external_perimeter_speed;
|
||||
ConfigOptionBool external_perimeters_first;
|
||||
ConfigOptionFloat extruder_clearance_height;
|
||||
ConfigOptionFloat extruder_clearance_radius;
|
||||
|
@ -1150,13 +1184,11 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionFloatOrPercent first_layer_speed;
|
||||
ConfigOptionInts first_layer_temperature;
|
||||
ConfigOptionBool g0;
|
||||
ConfigOptionFloat gap_fill_speed;
|
||||
ConfigOptionBool gcode_arcs;
|
||||
ConfigOptionBool gcode_comments;
|
||||
ConfigOptionEnum<GCodeFlavor> gcode_flavor;
|
||||
ConfigOptionFloat infill_acceleration;
|
||||
ConfigOptionBool infill_first;
|
||||
ConfigOptionFloat infill_speed;
|
||||
ConfigOptionString layer_gcode;
|
||||
ConfigOptionInt max_fan_speed;
|
||||
ConfigOptionInt min_fan_speed;
|
||||
|
@ -1168,7 +1200,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionBool ooze_prevention;
|
||||
ConfigOptionString output_filename_format;
|
||||
ConfigOptionFloat perimeter_acceleration;
|
||||
ConfigOptionFloat perimeter_speed;
|
||||
ConfigOptionStrings post_process;
|
||||
ConfigOptionPoint print_center;
|
||||
ConfigOptionBool randomize_start;
|
||||
|
@ -1185,8 +1216,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionInt skirt_height;
|
||||
ConfigOptionInt skirts;
|
||||
ConfigOptionInt slowdown_below_layer_time;
|
||||
ConfigOptionFloatOrPercent small_perimeter_speed;
|
||||
ConfigOptionFloatOrPercent solid_infill_speed;
|
||||
ConfigOptionBool spiral_vase;
|
||||
ConfigOptionInt standby_temperature_delta;
|
||||
ConfigOptionString start_gcode;
|
||||
|
@ -1195,7 +1224,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
ConfigOptionInts temperature;
|
||||
ConfigOptionInt threads;
|
||||
ConfigOptionString toolchange_gcode;
|
||||
ConfigOptionFloatOrPercent top_solid_infill_speed;
|
||||
ConfigOptionFloat travel_speed;
|
||||
ConfigOptionBool use_firmware_retraction;
|
||||
ConfigOptionBool use_relative_e_distances;
|
||||
|
@ -1210,7 +1238,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->bridge_acceleration.value = 0;
|
||||
this->bridge_fan_speed.value = 100;
|
||||
this->bridge_flow_ratio.value = 1;
|
||||
this->bridge_speed.value = 60;
|
||||
this->brim_width.value = 0;
|
||||
this->complete_objects.value = false;
|
||||
this->cooling.value = true;
|
||||
|
@ -1218,8 +1245,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->disable_fan_first_layers.value = 1;
|
||||
this->duplicate_distance.value = 6;
|
||||
this->end_gcode.value = "M104 S0 ; turn off temperature\nG28 X0 ; home X axis\nM84 ; disable motors\n";
|
||||
this->external_perimeter_speed.value = 70;
|
||||
this->external_perimeter_speed.percent = true;
|
||||
this->external_perimeters_first.value = false;
|
||||
this->extruder_clearance_height.value = 20;
|
||||
this->extruder_clearance_radius.value = 20;
|
||||
|
@ -1241,13 +1266,11 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->first_layer_temperature.values.resize(1);
|
||||
this->first_layer_temperature.values[0] = 200;
|
||||
this->g0.value = false;
|
||||
this->gap_fill_speed.value = 20;
|
||||
this->gcode_arcs.value = false;
|
||||
this->gcode_comments.value = false;
|
||||
this->gcode_flavor.value = gcfRepRap;
|
||||
this->infill_acceleration.value = 0;
|
||||
this->infill_first.value = false;
|
||||
this->infill_speed.value = 60;
|
||||
this->layer_gcode.value = "";
|
||||
this->max_fan_speed.value = 100;
|
||||
this->min_fan_speed.value = 35;
|
||||
|
@ -1260,7 +1283,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->ooze_prevention.value = false;
|
||||
this->output_filename_format.value = "[input_filename_base].gcode";
|
||||
this->perimeter_acceleration.value = 0;
|
||||
this->perimeter_speed.value = 30;
|
||||
this->print_center.point = Pointf(100,100);
|
||||
this->randomize_start.value = false;
|
||||
this->resolution.value = 0;
|
||||
|
@ -1284,10 +1306,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->skirt_height.value = 1;
|
||||
this->skirts.value = 1;
|
||||
this->slowdown_below_layer_time.value = 30;
|
||||
this->small_perimeter_speed.value = 30;
|
||||
this->small_perimeter_speed.percent = false;
|
||||
this->solid_infill_speed.value = 60;
|
||||
this->solid_infill_speed.percent = false;
|
||||
this->spiral_vase.value = false;
|
||||
this->standby_temperature_delta.value = -5;
|
||||
this->start_gcode.value = "G28 ; home all axes\nG1 Z5 F5000 ; lift nozzle\n";
|
||||
|
@ -1297,8 +1315,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
this->temperature.values[0] = 200;
|
||||
this->threads.value = 2;
|
||||
this->toolchange_gcode.value = "";
|
||||
this->top_solid_infill_speed.value = 50;
|
||||
this->top_solid_infill_speed.percent = false;
|
||||
this->travel_speed.value = 130;
|
||||
this->use_firmware_retraction.value = false;
|
||||
this->use_relative_e_distances.value = false;
|
||||
|
@ -1315,7 +1331,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "bridge_acceleration") return &this->bridge_acceleration;
|
||||
if (opt_key == "bridge_fan_speed") return &this->bridge_fan_speed;
|
||||
if (opt_key == "bridge_flow_ratio") return &this->bridge_flow_ratio;
|
||||
if (opt_key == "bridge_speed") return &this->bridge_speed;
|
||||
if (opt_key == "brim_width") return &this->brim_width;
|
||||
if (opt_key == "complete_objects") return &this->complete_objects;
|
||||
if (opt_key == "cooling") return &this->cooling;
|
||||
|
@ -1323,7 +1338,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "disable_fan_first_layers") return &this->disable_fan_first_layers;
|
||||
if (opt_key == "duplicate_distance") return &this->duplicate_distance;
|
||||
if (opt_key == "end_gcode") return &this->end_gcode;
|
||||
if (opt_key == "external_perimeter_speed") return &this->external_perimeter_speed;
|
||||
if (opt_key == "external_perimeters_first") return &this->external_perimeters_first;
|
||||
if (opt_key == "extruder_clearance_height") return &this->extruder_clearance_height;
|
||||
if (opt_key == "extruder_clearance_radius") return &this->extruder_clearance_radius;
|
||||
|
@ -1339,13 +1353,11 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "first_layer_speed") return &this->first_layer_speed;
|
||||
if (opt_key == "first_layer_temperature") return &this->first_layer_temperature;
|
||||
if (opt_key == "g0") return &this->g0;
|
||||
if (opt_key == "gap_fill_speed") return &this->gap_fill_speed;
|
||||
if (opt_key == "gcode_arcs") return &this->gcode_arcs;
|
||||
if (opt_key == "gcode_comments") return &this->gcode_comments;
|
||||
if (opt_key == "gcode_flavor") return &this->gcode_flavor;
|
||||
if (opt_key == "infill_acceleration") return &this->infill_acceleration;
|
||||
if (opt_key == "infill_first") return &this->infill_first;
|
||||
if (opt_key == "infill_speed") return &this->infill_speed;
|
||||
if (opt_key == "layer_gcode") return &this->layer_gcode;
|
||||
if (opt_key == "max_fan_speed") return &this->max_fan_speed;
|
||||
if (opt_key == "min_fan_speed") return &this->min_fan_speed;
|
||||
|
@ -1357,7 +1369,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "ooze_prevention") return &this->ooze_prevention;
|
||||
if (opt_key == "output_filename_format") return &this->output_filename_format;
|
||||
if (opt_key == "perimeter_acceleration") return &this->perimeter_acceleration;
|
||||
if (opt_key == "perimeter_speed") return &this->perimeter_speed;
|
||||
if (opt_key == "post_process") return &this->post_process;
|
||||
if (opt_key == "print_center") return &this->print_center;
|
||||
if (opt_key == "randomize_start") return &this->randomize_start;
|
||||
|
@ -1374,8 +1385,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "skirt_height") return &this->skirt_height;
|
||||
if (opt_key == "skirts") return &this->skirts;
|
||||
if (opt_key == "slowdown_below_layer_time") return &this->slowdown_below_layer_time;
|
||||
if (opt_key == "small_perimeter_speed") return &this->small_perimeter_speed;
|
||||
if (opt_key == "solid_infill_speed") return &this->solid_infill_speed;
|
||||
if (opt_key == "spiral_vase") return &this->spiral_vase;
|
||||
if (opt_key == "standby_temperature_delta") return &this->standby_temperature_delta;
|
||||
if (opt_key == "start_gcode") return &this->start_gcode;
|
||||
|
@ -1384,7 +1393,6 @@ class PrintConfig : public virtual StaticPrintConfig
|
|||
if (opt_key == "temperature") return &this->temperature;
|
||||
if (opt_key == "threads") return &this->threads;
|
||||
if (opt_key == "toolchange_gcode") return &this->toolchange_gcode;
|
||||
if (opt_key == "top_solid_infill_speed") return &this->top_solid_infill_speed;
|
||||
if (opt_key == "travel_speed") return &this->travel_speed;
|
||||
if (opt_key == "use_firmware_retraction") return &this->use_firmware_retraction;
|
||||
if (opt_key == "use_relative_e_distances") return &this->use_relative_e_distances;
|
||||
|
|
Loading…
Add table
Reference in a new issue