mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-10-30 12:11:15 -06:00
Faster algorithm for rectilinear fill
This commit is contained in:
parent
33d7b8c7cf
commit
5daaf454b1
10 changed files with 242 additions and 159 deletions
|
|
@ -69,15 +69,11 @@ sub extrude {
|
|||
|
||||
my $gcode = "";
|
||||
|
||||
# reset extrusion distance counter
|
||||
if (!$Slic3r::use_relative_e_distances) {
|
||||
$self->extrusion_distance(0);
|
||||
$gcode .= "G92 E0 ; reset extrusion distance\n";
|
||||
}
|
||||
|
||||
# retract
|
||||
if (Slic3r::Geometry::distance_between_points($self->last_pos, $path->points->[0]->p) * $Slic3r::resolution
|
||||
>= $Slic3r::retract_before_travel) {
|
||||
# retract if distance from previous position is greater or equal to the one
|
||||
# specified by the user *and* to the maximum distance between infill lines
|
||||
my $distance_from_last_pos = Slic3r::Geometry::distance_between_points($self->last_pos, $path->points->[0]->p) * $Slic3r::resolution;
|
||||
if ($distance_from_last_pos >= $Slic3r::retract_before_travel
|
||||
&& $distance_from_last_pos >= $Slic3r::flow_width / $Slic3r::fill_density * sqrt(2)) {
|
||||
$gcode .= $self->retract;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue