Further Perl eradication
This commit is contained in:
parent
57db091612
commit
2eb0417018
17 changed files with 6 additions and 255 deletions
|
@ -32,18 +32,12 @@ use Moo 1.003001;
|
|||
|
||||
use Slic3r::XS; # import all symbols (constants etc.) before they get parsed
|
||||
use Slic3r::Config;
|
||||
use Slic3r::ExPolygon;
|
||||
use Slic3r::ExtrusionLoop;
|
||||
use Slic3r::ExtrusionPath;
|
||||
use Slic3r::GCode::Reader;
|
||||
use Slic3r::Layer;
|
||||
use Slic3r::Line;
|
||||
use Slic3r::Model;
|
||||
use Slic3r::Point;
|
||||
use Slic3r::Polygon;
|
||||
use Slic3r::Polyline;
|
||||
use Slic3r::Print::Object;
|
||||
use Slic3r::Surface;
|
||||
our $build = eval "use Slic3r::Build; 1";
|
||||
|
||||
# Scaling between the float and integer coordinates.
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
package Slic3r::ExPolygon;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# an ExPolygon is a polygon with holes
|
||||
|
||||
sub bounding_box {
|
||||
my $self = shift;
|
||||
return $self->contour->bounding_box;
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,12 +0,0 @@
|
|||
package Slic3r::ExtrusionLoop;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Exporter);
|
||||
|
||||
our @EXPORT_OK = qw(EXTRL_ROLE_DEFAULT
|
||||
EXTRL_ROLE_CONTOUR_INTERNAL_PERIMETER EXTRL_ROLE_SKIRT);
|
||||
our %EXPORT_TAGS = (roles => \@EXPORT_OK);
|
||||
|
||||
|
||||
1;
|
|
@ -1,13 +0,0 @@
|
|||
package Slic3r::ExtrusionPath;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use parent qw(Exporter);
|
||||
|
||||
our @EXPORT_OK = qw(EXTR_ROLE_PERIMETER EXTR_ROLE_EXTERNAL_PERIMETER EXTR_ROLE_OVERHANG_PERIMETER
|
||||
EXTR_ROLE_FILL EXTR_ROLE_SOLIDFILL EXTR_ROLE_TOPSOLIDFILL EXTR_ROLE_GAPFILL EXTR_ROLE_BRIDGE
|
||||
EXTR_ROLE_SKIRT EXTR_ROLE_SUPPORTMATERIAL EXTR_ROLE_SUPPORTMATERIAL_INTERFACE
|
||||
EXTR_ROLE_NONE);
|
||||
our %EXPORT_TAGS = (roles => \@EXPORT_OK);
|
||||
|
||||
1;
|
|
@ -34,21 +34,4 @@ sub scaled_epsilon () { epsilon / &Slic3r::SCALING_FACTOR }
|
|||
sub scale ($) { $_[0] / &Slic3r::SCALING_FACTOR }
|
||||
sub unscale ($) { $_[0] * &Slic3r::SCALING_FACTOR }
|
||||
|
||||
# 2D
|
||||
sub bounding_box {
|
||||
my ($points) = @_;
|
||||
|
||||
my @x = map $_->x, @$points;
|
||||
my @y = map $_->y, @$points; #,,
|
||||
my @bb = (undef, undef, undef, undef);
|
||||
for (0..$#x) {
|
||||
$bb[X1] = $x[$_] if !defined $bb[X1] || $x[$_] < $bb[X1];
|
||||
$bb[X2] = $x[$_] if !defined $bb[X2] || $x[$_] > $bb[X2];
|
||||
$bb[Y1] = $y[$_] if !defined $bb[Y1] || $y[$_] < $bb[Y1];
|
||||
$bb[Y2] = $y[$_] if !defined $bb[Y2] || $y[$_] > $bb[Y2];
|
||||
}
|
||||
|
||||
return @bb[X1,Y1,X2,Y2];
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -1,18 +0,0 @@
|
|||
# Extends the C++ class Slic3r::Layer.
|
||||
|
||||
package Slic3r::Layer;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
# the following two were previously generated by Moo
|
||||
sub print {
|
||||
my $self = shift;
|
||||
return $self->object->print;
|
||||
}
|
||||
|
||||
sub config {
|
||||
my $self = shift;
|
||||
return $self->object->config;
|
||||
}
|
||||
|
||||
1;
|
|
@ -1,9 +0,0 @@
|
|||
package Slic3r::Print::Object;
|
||||
# extends c++ class Slic3r::PrintObject (Print.xsp)
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use List::Util qw(min max sum first);
|
||||
use Slic3r::Surface ':types';
|
||||
|
||||
1;
|
|
@ -1,15 +0,0 @@
|
|||
package Slic3r::Surface;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
require Exporter;
|
||||
our @ISA = qw(Exporter);
|
||||
our @EXPORT_OK = qw(S_TYPE_TOP S_TYPE_BOTTOM S_TYPE_BOTTOMBRIDGE S_TYPE_INTERNAL S_TYPE_INTERNALSOLID S_TYPE_INTERNALBRIDGE S_TYPE_INTERNALVOID);
|
||||
our %EXPORT_TAGS = (types => \@EXPORT_OK);
|
||||
|
||||
sub p {
|
||||
my $self = shift;
|
||||
return @{$self->polygons};
|
||||
}
|
||||
|
||||
1;
|
Loading…
Add table
Add a link
Reference in a new issue