2016-09-13 09:24:55 +00:00
|
|
|
# Extends the C++ class Slic3r::Layer.
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
2011-09-01 19:06:28 +00:00
|
|
|
1;
|