Просмотр исходного кода

Fix regression in --gcode-arcs

Alessandro Ranellucci 11 лет назад
Родитель
Сommit
09989ab8bd
1 измененных файлов с 4 добавлено и 1 удалено
  1. 4 1
      lib/Slic3r/ExtrusionPath.pm

+ 4 - 1
lib/Slic3r/ExtrusionPath.pm

@@ -20,7 +20,7 @@ has 'polyline' => (
 
 # height is the vertical thickness of the extrusion expressed in mm
 has 'height'       => (is => 'rw');
-has 'flow_spacing' => (is => 'rw');
+has 'flow_spacing' => (is => 'rw', required => 1);
 has 'role'         => (is => 'rw', required => 1);
 
 use constant EXTR_ROLE_PERIMETER                    => 0;
@@ -241,6 +241,7 @@ sub detect_arcs {
             my $arc = Slic3r::ExtrusionPath::Arc->new(
                 polyline    => Slic3r::Polyline->new(\@arc_points),
                 role        => $self->role,
+                flow_spacing => $self->flow_spacing,
                 orientation => $orientation,
                 center      => $arc_center,
                 radius      => $arc_center->distance_to($points[$i]),
@@ -250,6 +251,7 @@ sub detect_arcs {
             push @paths, (ref $self)->new(
                 polyline        => Slic3r::Polyline->new(@points[0..$i]),
                 role            => $self->role,
+                flow_spacing    => $self->flow_spacing,
                 height          => $self->height,
             ) if $i > 0;
             
@@ -269,6 +271,7 @@ sub detect_arcs {
     push @paths, (ref $self)->new(
         polyline        => Slic3r::Polyline->new(\@points),
         role            => $self->role,
+        flow_spacing    => $self->flow_spacing,
         height          => $self->height,
     ) if @points > 1;