Removed --g0
This commit is contained in:
parent
71ec90a1dd
commit
c2e710d092
@ -136,8 +136,6 @@ The author of the Silk icon set is Mark James.
|
|||||||
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
||||||
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
||||||
by all firmwares)
|
by all firmwares)
|
||||||
--g0 Use G0 commands for retraction (experimental, not supported by all
|
|
||||||
firmwares)
|
|
||||||
--gcode-comments Make G-code verbose by adding comments (default: no)
|
--gcode-comments Make G-code verbose by adding comments (default: no)
|
||||||
--vibration-limit Limit the frequency of moves on X and Y axes (Hz, set zero to disable;
|
--vibration-limit Limit the frequency of moves on X and Y axes (Hz, set zero to disable;
|
||||||
default: 0)
|
default: 0)
|
||||||
|
@ -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
|
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
|
adjust_overhang_flow standby_temperature scale rotate duplicate duplicate_grid
|
||||||
rotate scale duplicate_grid start_perimeters_at_concave_points start_perimeters_at_non_overhang
|
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();
|
our $Options = print_config_def();
|
||||||
|
|
||||||
|
@ -459,34 +459,6 @@ sub unretract {
|
|||||||
return $gcode;
|
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
|
# convert a model-space scaled point into G-code coordinates
|
||||||
sub point_to_gcode {
|
sub point_to_gcode {
|
||||||
my ($self, $point) = @_;
|
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 {
|
sub set_extruder {
|
||||||
my ($self, $extruder_id) = @_;
|
my ($self, $extruder_id) = @_;
|
||||||
|
|
||||||
|
@ -875,7 +875,10 @@ sub write_gcode {
|
|||||||
if ($finished_objects > 0) {
|
if ($finished_objects > 0) {
|
||||||
$gcodegen->set_shift(map unscale $copy->[$_], X,Y);
|
$gcodegen->set_shift(map unscale $copy->[$_], X,Y);
|
||||||
print $fh $gcodegen->retract;
|
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(
|
my $buffer = Slic3r::GCode::CoolingBuffer->new(
|
||||||
|
@ -283,8 +283,6 @@ $j
|
|||||||
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
||||||
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
--gcode-arcs Use G2/G3 commands for native arcs (experimental, not supported
|
||||||
by all firmwares)
|
by all firmwares)
|
||||||
--g0 Use G0 commands for retraction (experimental, not supported by all
|
|
||||||
firmwares)
|
|
||||||
--gcode-comments Make G-code verbose by adding comments (default: no)
|
--gcode-comments Make G-code verbose by adding comments (default: no)
|
||||||
--vibration-limit Limit the frequency of moves on X and Y axes (Hz, set zero to disable;
|
--vibration-limit Limit the frequency of moves on X and Y axes (Hz, set zero to disable;
|
||||||
default: $config->{vibration_limit})
|
default: $config->{vibration_limit})
|
||||||
|
@ -44,7 +44,7 @@ use Slic3r::Test qw(_eq);
|
|||||||
# lift move or lift + change layer
|
# lift move or lift + change layer
|
||||||
if (_eq($info->{dist_Z}, $print->print->config->get_at('retract_lift', $tool))
|
if (_eq($info->{dist_Z}, $print->print->config->get_at('retract_lift', $tool))
|
||||||
|| (_eq($info->{dist_Z}, $conf->layer_height + $print->print->config->get_at('retract_lift', $tool)) && $print->print->config->get_at('retract_lift', $tool) > 0)) {
|
|| (_eq($info->{dist_Z}, $conf->layer_height + $print->print->config->get_at('retract_lift', $tool)) && $print->print->config->get_at('retract_lift', $tool) > 0)) {
|
||||||
fail 'only lifting while retracted' if !$retracted[$tool] && !($conf->g0 && $info->{retracting});
|
fail 'only lifting while retracted' if !$retracted[$tool];
|
||||||
fail 'double lift' if $lifted;
|
fail 'double lift' if $lifted;
|
||||||
$lifted = 1;
|
$lifted = 1;
|
||||||
}
|
}
|
||||||
@ -67,8 +67,6 @@ use Slic3r::Test qw(_eq);
|
|||||||
} else {
|
} else {
|
||||||
fail 'retracted by the correct amount';
|
fail 'retracted by the correct amount';
|
||||||
}
|
}
|
||||||
fail 'combining retraction and travel with G0'
|
|
||||||
if $cmd ne 'G0' && $conf->g0 && ($info->{dist_Z} || $info->{dist_XY});
|
|
||||||
}
|
}
|
||||||
if ($info->{extruding}) {
|
if ($info->{extruding}) {
|
||||||
fail 'only extruding while not lifted' if $lifted;
|
fail 'only extruding while not lifted' if $lifted;
|
||||||
@ -120,11 +118,7 @@ use Slic3r::Test qw(_eq);
|
|||||||
$duplicate = 2;
|
$duplicate = 2;
|
||||||
$retract_tests->(' (duplicate)');
|
$retract_tests->(' (duplicate)');
|
||||||
|
|
||||||
$config->set('g0', 1);
|
|
||||||
$retract_tests->(' (G0 and duplicate)');
|
|
||||||
|
|
||||||
$duplicate = 1;
|
$duplicate = 1;
|
||||||
$config->set('g0', 0);
|
|
||||||
$config->set('infill_extruder', 2);
|
$config->set('infill_extruder', 2);
|
||||||
$config->set('skirts', 4);
|
$config->set('skirts', 4);
|
||||||
$config->set('skirt_height', 3);
|
$config->set('skirt_height', 3);
|
||||||
|
@ -26,7 +26,6 @@ _arguments -S \
|
|||||||
'(--use-relative-e-distances --no-use-relative-e-distances)'--{no-,}use-relative-e-distances'[disable/enable relative E values]' \
|
'(--use-relative-e-distances --no-use-relative-e-distances)'--{no-,}use-relative-e-distances'[disable/enable relative E values]' \
|
||||||
'--extrusion-axis[specify letter associated with the extrusion axis]:extrusion axis letter' \
|
'--extrusion-axis[specify letter associated with the extrusion axis]:extrusion axis letter' \
|
||||||
'(--gcode-arcs --no-gcode-arcs)'--{no-,}gcode-arcs'[disable/enable G2/G3 commands for native arcs]' \
|
'(--gcode-arcs --no-gcode-arcs)'--{no-,}gcode-arcs'[disable/enable G2/G3 commands for native arcs]' \
|
||||||
'(--g0 --no-g0)'--{no-,}g0'[disable/enable G0 commands for retraction]' \
|
|
||||||
'(--gcode-comments --no-gcode-comments)'--{no-,}gcode-comments'[disable/enable verbose G-code comments]' \
|
'(--gcode-comments --no-gcode-comments)'--{no-,}gcode-comments'[disable/enable verbose G-code comments]' \
|
||||||
\
|
\
|
||||||
'*--filament-diameter[specify raw filament diameter]:raw filament diameter in mm' \
|
'*--filament-diameter[specify raw filament diameter]:raw filament diameter in mm' \
|
||||||
|
@ -183,7 +183,6 @@ Print::invalidate_state_by_config_options(const std::vector<t_config_option_key>
|
|||||||
|| *opt_key == "first_layer_bed_temperature"
|
|| *opt_key == "first_layer_bed_temperature"
|
||||||
|| *opt_key == "first_layer_speed"
|
|| *opt_key == "first_layer_speed"
|
||||||
|| *opt_key == "first_layer_temperature"
|
|| *opt_key == "first_layer_temperature"
|
||||||
|| *opt_key == "g0"
|
|
||||||
|| *opt_key == "gcode_arcs"
|
|| *opt_key == "gcode_arcs"
|
||||||
|| *opt_key == "gcode_comments"
|
|| *opt_key == "gcode_comments"
|
||||||
|| *opt_key == "gcode_flavor"
|
|| *opt_key == "gcode_flavor"
|
||||||
|
@ -326,11 +326,6 @@ PrintConfigDef::build_def() {
|
|||||||
Options["first_layer_temperature"].min = 0;
|
Options["first_layer_temperature"].min = 0;
|
||||||
Options["first_layer_temperature"].max = 400;
|
Options["first_layer_temperature"].max = 400;
|
||||||
|
|
||||||
Options["g0"].type = coBool;
|
|
||||||
Options["g0"].label = "Use G0 for travel moves";
|
|
||||||
Options["g0"].tooltip = "Only enable this if your firmware supports G0 properly (thus decouples all axes using their maximum speeds instead of synchronizing them). Travel moves and retractions will be combined in single commands, speeding them print up.";
|
|
||||||
Options["g0"].cli = "g0!";
|
|
||||||
|
|
||||||
Options["gap_fill_speed"].type = coFloat;
|
Options["gap_fill_speed"].type = coFloat;
|
||||||
Options["gap_fill_speed"].label = "Gap fill";
|
Options["gap_fill_speed"].label = "Gap fill";
|
||||||
Options["gap_fill_speed"].category = "Speed";
|
Options["gap_fill_speed"].category = "Speed";
|
||||||
|
@ -388,7 +388,6 @@ class PrintConfig : public GCodeConfig
|
|||||||
ConfigOptionFloatOrPercent first_layer_extrusion_width;
|
ConfigOptionFloatOrPercent first_layer_extrusion_width;
|
||||||
ConfigOptionFloatOrPercent first_layer_speed;
|
ConfigOptionFloatOrPercent first_layer_speed;
|
||||||
ConfigOptionInts first_layer_temperature;
|
ConfigOptionInts first_layer_temperature;
|
||||||
ConfigOptionBool g0;
|
|
||||||
ConfigOptionBool gcode_arcs;
|
ConfigOptionBool gcode_arcs;
|
||||||
ConfigOptionFloat infill_acceleration;
|
ConfigOptionFloat infill_acceleration;
|
||||||
ConfigOptionBool infill_first;
|
ConfigOptionBool infill_first;
|
||||||
@ -455,7 +454,6 @@ class PrintConfig : public GCodeConfig
|
|||||||
this->first_layer_speed.percent = true;
|
this->first_layer_speed.percent = true;
|
||||||
this->first_layer_temperature.values.resize(1);
|
this->first_layer_temperature.values.resize(1);
|
||||||
this->first_layer_temperature.values[0] = 200;
|
this->first_layer_temperature.values[0] = 200;
|
||||||
this->g0.value = false;
|
|
||||||
this->gcode_arcs.value = false;
|
this->gcode_arcs.value = false;
|
||||||
this->infill_acceleration.value = 0;
|
this->infill_acceleration.value = 0;
|
||||||
this->infill_first.value = false;
|
this->infill_first.value = false;
|
||||||
@ -518,7 +516,6 @@ class PrintConfig : public GCodeConfig
|
|||||||
if (opt_key == "first_layer_extrusion_width") return &this->first_layer_extrusion_width;
|
if (opt_key == "first_layer_extrusion_width") return &this->first_layer_extrusion_width;
|
||||||
if (opt_key == "first_layer_speed") return &this->first_layer_speed;
|
if (opt_key == "first_layer_speed") return &this->first_layer_speed;
|
||||||
if (opt_key == "first_layer_temperature") return &this->first_layer_temperature;
|
if (opt_key == "first_layer_temperature") return &this->first_layer_temperature;
|
||||||
if (opt_key == "g0") return &this->g0;
|
|
||||||
if (opt_key == "gcode_arcs") return &this->gcode_arcs;
|
if (opt_key == "gcode_arcs") return &this->gcode_arcs;
|
||||||
if (opt_key == "infill_acceleration") return &this->infill_acceleration;
|
if (opt_key == "infill_acceleration") return &this->infill_acceleration;
|
||||||
if (opt_key == "infill_first") return &this->infill_first;
|
if (opt_key == "infill_first") return &this->infill_first;
|
||||||
|
Loading…
Reference in New Issue
Block a user