mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-16 03:07:55 -06:00
More constants, less strings => ess memory usage
This commit is contained in:
parent
8fe5d11624
commit
aa9563f00b
10 changed files with 51 additions and 27 deletions
|
@ -1,6 +1,13 @@
|
|||
package Slic3r::ExtrusionPath;
|
||||
use Moo;
|
||||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(EXTR_ROLE_PERIMETER EXTR_ROLE_SMALLPERIMETER EXTR_ROLE_FILL EXTR_ROLE_SOLIDFILL
|
||||
EXTR_ROLE_BRIDGE EXTR_ROLE_SKIRT EXTR_ROLE_SUPPORTMATERIAL);
|
||||
our %EXPORT_TAGS = (roles => \@EXPORT_OK);
|
||||
|
||||
|
||||
use Slic3r::Geometry qw(PI X Y epsilon deg2rad rotate_points);
|
||||
|
||||
# the underlying Slic3r::Polyline objects holds the geometry
|
||||
|
@ -16,8 +23,14 @@ has 'depth_layers' => (is => 'ro', default => sub {1});
|
|||
|
||||
has 'flow_spacing' => (is => 'rw');
|
||||
|
||||
# perimeter/fill/solid-fill/bridge/skirt/support-material
|
||||
has 'role' => (is => 'rw', required => 1);
|
||||
use constant EXTR_ROLE_PERIMETER => 0;
|
||||
use constant EXTR_ROLE_SMALLPERIMETER => 1;
|
||||
use constant EXTR_ROLE_FILL => 2;
|
||||
use constant EXTR_ROLE_SOLIDFILL => 3;
|
||||
use constant EXTR_ROLE_BRIDGE => 4;
|
||||
use constant EXTR_ROLE_SKIRT => 5;
|
||||
use constant EXTR_ROLE_SUPPORTMATERIAL => 6;
|
||||
|
||||
sub BUILD {
|
||||
my $self = shift;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue