mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-11 17:19:01 +08:00
Added Repetier FW flavor, fixed accel gcode generation for it.
Addresses #3426
This commit is contained in:
parent
eb491056d8
commit
e0d8101627
@ -133,7 +133,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/smoothie/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)
|
||||
|
@ -296,7 +296,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/smoothie/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 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]' \
|
||||
|
@ -54,7 +54,7 @@ GCodeWriter::preamble()
|
||||
gcode << "G21 ; set units to millimeters\n";
|
||||
gcode << "G90 ; use absolute coordinates\n";
|
||||
}
|
||||
if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfSmoothie)) {
|
||||
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 {
|
||||
@ -185,7 +185,12 @@ GCodeWriter::set_acceleration(unsigned int acceleration)
|
||||
this->_last_acceleration = acceleration;
|
||||
|
||||
std::ostringstream gcode;
|
||||
gcode << "M204 S" << acceleration;
|
||||
if (FLAVOR_IS(gcfRepetier)) {
|
||||
gcode << "M201 X" << acceleration << " Y" << acceleration;
|
||||
gcode << "M202 X" << acceleration << " Y" << acceleration;
|
||||
} else {
|
||||
gcode << "M204 S" << acceleration;
|
||||
}
|
||||
if (this->config.gcode_comments) gcode << " ; adjust acceleration";
|
||||
gcode << "\n";
|
||||
|
||||
|
@ -463,6 +463,7 @@ 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");
|
||||
@ -470,7 +471,8 @@ PrintConfigDef::PrintConfigDef()
|
||||
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)");
|
||||
|
@ -9,7 +9,7 @@
|
||||
namespace Slic3r {
|
||||
|
||||
enum GCodeFlavor {
|
||||
gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfMachinekit, gcfNoExtrusion, gcfSmoothie,
|
||||
gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfMachinekit, gcfNoExtrusion, gcfSmoothie, gcfRepetier,
|
||||
};
|
||||
|
||||
enum InfillPattern {
|
||||
@ -28,6 +28,7 @@ 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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user