mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 02:52:10 +00:00
Extrusion of perimeters
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user