mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-01 04:42:00 +08:00
Added max-support-layers (support_material_max_layers) (#4148)
* Added max-support-layers (support_material_max_layers) * Revised tooltip text for support_material_max_layers * Disable support_material_max_layers if no support.
This commit is contained in:
parent
df993c5020
commit
a46aa09755
@ -456,7 +456,7 @@ sub options {
|
|||||||
first_layer_acceleration default_acceleration
|
first_layer_acceleration default_acceleration
|
||||||
skirts skirt_distance skirt_height min_skirt_length
|
skirts skirt_distance skirt_height min_skirt_length
|
||||||
brim_connections_width brim_width interior_brim_width
|
brim_connections_width brim_width interior_brim_width
|
||||||
support_material support_material_threshold support_material_enforce_layers
|
support_material support_material_threshold support_material_max_layers support_material_enforce_layers
|
||||||
raft_layers
|
raft_layers
|
||||||
support_material_pattern support_material_spacing support_material_angle
|
support_material_pattern support_material_spacing support_material_angle
|
||||||
support_material_interface_layers support_material_interface_spacing
|
support_material_interface_layers support_material_interface_spacing
|
||||||
@ -600,6 +600,7 @@ sub build {
|
|||||||
my $optgroup = $page->new_optgroup('Support material');
|
my $optgroup = $page->new_optgroup('Support material');
|
||||||
$optgroup->append_single_option_line('support_material');
|
$optgroup->append_single_option_line('support_material');
|
||||||
$optgroup->append_single_option_line('support_material_threshold');
|
$optgroup->append_single_option_line('support_material_threshold');
|
||||||
|
$optgroup->append_single_option_line('support_material_max_layers');
|
||||||
$optgroup->append_single_option_line('support_material_enforce_layers');
|
$optgroup->append_single_option_line('support_material_enforce_layers');
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
@ -926,6 +927,10 @@ sub _update {
|
|||||||
support_material_interface_layers dont_support_bridges
|
support_material_interface_layers dont_support_bridges
|
||||||
support_material_extrusion_width support_material_interface_extrusion_width
|
support_material_extrusion_width support_material_interface_extrusion_width
|
||||||
support_material_contact_distance);
|
support_material_contact_distance);
|
||||||
|
|
||||||
|
# Disable features that need support to be enabled.
|
||||||
|
$self->get_field($_)->toggle($config->support_material)
|
||||||
|
for qw(support_material_max_layers);
|
||||||
|
|
||||||
$self->get_field($_)->toggle($have_support_material && $have_support_interface)
|
$self->get_field($_)->toggle($have_support_material && $have_support_interface)
|
||||||
for qw(support_material_interface_spacing support_material_interface_extruder
|
for qw(support_material_interface_spacing support_material_interface_extruder
|
||||||
|
@ -133,6 +133,8 @@ sub contact_area {
|
|||||||
last;
|
last;
|
||||||
}
|
}
|
||||||
my $layer = $object->get_layer($layer_id);
|
my $layer = $object->get_layer($layer_id);
|
||||||
|
last if $conf->support_material_max_layers
|
||||||
|
&& $layer_id > $conf->support_material_max_layers;
|
||||||
|
|
||||||
if ($buildplate_only) {
|
if ($buildplate_only) {
|
||||||
# Collect the top surfaces up to this layer and merge them.
|
# Collect the top surfaces up to this layer and merge them.
|
||||||
|
@ -1394,6 +1394,16 @@ PrintConfigDef::PrintConfigDef()
|
|||||||
def->enum_labels.push_back("0.2 (detachable)");
|
def->enum_labels.push_back("0.2 (detachable)");
|
||||||
def->default_value = new ConfigOptionFloat(0.2);
|
def->default_value = new ConfigOptionFloat(0.2);
|
||||||
|
|
||||||
|
def = this->add("support_material_max_layers", coInt);
|
||||||
|
def->label = "Max layer count for supports";
|
||||||
|
def->category = "Support material";
|
||||||
|
def->tooltip = "Disable support generation above this layer. Setting this to 0 will disable this feature.";
|
||||||
|
def->sidetext = "layers";
|
||||||
|
def->cli = "support-material-max-layers=f";
|
||||||
|
def->full_label = "Maximum layer count for support generation";
|
||||||
|
def->min = 0;
|
||||||
|
def->default_value = new ConfigOptionInt(0);
|
||||||
|
|
||||||
def = this->add("support_material_enforce_layers", coInt);
|
def = this->add("support_material_enforce_layers", coInt);
|
||||||
def->label = "Enforce support for the first";
|
def->label = "Enforce support for the first";
|
||||||
def->category = "Support material";
|
def->category = "Support material";
|
||||||
|
@ -171,6 +171,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
|||||||
ConfigOptionInt support_material_angle;
|
ConfigOptionInt support_material_angle;
|
||||||
ConfigOptionBool support_material_buildplate_only;
|
ConfigOptionBool support_material_buildplate_only;
|
||||||
ConfigOptionFloat support_material_contact_distance;
|
ConfigOptionFloat support_material_contact_distance;
|
||||||
|
ConfigOptionInt support_material_max_layers;
|
||||||
ConfigOptionInt support_material_enforce_layers;
|
ConfigOptionInt support_material_enforce_layers;
|
||||||
ConfigOptionInt support_material_extruder;
|
ConfigOptionInt support_material_extruder;
|
||||||
ConfigOptionFloatOrPercent support_material_extrusion_width;
|
ConfigOptionFloatOrPercent support_material_extrusion_width;
|
||||||
@ -208,6 +209,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
|||||||
OPT_PTR(support_material_angle);
|
OPT_PTR(support_material_angle);
|
||||||
OPT_PTR(support_material_buildplate_only);
|
OPT_PTR(support_material_buildplate_only);
|
||||||
OPT_PTR(support_material_contact_distance);
|
OPT_PTR(support_material_contact_distance);
|
||||||
|
OPT_PTR(support_material_max_layers);
|
||||||
OPT_PTR(support_material_enforce_layers);
|
OPT_PTR(support_material_enforce_layers);
|
||||||
OPT_PTR(support_material_extruder);
|
OPT_PTR(support_material_extruder);
|
||||||
OPT_PTR(support_material_extrusion_width);
|
OPT_PTR(support_material_extrusion_width);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user