mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-29 03:31:17 -06: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:
parent
f0579e59bd
commit
7e34244b05
23 changed files with 918 additions and 833 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue