Move external_perimeters_first to PrintRegionConfig

This commit is contained in:
Alessandro Ranellucci 2014-06-11 22:15:28 +02:00
parent e158d1e612
commit 34750d47fe
4 changed files with 7 additions and 5 deletions

View File

@ -399,7 +399,7 @@ sub make_perimeters {
# we continue inwards after having finished the brim # we continue inwards after having finished the brim
# TODO: add test for perimeter order # TODO: add test for perimeter order
@loops = reverse @loops @loops = reverse @loops
if $self->print->config->external_perimeters_first if $self->region->config->external_perimeters_first
|| ($self->layer->id == 0 && $self->print->config->brim_width > 0); || ($self->layer->id == 0 && $self->print->config->brim_width > 0);
# append perimeters # append perimeters

View File

@ -205,7 +205,8 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|| *opt_key == "gap_fill_speed" || *opt_key == "gap_fill_speed"
|| *opt_key == "overhangs" || *opt_key == "overhangs"
|| *opt_key == "perimeter_extrusion_width" || *opt_key == "perimeter_extrusion_width"
|| *opt_key == "thin_walls") { || *opt_key == "thin_walls"
|| *opt_key == "external_perimeters_first") {
steps.insert(posPerimeters); steps.insert(posPerimeters);
} else if (*opt_key == "resolution" } else if (*opt_key == "resolution"
|| *opt_key == "layer_height" || *opt_key == "layer_height"

View File

@ -126,6 +126,7 @@ PrintConfigDef::build_def() {
Options["external_perimeters_first"].type = coBool; Options["external_perimeters_first"].type = coBool;
Options["external_perimeters_first"].label = "External perimeters first"; Options["external_perimeters_first"].label = "External perimeters first";
Options["external_perimeters_first"].category = "Layers and Perimeters";
Options["external_perimeters_first"].tooltip = "Print contour perimeters from the outermost one to the innermost one instead of the default inverse order."; Options["external_perimeters_first"].tooltip = "Print contour perimeters from the outermost one to the innermost one instead of the default inverse order.";
Options["external_perimeters_first"].cli = "external-perimeters-first!"; Options["external_perimeters_first"].cli = "external-perimeters-first!";

View File

@ -199,6 +199,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
ConfigOptionFloat bridge_speed; ConfigOptionFloat bridge_speed;
ConfigOptionFloatOrPercent external_perimeter_extrusion_width; ConfigOptionFloatOrPercent external_perimeter_extrusion_width;
ConfigOptionFloatOrPercent external_perimeter_speed; ConfigOptionFloatOrPercent external_perimeter_speed;
ConfigOptionBool external_perimeters_first;
ConfigOptionBool extra_perimeters; ConfigOptionBool extra_perimeters;
ConfigOptionInt fill_angle; ConfigOptionInt fill_angle;
ConfigOptionPercent fill_density; ConfigOptionPercent fill_density;
@ -232,6 +233,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
this->external_perimeter_extrusion_width.percent = false; this->external_perimeter_extrusion_width.percent = false;
this->external_perimeter_speed.value = 70; this->external_perimeter_speed.value = 70;
this->external_perimeter_speed.percent = true; this->external_perimeter_speed.percent = true;
this->external_perimeters_first.value = false;
this->extra_perimeters.value = true; this->extra_perimeters.value = true;
this->fill_angle.value = 45; this->fill_angle.value = 45;
this->fill_density.value = 40; this->fill_density.value = 40;
@ -271,6 +273,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
if (opt_key == "bridge_speed") return &this->bridge_speed; if (opt_key == "bridge_speed") return &this->bridge_speed;
if (opt_key == "external_perimeter_extrusion_width") return &this->external_perimeter_extrusion_width; if (opt_key == "external_perimeter_extrusion_width") return &this->external_perimeter_extrusion_width;
if (opt_key == "external_perimeter_speed") return &this->external_perimeter_speed; 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 == "extra_perimeters") return &this->extra_perimeters; if (opt_key == "extra_perimeters") return &this->extra_perimeters;
if (opt_key == "fill_angle") return &this->fill_angle; if (opt_key == "fill_angle") return &this->fill_angle;
if (opt_key == "fill_density") return &this->fill_density; if (opt_key == "fill_density") return &this->fill_density;
@ -315,7 +318,6 @@ class PrintConfig : public virtual StaticPrintConfig
ConfigOptionInt disable_fan_first_layers; ConfigOptionInt disable_fan_first_layers;
ConfigOptionFloat duplicate_distance; ConfigOptionFloat duplicate_distance;
ConfigOptionString end_gcode; ConfigOptionString end_gcode;
ConfigOptionBool external_perimeters_first;
ConfigOptionFloat extruder_clearance_height; ConfigOptionFloat extruder_clearance_height;
ConfigOptionFloat extruder_clearance_radius; ConfigOptionFloat extruder_clearance_radius;
ConfigOptionPoints extruder_offset; ConfigOptionPoints extruder_offset;
@ -387,7 +389,6 @@ class PrintConfig : public virtual StaticPrintConfig
this->disable_fan_first_layers.value = 1; this->disable_fan_first_layers.value = 1;
this->duplicate_distance.value = 6; this->duplicate_distance.value = 6;
this->end_gcode.value = "M104 S0 ; turn off temperature\nG28 X0 ; home X axis\nM84 ; disable motors\n"; this->end_gcode.value = "M104 S0 ; turn off temperature\nG28 X0 ; home X axis\nM84 ; disable motors\n";
this->external_perimeters_first.value = false;
this->extruder_clearance_height.value = 20; this->extruder_clearance_height.value = 20;
this->extruder_clearance_radius.value = 20; this->extruder_clearance_radius.value = 20;
this->extruder_offset.values.resize(1); this->extruder_offset.values.resize(1);
@ -476,7 +477,6 @@ class PrintConfig : public virtual StaticPrintConfig
if (opt_key == "disable_fan_first_layers") return &this->disable_fan_first_layers; 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 == "duplicate_distance") return &this->duplicate_distance;
if (opt_key == "end_gcode") return &this->end_gcode; if (opt_key == "end_gcode") return &this->end_gcode;
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_height") return &this->extruder_clearance_height;
if (opt_key == "extruder_clearance_radius") return &this->extruder_clearance_radius; if (opt_key == "extruder_clearance_radius") return &this->extruder_clearance_radius;
if (opt_key == "extruder_offset") return &this->extruder_offset; if (opt_key == "extruder_offset") return &this->extruder_offset;