Generate boundaries of areas to fill (includes some refactoring)

This commit is contained in:
Alessandro Ranellucci 2011-09-04 12:04:01 +02:00
parent 416ad241ea
commit 428006264d
6 changed files with 82 additions and 24 deletions

View file

@ -3,12 +3,16 @@ use Moose;
use XXX;
# a sequential number of layer, starting at 0
has 'id' => (
is => 'ro',
isa => 'Int',
required => 1,
);
# index of points generated by slicing the original geometry
# keys are stringified coordinates (example: "0,0")
# each points connects exactly two segments
has 'pointmap' => (
traits => ['Hash'],
is => 'rw',
@ -19,12 +23,15 @@ has 'pointmap' => (
},
);
# collection of segments generated by slicing the original geometry
# each segment is part of a closed polyline
has 'lines' => (
is => 'rw',
isa => 'ArrayRef[Slic3r::Line]',
default => sub { [] },
);
# collection of surfaces generated by slicing the original geometry
has 'surfaces' => (
traits => ['Array'],
is => 'rw',
@ -32,9 +39,19 @@ has 'surfaces' => (
default => sub { [] },
);
# ordered collection of extrusion paths to build all perimeters
has 'perimeters' => (
is => 'rw',
isa => 'ArrayRef[Slic3r::Polyline]',
isa => 'ArrayRef[Slic3r::ExtrusionPath]',
default => sub { [] },
);
# collection of surfaces generated by offsetting the innermost perimeter(s)
# they represent boundaries of areas to fill
has 'fill_surfaces' => (
traits => ['Array'],
is => 'rw',
isa => 'ArrayRef[Slic3r::Surface]',
default => sub { [] },
);