mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-31 20:51:12 -06:00
Fixes to retraction and skirt
This commit is contained in:
parent
a1d518f1a2
commit
5a07137def
4 changed files with 5 additions and 6 deletions
|
|
@ -76,7 +76,7 @@ sub extrude {
|
|||
}
|
||||
|
||||
# retract
|
||||
if (Slic3r::Geometry::distance_between_points($self->last_pos, $path->points->[0]->p)
|
||||
if (Slic3r::Geometry::distance_between_points($self->last_pos, $path->points->[0]->p) * $Slic3r::resolution
|
||||
>= $Slic3r::retract_before_travel) {
|
||||
$gcode .= $self->retract;
|
||||
}
|
||||
|
|
@ -105,7 +105,6 @@ sub extrude {
|
|||
sub retract {
|
||||
my $self = shift;
|
||||
return "" unless $Slic3r::retract_length > 0
|
||||
&& $self->extrusion_distance > 0
|
||||
&& !$self->retracted;
|
||||
|
||||
$self->retracted(1);
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ sub points_coincide {
|
|||
|
||||
sub distance_between_points {
|
||||
my ($p1, $p2) = @_;
|
||||
return sqrt(($p1->[X] - $p2->[X])**2 + ($p1->[Y] - $p2->[Y])**2);
|
||||
return sqrt((($p1->[X] - $p2->[X])**2) + ($p1->[Y] - $p2->[Y])**2);
|
||||
}
|
||||
|
||||
sub point_in_polygon {
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ sub make_perimeter {
|
|||
# draw outlines from outside to inside
|
||||
for (my $i = $Slic3r::skirts - 1; $i >= 0; $i--) {
|
||||
my $distance = ($Slic3r::skirt_distance + ($Slic3r::flow_width * $i)) / $Slic3r::resolution;
|
||||
my $outline = offset([$convex_hull_points], $distance, $Slic3r::resolution * 100000, JT_ROUND);
|
||||
my $outline = offset([$convex_hull_points], $distance, $Slic3r::resolution * 100, JT_ROUND);
|
||||
push @{ $layer->skirts }, Slic3r::ExtrusionLoop->cast([ @{$outline->[0]} ]);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue