mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 11:53:48 +00:00
Refactored configuration handling.
Slic3r::Config is now an object. Multiple partial config objects are used throughout the codebase as local repositories, then merged and serialized when necessary.
This commit is contained in:
@@ -4,7 +4,7 @@ use Moo;
|
||||
use Slic3r::Geometry qw(PI);
|
||||
|
||||
has 'nozzle_diameter' => (is => 'ro', required => 1);
|
||||
has 'layer_height' => (is => 'ro', default => sub { $Slic3r::layer_height });
|
||||
has 'layer_height' => (is => 'ro', default => sub { $Slic3r::Config->layer_height });
|
||||
|
||||
has 'width' => (is => 'rwp', builder => 1);
|
||||
has 'spacing' => (is => 'lazy');
|
||||
@@ -52,7 +52,7 @@ sub _build_spacing {
|
||||
# rectangle with shrunk semicircles at the ends
|
||||
$min_flow_spacing = $self->nozzle_diameter * (1 - PI/4) + $self->width * PI/4;
|
||||
}
|
||||
return $self->width - $Slic3r::overlap_factor * ($self->width - $min_flow_spacing);
|
||||
return $self->width - &Slic3r::OVERLAP_FACTOR * ($self->width - $min_flow_spacing);
|
||||
}
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user