Cherry-picked Repetier acceleration fixes, thanks to @lordofhyphens
e0d8101627
885f27b8ae
Added a printer settings to enable / disable variable layer height editing.
This commit is contained in:
parent
db30cee6a9
commit
abda054720
@ -132,7 +132,7 @@ The author of the Silk icon set is Mark James.
|
||||
(default: 100,100)
|
||||
--z-offset Additional height in mm to add to vertical coordinates
|
||||
(+/-, default: 0)
|
||||
--gcode-flavor The type of G-code to generate (reprap/teacup/makerware/sailfish/mach3/machinekit/no-extrusion,
|
||||
--gcode-flavor The type of G-code to generate (reprap/teacup/repetier/makerware/sailfish/mach3/machinekit/smoothie/no-extrusion,
|
||||
default: reprap)
|
||||
--use-relative-e-distances Enable this to get relative E values (default: no)
|
||||
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
||||
|
@ -1129,7 +1129,7 @@ sub build {
|
||||
serial_port serial_speed
|
||||
octoprint_host octoprint_apikey
|
||||
use_firmware_retraction pressure_advance
|
||||
use_volumetric_e
|
||||
use_volumetric_e variable_layer_height
|
||||
start_gcode end_gcode before_layer_gcode layer_gcode toolchange_gcode
|
||||
nozzle_diameter extruder_offset
|
||||
retract_length retract_lift retract_speed retract_restart_extra retract_before_travel retract_layer_change wipe
|
||||
@ -1334,6 +1334,7 @@ sub build {
|
||||
$optgroup->append_single_option_line('use_firmware_retraction');
|
||||
$optgroup->append_single_option_line('use_volumetric_e');
|
||||
$optgroup->append_single_option_line('pressure_advance');
|
||||
$optgroup->append_single_option_line('variable_layer_height');
|
||||
}
|
||||
}
|
||||
{
|
||||
|
@ -298,7 +298,7 @@ $j
|
||||
(default: 100,100)
|
||||
--z-offset Additional height in mm to add to vertical coordinates
|
||||
(+/-, default: $config->{z_offset})
|
||||
--gcode-flavor The type of G-code to generate (reprap/teacup/makerware/sailfish/mach3/machinekit/no-extrusion,
|
||||
--gcode-flavor The type of G-code to generate (reprap/teacup/repetier/makerware/sailfish/mach3/machinekit/smoothie/no-extrusion,
|
||||
default: $config->{gcode_flavor})
|
||||
--use-relative-e-distances Enable this to get relative E values (default: no)
|
||||
--use-firmware-retraction Enable firmware-controlled retraction using G10/G11 (default: no)
|
||||
|
@ -22,7 +22,7 @@ _arguments -S \
|
||||
'*--nozzle-diameter[specify nozzle diameter]:nozzle diameter in mm' \
|
||||
'--print-center[specify print center coordinates]:print center coordinates in mm,mm' \
|
||||
'--z-offset[specify Z-axis offset]:Z-axis offset in mm' \
|
||||
'--gcode-flavor[specify the type of G-code to generate]:G-code flavor:(reprap teacup makerware sailfish mach3 machinekit no-extrusion)' \
|
||||
'--gcode-flavor[specify the type of G-code to generate]:G-code flavor:(reprap teacup repetier makerware sailfish mach3 machinekit smoothie no-extrusion)' \
|
||||
'(--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' \
|
||||
'(--gcode-arcs --no-gcode-arcs)'--{no-,}gcode-arcs'[disable/enable G2/G3 commands for native arcs]' \
|
||||
|
@ -41,7 +41,7 @@ GCodeWriter::preamble()
|
||||
gcode << "G21 ; set units to millimeters\n";
|
||||
gcode << "G90 ; use absolute coordinates\n";
|
||||
}
|
||||
if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfTeacup)) {
|
||||
if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepetier) || FLAVOR_IS(gcfSmoothie)) {
|
||||
if (this->config.use_relative_e_distances) {
|
||||
gcode << "M83 ; use relative distances for extrusion\n";
|
||||
} else {
|
||||
@ -172,7 +172,14 @@ GCodeWriter::set_acceleration(unsigned int acceleration)
|
||||
this->_last_acceleration = acceleration;
|
||||
|
||||
std::ostringstream gcode;
|
||||
if (FLAVOR_IS(gcfRepetier)) {
|
||||
gcode << "M201 X" << acceleration << " Y" << acceleration;
|
||||
if (this->config.gcode_comments) gcode << " ; adjust acceleration";
|
||||
gcode << "\n";
|
||||
gcode << "M202 X" << acceleration << " Y" << acceleration;
|
||||
} else {
|
||||
gcode << "M204 S" << acceleration;
|
||||
}
|
||||
if (this->config.gcode_comments) gcode << " ; adjust acceleration";
|
||||
gcode << "\n";
|
||||
|
||||
|
@ -526,18 +526,22 @@ PrintConfigDef::PrintConfigDef()
|
||||
def->cli = "gcode-flavor=s";
|
||||
def->enum_keys_map = ConfigOptionEnum<GCodeFlavor>::get_enum_values();
|
||||
def->enum_values.push_back("reprap");
|
||||
def->enum_values.push_back("repetier");
|
||||
def->enum_values.push_back("teacup");
|
||||
def->enum_values.push_back("makerware");
|
||||
def->enum_values.push_back("sailfish");
|
||||
def->enum_values.push_back("mach3");
|
||||
def->enum_values.push_back("machinekit");
|
||||
def->enum_values.push_back("smoothie");
|
||||
def->enum_values.push_back("no-extrusion");
|
||||
def->enum_labels.push_back("RepRap (Marlin/Sprinter/Repetier)");
|
||||
def->enum_labels.push_back("RepRap (Marlin/Sprinter)");
|
||||
def->enum_labels.push_back("Repetier");
|
||||
def->enum_labels.push_back("Teacup");
|
||||
def->enum_labels.push_back("MakerWare (MakerBot)");
|
||||
def->enum_labels.push_back("Sailfish (MakerBot)");
|
||||
def->enum_labels.push_back("Mach3/LinuxCNC");
|
||||
def->enum_labels.push_back("Machinekit");
|
||||
def->enum_labels.push_back("Smoothie");
|
||||
def->enum_labels.push_back("No extrusion");
|
||||
def->default_value = new ConfigOptionEnum<GCodeFlavor>(gcfRepRap);
|
||||
|
||||
@ -1432,6 +1436,12 @@ PrintConfigDef::PrintConfigDef()
|
||||
def->cli = "use-volumetric-e!";
|
||||
def->default_value = new ConfigOptionBool(false);
|
||||
|
||||
def = this->add("variable_layer_height", coBool);
|
||||
def->label = "Enable variable layer height feature";
|
||||
def->tooltip = "Some printers or printer setups may have difficulties printing with a variable layer height. Enabled by default.";
|
||||
def->cli = "variable-layer-height!";
|
||||
def->default_value = new ConfigOptionBool(true);
|
||||
|
||||
def = this->add("wipe", coBools);
|
||||
def->label = "Wipe while retracting";
|
||||
def->tooltip = "This flag will move the nozzle while retracting to minimize the possible blob on leaky extruders.";
|
||||
|
@ -26,7 +26,7 @@
|
||||
namespace Slic3r {
|
||||
|
||||
enum GCodeFlavor {
|
||||
gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfMachinekit, gcfNoExtrusion,
|
||||
gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfMachinekit, gcfNoExtrusion, gcfSmoothie, gcfRepetier,
|
||||
};
|
||||
|
||||
enum InfillPattern {
|
||||
@ -45,9 +45,11 @@ enum SeamPosition {
|
||||
template<> inline t_config_enum_values ConfigOptionEnum<GCodeFlavor>::get_enum_values() {
|
||||
t_config_enum_values keys_map;
|
||||
keys_map["reprap"] = gcfRepRap;
|
||||
keys_map["repetier"] = gcfRepetier;
|
||||
keys_map["teacup"] = gcfTeacup;
|
||||
keys_map["makerware"] = gcfMakerWare;
|
||||
keys_map["sailfish"] = gcfSailfish;
|
||||
keys_map["smoothie"] = gcfSmoothie;
|
||||
keys_map["mach3"] = gcfMach3;
|
||||
keys_map["machinekit"] = gcfMachinekit;
|
||||
keys_map["no-extrusion"] = gcfNoExtrusion;
|
||||
@ -324,6 +326,7 @@ class GCodeConfig : public virtual StaticPrintConfig
|
||||
ConfigOptionBool use_firmware_retraction;
|
||||
ConfigOptionBool use_relative_e_distances;
|
||||
ConfigOptionBool use_volumetric_e;
|
||||
ConfigOptionBool variable_layer_height;
|
||||
|
||||
GCodeConfig(bool initialize = true) : StaticPrintConfig() {
|
||||
if (initialize)
|
||||
@ -361,7 +364,7 @@ class GCodeConfig : public virtual StaticPrintConfig
|
||||
OPT_PTR(use_firmware_retraction);
|
||||
OPT_PTR(use_relative_e_distances);
|
||||
OPT_PTR(use_volumetric_e);
|
||||
|
||||
OPT_PTR(variable_layer_height);
|
||||
return NULL;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user