diff --git a/resources/profiles/Voron/Voron 0.1_cover.png b/resources/profiles/Voron/Voron 0.1_cover.png new file mode 100644 index 000000000..24c4f5227 Binary files /dev/null and b/resources/profiles/Voron/Voron 0.1_cover.png differ diff --git a/resources/profiles/Voron/Voron 2.4 250_cover.png b/resources/profiles/Voron/Voron 2.4 250_cover.png new file mode 100644 index 000000000..69e0c0825 Binary files /dev/null and b/resources/profiles/Voron/Voron 2.4 250_cover.png differ diff --git a/resources/profiles/Voron/Voron 2.4 300_cover.png b/resources/profiles/Voron/Voron 2.4 300_cover.png new file mode 100644 index 000000000..69e0c0825 Binary files /dev/null and b/resources/profiles/Voron/Voron 2.4 300_cover.png differ diff --git a/resources/profiles/Voron/Voron 2.4 350_cover.png b/resources/profiles/Voron/Voron 2.4 350_cover.png new file mode 100644 index 000000000..69e0c0825 Binary files /dev/null and b/resources/profiles/Voron/Voron 2.4 350_cover.png differ diff --git a/resources/profiles/Voron/Voron Trident 250_cover.png b/resources/profiles/Voron/Voron Trident 250_cover.png new file mode 100644 index 000000000..a032d6250 Binary files /dev/null and b/resources/profiles/Voron/Voron Trident 250_cover.png differ diff --git a/resources/profiles/Voron/Voron Trident 300_cover.png b/resources/profiles/Voron/Voron Trident 300_cover.png new file mode 100644 index 000000000..a032d6250 Binary files /dev/null and b/resources/profiles/Voron/Voron Trident 300_cover.png differ diff --git a/resources/profiles/Voron/Voron Trident 350_cover.png b/resources/profiles/Voron/Voron Trident 350_cover.png new file mode 100644 index 000000000..a032d6250 Binary files /dev/null and b/resources/profiles/Voron/Voron Trident 350_cover.png differ diff --git a/resources/profiles/Voron/filament/Voron Generic PETG.json b/resources/profiles/Voron/filament/Voron Generic PETG.json index 145840d65..0f89eb6bb 100644 --- a/resources/profiles/Voron/filament/Voron Generic PETG.json +++ b/resources/profiles/Voron/filament/Voron Generic PETG.json @@ -28,7 +28,7 @@ "40" ], "slow_down_min_speed": [ - "20" + "10" ], "slow_down_layer_time": [ "8" diff --git a/resources/profiles/Voron/filament/Voron Generic PVA.json b/resources/profiles/Voron/filament/Voron Generic PVA.json index b8a7d826a..9ae752a63 100644 --- a/resources/profiles/Voron/filament/Voron Generic PVA.json +++ b/resources/profiles/Voron/filament/Voron Generic PVA.json @@ -16,7 +16,7 @@ "7" ], "slow_down_min_speed": [ - "20" + "10" ], "compatible_printers": [ "Voron 2.4 250 0.4 nozzle", diff --git a/resources/profiles/Voron/filament/fdm_filament_abs.json b/resources/profiles/Voron/filament/fdm_filament_abs.json index 67ce7d013..b9d4eeda3 100644 --- a/resources/profiles/Voron/filament/fdm_filament_abs.json +++ b/resources/profiles/Voron/filament/fdm_filament_abs.json @@ -80,7 +80,7 @@ "270" ], "slow_down_min_speed": [ - "20" + "10" ], "slow_down_layer_time": [ "3" diff --git a/resources/profiles/Voron/filament/fdm_filament_asa.json b/resources/profiles/Voron/filament/fdm_filament_asa.json index fb1a3e530..262c561bd 100644 --- a/resources/profiles/Voron/filament/fdm_filament_asa.json +++ b/resources/profiles/Voron/filament/fdm_filament_asa.json @@ -80,7 +80,7 @@ "270" ], "slow_down_min_speed": [ - "20" + "10" ], "slow_down_layer_time": [ "3" diff --git a/resources/profiles/Voron/filament/fdm_filament_pa.json b/resources/profiles/Voron/filament/fdm_filament_pa.json index ce1b3d653..58f53cd45 100644 --- a/resources/profiles/Voron/filament/fdm_filament_pa.json +++ b/resources/profiles/Voron/filament/fdm_filament_pa.json @@ -77,7 +77,7 @@ "300" ], "slow_down_min_speed": [ - "20" + "10" ], "slow_down_layer_time": [ "2" diff --git a/resources/profiles/Voron/filament/fdm_filament_pc.json b/resources/profiles/Voron/filament/fdm_filament_pc.json index dd4692558..cec8b89a3 100644 --- a/resources/profiles/Voron/filament/fdm_filament_pc.json +++ b/resources/profiles/Voron/filament/fdm_filament_pc.json @@ -80,7 +80,7 @@ "280" ], "slow_down_min_speed": [ - "20" + "10" ], "slow_down_layer_time": [ "2" diff --git a/resources/profiles/Voron/filament/fdm_filament_pla.json b/resources/profiles/Voron/filament/fdm_filament_pla.json index 6814cff16..82c6772f3 100644 --- a/resources/profiles/Voron/filament/fdm_filament_pla.json +++ b/resources/profiles/Voron/filament/fdm_filament_pla.json @@ -80,7 +80,7 @@ "230" ], "slow_down_min_speed": [ - "20" + "10" ], "slow_down_layer_time": [ "4" diff --git a/resources/profiles/Voron/filament/fdm_filament_pva.json b/resources/profiles/Voron/filament/fdm_filament_pva.json index 6b6576a44..ebf25aa3a 100644 --- a/resources/profiles/Voron/filament/fdm_filament_pva.json +++ b/resources/profiles/Voron/filament/fdm_filament_pva.json @@ -86,7 +86,7 @@ "250" ], "slow_down_min_speed": [ - "50" + "10" ], "slow_down_layer_time": [ "4" diff --git a/resources/profiles/Voron/hotend.stl b/resources/profiles/Voron/hotend.stl deleted file mode 100644 index 4138160ec..000000000 Binary files a/resources/profiles/Voron/hotend.stl and /dev/null differ diff --git a/resources/profiles/Voron/machine/Voron 0.1.json b/resources/profiles/Voron/machine/Voron 0.1.json index 160ee037b..6a3d37f83 100644 --- a/resources/profiles/Voron/machine/Voron 0.1.json +++ b/resources/profiles/Voron/machine/Voron 0.1.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_v0_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/Voron 2.4 250.json b/resources/profiles/Voron/machine/Voron 2.4 250.json index 26e8f241d..5099f066d 100644 --- a/resources/profiles/Voron/machine/Voron 2.4 250.json +++ b/resources/profiles/Voron/machine/Voron 2.4 250.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/Voron 2.4 300.json b/resources/profiles/Voron/machine/Voron 2.4 300.json index b32bd22a9..37d3632e0 100644 --- a/resources/profiles/Voron/machine/Voron 2.4 300.json +++ b/resources/profiles/Voron/machine/Voron 2.4 300.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/Voron 2.4 350.json b/resources/profiles/Voron/machine/Voron 2.4 350.json index 0e165df53..228bfbc8f 100644 --- a/resources/profiles/Voron/machine/Voron 2.4 350.json +++ b/resources/profiles/Voron/machine/Voron 2.4 350.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/Voron Trident 250.json b/resources/profiles/Voron/machine/Voron Trident 250.json index 424229cc9..0fd8baac1 100644 --- a/resources/profiles/Voron/machine/Voron Trident 250.json +++ b/resources/profiles/Voron/machine/Voron Trident 250.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/Voron Trident 300.json b/resources/profiles/Voron/machine/Voron Trident 300.json index 68aac7a99..a84801a9f 100644 --- a/resources/profiles/Voron/machine/Voron Trident 300.json +++ b/resources/profiles/Voron/machine/Voron Trident 300.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/Voron Trident 350.json b/resources/profiles/Voron/machine/Voron Trident 350.json index 51b9e14c2..2cce35b6a 100644 --- a/resources/profiles/Voron/machine/Voron Trident 350.json +++ b/resources/profiles/Voron/machine/Voron Trident 350.json @@ -7,6 +7,6 @@ "family": "VoronDesign", "bed_model": "", "bed_texture": "voron_logo.png", - "hotend_model": "hotend.stl", + "hotend_model": "", "default_materials": "Voron Generic ABS;Voron Generic PLA;Voron Generic PLA-CF;Voron Generic PETG;Voron Generic TPU;Voron Generic ASA;Voron Generic PC;Voron Generic PVA;Voron Generic PA;Voron Generic PA-CF" } diff --git a/resources/profiles/Voron/machine/fdm_klipper_common.json b/resources/profiles/Voron/machine/fdm_klipper_common.json index e4cb236e2..f74a4fbce 100644 --- a/resources/profiles/Voron/machine/fdm_klipper_common.json +++ b/resources/profiles/Voron/machine/fdm_klipper_common.json @@ -4,7 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_machine_common", - "gcode_flavor": "marlin", + "gcode_flavor": "klipper", "machine_max_acceleration_e": [ "5000", "5000" @@ -116,6 +116,7 @@ "deretraction_speed": [ "30" ], + "z_hop_types": "Normal Lift", "silent_mode": "0", "single_extruder_multi_material": "1", "change_filament_gcode": "", @@ -130,9 +131,10 @@ "bed_exclude_area": [ "0x0" ], - "machine_start_gcode": "; M190 S0\n; M104 S0\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}", + "machine_start_gcode": "M190 S[bed_temperature_initial_layer_single]\nM109 S[nozzle_temperature_initial_layer]\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}", "machine_end_gcode": "PRINT_END", - "layer_change_gcode": "", + "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", + "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n", "scan_first_layer": "0", "nozzle_type": "undefine", "auxiliary_fan": "0" diff --git a/resources/profiles/Voron/process/fdm_process_common.json b/resources/profiles/Voron/process/fdm_process_common.json index cb3d7351b..7398bcd48 100644 --- a/resources/profiles/Voron/process/fdm_process_common.json +++ b/resources/profiles/Voron/process/fdm_process_common.json @@ -31,7 +31,7 @@ "detect_overhang_wall": "0", "reduce_infill_retraction": "0", "filename_format": "{input_filename_base}.gcode", - "wall_loops": "2", + "wall_loops": "3", "inner_wall_line_width": "0.45", "inner_wall_speed": "40", "print_settings_id": "", diff --git a/resources/profiles/Voron/process/fdm_process_voron_common.json b/resources/profiles/Voron/process/fdm_process_voron_common.json index 758be9d99..0dd70a8ac 100644 --- a/resources/profiles/Voron/process/fdm_process_voron_common.json +++ b/resources/profiles/Voron/process/fdm_process_voron_common.json @@ -16,12 +16,14 @@ "brim_object_gap": "0.1", "compatible_printers_condition": "", "print_sequence": "by layer", - "default_acceleration": "7000", + "default_acceleration": "5000", "top_surface_acceleration": "3000", + "travel_acceleration": "7000", + "inner_wall_acceleration": "5000", + "outer_wall_acceleration": "3000", "bridge_no_support": "0", "draft_shield": "disabled", "elefant_foot_compensation": "0", - "enable_arc_fitting": "1", "outer_wall_line_width": "0.4", "wall_infill_order": "inner wall/outer wall/infill", "line_width": "0.4", @@ -48,7 +50,7 @@ "overhang_3_4_speed": "30", "overhang_4_4_speed": "10", "inner_wall_line_width": "0.45", - "wall_loops": "2", + "wall_loops": "3", "print_settings_id": "", "raft_layers": "0", "seam_position": "aligned", @@ -81,7 +83,7 @@ "tree_support_branch_angle": "45", "tree_support_wall_count": "0", "detect_thin_wall": "0", - "top_surface_pattern": "monotonicline", + "top_surface_pattern": "monotonic", "top_surface_line_width": "0.4", "top_shell_layers": "3", "top_shell_thickness": "0.8", @@ -99,6 +101,7 @@ "prime_tower_width": "35", "xy_hole_compensation": "0", "xy_contour_compensation": "0", + "enable_arc_fitting": "0", "compatible_printers": [ "Voron 2.4 250 0.4 nozzle", "Voron 2.4 300 0.4 nozzle", diff --git a/resources/profiles/Voron/voron_logo.png b/resources/profiles/Voron/voron_logo.png index 8743146a8..a8cf27410 100644 Binary files a/resources/profiles/Voron/voron_logo.png and b/resources/profiles/Voron/voron_logo.png differ diff --git a/resources/profiles/Voron/voron_v0_logo.png b/resources/profiles/Voron/voron_v0_logo.png index bca8bb378..2e78af04a 100644 Binary files a/resources/profiles/Voron/voron_v0_logo.png and b/resources/profiles/Voron/voron_v0_logo.png differ diff --git a/resources/web/image/printer/Voron 0.1_cover.png b/resources/web/image/printer/Voron 0.1_cover.png deleted file mode 100644 index 16f750deb..000000000 Binary files a/resources/web/image/printer/Voron 0.1_cover.png and /dev/null differ diff --git a/resources/web/image/printer/Voron 2.4 250_cover.png b/resources/web/image/printer/Voron 2.4 250_cover.png deleted file mode 100644 index fac8d6813..000000000 Binary files a/resources/web/image/printer/Voron 2.4 250_cover.png and /dev/null differ diff --git a/resources/web/image/printer/Voron 2.4 300_cover.png b/resources/web/image/printer/Voron 2.4 300_cover.png deleted file mode 100644 index fac8d6813..000000000 Binary files a/resources/web/image/printer/Voron 2.4 300_cover.png and /dev/null differ diff --git a/resources/web/image/printer/Voron 2.4 350_cover.png b/resources/web/image/printer/Voron 2.4 350_cover.png deleted file mode 100644 index fac8d6813..000000000 Binary files a/resources/web/image/printer/Voron 2.4 350_cover.png and /dev/null differ diff --git a/resources/web/image/printer/Voron Trident 250_cover.png b/resources/web/image/printer/Voron Trident 250_cover.png deleted file mode 100644 index 8357a65a1..000000000 Binary files a/resources/web/image/printer/Voron Trident 250_cover.png and /dev/null differ diff --git a/resources/web/image/printer/Voron Trident 300_cover.png b/resources/web/image/printer/Voron Trident 300_cover.png deleted file mode 100644 index 8357a65a1..000000000 Binary files a/resources/web/image/printer/Voron Trident 300_cover.png and /dev/null differ diff --git a/resources/web/image/printer/Voron Trident 350_cover.png b/resources/web/image/printer/Voron Trident 350_cover.png deleted file mode 100644 index 8357a65a1..000000000 Binary files a/resources/web/image/printer/Voron Trident 350_cover.png and /dev/null differ diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index 03e84cfdd..71c518e0e 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1759,6 +1759,7 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato m_placeholder_parser.set("bed_temperature", new ConfigOptionInts(*bed_temp_opt)); m_placeholder_parser.set("bed_temperature_initial_layer_single", new ConfigOptionInt(first_bed_temp_opt->get_at(initial_extruder_id))); m_placeholder_parser.set("bed_temperature_initial_layer_vector", new ConfigOptionString("")); + m_placeholder_parser.set("chamber_temperature", new ConfigOptionInt(m_config.chamber_temperature)); //support variables `first_layer_temperature` and `first_layer_bed_temperature` m_placeholder_parser.set("first_layer_bed_temperature", new ConfigOptionInts(*first_bed_temp_opt)); @@ -1784,11 +1785,12 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato } std::string machine_start_gcode = this->placeholder_parser_process("machine_start_gcode", print.config().machine_start_gcode.value, initial_extruder_id); - // Set bed temperature if the start G-code does not contain any bed temp control G-codes. - this->_print_first_layer_bed_temperature(file, print, machine_start_gcode, initial_extruder_id, true); - // Set extruder(s) temperature before and after start G-code. - this->_print_first_layer_extruder_temperatures(file, print, machine_start_gcode, initial_extruder_id, false); - + if (print.config().gcode_flavor != gcfKlipper) { + // Set bed temperature if the start G-code does not contain any bed temp control G-codes. + this->_print_first_layer_bed_temperature(file, print, machine_start_gcode, initial_extruder_id, true); + // Set extruder(s) temperature before and after start G-code. + this->_print_first_layer_extruder_temperatures(file, print, machine_start_gcode, initial_extruder_id, false); + } // adds tag for processor file.write_format(";%s%s\n", GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Role).c_str(), ExtrusionEntity::role_to_string(erCustom).c_str()); diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index 25dab81f9..73091d3b2 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -921,7 +921,7 @@ void GCodeProcessor::apply_config(const PrintConfig& config) m_result.filament_vitrification_temperature[i] = static_cast(config.temperature_vitrification.get_at(i)); } - if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware) { + if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfKlipper) { m_time_processor.machine_limits = reinterpret_cast(config); if (m_flavor == gcfMarlinLegacy) { // Legacy Marlin does not have separate travel acceleration, it uses the 'extruding' value instead. @@ -1116,7 +1116,7 @@ void GCodeProcessor::apply_config(const DynamicPrintConfig& config) if (machine_unload_filament_time != nullptr) m_time_processor.filament_unload_times = static_cast(machine_unload_filament_time->value); - if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware) { + if (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfKlipper) { const ConfigOptionFloats* machine_max_acceleration_x = config.option("machine_max_acceleration_x"); if (machine_max_acceleration_x != nullptr) m_time_processor.machine_limits.machine_max_acceleration_x.values = machine_max_acceleration_x->values; @@ -1659,6 +1659,16 @@ void GCodeProcessor::process_gcode_line(const GCodeReader::GCodeLine& line, bool m_start_position = m_end_position; const std::string_view cmd = line.cmd(); + //softfever + if (m_flavor == gcfKlipper) + { + if (boost::iequals(cmd, "SET_VELOCITY_LIMIT")) + { + process_SET_VELOCITY_LIMIT(line); + return; + } + } + if (cmd.length() > 1) { // process command lines switch (cmd[0]) @@ -3719,7 +3729,7 @@ void GCodeProcessor::process_M203(const GCodeReader::GCodeLine& line) // see http://reprap.org/wiki/G-code#M203:_Set_maximum_feedrate // http://smoothieware.org/supported-g-codes - float factor = (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfSmoothie) ? 1.0f : MMMIN_TO_MMSEC; + float factor = (m_flavor == gcfMarlinLegacy || m_flavor == gcfMarlinFirmware || m_flavor == gcfSmoothie || m_flavor == gcfKlipper) ? 1.0f : MMMIN_TO_MMSEC; for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { if (static_cast(i) == PrintEstimatedStatistics::ETimeMode::Normal || @@ -3798,6 +3808,54 @@ void GCodeProcessor::process_M205(const GCodeReader::GCodeLine& line) } } +void GCodeProcessor::process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& line) +{ + // handle SQUARE_CORNER_VELOCITY + std::regex pattern("\\sSQUARE_CORNER_VELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)"); + std::smatch matches; + if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) { + float _jerk = 0; + try + { + _jerk = std::stof(matches[1]); + } + catch (...) {} + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + set_option_value(m_time_processor.machine_limits.machine_max_jerk_x, i, _jerk); + set_option_value(m_time_processor.machine_limits.machine_max_jerk_y, i, _jerk); + } + } + + pattern = std::regex("\\sACCEL\\s*=\\s*([0-9]*\\.*[0-9]*)"); + if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) { + float _accl = 0; + try + { + _accl = std::stof(matches[1]); + } + catch (...) {} + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + set_acceleration(static_cast(i), _accl); + set_travel_acceleration(static_cast(i), _accl); + } + } + + pattern = std::regex("\\sVELOCITY\\s*=\\s*([0-9]*\\.*[0-9]*)"); + if (std::regex_search(line.raw(), matches, pattern) && matches.size() == 2) { + float _speed = 0; + try + { + _speed = std::stof(matches[1]); + } + catch (...) {} + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + set_option_value(m_time_processor.machine_limits.machine_max_speed_x, i, _speed); + set_option_value(m_time_processor.machine_limits.machine_max_speed_y, i, _speed); + } + } + +} + void GCodeProcessor::process_M221(const GCodeReader::GCodeLine& line) { float value_s; diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 22d5d1187..2b71c2749 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -837,6 +837,9 @@ namespace Slic3r { // Advanced settings void process_M205(const GCodeReader::GCodeLine& line); + // Klipper SET_VELOCITY_LIMIT + void process_SET_VELOCITY_LIMIT(const GCodeReader::GCodeLine& line); + // Set extrude factor override percentage void process_M221(const GCodeReader::GCodeLine& line); diff --git a/src/libslic3r/GCode/WipeTower.cpp b/src/libslic3r/GCode/WipeTower.cpp index 6e8aaa79c..f88e0d56a 100644 --- a/src/libslic3r/GCode/WipeTower.cpp +++ b/src/libslic3r/GCode/WipeTower.cpp @@ -128,9 +128,13 @@ public: } WipeTowerWriter& disable_linear_advance() { - m_gcode += (m_gcode_flavor == gcfRepRapSprinter || m_gcode_flavor == gcfRepRapFirmware - ? (std::string("M572 D") + std::to_string(m_current_tool) + " S0\n") - : std::string("M900 K0\n")); + if (m_gcode_flavor == gcfKlipper) + m_gcode += "SET_PRESSURE_ADVANCE ADVANCE=0\n"; + else if (m_gcode_flavor == gcfRepRapFirmware) + m_gcode += std::string("M572 D") + std::to_string(m_current_tool) + " S0\n"; + else + m_gcode += "M900 K0\n"; + return *this; } diff --git a/src/libslic3r/GCodeWriter.cpp b/src/libslic3r/GCodeWriter.cpp index 536d17b66..d754fbbee 100644 --- a/src/libslic3r/GCodeWriter.cpp +++ b/src/libslic3r/GCodeWriter.cpp @@ -22,7 +22,9 @@ void GCodeWriter::apply_print_config(const PrintConfig &print_config) { this->config.apply(print_config, true); m_single_extruder_multi_material = print_config.single_extruder_multi_material.value; - bool is_marlin = print_config.gcode_flavor.value == gcfMarlinLegacy || print_config.gcode_flavor.value == gcfMarlinFirmware; + bool is_marlin = print_config.gcode_flavor.value == gcfMarlinLegacy + || print_config.gcode_flavor.value == gcfMarlinFirmware + || print_config.gcode_flavor.value == gcfKlipper; m_max_acceleration = std::lrint(is_marlin ? print_config.machine_max_acceleration_extruding.values.front() : 0); } @@ -54,7 +56,8 @@ std::string GCodeWriter::preamble() FLAVOR_IS(gcfMarlinFirmware) || FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepetier) || - FLAVOR_IS(gcfSmoothie)) + FLAVOR_IS(gcfSmoothie) || + FLAVOR_IS(gcfKlipper)) { if (RELATIVE_E_AXIS) { gcode << "M83 ; only support relative e\n"; diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index 39add72de..4f3ab84c1 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -781,7 +781,9 @@ static std::vector s_Preset_filament_options { "filament_vendor", "compatible_prints", "compatible_prints_condition", "compatible_printers", "compatible_printers_condition", "inherits", //BBS "filament_wipe_distance", "additional_cooling_fan_speed", - "bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high" + "bed_temperature_difference", "nozzle_temperature_range_low", "nozzle_temperature_range_high", + //softfever + "chamber_temperature" }; static std::vector s_Preset_machine_limits_options { diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 7d6ed1275..4319ac6f1 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -141,6 +141,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "wipe_distance", "curr_bed_type", "nozzle_volume", + "chamber_temperature", "nozzle_hrc", "required_nozzle_HRC", "upward_compatible_machine" @@ -180,6 +181,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n osteps.emplace_back(posSlice); } else if ( opt_key == "print_sequence" + || opt_key == "chamber_temperature" || opt_key == "filament_type" || opt_key == "nozzle_temperature_initial_layer" || opt_key == "filament_minimal_purge_on_wipe_tower" diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index b794be20e..33bf1d535 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -91,6 +91,7 @@ CONFIG_OPTION_ENUM_DEFINE_STATIC_MAPS(AuthorizationType) static t_config_enum_values s_keys_map_GCodeFlavor { { "marlin", gcfMarlinLegacy }, + { "klipper", gcfKlipper }, { "reprap", gcfRepRapSprinter }, { "reprapfirmware", gcfRepRapFirmware }, { "repetier", gcfRepetier }, @@ -1551,29 +1552,31 @@ void PrintConfigDef::init_fff_params() def->tooltip = L("What kind of gcode the printer is compatible with"); def->enum_keys_map = &ConfigOptionEnum::get_enum_values(); def->enum_values.push_back("marlin"); - /*def->enum_values.push_back("reprap"); - def->enum_values.push_back("reprapfirmware"); - def->enum_values.push_back("repetier"); - def->enum_values.push_back("teacup"); - def->enum_values.push_back("makerware"); - def->enum_values.push_back("marlin2"); - 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_values.push_back("klipper"); + //def->enum_values.push_back("reprap"); + //def->enum_values.push_back("reprapfirmware"); + //def->enum_values.push_back("repetier"); + //def->enum_values.push_back("teacup"); + //def->enum_values.push_back("makerware"); + //def->enum_values.push_back("marlin2"); + //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("Marlin(legacy)"); - /*def->enum_labels.push_back("RepRap/Sprinter"); - def->enum_labels.push_back("RepRapFirmware"); - 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 2"); - 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(L("No extrusion"));*/ + def->enum_labels.push_back("Klipper"); + //def->enum_labels.push_back("RepRap/Sprinter"); + //def->enum_labels.push_back("RepRapFirmware"); + //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 2"); + //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(L("No extrusion")); def->mode = comAdvanced; def->readonly = false; def->set_default_value(new ConfigOptionEnum(gcfMarlinLegacy)); @@ -2879,6 +2882,15 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(0)); + def = this->add("chamber_temperature", coInt); + def->label = L("Chamber temperature"); + def->tooltip = L("Target chamber temperature"); + def->sidetext = L("°C"); + def->full_label = L("Chamber temperature"); + def->min = 0; + def->max = max_temp; + def->set_default_value(new ConfigOptionInt(0)); + def = this->add("nozzle_temperature", coInts); def->label = L("Other layers"); def->tooltip = L("Nozzle temperature for layers after the initial one"); diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 361b9e024..266d24d28 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -32,8 +32,8 @@ namespace Slic3r { enum GCodeFlavor : unsigned char { - gcfMarlinLegacy, gcfRepRapSprinter, gcfRepRapFirmware, gcfRepetier, gcfTeacup, gcfMakerWare, gcfMarlinFirmware, gcfSailfish, gcfMach3, gcfMachinekit, - gcfSmoothie, gcfNoExtrusion, gcfKlipper + gcfMarlinLegacy, gcfKlipper, gcfRepRapSprinter, gcfRepRapFirmware, gcfRepetier, gcfTeacup, gcfMakerWare, gcfMarlinFirmware, gcfSailfish, gcfMach3, gcfMachinekit, + gcfSmoothie, gcfNoExtrusion }; enum class FuzzySkinType { @@ -925,6 +925,7 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionBool, spiral_mode)) ((ConfigOptionInt, standby_temperature_delta)) ((ConfigOptionInts, nozzle_temperature)) + ((ConfigOptionInt, chamber_temperature)) ((ConfigOptionBools, wipe)) // BBS ((ConfigOptionInts, bed_temperature_difference)) diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 43a41ad75..be9f3b0ae 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -2617,6 +2617,8 @@ void TabFilament::build() optgroup->append_single_option_line("bed_temperature_difference"); optgroup = page->new_optgroup(L("Print temperature"), L"param_temperature"); + optgroup->append_single_option_line("chamber_temperature"); + line = { L("Nozzle"), L("Nozzle temperature when printing") }; line.append_option(optgroup->get_option("nozzle_temperature_initial_layer")); line.append_option(optgroup->get_option("nozzle_temperature")); @@ -2806,6 +2808,13 @@ void TabFilament::toggle_options() if (!m_active_page) return; + bool is_BBL_printer = false; + if (m_preset_bundle) { + is_BBL_printer = + m_preset_bundle->printers.get_edited_preset().is_bbl_vendor_preset( + m_preset_bundle); + } + if (m_active_page->title() == "Cooling") { bool cooling = m_config->opt_bool("slow_down_for_layer_cooling", 0); @@ -2815,6 +2824,10 @@ void TabFilament::toggle_options() for (auto el : { "overhang_fan_speed", "overhang_fan_threshold" }) toggle_option(el, has_enable_overhang_bridge_fan); } + if (m_active_page->title() == "Filament") + { + toggle_line("chamber_temperature", !is_BBL_printer); + } if (m_active_page->title() == "Setting Overrides") update_filament_overrides_page(); @@ -3281,7 +3294,7 @@ void TabPrinter::build_unregular_pages(bool from_initial_build/* = false*/) { size_t n_before_extruders = 2; // Count of pages before Extruder pages auto flavor = m_config->option>("gcode_flavor")->value; - bool is_marlin_flavor = (flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware); + bool is_marlin_flavor = (flavor == gcfMarlinLegacy || flavor == gcfMarlinFirmware || flavor == gcfKlipper); /* ! Freeze/Thaw in this function is needed to avoid call OnPaint() for erased pages * and be cause of application crash, when try to change Preset in moment, @@ -3632,7 +3645,8 @@ void TabPrinter::toggle_options() if (m_active_page->title() == "Motion ability") { assert(m_config->option>("gcode_flavor")->value == gcfMarlinLegacy - || m_config->option>("gcode_flavor")->value == gcfMarlinFirmware); + || m_config->option>("gcode_flavor")->value == gcfMarlinFirmware + || m_config->option>("gcode_flavor")->value == gcfKlipper); bool silent_mode = m_config->opt_bool("silent_mode"); int max_field = silent_mode ? 2 : 1; //BBS: limits of BBL printer can't be edited, except jerk. @@ -3667,7 +3681,8 @@ void TabPrinter::update_fff() m_use_silent_mode = m_config->opt_bool("silent_mode"); } - bool supports_travel_acceleration = (m_config->option>("gcode_flavor")->value == gcfMarlinFirmware); + auto gcf_ = m_config->option>("gcode_flavor")->value; + bool supports_travel_acceleration = (gcf_ == gcfMarlinFirmware || gcf_ == gcfMarlinLegacy || gcf_ == gcfKlipper); if (m_supports_travel_acceleration != supports_travel_acceleration) { m_rebuild_kinematics_page = true; m_supports_travel_acceleration = supports_travel_acceleration;