2011-09-01 19:06:28 +00:00
|
|
|
package Slic3r::Layer;
|
2014-06-12 07:23:10 +00:00
|
|
|
use strict;
|
|
|
|
use warnings;
|
2011-09-01 19:06:28 +00:00
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
# the following two were previously generated by Moo
|
|
|
|
sub print {
|
|
|
|
my $self = shift;
|
|
|
|
return $self->object->print;
|
|
|
|
}
|
2011-11-30 15:28:09 +00:00
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
sub config {
|
|
|
|
my $self = shift;
|
|
|
|
return $self->object->config;
|
|
|
|
}
|
2011-09-04 10:04:01 +00:00
|
|
|
|
2012-09-23 00:52:31 +00:00
|
|
|
sub region {
|
2012-04-29 10:51:20 +00:00
|
|
|
my $self = shift;
|
2012-09-23 00:52:31 +00:00
|
|
|
my ($region_id) = @_;
|
2012-04-29 10:51:20 +00:00
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
while ($self->region_count <= $region_id) {
|
|
|
|
$self->add_region($self->object->print->get_region($self->region_count));
|
2012-04-29 10:51:20 +00:00
|
|
|
}
|
2012-11-05 14:59:31 +00:00
|
|
|
|
2014-05-06 08:07:18 +00:00
|
|
|
return $self->get_region($region_id);
|
|
|
|
}
|
|
|
|
|
|
|
|
sub regions {
|
|
|
|
my ($self) = @_;
|
|
|
|
return [ map $self->get_region($_), 0..($self->region_count-1) ];
|
2012-04-29 10:51:20 +00:00
|
|
|
}
|
|
|
|
|
2016-02-20 19:50:40 +00:00
|
|
|
sub make_fill {
|
|
|
|
my ($self) = @_;
|
|
|
|
|
|
|
|
foreach my $layerm (@{$self->regions}) {
|
|
|
|
$layerm->fills->clear;
|
|
|
|
$layerm->fills->append($_) for $self->object->fill_maker->make_fill($layerm);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-07-29 18:49:54 +00:00
|
|
|
package Slic3r::Layer::Support;
|
2014-05-19 22:03:29 +00:00
|
|
|
our @ISA = qw(Slic3r::Layer);
|
2013-07-29 18:49:54 +00:00
|
|
|
|
2011-09-01 19:06:28 +00:00
|
|
|
1;
|