mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-05 04:54:08 -06:00
Removed --g0
This commit is contained in:
parent
71ec90a1dd
commit
c2e710d092
10 changed files with 6 additions and 65 deletions
|
@ -9,7 +9,7 @@ use List::Util qw(first max);
|
|||
our @Ignore = qw(duplicate_x duplicate_y multiply_x multiply_y support_material_tool acceleration
|
||||
adjust_overhang_flow standby_temperature scale rotate duplicate duplicate_grid
|
||||
rotate scale duplicate_grid start_perimeters_at_concave_points start_perimeters_at_non_overhang
|
||||
randomize_start seal_position bed_size print_center);
|
||||
randomize_start seal_position bed_size print_center g0);
|
||||
|
||||
our $Options = print_config_def();
|
||||
|
||||
|
|
|
@ -459,34 +459,6 @@ sub unretract {
|
|||
return $gcode;
|
||||
}
|
||||
|
||||
sub G0 {
|
||||
my $self = shift;
|
||||
return $self->G1(@_) if !($self->config->g0 || $self->config->gcode_flavor eq 'mach3');
|
||||
return $self->_G0_G1("G0", @_);
|
||||
}
|
||||
|
||||
sub G1 {
|
||||
my $self = shift;
|
||||
return $self->_G0_G1("G1", @_);
|
||||
}
|
||||
|
||||
sub _G0_G1 {
|
||||
my ($self, $gcode, $point, $z, $e, $F, $comment) = @_;
|
||||
|
||||
if ($point) {
|
||||
$gcode .= sprintf " X%.3f Y%.3f",
|
||||
($point->x * &Slic3r::SCALING_FACTOR) + $self->shift_x - $self->_extruder->extruder_offset->x,
|
||||
($point->y * &Slic3r::SCALING_FACTOR) + $self->shift_y - $self->_extruder->extruder_offset->y; #**
|
||||
$self->last_pos($point->clone);
|
||||
}
|
||||
if (defined $z && (!defined $self->z || $z != $self->z)) {
|
||||
$self->z($z);
|
||||
$gcode .= sprintf " Z%.3f", $z;
|
||||
}
|
||||
|
||||
return $self->_Gx($gcode, $e, $F, $comment);
|
||||
}
|
||||
|
||||
# convert a model-space scaled point into G-code coordinates
|
||||
sub point_to_gcode {
|
||||
my ($self, $point) = @_;
|
||||
|
@ -497,20 +469,6 @@ sub point_to_gcode {
|
|||
);
|
||||
}
|
||||
|
||||
sub _Gx {
|
||||
my ($self, $gcode, $e, $F, $comment) = @_;
|
||||
|
||||
$gcode .= sprintf " F%.3f", $F;
|
||||
|
||||
# output extrusion distance
|
||||
if ($e && $self->_extrusion_axis) {
|
||||
$gcode .= sprintf " %s%.5f", $self->_extrusion_axis, $self->_extruder->extrude($e);
|
||||
}
|
||||
|
||||
$gcode .= " ; $comment" if $comment && $self->config->gcode_comments;
|
||||
return "$gcode\n";
|
||||
}
|
||||
|
||||
sub set_extruder {
|
||||
my ($self, $extruder_id) = @_;
|
||||
|
||||
|
|
|
@ -875,7 +875,10 @@ sub write_gcode {
|
|||
if ($finished_objects > 0) {
|
||||
$gcodegen->set_shift(map unscale $copy->[$_], X,Y);
|
||||
print $fh $gcodegen->retract;
|
||||
print $fh $gcodegen->G0($object->_copies_shift->negative, undef, 0, $gcodegen->config->travel_speed*60, 'move to origin position for next object');
|
||||
print $fh $gcodegen->travel_to_xy(
|
||||
$gcodegen->point_to_gcode($object->_copies_shift->negative),
|
||||
'move to origin position for next object',
|
||||
);
|
||||
}
|
||||
|
||||
my $buffer = Slic3r::GCode::CoolingBuffer->new(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue