diff --git a/Build.PL b/Build.PL old mode 100644 new mode 100755 diff --git a/lib/Slic3r/GUI/PresetEditor.pm b/lib/Slic3r/GUI/PresetEditor.pm index 7ba3691b5..01c5688ca 100644 --- a/lib/Slic3r/GUI/PresetEditor.pm +++ b/lib/Slic3r/GUI/PresetEditor.pm @@ -457,7 +457,8 @@ sub options { brim_connections_width brim_width interior_brim_width support_material support_material_threshold support_material_max_layers support_material_enforce_layers raft_layers - support_material_pattern support_material_spacing support_material_angle + support_material_pattern support_material_spacing support_material_angle + support_material_pillar_size support_material_pillar_spacing support_material_interface_layers support_material_interface_spacing support_material_contact_distance support_material_buildplate_only dont_support_bridges notes @@ -612,6 +613,8 @@ sub build { $optgroup->append_single_option_line('support_material_pattern'); $optgroup->append_single_option_line('support_material_spacing'); $optgroup->append_single_option_line('support_material_angle'); + $optgroup->append_single_option_line('support_material_pillar_size'); + $optgroup->append_single_option_line('support_material_pillar_spacing'); $optgroup->append_single_option_line('support_material_interface_layers'); $optgroup->append_single_option_line('support_material_interface_spacing'); $optgroup->append_single_option_line('support_material_buildplate_only'); @@ -939,6 +942,7 @@ sub _update { my $have_support_material = $config->support_material || $config->raft_layers > 0; my $have_support_interface = $config->support_material_interface_layers > 0; + my $have_support_pillars = $have_support_material && $config->support_material_pattern eq 'pillars'; $self->get_field($_)->toggle($have_support_material) for qw(support_material_threshold support_material_pattern support_material_spacing support_material_angle @@ -949,6 +953,10 @@ sub _update { # Disable features that need support to be enabled. $self->get_field($_)->toggle($config->support_material) for qw(support_material_max_layers); + + # Only enable pillar configuration when using pillars + $self->get_field($_)->toggle($have_support_pillars) + for qw(support_material_pillar_size support_material_pillar_spacing); $self->get_field($_)->toggle($have_support_material && $have_support_interface) for qw(support_material_interface_spacing support_material_interface_extruder diff --git a/lib/Slic3r/Print/SupportMaterial.pm b/lib/Slic3r/Print/SupportMaterial.pm index 7f080cbed..f20a79bc9 100644 --- a/lib/Slic3r/Print/SupportMaterial.pm +++ b/lib/Slic3r/Print/SupportMaterial.pm @@ -22,10 +22,6 @@ use constant DEBUG_CONTACT_ONLY => 0; # increment used to reach MARGIN in steps to avoid trespassing thin objects use constant MARGIN_STEP => MARGIN/3; -# generate a tree-like structure to save material -use constant PILLAR_SIZE => 2.5; -use constant PILLAR_SPACING => 10; - sub generate { # $object is Slic3r::Print::Object my ($self, $object) = @_; @@ -911,8 +907,8 @@ sub generate_pillars_shape { # this prevents supplying an empty point set to BoundingBox constructor return if !%$contact; - my $pillar_size = scale PILLAR_SIZE; - my $pillar_spacing = scale PILLAR_SPACING; + my $pillar_size = scale $self->object_config->support_material_pillar_size; + my $pillar_spacing = scale $self->object_config->support_material_pillar_spacing; my $grid; # arrayref of polygons { diff --git a/package/common/util.sh b/package/common/util.sh old mode 100644 new mode 100755 diff --git a/package/linux/startup_script.sh b/package/linux/startup_script.sh old mode 100644 new mode 100755 diff --git a/package/osx/plist.sh b/package/osx/plist.sh old mode 100644 new mode 100755 diff --git a/package/osx/startup_script.sh b/package/osx/startup_script.sh old mode 100644 new mode 100755 diff --git a/slic3r.pl b/slic3r.pl index 11dc2fad5..cbd27200b 100755 --- a/slic3r.pl +++ b/slic3r.pl @@ -486,6 +486,10 @@ $j Pattern to use for support material (default: $config->{support_material_pattern}) --support-material-spacing Spacing between pattern lines (mm, default: $config->{support_material_spacing}) + --support-material-pillar-size + Size of the pillars in the pillar support pattern (default: $config->{support_material_pillar_size}) + --support-material-pillar-spacing + Spacing between the pillars in the pillar support pattern (default: $config->{support_material_pillar_spacing}) --support-material-angle Support material angle in degrees (range: 0-90, default: $config->{support_material_angle}) --support-material-contact-distance diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 0287c12bf..b0bcc0121 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -1502,6 +1502,24 @@ PrintConfigDef::PrintConfigDef() def->enum_labels.push_back("pillars"); def->default_value = new ConfigOptionEnum(smpPillars); + def = this->add("support_material_pillar_size", coFloat); + def->label = "Pillar size"; + def->category = "Support material"; + def->tooltip = "Size of the pillars in the pillar support pattern"; + def->sidetext = "mm"; + def->cli = "support-material-pillar-size=f"; + def->min = 0; + def->default_value = new ConfigOptionFloat(2.5); + + def = this->add("support_material_pillar_spacing", coFloat); + def->label = "Pillar spacing"; + def->category = "Support material"; + def->tooltip = "Spacing between pillars in the pillar support pattern"; + def->sidetext = "mm"; + def->cli = "support-material-pillar-spacing=f"; + def->min = 0; + def->default_value = new ConfigOptionFloat(10); + def = this->add("support_material_spacing", coFloat); def->label = "Pattern spacing"; def->category = "Support material"; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index 0aa65ba28..166fb6740 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -181,6 +181,8 @@ class PrintObjectConfig : public virtual StaticPrintConfig ConfigOptionFloat support_material_interface_spacing; ConfigOptionFloatOrPercent support_material_interface_speed; ConfigOptionEnum support_material_pattern; + ConfigOptionFloat support_material_pillar_size; + ConfigOptionFloat support_material_pillar_spacing; ConfigOptionFloat support_material_spacing; ConfigOptionFloat support_material_speed; ConfigOptionFloatOrPercent support_material_threshold; @@ -219,6 +221,8 @@ class PrintObjectConfig : public virtual StaticPrintConfig OPT_PTR(support_material_interface_spacing); OPT_PTR(support_material_interface_speed); OPT_PTR(support_material_pattern); + OPT_PTR(support_material_pillar_size); + OPT_PTR(support_material_pillar_spacing); OPT_PTR(support_material_spacing); OPT_PTR(support_material_speed); OPT_PTR(support_material_threshold); diff --git a/xs/src/libslic3r/PrintObject.cpp b/xs/src/libslic3r/PrintObject.cpp index 9700057b0..de1bd57ad 100644 --- a/xs/src/libslic3r/PrintObject.cpp +++ b/xs/src/libslic3r/PrintObject.cpp @@ -251,6 +251,8 @@ PrintObject::invalidate_state_by_config(const PrintConfigBase &config) || opt_key == "support_material_pattern" || opt_key == "support_material_spacing" || opt_key == "support_material_threshold" + || opt_key == "support_material_pillar_size" + || opt_key == "support_material_pillar_spacing" || opt_key == "dont_support_bridges") { steps.insert(posSupportMaterial); } else if (opt_key == "interface_shells"