Typo seal -> seam :-)
This commit is contained in:
parent
3df2488eca
commit
88a2e5c791
@ -219,7 +219,7 @@ The author of the Silk icon set is Mark James.
|
|||||||
home X axis [G28 X], disable motors [M84]).
|
home X axis [G28 X], disable motors [M84]).
|
||||||
--layer-gcode Load layer-change G-code from the supplied file (default: nothing).
|
--layer-gcode Load layer-change G-code from the supplied file (default: nothing).
|
||||||
--toolchange-gcode Load tool-change G-code from the supplied file (default: nothing).
|
--toolchange-gcode Load tool-change G-code from the supplied file (default: nothing).
|
||||||
--seal-position Position of loop starting points (random/nearest/aligned, default: aligned).
|
--seam-position Position of loop starting points (random/nearest/aligned, default: aligned).
|
||||||
--external-perimeters-first Reverse perimeter order. (default: no)
|
--external-perimeters-first Reverse perimeter order. (default: no)
|
||||||
--spiral-vase Experimental option to raise Z gradually when printing single-walled vases
|
--spiral-vase Experimental option to raise Z gradually when printing single-walled vases
|
||||||
(default: no)
|
(default: no)
|
||||||
|
@ -9,7 +9,7 @@ use List::Util qw(first max);
|
|||||||
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
|
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
|
||||||
adjust_overhang_flow standby_temperature scale rotate duplicate duplicate_grid
|
adjust_overhang_flow standby_temperature scale rotate duplicate duplicate_grid
|
||||||
rotate scale duplicate_grid start_perimeters_at_concave_points start_perimeters_at_non_overhang
|
rotate scale duplicate_grid start_perimeters_at_concave_points start_perimeters_at_non_overhang
|
||||||
randomize_start);
|
randomize_start seal_position);
|
||||||
|
|
||||||
our $Options = print_config_def();
|
our $Options = print_config_def();
|
||||||
|
|
||||||
@ -142,7 +142,7 @@ sub _handle_legacy {
|
|||||||
$value = "$value"; # force update of the PV value, workaround for bug https://rt.cpan.org/Ticket/Display.html?id=94110
|
$value = "$value"; # force update of the PV value, workaround for bug https://rt.cpan.org/Ticket/Display.html?id=94110
|
||||||
}
|
}
|
||||||
if ($opt_key eq 'randomize_start' && $value) {
|
if ($opt_key eq 'randomize_start' && $value) {
|
||||||
$opt_key = 'seal_position';
|
$opt_key = 'seam_position';
|
||||||
$value = 'random';
|
$value = 'random';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ has '_layer_index' => (is => 'rw', default => sub {-1}); # just a counter
|
|||||||
has 'layer' => (is => 'rw');
|
has 'layer' => (is => 'rw');
|
||||||
has '_layer_islands' => (is => 'rw');
|
has '_layer_islands' => (is => 'rw');
|
||||||
has '_upper_layer_islands' => (is => 'rw');
|
has '_upper_layer_islands' => (is => 'rw');
|
||||||
has '_seal_position' => (is => 'ro', default => sub { {} }); # $object => pos
|
has '_seam_position' => (is => 'ro', default => sub { {} }); # $object => pos
|
||||||
has 'shift_x' => (is => 'rw', default => sub {0} );
|
has 'shift_x' => (is => 'rw', default => sub {0} );
|
||||||
has 'shift_y' => (is => 'rw', default => sub {0} );
|
has 'shift_y' => (is => 'rw', default => sub {0} );
|
||||||
has 'z' => (is => 'rw');
|
has 'z' => (is => 'rw');
|
||||||
@ -156,7 +156,7 @@ sub extrude_loop {
|
|||||||
my $last_pos = $self->last_pos;
|
my $last_pos = $self->last_pos;
|
||||||
if ($self->config->spiral_vase) {
|
if ($self->config->spiral_vase) {
|
||||||
$loop->split_at($last_pos);
|
$loop->split_at($last_pos);
|
||||||
} elsif ($self->config->seal_position eq 'nearest' || $self->config->seal_position eq 'aligned') {
|
} elsif ($self->config->seam_position eq 'nearest' || $self->config->seam_position eq 'aligned') {
|
||||||
my $polygon = $loop->polygon;
|
my $polygon = $loop->polygon;
|
||||||
my @candidates = @{$polygon->concave_points(PI*4/3)};
|
my @candidates = @{$polygon->concave_points(PI*4/3)};
|
||||||
@candidates = @{$polygon->convex_points(PI*2/3)} if !@candidates;
|
@candidates = @{$polygon->convex_points(PI*2/3)} if !@candidates;
|
||||||
@ -165,16 +165,16 @@ sub extrude_loop {
|
|||||||
my @non_overhang = grep !$loop->has_overhang_point($_), @candidates;
|
my @non_overhang = grep !$loop->has_overhang_point($_), @candidates;
|
||||||
@candidates = @non_overhang if @non_overhang;
|
@candidates = @non_overhang if @non_overhang;
|
||||||
|
|
||||||
if ($self->config->seal_position eq 'nearest') {
|
if ($self->config->seam_position eq 'nearest') {
|
||||||
$loop->split_at_vertex($last_pos->nearest_point(\@candidates));
|
$loop->split_at_vertex($last_pos->nearest_point(\@candidates));
|
||||||
} elsif ($self->config->seal_position eq 'aligned') {
|
} elsif ($self->config->seam_position eq 'aligned') {
|
||||||
if (defined $self->layer && defined $self->_seal_position->{$self->layer->object}) {
|
if (defined $self->layer && defined $self->_seam_position->{$self->layer->object}) {
|
||||||
$last_pos = $self->_seal_position->{$self->layer->object};
|
$last_pos = $self->_seam_position->{$self->layer->object};
|
||||||
}
|
}
|
||||||
my $point = $self->_seal_position->{$self->layer->object} = $last_pos->nearest_point(\@candidates);
|
my $point = $self->_seam_position->{$self->layer->object} = $last_pos->nearest_point(\@candidates);
|
||||||
$loop->split_at_vertex($point);
|
$loop->split_at_vertex($point);
|
||||||
}
|
}
|
||||||
} elsif ($self->config->seal_position eq 'random') {
|
} elsif ($self->config->seam_position eq 'random') {
|
||||||
if ($loop->role == EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER) {
|
if ($loop->role == EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER) {
|
||||||
my $polygon = $loop->polygon;
|
my $polygon = $loop->polygon;
|
||||||
my $centroid = $polygon->centroid;
|
my $centroid = $polygon->centroid;
|
||||||
|
@ -427,7 +427,7 @@ sub build {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
title => 'Advanced',
|
title => 'Advanced',
|
||||||
options => [qw(seal_position external_perimeters_first)],
|
options => [qw(seam_position external_perimeters_first)],
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ $j
|
|||||||
home X axis [G28 X], disable motors [M84]).
|
home X axis [G28 X], disable motors [M84]).
|
||||||
--layer-gcode Load layer-change G-code from the supplied file (default: nothing).
|
--layer-gcode Load layer-change G-code from the supplied file (default: nothing).
|
||||||
--toolchange-gcode Load tool-change G-code from the supplied file (default: nothing).
|
--toolchange-gcode Load tool-change G-code from the supplied file (default: nothing).
|
||||||
--seal-position Position of loop starting points (random/nearest/aligned, default: $config->{seal_position}).
|
--seam-position Position of loop starting points (random/nearest/aligned, default: $config->{seam_position}).
|
||||||
--external-perimeters-first Reverse perimeter order. (default: no)
|
--external-perimeters-first Reverse perimeter order. (default: no)
|
||||||
--spiral-vase Experimental option to raise Z gradually when printing single-walled vases
|
--spiral-vase Experimental option to raise Z gradually when printing single-walled vases
|
||||||
(default: no)
|
(default: no)
|
||||||
|
@ -245,9 +245,9 @@ use Slic3r::Test;
|
|||||||
|
|
||||||
{
|
{
|
||||||
my $config = Slic3r::Config->new_from_defaults;
|
my $config = Slic3r::Config->new_from_defaults;
|
||||||
$config->set('seal_position', 'random');
|
$config->set('seam_position', 'random');
|
||||||
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
my $print = Slic3r::Test::init_print('20mm_cube', config => $config);
|
||||||
ok Slic3r::Test::gcode($print), 'successful generation of G-code with seal_position = random';
|
ok Slic3r::Test::gcode($print), 'successful generation of G-code with seam_position = random';
|
||||||
}
|
}
|
||||||
|
|
||||||
__END__
|
__END__
|
||||||
|
@ -18,7 +18,7 @@ enum SupportMaterialPattern {
|
|||||||
smpRectilinear, smpRectilinearGrid, smpHoneycomb, smpPillars,
|
smpRectilinear, smpRectilinearGrid, smpHoneycomb, smpPillars,
|
||||||
};
|
};
|
||||||
|
|
||||||
enum SealPosition {
|
enum SeamPosition {
|
||||||
spRandom, spNearest, spAligned
|
spRandom, spNearest, spAligned
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ template<> inline t_config_enum_values ConfigOptionEnum<SupportMaterialPattern>:
|
|||||||
return keys_map;
|
return keys_map;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<> inline t_config_enum_values ConfigOptionEnum<SealPosition>::get_enum_values() {
|
template<> inline t_config_enum_values ConfigOptionEnum<SeamPosition>::get_enum_values() {
|
||||||
t_config_enum_values keys_map;
|
t_config_enum_values keys_map;
|
||||||
keys_map["random"] = spRandom;
|
keys_map["random"] = spRandom;
|
||||||
keys_map["nearest"] = spNearest;
|
keys_map["nearest"] = spNearest;
|
||||||
@ -651,18 +651,18 @@ class PrintConfigDef
|
|||||||
Options["retract_speed"].cli = "retract-speed=f@";
|
Options["retract_speed"].cli = "retract-speed=f@";
|
||||||
Options["retract_speed"].max = 1000;
|
Options["retract_speed"].max = 1000;
|
||||||
|
|
||||||
Options["seal_position"].type = coEnum;
|
Options["seam_position"].type = coEnum;
|
||||||
Options["seal_position"].label = "Seal position";
|
Options["seam_position"].label = "Seam position";
|
||||||
Options["seal_position"].category = "Layers and perimeters";
|
Options["seam_position"].category = "Layers and perimeters";
|
||||||
Options["seal_position"].tooltip = "Position of perimeters starting points.";
|
Options["seam_position"].tooltip = "Position of perimeters starting points.";
|
||||||
Options["seal_position"].cli = "seal-position=s";
|
Options["seam_position"].cli = "seam-position=s";
|
||||||
Options["seal_position"].enum_keys_map = ConfigOptionEnum<SealPosition>::get_enum_values();
|
Options["seam_position"].enum_keys_map = ConfigOptionEnum<SeamPosition>::get_enum_values();
|
||||||
Options["seal_position"].enum_values.push_back("random");
|
Options["seam_position"].enum_values.push_back("random");
|
||||||
Options["seal_position"].enum_values.push_back("nearest");
|
Options["seam_position"].enum_values.push_back("nearest");
|
||||||
Options["seal_position"].enum_values.push_back("aligned");
|
Options["seam_position"].enum_values.push_back("aligned");
|
||||||
Options["seal_position"].enum_labels.push_back("Random");
|
Options["seam_position"].enum_labels.push_back("Random");
|
||||||
Options["seal_position"].enum_labels.push_back("Nearest");
|
Options["seam_position"].enum_labels.push_back("Nearest");
|
||||||
Options["seal_position"].enum_labels.push_back("Aligned");
|
Options["seam_position"].enum_labels.push_back("Aligned");
|
||||||
|
|
||||||
Options["skirt_distance"].type = coFloat;
|
Options["skirt_distance"].type = coFloat;
|
||||||
Options["skirt_distance"].label = "Distance from object";
|
Options["skirt_distance"].label = "Distance from object";
|
||||||
@ -1006,7 +1006,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
|||||||
ConfigOptionBool interface_shells;
|
ConfigOptionBool interface_shells;
|
||||||
ConfigOptionFloat layer_height;
|
ConfigOptionFloat layer_height;
|
||||||
ConfigOptionInt raft_layers;
|
ConfigOptionInt raft_layers;
|
||||||
ConfigOptionEnum<SealPosition> seal_position;
|
ConfigOptionEnum<SeamPosition> seam_position;
|
||||||
ConfigOptionBool support_material;
|
ConfigOptionBool support_material;
|
||||||
ConfigOptionInt support_material_angle;
|
ConfigOptionInt support_material_angle;
|
||||||
ConfigOptionInt support_material_enforce_layers;
|
ConfigOptionInt support_material_enforce_layers;
|
||||||
@ -1031,7 +1031,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
|||||||
this->interface_shells.value = false;
|
this->interface_shells.value = false;
|
||||||
this->layer_height.value = 0.4;
|
this->layer_height.value = 0.4;
|
||||||
this->raft_layers.value = 0;
|
this->raft_layers.value = 0;
|
||||||
this->seal_position.value = spAligned;
|
this->seam_position.value = spAligned;
|
||||||
this->support_material.value = false;
|
this->support_material.value = false;
|
||||||
this->support_material_angle.value = 0;
|
this->support_material_angle.value = 0;
|
||||||
this->support_material_enforce_layers.value = 0;
|
this->support_material_enforce_layers.value = 0;
|
||||||
@ -1057,7 +1057,7 @@ class PrintObjectConfig : public virtual StaticPrintConfig
|
|||||||
if (opt_key == "interface_shells") return &this->interface_shells;
|
if (opt_key == "interface_shells") return &this->interface_shells;
|
||||||
if (opt_key == "layer_height") return &this->layer_height;
|
if (opt_key == "layer_height") return &this->layer_height;
|
||||||
if (opt_key == "raft_layers") return &this->raft_layers;
|
if (opt_key == "raft_layers") return &this->raft_layers;
|
||||||
if (opt_key == "seal_position") return &this->seal_position;
|
if (opt_key == "seam_position") return &this->seam_position;
|
||||||
if (opt_key == "support_material") return &this->support_material;
|
if (opt_key == "support_material") return &this->support_material;
|
||||||
if (opt_key == "support_material_angle") return &this->support_material_angle;
|
if (opt_key == "support_material_angle") return &this->support_material_angle;
|
||||||
if (opt_key == "support_material_enforce_layers") return &this->support_material_enforce_layers;
|
if (opt_key == "support_material_enforce_layers") return &this->support_material_enforce_layers;
|
||||||
|
Loading…
Reference in New Issue
Block a user