Extrusion of perimeters

This commit is contained in:
Alessandro Ranellucci 2011-09-02 21:10:20 +02:00
parent 55a523e1fa
commit febd655e22
11 changed files with 206 additions and 5 deletions

View file

@ -1,6 +1,7 @@
package Slic3r::Surface;
use Moose;
use Math::Geometry::Planar;
use Moose::Util::TypeConstraints;
has 'contour' => (
@ -55,4 +56,12 @@ sub encloses_point {
return 1;
}
sub mgp_polygon {
my $self = shift;
my $p = Math::Geometry::Planar->new;
$p->polygons([ map $_->points, $self->contour->mgp_polygon, map($_->mgp_polygon, @{ $self->holes }) ]);
return $p;
}
1;