9e4edcd8ec
Made sure the C++ fillers are instantiated at the worker threads, where there are being released. Extended the FillRectilinear2 to calculate the contour / line intersection with exact arithmetics, improved robustness and added error handling and error reporting, if the contours to be filled are not correct.
49 lines
1.0 KiB
Perl
49 lines
1.0 KiB
Perl
# Extends the C++ class Slic3r::Layer.
|
|
|
|
package Slic3r::Layer;
|
|
use strict;
|
|
use warnings;
|
|
|
|
# the following two were previously generated by Moo
|
|
sub print {
|
|
my $self = shift;
|
|
return $self->object->print;
|
|
}
|
|
|
|
sub config {
|
|
my $self = shift;
|
|
return $self->object->config;
|
|
}
|
|
|
|
sub region {
|
|
my $self = shift;
|
|
my ($region_id) = @_;
|
|
|
|
while ($self->region_count <= $region_id) {
|
|
$self->add_region($self->object->print->get_region($self->region_count));
|
|
}
|
|
|
|
return $self->get_region($region_id);
|
|
}
|
|
|
|
sub regions {
|
|
my ($self) = @_;
|
|
return [ map $self->get_region($_), 0..($self->region_count-1) ];
|
|
}
|
|
|
|
sub make_fill {
|
|
my ($self) = @_;
|
|
|
|
foreach my $layerm (@{$self->regions}) {
|
|
$layerm->fills->clear;
|
|
# Fearlessly enable the C++ fillers.
|
|
$layerm->fills->append($_) for $self->object->fill_maker2->make_fill($layerm);
|
|
# $layerm->fills->append($_) for $self->object->fill_maker->make_fill($layerm);
|
|
}
|
|
}
|
|
|
|
package Slic3r::Layer::Support;
|
|
our @ISA = qw(Slic3r::Layer);
|
|
|
|
1;
|