Honeycomb infill. #300

This commit is contained in:
Alessandro Ranellucci 2012-04-16 11:55:14 +02:00
parent 0faebad4da
commit cb182b8bc2
8 changed files with 126 additions and 20 deletions

View file

@ -6,8 +6,7 @@ use warnings;
use parent 'Slic3r::Polyline';
use Slic3r::Geometry qw(polygon_lines polygon_remove_parallel_continuous_edges
scale polygon_remove_acute_vertices
polygon_segment_having_point point_in_polygon move_points rotate_points);
scale polygon_remove_acute_vertices polygon_segment_having_point point_in_polygon);
use Slic3r::Geometry::Clipper qw(JT_MITER);
# the constructor accepts an array(ref) of points
@ -83,18 +82,6 @@ sub encloses_point {
return point_in_polygon($point, $self);
}
sub translate {
my $self = shift;
my ($x, $y) = @_;
@$self = move_points([$x, $y], @$self);
}
sub rotate {
my $self = shift;
my ($angle, $center) = @_;
@$self = rotate_points($angle, $center, @$self);
}
sub area {
my $self = shift;
return Slic3r::Geometry::Clipper::area($self);