mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-03 12:04:05 -06:00
Generate raft automatically even when support material is disabled
This commit is contained in:
parent
177f1a9bf0
commit
c7b4d99d7e
2 changed files with 6 additions and 4 deletions
|
@ -216,7 +216,7 @@ sub init_extruders {
|
||||||
}
|
}
|
||||||
|
|
||||||
# calculate support material flow
|
# calculate support material flow
|
||||||
if ($self->config->support_material) {
|
if ($self->config->support_material || $self->config->raft_layers > 0) {
|
||||||
my $extruder = $self->extruders->[$self->config->support_material_extruder-1];
|
my $extruder = $self->extruders->[$self->config->support_material_extruder-1];
|
||||||
$self->support_material_flow($extruder->make_flow(
|
$self->support_material_flow($extruder->make_flow(
|
||||||
width => $self->config->support_material_extrusion_width || $self->config->extrusion_width,
|
width => $self->config->support_material_extrusion_width || $self->config->extrusion_width,
|
||||||
|
@ -413,7 +413,7 @@ sub export_gcode {
|
||||||
}
|
}
|
||||||
|
|
||||||
# generate support material
|
# generate support material
|
||||||
if ($Slic3r::Config->support_material) {
|
if ($Slic3r::Config->support_material || $Slic3r::Config->raft_layers > 0) {
|
||||||
$status_cb->(85, "Generating support material");
|
$status_cb->(85, "Generating support material");
|
||||||
$_->generate_support_material for @{$self->objects};
|
$_->generate_support_material for @{$self->objects};
|
||||||
}
|
}
|
||||||
|
@ -510,7 +510,7 @@ EOF
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
# generate support material
|
# generate support material
|
||||||
if ($Slic3r::Config->support_material && $layer_id > 0) {
|
if (($Slic3r::Config->support_material || $self->config->raft_layers > 0) && $layer_id > 0) {
|
||||||
my (@supported_slices, @unsupported_slices) = ();
|
my (@supported_slices, @unsupported_slices) = ();
|
||||||
foreach my $expolygon (@current_layer_slices) {
|
foreach my $expolygon (@current_layer_slices) {
|
||||||
my $intersection = intersection_ex(
|
my $intersection = intersection_ex(
|
||||||
|
@ -801,7 +801,7 @@ sub write_gcode {
|
||||||
|
|
||||||
# extrude support material before other things because it might use a lower Z
|
# extrude support material before other things because it might use a lower Z
|
||||||
# and also because we avoid travelling on other things when printing it
|
# and also because we avoid travelling on other things when printing it
|
||||||
if ($Slic3r::Config->support_material) {
|
if ($Slic3r::Config->support_material || $self->config->raft_layers > 0) {
|
||||||
$gcode .= $gcodegen->move_z($layer->support_material_interface_z)
|
$gcode .= $gcodegen->move_z($layer->support_material_interface_z)
|
||||||
if ($layer->support_interface_fills && @{ $layer->support_interface_fills->paths });
|
if ($layer->support_interface_fills && @{ $layer->support_interface_fills->paths });
|
||||||
$gcode .= $gcodegen->set_extruder($self->extruders->[$Slic3r::Config->support_material_extruder-1]);
|
$gcode .= $gcodegen->set_extruder($self->extruders->[$Slic3r::Config->support_material_extruder-1]);
|
||||||
|
|
|
@ -559,6 +559,8 @@ sub generate_support_material {
|
||||||
my @current_support_regions = (); # expolygons we've started to support (i.e. below the empty interface layers)
|
my @current_support_regions = (); # expolygons we've started to support (i.e. below the empty interface layers)
|
||||||
my @queue = (); # the number of items of this array determines the number of empty interface layers
|
my @queue = (); # the number of items of this array determines the number of empty interface layers
|
||||||
for my $i (reverse 0 .. $#{$self->layers}) {
|
for my $i (reverse 0 .. $#{$self->layers}) {
|
||||||
|
next unless $Slic3r::Config->support_material || ($i <= $Slic3r::Config->raft_layers); # <= because we need to start from the first non-raft layer
|
||||||
|
|
||||||
my $layer = $self->layers->[$i];
|
my $layer = $self->layers->[$i];
|
||||||
my $lower_layer = $i > 0 ? $self->layers->[$i-1] : undef;
|
my $lower_layer = $i > 0 ? $self->layers->[$i-1] : undef;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue