More work (breaks centering and internal surfaces detection)

This commit is contained in:
Alessandro Ranellucci 2012-09-22 19:38:25 +02:00
parent 02356fd613
commit d488afd243
4 changed files with 24 additions and 19 deletions

View file

@ -19,36 +19,37 @@ has 'layer' => (
has 'lines' => (is => 'rw', default => sub { [] });
# collection of surfaces generated by slicing the original geometry
has 'slices' => (is => 'rw');
has 'slices' => (is => 'rw', default => sub { [] });
# collection of polygons or polylines representing thin walls contained
# in the original geometry
has 'thin_walls' => (is => 'rw');
has 'thin_walls' => (is => 'rw', default => sub { [] });
# collection of polygons or polylines representing thin infill regions that
# need to be filled with a medial axis
has 'thin_fills' => (is => 'rw');
has 'thin_fills' => (is => 'rw', default => sub { [] });
# collection of expolygons generated by offsetting the innermost perimeter(s)
# they represent boundaries of areas to fill, typed (top/bottom/internal)
has 'surfaces' => (is => 'rw');
has 'surfaces' => (is => 'rw', default => sub { [] });
# collection of surfaces for infill generation. the difference between surfaces
# fill_surfaces is that this one honors fill_density == 0 and turns small internal
# surfaces into solid ones
has 'fill_surfaces' => (is => 'rw');
has 'fill_surfaces' => (is => 'rw', default => sub { [] });
# ordered collection of extrusion paths/loops to build all perimeters
has 'perimeters' => (is => 'rw');
has 'perimeters' => (is => 'rw', default => sub { [] });
# ordered collection of extrusion paths to fill surfaces
has 'fills' => (is => 'rw');
has 'fills' => (is => 'rw', default => sub { [] });
# build polylines from lines
sub make_surfaces {
my $self = shift;
my ($loops) = @_;
return if !@$loops;
{
my $safety_offset = scale 0.1;
# merge everything