diff options
-rw-r--r-- | resources/profiles/Original Prusa i3 MK2 and MK2S.ini | 6 | ||||
-rw-r--r-- | resources/profiles/Original Prusa i3 MK2, MK2S, MK2MM and MK3.ini | 16 | ||||
-rw-r--r-- | resources/profiles/Original Prusa i3 MK2MM.ini | 8 | ||||
-rw-r--r-- | resources/profiles/Original Prusa i3 MK3.ini | 2 | ||||
-rw-r--r-- | xs/src/libslic3r/GCode.cpp | 1 | ||||
-rw-r--r-- | xs/src/libslic3r/GCodeTimeEstimator.cpp | 26 | ||||
-rw-r--r-- | xs/src/libslic3r/GCodeTimeEstimator.hpp | 18 | ||||
-rw-r--r-- | xs/src/libslic3r/GCodeWriter.cpp | 2 | ||||
-rw-r--r-- | xs/src/libslic3r/Print.cpp | 4 | ||||
-rw-r--r-- | xs/src/libslic3r/PrintConfig.cpp | 7 | ||||
-rw-r--r-- | xs/src/libslic3r/PrintConfig.hpp | 4 |
11 files changed, 45 insertions, 49 deletions
diff --git a/resources/profiles/Original Prusa i3 MK2 and MK2S.ini b/resources/profiles/Original Prusa i3 MK2 and MK2S.ini index d7b116f7e..a186c3775 100644 --- a/resources/profiles/Original Prusa i3 MK2 and MK2S.ini +++ b/resources/profiles/Original Prusa i3 MK2 and MK2S.ini @@ -3258,7 +3258,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -3298,7 +3298,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.1 min_layer_height = 0.05 @@ -3338,7 +3338,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.35 min_layer_height = 0.1 diff --git a/resources/profiles/Original Prusa i3 MK2, MK2S, MK2MM and MK3.ini b/resources/profiles/Original Prusa i3 MK2, MK2S, MK2MM and MK3.ini index 03f48e6f2..5835cfdeb 100644 --- a/resources/profiles/Original Prusa i3 MK2, MK2S, MK2MM and MK3.ini +++ b/resources/profiles/Original Prusa i3 MK2, MK2S, MK2MM and MK3.ini @@ -3258,7 +3258,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -3298,7 +3298,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.1 min_layer_height = 0.05 @@ -3338,7 +3338,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.35 min_layer_height = 0.1 @@ -3378,7 +3378,7 @@ deretract_speed = 50 end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n extruder_colour = #FFAA55 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -3418,7 +3418,7 @@ deretract_speed = 50 end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n extruder_colour = #FFAA55 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -3458,7 +3458,7 @@ deretract_speed = 50,50,50,50 end_gcode = {if not has_wipe_tower}\n; Pull the filament into the cooling tubes.\nG1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\n{endif}\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259 extruder_offset = 0x0,0x0,0x0,0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25,0.25,0.25,0.25 min_layer_height = 0.07,0.07,0.07,0.07 @@ -3498,7 +3498,7 @@ deretract_speed = 50,50,50,50 end_gcode = {if not has_wipe_tower}\nG1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\n{endif}\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259 extruder_offset = 0x0,0x0,0x0,0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25,0.25,0.25,0.25 min_layer_height = 0.07,0.07,0.07,0.07 @@ -3538,7 +3538,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 diff --git a/resources/profiles/Original Prusa i3 MK2MM.ini b/resources/profiles/Original Prusa i3 MK2MM.ini index 9776c065e..035d15515 100644 --- a/resources/profiles/Original Prusa i3 MK2MM.ini +++ b/resources/profiles/Original Prusa i3 MK2MM.ini @@ -3258,7 +3258,7 @@ deretract_speed = 50 end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n extruder_colour = #FFAA55 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -3298,7 +3298,7 @@ deretract_speed = 50 end_gcode = G1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n\n extruder_colour = #FFAA55 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 @@ -3338,7 +3338,7 @@ deretract_speed = 50,50,50,50 end_gcode = {if not has_wipe_tower}\n; Pull the filament into the cooling tubes.\nG1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\n{endif}\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259 extruder_offset = 0x0,0x0,0x0,0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25,0.25,0.25,0.25 min_layer_height = 0.07,0.07,0.07,0.07 @@ -3378,7 +3378,7 @@ deretract_speed = 50,50,50,50 end_gcode = {if not has_wipe_tower}\nG1 E-4 F2100.00000\nG91\nG1 Z1 F7200.000\nG90\nG1 X245 Y1\nG1 X240 E4\nG1 F4000\nG1 X190 E2.7 \nG1 F4600\nG1 X110 E2.8\nG1 F5200\nG1 X40 E3 \nG1 E-15.0000 F5000\nG1 E-50.0000 F5400\nG1 E-15.0000 F3000\nG1 E-12.0000 F2000\nG1 F1600\nG1 X0 Y1 E3.0000\nG1 X50 Y1 E-5.0000\nG1 F2000\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-5.0000\nG1 F2400\nG1 X0 Y1 E5.0000\nG1 X50 Y1 E-3.0000\nG4 S0\n{endif}\nM107 ; fan off\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nG28 X0 ; home X axis\nM84 ; disable motors\n extruder_colour = #FFAA55;#5182DB;#4ECDD3;#FB7259 extruder_offset = 0x0,0x0,0x0,0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25,0.25,0.25,0.25 min_layer_height = 0.07,0.07,0.07,0.07 diff --git a/resources/profiles/Original Prusa i3 MK3.ini b/resources/profiles/Original Prusa i3 MK3.ini index 1aafb61f9..0afbb35cd 100644 --- a/resources/profiles/Original Prusa i3 MK3.ini +++ b/resources/profiles/Original Prusa i3 MK3.ini @@ -3258,7 +3258,7 @@ deretract_speed = 0 end_gcode = G4 ; wait\nM221 S100\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X0 Y200; home X axis\nM84 ; disable motors extruder_colour = #FFFF00 extruder_offset = 0x0 -gcode_flavor = reprap +gcode_flavor = marlin layer_gcode = ;AFTER_LAYER_CHANGE\n;[layer_z] max_layer_height = 0.25 min_layer_height = 0.07 diff --git a/xs/src/libslic3r/GCode.cpp b/xs/src/libslic3r/GCode.cpp index e85b21f80..d22040799 100644 --- a/xs/src/libslic3r/GCode.cpp +++ b/xs/src/libslic3r/GCode.cpp @@ -400,6 +400,7 @@ void GCode::_do_export(Print &print, FILE *file) // resets time estimator m_time_estimator.reset(); + m_time_estimator.set_dialect(print.config.gcode_flavor); // How many times will be change_layer() called? // change_layer() in turn increments the progress bar status. diff --git a/xs/src/libslic3r/GCodeTimeEstimator.cpp b/xs/src/libslic3r/GCodeTimeEstimator.cpp index 2ebeb9fd2..2edbfeac5 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.cpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.cpp @@ -302,12 +302,12 @@ namespace Slic3r { return _state.extrude_factor_override_percentage; } - void GCodeTimeEstimator::set_dialect(GCodeTimeEstimator::EDialect dialect) + void GCodeTimeEstimator::set_dialect(GCodeFlavor dialect) { _state.dialect = dialect; } - GCodeTimeEstimator::EDialect GCodeTimeEstimator::get_dialect() const + GCodeFlavor GCodeTimeEstimator::get_dialect() const { return _state.dialect; } @@ -360,7 +360,7 @@ namespace Slic3r { void GCodeTimeEstimator::set_default() { set_units(Millimeters); - set_dialect(Unknown); + set_dialect(gcfRepRap); set_positioning_xyz_type(Absolute); set_positioning_e_type(Relative); @@ -738,17 +738,17 @@ namespace Slic3r { void GCodeTimeEstimator::_processG4(const GCodeReader::GCodeLine& line) { - EDialect dialect = get_dialect(); + GCodeFlavor dialect = get_dialect(); float value; if (line.has_value('P', value)) add_additional_time(value * MILLISEC_TO_SEC); // see: http://reprap.org/wiki/G-code#G4:_Dwell - if ((dialect == Repetier) || - (dialect == Marlin) || - (dialect == Smoothieware) || - (dialect == RepRapFirmware)) + if ((dialect == gcfRepetier) || + (dialect == gcfMarlin) || + (dialect == gcfSmoothie) || + (dialect == gcfRepRap)) { if (line.has_value('S', value)) add_additional_time(value); @@ -846,10 +846,10 @@ namespace Slic3r { void GCodeTimeEstimator::_processM201(const GCodeReader::GCodeLine& line) { - EDialect dialect = get_dialect(); + GCodeFlavor dialect = get_dialect(); // see http://reprap.org/wiki/G-code#M201:_Set_max_printing_acceleration - float factor = ((dialect != RepRapFirmware) && (get_units() == GCodeTimeEstimator::Inches)) ? INCHES_TO_MM : 1.0f; + float factor = ((dialect != gcfRepRap) && (get_units() == GCodeTimeEstimator::Inches)) ? INCHES_TO_MM : 1.0f; if (line.has_x()) set_axis_max_acceleration(X, line.x() * factor); @@ -866,14 +866,14 @@ namespace Slic3r { void GCodeTimeEstimator::_processM203(const GCodeReader::GCodeLine& line) { - EDialect dialect = get_dialect(); + GCodeFlavor dialect = get_dialect(); // see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate - if (dialect == Repetier) + if (dialect == gcfRepetier) return; // see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate - float factor = (dialect == Marlin) ? 1.0f : MMMIN_TO_MMSEC; + float factor = (dialect == gcfMarlin) ? 1.0f : MMMIN_TO_MMSEC; if (line.has_x()) set_axis_max_feedrate(X, line.x() * factor); diff --git a/xs/src/libslic3r/GCodeTimeEstimator.hpp b/xs/src/libslic3r/GCodeTimeEstimator.hpp index 46f866972..9e429462e 100644 --- a/xs/src/libslic3r/GCodeTimeEstimator.hpp +++ b/xs/src/libslic3r/GCodeTimeEstimator.hpp @@ -2,6 +2,7 @@ #define slic3r_GCodeTimeEstimator_hpp_ #include "libslic3r.h" +#include "PrintConfig.hpp" #include "GCodeReader.hpp" namespace Slic3r { @@ -24,17 +25,6 @@ namespace Slic3r { Num_Axis }; - enum EDialect : unsigned char - { - Unknown, - Marlin, - Repetier, - Smoothieware, - RepRapFirmware, - Teacup, - Num_Dialects - }; - enum EPositioningType : unsigned char { Absolute, @@ -62,7 +52,7 @@ namespace Slic3r { struct State { - EDialect dialect; + GCodeFlavor dialect; EUnits units; EPositioningType positioning_xyz_type; EPositioningType positioning_e_type; @@ -222,8 +212,8 @@ namespace Slic3r { void set_extrude_factor_override_percentage(float percentage); float get_extrude_factor_override_percentage() const; - void set_dialect(EDialect dialect); - EDialect get_dialect() const; + void set_dialect(GCodeFlavor dialect); + GCodeFlavor get_dialect() const; void set_units(EUnits units); EUnits get_units() const; diff --git a/xs/src/libslic3r/GCodeWriter.cpp b/xs/src/libslic3r/GCodeWriter.cpp index abf55114b..cbe94f317 100644 --- a/xs/src/libslic3r/GCodeWriter.cpp +++ b/xs/src/libslic3r/GCodeWriter.cpp @@ -42,7 +42,7 @@ std::string GCodeWriter::preamble() gcode << "G21 ; set units to millimeters\n"; gcode << "G90 ; use absolute coordinates\n"; } - if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepetier) || FLAVOR_IS(gcfSmoothie)) { + if (FLAVOR_IS(gcfRepRap) || FLAVOR_IS(gcfMarlin) || 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 { diff --git a/xs/src/libslic3r/Print.cpp b/xs/src/libslic3r/Print.cpp index 773998394..0bc63f2f3 100644 --- a/xs/src/libslic3r/Print.cpp +++ b/xs/src/libslic3r/Print.cpp @@ -567,8 +567,8 @@ std::string Print::validate() const if (std::abs(dmr - 0.4) > EPSILON) return "The Wipe Tower is currently only supported for the 0.4mm nozzle diameter."; #endif - if (this->config.gcode_flavor != gcfRepRap) - return "The Wipe Tower is currently only supported for the RepRap (Marlin / Sprinter) G-code flavor."; + if (this->config.gcode_flavor != gcfRepRap && this->config.gcode_flavor != gcfMarlin) + return "The Wipe Tower is currently only supported for the Marlin and RepRap/Sprinter G-code flavors."; if (! this->config.use_relative_e_distances) return "The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1)."; SlicingParameters slicing_params0 = this->objects.front()->slicing_parameters(); diff --git a/xs/src/libslic3r/PrintConfig.cpp b/xs/src/libslic3r/PrintConfig.cpp index 902914536..0dc6c9d43 100644 --- a/xs/src/libslic3r/PrintConfig.cpp +++ b/xs/src/libslic3r/PrintConfig.cpp @@ -653,21 +653,23 @@ PrintConfigDef::PrintConfigDef() def->enum_values.push_back("repetier"); def->enum_values.push_back("teacup"); def->enum_values.push_back("makerware"); + def->enum_values.push_back("marlin"); 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)"); + def->enum_labels.push_back("RepRap/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("Marlin"); 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); + def->default_value = new ConfigOptionEnum<GCodeFlavor>(gcfMarlin); def = this->add("infill_acceleration", coFloat); def->label = "Infill"; @@ -1919,6 +1921,7 @@ std::string FullPrintConfig::validate() if (this->use_firmware_retraction.value && this->gcode_flavor.value != gcfSmoothie && this->gcode_flavor.value != gcfRepRap && + this->gcode_flavor.value != gcfMarlin && this->gcode_flavor.value != gcfMachinekit && this->gcode_flavor.value != gcfRepetier) return "--use-firmware-retraction is only supported by Marlin, Smoothie, Repetier and Machinekit firmware"; diff --git a/xs/src/libslic3r/PrintConfig.hpp b/xs/src/libslic3r/PrintConfig.hpp index ab58aa356..4394fcac1 100644 --- a/xs/src/libslic3r/PrintConfig.hpp +++ b/xs/src/libslic3r/PrintConfig.hpp @@ -23,7 +23,8 @@ namespace Slic3r { enum GCodeFlavor { - gcfRepRap, gcfTeacup, gcfMakerWare, gcfSailfish, gcfMach3, gcfMachinekit, gcfNoExtrusion, gcfSmoothie, gcfRepetier, + gcfRepRap, gcfRepetier, gcfTeacup, gcfMakerWare, gcfMarlin, gcfSailfish, gcfMach3, gcfMachinekit, + gcfSmoothie, gcfNoExtrusion, }; enum InfillPattern { @@ -50,6 +51,7 @@ template<> inline t_config_enum_values& ConfigOptionEnum<GCodeFlavor>::get_enum_ keys_map["repetier"] = gcfRepetier; keys_map["teacup"] = gcfTeacup; keys_map["makerware"] = gcfMakerWare; + keys_map["marlin"] = gcfMarlin; keys_map["sailfish"] = gcfSailfish; keys_map["smoothie"] = gcfSmoothie; keys_map["mach3"] = gcfMach3; |