More work here and there

This commit is contained in:
Alessandro Ranellucci 2014-01-01 17:29:15 +01:00
parent 51b976721d
commit 0883d0f4eb
7 changed files with 85 additions and 32 deletions

View file

@ -13,8 +13,7 @@ has 'print' => (is => 'ro', weak_ref => 1, required => 1);
has 'model_object' => (is => 'ro', required => 1);
has 'region_volumes' => (is => 'rw', default => sub { [] }); # by region_id
has 'copies' => (is => 'ro'); # Slic3r::Point objects in scaled G-code coordinates
has 'config_overrides' => (is => 'rw', default => sub { Slic3r::Config->new });
has 'config' => (is => 'rw');
has 'config' => (is => 'rw', required => 1); # Slic3r::Config::PrintObject
has 'layer_height_ranges' => (is => 'rw', default => sub { [] }); # [ z_min, z_max, layer_height ]
has 'size' => (is => 'rw'); # XYZ in scaled coordinates
@ -28,8 +27,6 @@ has '_state' => (is => 'ro', default => sub { Slic3r::Print::State->n
sub BUILD {
my $self = shift;
$self->init_config;
# translate meshes so that we work with smaller coordinates
{
# compute the bounding box of the supplied meshes
@ -97,11 +94,6 @@ sub delete_all_copies {
$self->_trigger_copies;
}
sub init_config {
my $self = shift;
$self->config(Slic3r::Config->merge($self->print->config, $self->config_overrides));
}
sub layer_count {
my $self = shift;
return scalar @{ $self->layers };