Minor cleanups
This commit is contained in:
parent
81085433fd
commit
b61b543243
5 changed files with 2 additions and 29 deletions
|
@ -123,7 +123,7 @@ sub G1 {
|
|||
}
|
||||
|
||||
# apply the speed reduction for print moves on bottom layer
|
||||
my $speed_multiplier = $e
|
||||
my $speed_multiplier = $e && $self->z == $Slic3r::z_offset
|
||||
? $Slic3r::bottom_layer_speed_ratio
|
||||
: 1;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package Slic3r::Line;
|
||||
use Moo;
|
||||
use Scalar::Util qw(weaken);
|
||||
|
||||
# arrayref of points
|
||||
has 'points' => (
|
||||
|
|
|
@ -3,7 +3,6 @@ use Moo;
|
|||
|
||||
use Math::Clipper ':all';
|
||||
use Math::Geometry::Planar;
|
||||
*Math::Geometry::Planar::OffsetPolygon = *Math::Geometry::Planar::Offset::OffsetPolygon;
|
||||
use XXX;
|
||||
|
||||
use constant X => 0;
|
||||
|
@ -130,12 +129,4 @@ sub _mgp_from_points_ref {
|
|||
return $p;
|
||||
}
|
||||
|
||||
sub _mgp_from_polygons_ref {
|
||||
my $self = shift;
|
||||
my ($polygons) = @_;
|
||||
my $p = Math::Geometry::Planar->new;
|
||||
$p->polygons($polygons);
|
||||
return $p;
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -174,13 +174,11 @@ sub export_gcode {
|
|||
print $fh "M82 ; use absolute distances for extrusion\n";
|
||||
}
|
||||
|
||||
# make up a subroutine to generate G1 commands
|
||||
# set up our extruder object
|
||||
my $extruder = Slic3r::Extruder->new(
|
||||
|
||||
# calculate X,Y shift to center print around specified origin
|
||||
shift_x => $Slic3r::print_center->[X] - ($self->x_length * $Slic3r::resolution / 2),
|
||||
shift_y => $Slic3r::print_center->[Y] - ($self->y_length * $Slic3r::resolution / 2),
|
||||
|
||||
);
|
||||
|
||||
# write gcode commands layer by layer
|
||||
|
|
|
@ -28,21 +28,6 @@ sub add_hole {
|
|||
push @{ $self->holes }, $hole;
|
||||
}
|
||||
|
||||
sub new_from_mgp {
|
||||
my $self = shift;
|
||||
my ($polygon, %params) = @_;
|
||||
|
||||
my ($contour_p, @holes_p) = @{ $polygon->polygons };
|
||||
|
||||
return __PACKAGE__->new(
|
||||
contour => Slic3r::Polyline::Closed->cast($contour_p),
|
||||
holes => [
|
||||
map Slic3r::Polyline::Closed->cast($_), @holes_p
|
||||
],
|
||||
%params,
|
||||
);
|
||||
}
|
||||
|
||||
sub id {
|
||||
my $self = shift;
|
||||
return $self->contour->id;
|
||||
|
|
Loading…
Reference in a new issue