Flowsnake.pm 370 B

123456789101112131415161718
  1. package Slic3r::Fill::Flowsnake;
  2. use Moo;
  3. extends 'Slic3r::Fill::PlanePath';
  4. use Math::PlanePath::Flowsnake;
  5. use Slic3r::Geometry qw(X X1 X2);
  6. # Sorry, this fill is currently broken.
  7. sub process_polyline {
  8. my $self = shift;
  9. my ($polyline, $bounding_box) = @_;
  10. $_->[X] += ($bounding_box->[X1] + $bounding_box->[X2]/2) for @{$polyline->points};
  11. }
  12. 1;