From e158d1e6124de731a9d22365bf3788b2bb45b4ac Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Wed, 11 Jun 2014 22:10:33 +0200 Subject: [PATCH] Move bridge_flow_ratio to PrintRegionConfig --- lib/Slic3r/Print/Region.pm | 2 +- xs/src/Print.cpp | 3 +++ xs/src/PrintConfig.cpp | 1 + xs/src/PrintConfig.hpp | 6 +++--- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lib/Slic3r/Print/Region.pm b/lib/Slic3r/Print/Region.pm index 8a2330495..5f591d883 100644 --- a/lib/Slic3r/Print/Region.pm +++ b/lib/Slic3r/Print/Region.pm @@ -56,7 +56,7 @@ sub flow { role => $role, nozzle_diameter => $nozzle_diameter, layer_height => $layer_height, - bridge_flow_ratio => ($bridge ? $self->print->config->bridge_flow_ratio : 0), + bridge_flow_ratio => ($bridge ? $self->config->bridge_flow_ratio : 0), ); } diff --git a/xs/src/Print.cpp b/xs/src/Print.cpp index 950377db1..f7a34a98f 100644 --- a/xs/src/Print.cpp +++ b/xs/src/Print.cpp @@ -249,6 +249,9 @@ PrintObject::invalidate_state_by_config_options(const std::vectorbottom_solid_layers.value = 3; + this->bridge_flow_ratio.value = 1; this->bridge_speed.value = 60; this->external_perimeter_extrusion_width.value = 0; this->external_perimeter_extrusion_width.percent = false; @@ -265,6 +267,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig 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_flow_ratio") return &this->bridge_flow_ratio; 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_speed") return &this->external_perimeter_speed; @@ -305,7 +308,6 @@ class PrintConfig : public virtual StaticPrintConfig ConfigOptionInt bed_temperature; ConfigOptionFloat bridge_acceleration; ConfigOptionInt bridge_fan_speed; - ConfigOptionFloat bridge_flow_ratio; ConfigOptionFloat brim_width; ConfigOptionBool complete_objects; ConfigOptionBool cooling; @@ -378,7 +380,6 @@ class PrintConfig : public virtual StaticPrintConfig this->bed_temperature.value = 0; this->bridge_acceleration.value = 0; this->bridge_fan_speed.value = 100; - this->bridge_flow_ratio.value = 1; this->brim_width.value = 0; this->complete_objects.value = false; this->cooling.value = true; @@ -468,7 +469,6 @@ class PrintConfig : public virtual StaticPrintConfig if (opt_key == "bed_temperature") return &this->bed_temperature; 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 == "brim_width") return &this->brim_width; if (opt_key == "complete_objects") return &this->complete_objects; if (opt_key == "cooling") return &this->cooling;