mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 01:37:53 -06:00
Rename solid_fill_pattern to external_fill_pattern and clarify tooltip
This commit is contained in:
parent
23848492ce
commit
7a7d00c8d6
9 changed files with 38 additions and 39 deletions
|
@ -250,14 +250,14 @@ sub validate {
|
||||||
die "Invalid value for --fill-pattern\n"
|
die "Invalid value for --fill-pattern\n"
|
||||||
if !first { $_ eq $self->fill_pattern } @{$Options->{fill_pattern}{values}};
|
if !first { $_ eq $self->fill_pattern } @{$Options->{fill_pattern}{values}};
|
||||||
|
|
||||||
# --solid-fill-pattern
|
# --external-fill-pattern
|
||||||
die "Invalid value for --solid-fill-pattern\n"
|
die "Invalid value for --external-fill-pattern\n"
|
||||||
if !first { $_ eq $self->solid_fill_pattern } @{$Options->{solid_fill_pattern}{values}};
|
if !first { $_ eq $self->external_fill_pattern } @{$Options->{external_fill_pattern}{values}};
|
||||||
|
|
||||||
# --fill-density
|
# --fill-density
|
||||||
die "The selected fill pattern is not supposed to work at 100% density\n"
|
die "The selected fill pattern is not supposed to work at 100% density\n"
|
||||||
if $self->fill_density == 100
|
if $self->fill_density == 100
|
||||||
&& !first { $_ eq $self->fill_pattern } @{$Options->{solid_fill_pattern}{values}};
|
&& !first { $_ eq $self->fill_pattern } @{$Options->{external_fill_pattern}{values}};
|
||||||
|
|
||||||
# --infill-every-layers
|
# --infill-every-layers
|
||||||
die "Invalid value for --infill-every-layers\n"
|
die "Invalid value for --infill-every-layers\n"
|
||||||
|
|
|
@ -83,7 +83,7 @@ sub make_fill {
|
||||||
? $layerm->flow(FLOW_ROLE_TOP_SOLID_INFILL)->width
|
? $layerm->flow(FLOW_ROLE_TOP_SOLID_INFILL)->width
|
||||||
: $solid_infill_flow->width;
|
: $solid_infill_flow->width;
|
||||||
$pattern[$i] = $groups[$i][0]->is_external
|
$pattern[$i] = $groups[$i][0]->is_external
|
||||||
? $layerm->config->solid_fill_pattern
|
? $layerm->config->external_fill_pattern
|
||||||
: 'rectilinear';
|
: 'rectilinear';
|
||||||
} else {
|
} else {
|
||||||
$is_solid[$i] = 0;
|
$is_solid[$i] = 0;
|
||||||
|
@ -190,14 +190,11 @@ sub make_fill {
|
||||||
my $is_bridge = $layerm->id > 0 && $surface->is_bridge;
|
my $is_bridge = $layerm->id > 0 && $surface->is_bridge;
|
||||||
my $is_solid = $surface->is_solid;
|
my $is_solid = $surface->is_solid;
|
||||||
|
|
||||||
# force 100% density and rectilinear fill for external surfaces
|
if ($surface->is_solid) {
|
||||||
if ($surface->surface_type != S_TYPE_INTERNAL) {
|
|
||||||
$density = 100;
|
$density = 100;
|
||||||
$filler = $layerm->config->solid_fill_pattern;
|
$filler = 'rectilinear';
|
||||||
if ($is_bridge) {
|
if ($surface->is_external) {
|
||||||
$filler = 'rectilinear';
|
$filler = $layerm->config->external_fill_pattern;
|
||||||
} elsif ($surface->surface_type == S_TYPE_INTERNALSOLID) {
|
|
||||||
$filler = 'rectilinear';
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
next SURFACE unless $density > 0;
|
next SURFACE unless $density > 0;
|
||||||
|
|
|
@ -432,7 +432,7 @@ sub build {
|
||||||
top_solid_layers bottom_solid_layers
|
top_solid_layers bottom_solid_layers
|
||||||
extra_perimeters avoid_crossing_perimeters thin_walls overhangs
|
extra_perimeters avoid_crossing_perimeters thin_walls overhangs
|
||||||
seam_position external_perimeters_first
|
seam_position external_perimeters_first
|
||||||
fill_density fill_pattern solid_fill_pattern
|
fill_density fill_pattern external_fill_pattern
|
||||||
infill_every_layers infill_only_where_needed
|
infill_every_layers infill_only_where_needed
|
||||||
solid_infill_every_layers fill_angle solid_infill_below_area
|
solid_infill_every_layers fill_angle solid_infill_below_area
|
||||||
only_retract_when_crossing_perimeters infill_first
|
only_retract_when_crossing_perimeters infill_first
|
||||||
|
@ -505,7 +505,7 @@ sub build {
|
||||||
my $optgroup = $page->new_optgroup('Infill');
|
my $optgroup = $page->new_optgroup('Infill');
|
||||||
$optgroup->append_single_option_line('fill_density');
|
$optgroup->append_single_option_line('fill_density');
|
||||||
$optgroup->append_single_option_line('fill_pattern');
|
$optgroup->append_single_option_line('fill_pattern');
|
||||||
$optgroup->append_single_option_line('solid_fill_pattern');
|
$optgroup->append_single_option_line('external_fill_pattern');
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
my $optgroup = $page->new_optgroup('Reducing printing time');
|
my $optgroup = $page->new_optgroup('Reducing printing time');
|
||||||
|
|
|
@ -364,7 +364,7 @@ $j
|
||||||
--fill-density Infill density (range: 0%-100%, default: $config->{fill_density}%)
|
--fill-density Infill density (range: 0%-100%, default: $config->{fill_density}%)
|
||||||
--fill-angle Infill angle in degrees (range: 0-90, default: $config->{fill_angle})
|
--fill-angle Infill angle in degrees (range: 0-90, default: $config->{fill_angle})
|
||||||
--fill-pattern Pattern to use to fill non-solid layers (default: $config->{fill_pattern})
|
--fill-pattern Pattern to use to fill non-solid layers (default: $config->{fill_pattern})
|
||||||
--solid-fill-pattern Pattern to use to fill solid layers (default: $config->{solid_fill_pattern})
|
--external-fill-pattern Pattern to use to fill solid layers (default: $config->{external_fill_pattern})
|
||||||
--start-gcode Load initial G-code from the supplied file. This will overwrite
|
--start-gcode Load initial G-code from the supplied file. This will overwrite
|
||||||
the default command (home all axes [G28]).
|
the default command (home all axes [G28]).
|
||||||
--end-gcode Load final G-code from the supplied file. This will overwrite
|
--end-gcode Load final G-code from the supplied file. This will overwrite
|
||||||
|
|
2
t/fill.t
2
t/fill.t
|
@ -171,7 +171,7 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
|
||||||
for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) {
|
for my $pattern (qw(rectilinear honeycomb hilbertcurve concentric)) {
|
||||||
my $config = Slic3r::Config->new_from_defaults;
|
my $config = Slic3r::Config->new_from_defaults;
|
||||||
$config->set('fill_pattern', $pattern);
|
$config->set('fill_pattern', $pattern);
|
||||||
$config->set('solid_fill_pattern', $pattern);
|
$config->set('external_fill_pattern', $pattern);
|
||||||
$config->set('perimeters', 1);
|
$config->set('perimeters', 1);
|
||||||
$config->set('skirts', 0);
|
$config->set('skirts', 0);
|
||||||
$config->set('fill_density', 20);
|
$config->set('fill_density', 20);
|
||||||
|
|
|
@ -115,6 +115,24 @@ PrintConfigDef::build_def() {
|
||||||
Options["end_gcode"].full_width = true;
|
Options["end_gcode"].full_width = true;
|
||||||
Options["end_gcode"].height = 120;
|
Options["end_gcode"].height = 120;
|
||||||
|
|
||||||
|
Options["external_fill_pattern"].type = coEnum;
|
||||||
|
Options["external_fill_pattern"].label = "Top/bottom fill pattern";
|
||||||
|
Options["external_fill_pattern"].category = "Infill";
|
||||||
|
Options["external_fill_pattern"].tooltip = "Fill pattern for top/bottom infill. This only affects the external visible layer, and not its adjacent solid shells.";
|
||||||
|
Options["external_fill_pattern"].cli = "external-fill-pattern=s";
|
||||||
|
Options["external_fill_pattern"].enum_keys_map = ConfigOptionEnum<InfillPattern>::get_enum_values();
|
||||||
|
Options["external_fill_pattern"].enum_values.push_back("rectilinear");
|
||||||
|
Options["external_fill_pattern"].enum_values.push_back("concentric");
|
||||||
|
Options["external_fill_pattern"].enum_values.push_back("hilbertcurve");
|
||||||
|
Options["external_fill_pattern"].enum_values.push_back("archimedeanchords");
|
||||||
|
Options["external_fill_pattern"].enum_values.push_back("octagramspiral");
|
||||||
|
Options["external_fill_pattern"].enum_labels.push_back("rectilinear");
|
||||||
|
Options["external_fill_pattern"].enum_labels.push_back("concentric");
|
||||||
|
Options["external_fill_pattern"].enum_labels.push_back("hilbertcurve (slow)");
|
||||||
|
Options["external_fill_pattern"].enum_labels.push_back("archimedeanchords (slow)");
|
||||||
|
Options["external_fill_pattern"].enum_labels.push_back("octagramspiral (slow)");
|
||||||
|
Options["external_fill_pattern"].aliases.push_back("solid_fill_pattern");
|
||||||
|
|
||||||
Options["external_perimeter_extrusion_width"].type = coFloatOrPercent;
|
Options["external_perimeter_extrusion_width"].type = coFloatOrPercent;
|
||||||
Options["external_perimeter_extrusion_width"].label = "External perimeters";
|
Options["external_perimeter_extrusion_width"].label = "External perimeters";
|
||||||
Options["external_perimeter_extrusion_width"].category = "Extrusion Width";
|
Options["external_perimeter_extrusion_width"].category = "Extrusion Width";
|
||||||
|
@ -668,23 +686,6 @@ PrintConfigDef::build_def() {
|
||||||
Options["small_perimeter_speed"].cli = "small-perimeter-speed=s";
|
Options["small_perimeter_speed"].cli = "small-perimeter-speed=s";
|
||||||
Options["small_perimeter_speed"].ratio_over = "perimeter_speed";
|
Options["small_perimeter_speed"].ratio_over = "perimeter_speed";
|
||||||
|
|
||||||
Options["solid_fill_pattern"].type = coEnum;
|
|
||||||
Options["solid_fill_pattern"].label = "Top/bottom fill pattern";
|
|
||||||
Options["solid_fill_pattern"].category = "Infill";
|
|
||||||
Options["solid_fill_pattern"].tooltip = "Fill pattern for top/bottom infill.";
|
|
||||||
Options["solid_fill_pattern"].cli = "solid-fill-pattern=s";
|
|
||||||
Options["solid_fill_pattern"].enum_keys_map = ConfigOptionEnum<InfillPattern>::get_enum_values();
|
|
||||||
Options["solid_fill_pattern"].enum_values.push_back("rectilinear");
|
|
||||||
Options["solid_fill_pattern"].enum_values.push_back("concentric");
|
|
||||||
Options["solid_fill_pattern"].enum_values.push_back("hilbertcurve");
|
|
||||||
Options["solid_fill_pattern"].enum_values.push_back("archimedeanchords");
|
|
||||||
Options["solid_fill_pattern"].enum_values.push_back("octagramspiral");
|
|
||||||
Options["solid_fill_pattern"].enum_labels.push_back("rectilinear");
|
|
||||||
Options["solid_fill_pattern"].enum_labels.push_back("concentric");
|
|
||||||
Options["solid_fill_pattern"].enum_labels.push_back("hilbertcurve (slow)");
|
|
||||||
Options["solid_fill_pattern"].enum_labels.push_back("archimedeanchords (slow)");
|
|
||||||
Options["solid_fill_pattern"].enum_labels.push_back("octagramspiral (slow)");
|
|
||||||
|
|
||||||
Options["solid_infill_below_area"].type = coFloat;
|
Options["solid_infill_below_area"].type = coFloat;
|
||||||
Options["solid_infill_below_area"].label = "Solid infill threshold area";
|
Options["solid_infill_below_area"].label = "Solid infill threshold area";
|
||||||
Options["solid_infill_below_area"].category = "Infill";
|
Options["solid_infill_below_area"].category = "Infill";
|
||||||
|
|
|
@ -205,6 +205,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
||||||
ConfigOptionInt bottom_solid_layers;
|
ConfigOptionInt bottom_solid_layers;
|
||||||
ConfigOptionFloat bridge_flow_ratio;
|
ConfigOptionFloat bridge_flow_ratio;
|
||||||
ConfigOptionFloat bridge_speed;
|
ConfigOptionFloat bridge_speed;
|
||||||
|
ConfigOptionEnum<InfillPattern> external_fill_pattern;
|
||||||
ConfigOptionFloatOrPercent external_perimeter_extrusion_width;
|
ConfigOptionFloatOrPercent external_perimeter_extrusion_width;
|
||||||
ConfigOptionFloatOrPercent external_perimeter_speed;
|
ConfigOptionFloatOrPercent external_perimeter_speed;
|
||||||
ConfigOptionBool external_perimeters_first;
|
ConfigOptionBool external_perimeters_first;
|
||||||
|
@ -223,7 +224,6 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
||||||
ConfigOptionFloat perimeter_speed;
|
ConfigOptionFloat perimeter_speed;
|
||||||
ConfigOptionInt perimeters;
|
ConfigOptionInt perimeters;
|
||||||
ConfigOptionFloatOrPercent small_perimeter_speed;
|
ConfigOptionFloatOrPercent small_perimeter_speed;
|
||||||
ConfigOptionEnum<InfillPattern> solid_fill_pattern;
|
|
||||||
ConfigOptionFloat solid_infill_below_area;
|
ConfigOptionFloat solid_infill_below_area;
|
||||||
ConfigOptionFloatOrPercent solid_infill_extrusion_width;
|
ConfigOptionFloatOrPercent solid_infill_extrusion_width;
|
||||||
ConfigOptionInt solid_infill_every_layers;
|
ConfigOptionInt solid_infill_every_layers;
|
||||||
|
@ -237,6 +237,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
||||||
this->bottom_solid_layers.value = 3;
|
this->bottom_solid_layers.value = 3;
|
||||||
this->bridge_flow_ratio.value = 1;
|
this->bridge_flow_ratio.value = 1;
|
||||||
this->bridge_speed.value = 60;
|
this->bridge_speed.value = 60;
|
||||||
|
this->external_fill_pattern.value = ipRectilinear;
|
||||||
this->external_perimeter_extrusion_width.value = 0;
|
this->external_perimeter_extrusion_width.value = 0;
|
||||||
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;
|
||||||
|
@ -260,7 +261,6 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
||||||
this->perimeters.value = 3;
|
this->perimeters.value = 3;
|
||||||
this->small_perimeter_speed.value = 30;
|
this->small_perimeter_speed.value = 30;
|
||||||
this->small_perimeter_speed.percent = false;
|
this->small_perimeter_speed.percent = false;
|
||||||
this->solid_fill_pattern.value = ipRectilinear;
|
|
||||||
this->solid_infill_below_area.value = 70;
|
this->solid_infill_below_area.value = 70;
|
||||||
this->solid_infill_extrusion_width.value = 0;
|
this->solid_infill_extrusion_width.value = 0;
|
||||||
this->solid_infill_extrusion_width.percent = false;
|
this->solid_infill_extrusion_width.percent = false;
|
||||||
|
@ -279,6 +279,7 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
||||||
if (opt_key == "bottom_solid_layers") return &this->bottom_solid_layers;
|
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_flow_ratio") return &this->bridge_flow_ratio;
|
||||||
if (opt_key == "bridge_speed") return &this->bridge_speed;
|
if (opt_key == "bridge_speed") return &this->bridge_speed;
|
||||||
|
if (opt_key == "external_fill_pattern") return &this->external_fill_pattern;
|
||||||
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 == "external_perimeters_first") return &this->external_perimeters_first;
|
||||||
|
@ -297,7 +298,6 @@ class PrintRegionConfig : public virtual StaticPrintConfig
|
||||||
if (opt_key == "perimeter_speed") return &this->perimeter_speed;
|
if (opt_key == "perimeter_speed") return &this->perimeter_speed;
|
||||||
if (opt_key == "perimeters") return &this->perimeters;
|
if (opt_key == "perimeters") return &this->perimeters;
|
||||||
if (opt_key == "small_perimeter_speed") return &this->small_perimeter_speed;
|
if (opt_key == "small_perimeter_speed") return &this->small_perimeter_speed;
|
||||||
if (opt_key == "solid_fill_pattern") return &this->solid_fill_pattern;
|
|
||||||
if (opt_key == "solid_infill_below_area") return &this->solid_infill_below_area;
|
if (opt_key == "solid_infill_below_area") return &this->solid_infill_below_area;
|
||||||
if (opt_key == "solid_infill_extrusion_width") return &this->solid_infill_extrusion_width;
|
if (opt_key == "solid_infill_extrusion_width") return &this->solid_infill_extrusion_width;
|
||||||
if (opt_key == "solid_infill_every_layers") return &this->solid_infill_every_layers;
|
if (opt_key == "solid_infill_every_layers") return &this->solid_infill_every_layers;
|
||||||
|
|
|
@ -234,9 +234,9 @@ PrintObject::invalidate_state_by_config_options(const std::vector<t_config_optio
|
||||||
|| *opt_key == "infill_extruder"
|
|| *opt_key == "infill_extruder"
|
||||||
|| *opt_key == "infill_extrusion_width") {
|
|| *opt_key == "infill_extrusion_width") {
|
||||||
steps.insert(posPrepareInfill);
|
steps.insert(posPrepareInfill);
|
||||||
} else if (*opt_key == "fill_angle"
|
} else if (*opt_key == "external_fill_pattern"
|
||||||
|
|| *opt_key == "fill_angle"
|
||||||
|| *opt_key == "fill_pattern"
|
|| *opt_key == "fill_pattern"
|
||||||
|| *opt_key == "solid_fill_pattern"
|
|
||||||
|| *opt_key == "infill_every_layers"
|
|| *opt_key == "infill_every_layers"
|
||||||
|| *opt_key == "solid_infill_every_layers"
|
|| *opt_key == "solid_infill_every_layers"
|
||||||
|| *opt_key == "top_infill_extrusion_width") {
|
|| *opt_key == "top_infill_extrusion_width") {
|
||||||
|
|
|
@ -14,7 +14,8 @@ Surface::is_solid() const
|
||||||
return this->surface_type == stTop
|
return this->surface_type == stTop
|
||||||
|| this->surface_type == stBottom
|
|| this->surface_type == stBottom
|
||||||
|| this->surface_type == stBottomBridge
|
|| this->surface_type == stBottomBridge
|
||||||
|| this->surface_type == stInternalSolid;
|
|| this->surface_type == stInternalSolid
|
||||||
|
|| this->surface_type == stInternalBridge;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue