support_material_synchronize_layers configuration value

for synchronization of object layers with print layers.
This commit is contained in:
bubnikv 2016-11-30 16:04:15 +01:00
parent 1a1eaa0810
commit 556204fddc
4 changed files with 13 additions and 2 deletions

View File

@ -532,7 +532,7 @@ sub build {
brim_width brim_width
support_material support_material_threshold support_material_enforce_layers support_material support_material_threshold support_material_enforce_layers
raft_layers raft_layers
support_material_pattern support_material_with_sheath support_material_spacing support_material_angle support_material_pattern support_material_with_sheath support_material_spacing support_material_synchronize_layers support_material_angle
support_material_interface_layers support_material_interface_spacing support_material_interface_layers support_material_interface_spacing
support_material_contact_distance support_material_buildplate_only dont_support_bridges support_material_contact_distance support_material_buildplate_only dont_support_bridges
notes notes
@ -648,6 +648,7 @@ sub build {
$optgroup->append_single_option_line('support_material_interface_spacing'); $optgroup->append_single_option_line('support_material_interface_spacing');
$optgroup->append_single_option_line('support_material_buildplate_only'); $optgroup->append_single_option_line('support_material_buildplate_only');
$optgroup->append_single_option_line('dont_support_bridges'); $optgroup->append_single_option_line('dont_support_bridges');
$optgroup->append_single_option_line('support_material_synchronize_layers');
} }
} }
@ -910,7 +911,7 @@ sub _update {
my $have_support_interface = $config->support_material_interface_layers > 0; my $have_support_interface = $config->support_material_interface_layers > 0;
$self->get_field($_)->toggle($have_support_material) $self->get_field($_)->toggle($have_support_material)
for qw(support_material_threshold support_material_pattern support_material_with_sheath for qw(support_material_threshold support_material_pattern support_material_with_sheath
support_material_spacing support_material_angle support_material_spacing support_material_synchronize_layers support_material_angle
support_material_interface_layers dont_support_bridges support_material_interface_layers dont_support_bridges
support_material_extrusion_width support_material_contact_distance); support_material_extrusion_width support_material_contact_distance);
$self->get_field($_)->toggle($have_support_material && $have_support_interface) $self->get_field($_)->toggle($have_support_material && $have_support_interface)

View File

@ -1247,6 +1247,13 @@ PrintConfigDef::PrintConfigDef()
def->min = 0; def->min = 0;
def->default_value = new ConfigOptionFloat(60); def->default_value = new ConfigOptionFloat(60);
def = this->add("support_material_synchronize_layers", coBool);
def->label = "Synchronize with object layers";
def->category = "Support material";
def->tooltip = "Synchronize support layers with the object print layers. This is useful with multi-material printers, where the extruder switch is expensive.";
def->cli = "support-material-synchronize-layers!";
def->default_value = new ConfigOptionBool(true);
def = this->add("support_material_threshold", coInt); def = this->add("support_material_threshold", coInt);
def->label = "Overhang threshold"; def->label = "Overhang threshold";
def->category = "Support material"; def->category = "Support material";

View File

@ -160,6 +160,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
ConfigOptionEnum<SupportMaterialPattern> support_material_pattern; ConfigOptionEnum<SupportMaterialPattern> support_material_pattern;
ConfigOptionFloat support_material_spacing; ConfigOptionFloat support_material_spacing;
ConfigOptionFloat support_material_speed; ConfigOptionFloat support_material_speed;
ConfigOptionBool support_material_synchronize_layers;
ConfigOptionInt support_material_threshold; ConfigOptionInt support_material_threshold;
ConfigOptionBool support_material_with_sheath; ConfigOptionBool support_material_with_sheath;
ConfigOptionFloat xy_size_compensation; ConfigOptionFloat xy_size_compensation;
@ -194,6 +195,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
OPT_PTR(support_material_pattern); OPT_PTR(support_material_pattern);
OPT_PTR(support_material_spacing); OPT_PTR(support_material_spacing);
OPT_PTR(support_material_speed); OPT_PTR(support_material_speed);
OPT_PTR(support_material_synchronize_layers);
OPT_PTR(support_material_threshold); OPT_PTR(support_material_threshold);
OPT_PTR(support_material_with_sheath); OPT_PTR(support_material_with_sheath);
OPT_PTR(xy_size_compensation); OPT_PTR(xy_size_compensation);

View File

@ -203,6 +203,7 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|| *opt_key == "support_material_buildplate_only" || *opt_key == "support_material_buildplate_only"
|| *opt_key == "support_material_pattern" || *opt_key == "support_material_pattern"
|| *opt_key == "support_material_spacing" || *opt_key == "support_material_spacing"
|| *opt_key == "support_material_synchronize_layers"
|| *opt_key == "support_material_threshold" || *opt_key == "support_material_threshold"
|| *opt_key == "support_material_with_sheath" || *opt_key == "support_material_with_sheath"
|| *opt_key == "dont_support_bridges" || *opt_key == "dont_support_bridges"