mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-06 21:44:08 -06:00
New semantics for ExtrusionLoop objects. Early processing of perimeter overhangs for paralellizing such work and making G-code export lighter. Lots of refactoring. This should fix a number of minor bugs, including reversals of perimeter overhangs.
This commit is contained in:
parent
d2d885fc53
commit
c37ef2f18b
27 changed files with 618 additions and 423 deletions
|
@ -106,28 +106,12 @@ use overload
|
|||
'@{}' => sub { $_[0]->arrayref },
|
||||
'fallback' => 1;
|
||||
|
||||
sub new {
|
||||
my ($class, %args) = @_;
|
||||
sub new_from_paths {
|
||||
my ($class, @paths) = @_;
|
||||
|
||||
return $class->_new(
|
||||
$args{polygon}, # required
|
||||
$args{role}, # required
|
||||
$args{mm3_per_mm} // die("Missing required mm3_per_mm in ExtrusionLoop constructor"),
|
||||
$args{width} // -1,
|
||||
$args{height} // -1,
|
||||
);
|
||||
}
|
||||
|
||||
sub clone {
|
||||
my ($self, %args) = @_;
|
||||
|
||||
return __PACKAGE__->_new(
|
||||
$args{polygon} // $self->polygon,
|
||||
$args{role} // $self->role,
|
||||
$args{mm3_per_mm} // $self->mm3_per_mm,
|
||||
$args{width} // $self->width,
|
||||
$args{height} // $self->height,
|
||||
);
|
||||
my $loop = $class->new;
|
||||
$loop->append($_) for @paths;
|
||||
return $loop;
|
||||
}
|
||||
|
||||
package Slic3r::ExtrusionLoop::Ref;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue