Add Prusa MK4S profiles (#8279)

* Whitespace cleanup in Prusa profile

```
$ diff -u Prusa.json <(jq --indent 4 < Prusa.json) | wc -l
       0
```

* Add Prusa MK4S profiles

There were generated from the PrusaSlicer profiles[0] using some scripts
which try to faithfully convert the profiles[1]. The high flow nozzle
settings have been modeled as a separate printer model.

A few things I'm aware of that haven't been converted:

 - Filament multi-material settings (eg loading speeds)
 - High-flow and abrasive nozzle check in gcode, which, as far as I
   know, isn't available in the current firmware anyways

I've also found that disabling z-hop on layer change in OrcaSlicer seems
more similar to the behavior in PrusaSlicer (which allows travel
distance limitations to override that setting), so I've disabled that.

Fixes #7391

[0]: 0bca90da13/resources/profiles/PrusaResearch.ini
[1]: https://github.com/rcloran/SuperSlicer_to_Orca_scripts/tree/20d2881
This commit is contained in:
Russell Cloran
2025-02-07 08:12:55 -08:00
committed by GitHub
parent 2af5aa56d8
commit 06c809c598
107 changed files with 3370 additions and 24 deletions

View File

@@ -0,0 +1,21 @@
{
"default_print_profile": "0.12mm STRUCTURAL @MK4S 0.25",
"from": "system",
"inherits": "Prusa MK4S 0.4 nozzle",
"instantiation": "true",
"machine_max_acceleration_travel": [
"2500",
"2500"
],
"max_layer_height": "0.15",
"min_layer_height": "0.05",
"name": "Prusa MK4S 0.25 nozzle",
"nozzle_diameter": [
"0.25"
],
"printer_model": "MK4S",
"printer_variant": "0.25",
"retraction_length": "0.8",
"type": "machine",
"z_hop": "0.15"
}

View File

@@ -0,0 +1,15 @@
{
"default_print_profile": "0.16mm STRUCTURAL @MK4S 0.3",
"from": "system",
"inherits": "Prusa MK4S 0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.22",
"min_layer_height": "0.05",
"name": "Prusa MK4S 0.3 nozzle",
"nozzle_diameter": [
"0.3"
],
"printer_model": "MK4S",
"printer_variant": "0.3",
"type": "machine"
}

View File

@@ -0,0 +1,13 @@
{
"default_filament_profile": "Prusament PLA @MK4S",
"default_print_profile": "0.20mm SPEED @MK4S 0.4",
"from": "system",
"inherits": "fdm_machine_common_mk4s",
"instantiation": "true",
"name": "Prusa MK4S 0.4 nozzle",
"nozzle_diameter": [
"0.4"
],
"printer_model": "MK4S",
"type": "machine"
}

View File

@@ -0,0 +1,15 @@
{
"default_print_profile": "0.20mm SPEED @MK4S 0.5",
"from": "system",
"inherits": "Prusa MK4S 0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.32",
"name": "Prusa MK4S 0.5 nozzle",
"nozzle_diameter": [
"0.5"
],
"printer_model": "MK4S",
"printer_variant": "0.5",
"type": "machine",
"wipe": "1"
}

View File

@@ -0,0 +1,17 @@
{
"default_filament_profile": "Prusament PLA @MK4S 0.6",
"default_print_profile": "0.25mm SPEED @MK4S 0.6",
"from": "system",
"inherits": "Prusa MK4S 0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.40",
"min_layer_height": "0.15",
"name": "Prusa MK4S 0.6 nozzle",
"nozzle_diameter": [
"0.6"
],
"printer_model": "MK4S",
"printer_variant": "0.6",
"type": "machine",
"wipe": "1"
}

View File

@@ -0,0 +1,22 @@
{
"default_filament_profile": "Prusament PLA @MK4S 0.8",
"default_print_profile": "0.40mm QUALITY @MK4S 0.8",
"deretraction_speed": "15",
"from": "system",
"inherits": "Prusa MK4S 0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.6",
"min_layer_height": "0.2",
"name": "Prusa MK4S 0.8 nozzle",
"nozzle_diameter": [
"0.8"
],
"printer_model": "MK4S",
"printer_variant": "0.8",
"retract_before_wipe": "50%",
"retraction_length": "0.6",
"retraction_speed": "25",
"type": "machine",
"wipe": "1",
"z_hop": "0.25"
}

View File

@@ -0,0 +1,12 @@
{
"bed_model": "mk4_bed.stl",
"bed_texture": "mk4s.svg",
"default_materials": "Prusa Generic ABS @MK4S;Prusa Generic ASA @MK4S;Prusa Generic PETG @MK4S;Prusa Generic PLA @MK4S;Prusa Generic PLA Silk @MK4S;Prusa Generic TPU @MK4S",
"family": "Prusa",
"hotend_model": "",
"machine_tech": "FFF",
"model_id": "MK4S HF",
"name": "Prusa MK4S HF",
"nozzle_diameter": "0.4;0.5;0.6;0.8",
"type": "machine_model"
}

View File

@@ -0,0 +1,20 @@
{
"default_filament_profile": "Prusament PLA @HF0.4",
"default_print_profile": "0.20mm SPEED @MK4S HF0.4",
"from": "system",
"inherits": "Prusa MK4S 0.4 nozzle",
"instantiation": "true",
"machine_start_gcode": [
"M17 ; enable steppers\nM862.1 P[nozzle_diameter] ; nozzle check\nM862.3 P \"MK4S\" ; printer model check\nM862.5 P2 ; g-code level check\nM862.6 P\"Input shaper\" ; FW feature check\nM115 U6.1.3+7898\n\nM555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}\n\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n\nM140 S[first_layer_bed_temperature] ; set bed temp\nM104 T0 S{((filament_notes[0]=~/.*HT_MBL10.*/) ? (first_layer_temperature[0] - 10) : (filament_type[0] == \"PC\" or filament_type[0] == \"PA\") ? (first_layer_temperature[0] - 25) : (filament_type[0] == \"FLEX\") ? 210 : (filament_type[0]=~/.*PET.*/) ? 175 : 170)} ; set extruder temp for bed leveling\nM109 T0 R{((filament_notes[0]=~/.*HT_MBL10.*/) ? (first_layer_temperature[0] - 10) : (filament_type[0] == \"PC\" or filament_type[0] == \"PA\") ? (first_layer_temperature[0] - 25) : (filament_type[0] == \"FLEX\") ? 210 : (filament_type[0]=~/.*PET.*/) ? 175 : 170)} ; wait for temp\n\nM84 E ; turn off E motor\n\nG28 ; home all without mesh bed level\n\nG1 X42 Y-4 Z5 F4800\n\nM302 S160 ; lower cold extrusion limit to 160C\n\n{if filament_type[initial_tool]==\"FLEX\"}\nG1 E-4 F2400 ; retraction\n{else}\nG1 E-2 F2400 ; retraction\n{endif}\n\nM84 E ; turn off E motor\n\nG29 P9 X10 Y-4 W32 H4\n\n{if first_layer_bed_temperature[initial_tool]<=60}M106 S100{endif}\n\nG0 Z40 F10000\n\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nM107\n\n;\n; MBL\n;\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X0 Y0 W50 H20 C ; probe near purge place\nG29 P3.2 ; interpolate mbl probes\nG29 P3.13 ; extrapolate mbl outside probe area\nG29 A ; activate mbl\n\n; prepare for purge\nM104 S{first_layer_temperature[0]}\nG0 X0 Y-4 Z15 F4800 ; move away and ready for the purge\nM109 S{first_layer_temperature[0]}\n\nG92 E0\nM569 S0 E ; set spreadcycle mode for extruder\n\n;\n; Extrude purge line\n;\nG92 E0 ; reset extruder position\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E7 X15 Z0.2 F500 ; purge\nG0 X25 E4 F500 ; purge\nG0 X35 E4 F650 ; purge\nG0 X45 E4 F800 ; purge\nG0 X48 Z0.05 F8000 ; wipe, move close to the bed\nG0 X51 Z0.2 F8000 ; wipe, move quickly away from the bed\n\nG92 E0\nM221 S100 ; set flow to 100%"
],
"name": "Prusa MK4S HF0.4 nozzle",
"nozzle_diameter": [
"0.4"
],
"printer_model": "MK4S HF",
"printer_notes": [
"Don't remove the following keywords! These keywords are used in the \"compatible printer\" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_MODEL_MK4S\nPG\nHF_NOZZLE\nNO_TEMPLATES"
],
"printer_variant": "0.4",
"type": "machine"
}

View File

@@ -0,0 +1,15 @@
{
"default_print_profile": "0.20mm SPEED @MK4S HF0.5",
"from": "system",
"inherits": "Prusa MK4S HF0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.32",
"name": "Prusa MK4S HF0.5 nozzle",
"nozzle_diameter": [
"0.5"
],
"printer_model": "MK4S HF",
"printer_variant": "0.5",
"type": "machine",
"wipe": "1"
}

View File

@@ -0,0 +1,16 @@
{
"default_print_profile": "0.32mm SPEED @MK4S HF0.6",
"from": "system",
"inherits": "Prusa MK4S HF0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.40",
"min_layer_height": "0.15",
"name": "Prusa MK4S HF0.6 nozzle",
"nozzle_diameter": [
"0.6"
],
"printer_model": "MK4S HF",
"printer_variant": "0.6",
"type": "machine",
"wipe": "1"
}

View File

@@ -0,0 +1,22 @@
{
"default_filament_profile": "Prusament PLA @HF0.8",
"default_print_profile": "0.40mm STRUCTURAL @MK4S HF0.8",
"deretraction_speed": "15",
"from": "system",
"inherits": "Prusa MK4S HF0.4 nozzle",
"instantiation": "true",
"max_layer_height": "0.6",
"min_layer_height": "0.2",
"name": "Prusa MK4S HF0.8 nozzle",
"nozzle_diameter": [
"0.8"
],
"printer_model": "MK4S HF",
"printer_variant": "0.8",
"retract_before_wipe": "50%",
"retraction_length": "0.6",
"retraction_speed": "25",
"type": "machine",
"wipe": "1",
"z_hop": "0.25"
}

View File

@@ -0,0 +1,12 @@
{
"bed_model": "mk4_bed.stl",
"bed_texture": "mk4s.svg",
"default_materials": "Prusa Generic ABS @MK4S;Prusa Generic ASA @MK4S;Prusa Generic PETG @MK4S;Prusa Generic PLA @MK4S;Prusa Generic PLA Silk @MK4S;Prusa Generic TPU @MK4S",
"family": "Prusa",
"hotend_model": "",
"machine_tech": "FFF",
"model_id": "MK4S",
"name": "Prusa MK4S",
"nozzle_diameter": "0.25;0.3;0.4;0.5;0.6;0.8",
"type": "machine_model"
}

View File

@@ -0,0 +1,129 @@
{
"before_layer_change_gcode": [
";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]\nM201 X{interpolate_table(extruded_weight_total, (0,4000), (1400,2500), (10000,2500))} Y{interpolate_table(extruded_weight_total, (0,4000), (1400,2500), (10000,2500))}\n"
],
"change_filament_gcode": [
""
],
"default_filament_profile": "Prusament PLA @PGIS",
"default_print_profile": "0.20mm SPEED @MK4IS 0.4",
"deretraction_speed": "25",
"extruder_clearance_height_to_lid": "220",
"extruder_clearance_height_to_rod": "14",
"extruder_clearance_radius": "45",
"from": "system",
"gcode_flavor": "marlin2",
"host_type": "prusalink",
"inherits": "fdm_machine_common",
"instantiation": "false",
"layer_change_gcode": [
";AFTER_LAYER_CHANGE\n;[layer_z]\n{if ! spiral_mode}M74 W[extruded_weight_total]{endif}\n"
],
"machine_end_gcode": [
"{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+1, max_print_height)} F720 ; Move print head up{endif}\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X241 Y170 F3600 ; park\n{if layer_z < max_print_height}G1 Z{z_offset+min(layer_z+23, max_print_height)} F300 ; Move print head up{endif}\nG4 ; wait\nM572 S0 ; reset PA\nM593 X T2 F0 ; disable IS\nM593 Y T2 F0 ; disable IS\nM84 X Y E ; disable motors\n; max_layer_z = [max_layer_z]"
],
"machine_max_acceleration_e": [
"2500",
"2500"
],
"machine_max_acceleration_extruding": [
"4000",
"2500"
],
"machine_max_acceleration_retracting": [
"1200",
"1200"
],
"machine_max_acceleration_travel": [
"4000",
"2500"
],
"machine_max_acceleration_x": [
"4000",
"2500"
],
"machine_max_acceleration_y": [
"4000",
"2500"
],
"machine_max_acceleration_z": [
"200",
"200"
],
"machine_max_jerk_e": [
"10",
"10"
],
"machine_max_jerk_x": [
"8",
"8"
],
"machine_max_jerk_y": [
"8",
"8"
],
"machine_max_jerk_z": [
"2",
"2"
],
"machine_max_speed_e": [
"100",
"100"
],
"machine_max_speed_x": [
"300",
"160"
],
"machine_max_speed_y": [
"300",
"160"
],
"machine_max_speed_z": [
"40",
"40"
],
"machine_start_gcode": [
"M17 ; enable steppers\nM862.1 P[nozzle_diameter] ; nozzle check\nM862.3 P \"[printer_model]\" ; printer model check\nM862.5 P2 ; g-code level check\nM862.6 P\"Input shaper\" ; FW feature check\nM115 U6.1.3+7898\n\nM555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}\n\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n\nM140 S[first_layer_bed_temperature] ; set bed temp\nM104 T0 S{((filament_notes[0]=~/.*HT_MBL10.*/) ? (first_layer_temperature[0] - 10) : (filament_type[0] == \"PC\" or filament_type[0] == \"PA\") ? (first_layer_temperature[0] - 25) : (filament_type[0] == \"FLEX\") ? 210 : (filament_type[0]=~/.*PET.*/) ? 175 : 170)} ; set extruder temp for bed leveling\nM109 T0 R{((filament_notes[0]=~/.*HT_MBL10.*/) ? (first_layer_temperature[0] - 10) : (filament_type[0] == \"PC\" or filament_type[0] == \"PA\") ? (first_layer_temperature[0] - 25) : (filament_type[0] == \"FLEX\") ? 210 : (filament_type[0]=~/.*PET.*/) ? 175 : 170)} ; wait for temp\n\nM84 E ; turn off E motor\n\nG28 ; home all without mesh bed level\n\nG1 X42 Y-4 Z5 F4800\n\nM302 S160 ; lower cold extrusion limit to 160C\n\n{if filament_type[initial_tool]==\"FLEX\"}\nG1 E-4 F2400 ; retraction\n{else}\nG1 E-2 F2400 ; retraction\n{endif}\n\nM84 E ; turn off E motor\n\nG29 P9 X10 Y-4 W32 H4\n\n{if first_layer_bed_temperature[initial_tool]<=60}M106 S100{endif}\n\nG0 Z40 F10000\n\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nM107\n\n;\n; MBL\n;\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X0 Y0 W50 H20 C ; probe near purge place\nG29 P3.2 ; interpolate mbl probes\nG29 P3.13 ; extrapolate mbl outside probe area\nG29 A ; activate mbl\n\n; prepare for purge\nM104 S{first_layer_temperature[0]}\nG0 X0 Y-4 Z15 F4800 ; move away and ready for the purge\nM109 S{first_layer_temperature[0]}\n\nG92 E0\nM569 S0 E ; set spreadcycle mode for extruder\n\n;\n; Extrude purge line\n;\nG92 E0 ; reset extruder position\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E7 X15 Z0.2 F500 ; purge\nG0 X25 E4 F500 ; purge\nG0 X35 E4 F650 ; purge\nG0 X45 E4 F800 ; purge\nG0 X48 Z0.05 F8000 ; wipe, move close to the bed\nG0 X51 Z0.2 F8000 ; wipe, move quickly away from the bed\n\nG92 E0\nM221 S100 ; set flow to 100%"
],
"max_layer_height": "0.30",
"min_layer_height": "0.07",
"name": "fdm_machine_common_mk4s",
"nozzle_diameter": [
"0.4"
],
"printable_area": [
"0x0",
"250x0",
"250x210",
"0x210"
],
"printable_height": "220",
"printer_model": "MK4S",
"printer_notes": [
"Don't remove the following keywords! These keywords are used in the \"compatible printer\" condition of the print and filament profiles to link the particular print and filament profiles to this printer profile.\nPRINTER_MODEL_MK4S\nPG\nNO_TEMPLATES"
],
"retract_before_wipe": "80",
"retract_length_toolchange": "0",
"retract_lift_above": "0",
"retract_lift_below": "219",
"retract_when_changing_layer": "0",
"retraction_length": "0.7",
"retraction_minimum_travel": "1.5",
"retraction_speed": "35",
"silent_mode": "1",
"single_extruder_multi_material": "0",
"thumbnails": [
"16x16/QOI",
"313x173/QOI",
"440x240/QOI",
"480x240/QOI",
"640x480/PNG"
],
"travel_slope": "1",
"type": "machine",
"use_firmware_retraction": "0",
"use_relative_e_distances": "1",
"wipe": "0",
"z_hop": "0.2",
"z_hop_types": "Slope Lift"
}