mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-18 20:28:08 -06:00
Simplify layer change code now that we have distinct support layers
This commit is contained in:
parent
548b301432
commit
4862d832b5
3 changed files with 13 additions and 21 deletions
|
@ -732,7 +732,7 @@ sub write_gcode {
|
|||
# set up our extruder object
|
||||
my $gcodegen = Slic3r::GCode->new(
|
||||
config => $self->config,
|
||||
extruders => $self->extruders,
|
||||
extruders => $self->extruders, # we should only pass the *used* extruders (but maintain the Tx indices right!)
|
||||
layer_count => $self->layer_count,
|
||||
);
|
||||
print $fh "G21 ; set units to millimeters\n" if $Slic3r::Config->gcode_flavor ne 'makerware';
|
||||
|
@ -768,6 +768,10 @@ sub write_gcode {
|
|||
}
|
||||
}
|
||||
|
||||
# always start with first extruder
|
||||
# TODO: make sure we select the first *used* extruder
|
||||
print $fh $gcodegen->set_extruder($self->extruders->[0]);
|
||||
|
||||
# calculate X,Y shift to center print around specified origin
|
||||
my $print_bb = $self->bounding_box;
|
||||
my $print_size = $print_bb->size;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue