{
  "type": "machine",
  "from": "system",
  "instantiation": "false",
  "name": "fdm_idex",
  "inherits": "fdm_common",
  "wipe": [
    "1"
  ],
  "wipe_distance": [
    "2"
  ],
  "retraction_speed": [
    "25",
    "25"
  ],
  "deretraction_speed": [
    "25",
    "25"
  ],
  "bed_model": "Snapmaker J1_bed.stl",
  "bed_texture": "Snapmaker J1_texture.svg",
  "printable_height": "200",
  "extruder_clearance_radius": "35",
  "extruder_clearance_height_to_rod": "35",
  "extruder_clearance_height_to_lid": "150",
  "printer_notes": "PRINTER_MODEL_SNAPMAKER_J1\n",
  "fan_speedup_time": [
    "0.3"
  ],
  "machine_max_acceleration_x": [
    "10000"
  ],
  "machine_max_acceleration_y": [
    "8000"
  ],
  "machine_max_acceleration_z": [
    "100"
  ],
  "machine_max_acceleration_e": [
    "6000"
  ],
  "machine_max_acceleration_travel": [
    "10000"
  ],
  "machine_max_acceleration_extruding": [
    "10000"
  ],
  "machine_max_acceleration_retracting": [
    "6000"
  ],
  "machine_max_speed_x": [
    "350"
  ],
  "machine_max_speed_y": [
    "300"
  ],
  "machine_max_speed_z": [
    "10"
  ],
  "machine_max_speed_e": [
    "40"
  ],
  "machine_max_jerk_x": [
    "10"
  ],
  "machine_max_jerk_y": [
    "10"
  ],
  "machine_max_jerk_z": [
    "3"
  ],
  "machine_max_jerk_e": [
    "2.5"
  ],
  "retract_length_toolchange": [
    "2",
    "2"
  ],
  "printable_area": [
    "0x0",
    "324x0",
    "324x200",
    "0x200"
  ],
  "bed_exclude_area": [
    "312x0",
    "324x0",
    "324x200",
    "312x200"
  ],
  "thumbnails": [
    "300x300"
  ],
  "extruder_offset": [
    "0x0",
    "0x0"
  ],
  "default_filament_profile": [
    "Snapmaker J1 PLA",
    "Snapmaker J1 PETG"
  ],
  "machine_start_gcode": "; Model: Snapmaker J1 ({nozzle_diameter[0]}/{nozzle_diameter[1]})\n; Update: 20240922\n; Maintained by https://github.com/macdylan/3dp-configs\n; Printer : [printer_preset]\n; Profile : [print_preset]\n; Plate   : [plate_name]\n; --- initial_extruder: [initial_extruder]\n; --- has_wipe_tower: [has_wipe_tower]\n; --- total_toolchanges: [total_toolchanges]\n; --- T0: {is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - 1, 0))]}\n; --- T1: {is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - 0, 0))]}\n\nT[initial_extruder]\n\nM205 V[machine_max_jerk_x] ;Junction Deviation (mm)\n\n{if plate_name =~/.*IDEXDupl.*/ || plate_name =~/.*IDEXCopy.*/ }\n  M605 S2 X162 R0 ;IDEX Duplication\n{elsif plate_name =~/.*IDEXMirr.*/}\n  M605 S3 ;IDEX Mirror\n{elsif plate_name =~/.*IDEXBack.*/}\n  M605 S4 ;IDEX Backup\n{endif}\n\nM140 S{first_layer_bed_temperature[initial_extruder]}\n\n; you can clean the nozzle\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]}\n  M104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} S165\n  {endif}\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]}\n  M104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} S165\n  {endif}\nM204 S100\nG28\n\nG0 Z100.0\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]}\n  T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))}\n  G0 X{if 0 == 0}80{else}240{endif} Y0 F6840.0\n  {endif}\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]}\n  T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))}\n  G0 X{if 1 == 0}80{else}240{endif} Y0 F6840.0\n  {endif}\n\nM190 R{first_layer_bed_temperature[initial_extruder]}\n\n{if 1==1}; LED\n  M355 S1 P64\n  G4 P100\n  M355 S1 P128\n  G4 P100\n  M355 S1 P64\n  G4 P200\n  M355 S1 P255\n  G4 P100\n{endif}\nG28 X Y\n\nM83\n{if 1==1 && max(hot_plate_temp_initial_layer[initial_extruder], hot_plate_temp[initial_extruder]) >= 90}\nG0 Z0.06\nG92 Z0 ;reset z\n{endif}\n\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]}\n; preheat 0\nM104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))}\n  {endif}\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]}\n; preheat 1\nM104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 15))}\n  {endif}\n\n  {if 1==1}\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] and (initial_extruder % 2) != 0}\n; flush nozzle 0\nT{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))}\nM104 S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))}; common flush temp\nG0 Z1.6 F240.0\nG0 X{( 0 % 2 == 0 ? 147.0 : 177.0 )} F6840.0\nG0 Y0 F6840.0\n\nM109 S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))} C2 W1\nG1 E20 F80.0\nG92 E0\n\nM106 S{min(255, (fan_max_speed[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 10) * 2.55)}\n\nM104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 5}\n\nG1 E12.0 F200\nG92 E0\nG1 E8.0 Z4.6 F200\nG92 E0\n\nG0 Z5.6 F200\nM107\n\nG0 X{( 0 % 2 == 0 ? 137.0 : 187.0 )} F6840.0\nG0 Z0.3 F240.0\nM109 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]} C3 W1\nG1 E3 F200\nG92 E0\nG1 X{( 0 % 2 == 0 ? 0 : 324 )} E8.5437 F6840.0\nG92 E0\n\nG1 E-{retract_length_toolchange[0]} F200\nG92 E0\nG0 Y20 F6840.0\nG28 X F6840.0\n\nM104 S{temperature_vitrification[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]}\n  {endif}\n\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] and (initial_extruder % 2) != 1}\n; flush nozzle 1\nT{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))}\nM104 S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 15))}; common flush temp\nG0 Z1.6 F240.0\nG0 X{( 1 % 2 == 0 ? 147.0 : 177.0 )} F6840.0\nG0 Y0 F6840.0\n\nM109 S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 15))} C2 W1\nG1 E20 F80.0\nG92 E0\n\nM106 S{min(255, (fan_max_speed[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 10) * 2.55)}\n\nM104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 5}\n\nG1 E12.0 F200\nG92 E0\nG1 E8.0 Z4.6 F200\nG92 E0\n\nG0 Z5.6 F200\nM107\n\nG0 X{( 1 % 2 == 0 ? 137.0 : 187.0 )} F6840.0\nG0 Z0.3 F240.0\nM109 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]} C3 W1\nG1 E3 F200\nG92 E0\nG1 X{( 1 % 2 == 0 ? 0 : 324 )} E8.5437 F6840.0\nG92 E0\n\nG1 E-{retract_length_toolchange[1]} F200\nG92 E0\nG0 Y20 F6840.0\nG28 X F6840.0\n\nM104 S{temperature_vitrification[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]}\n  {endif}\n\n  {endif}\n; flush initial nozzle\nT[initial_extruder]\nM104 S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 15))}; common flush temp\nG0 Z1.6 F240.0\nG0 X{( initial_extruder % 2 == 0 ? 147.0 : 177.0 )} F6840.0\nG0 Y0 F6840.0\n\nM109 S{max(250, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 15))} C2 W1\nG1 E20 F80.0\nG92 E0\n\nM106 S{min(255, (fan_max_speed[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 10) * 2.55)}\n\nM104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 5}\n\nG1 E12.0 F200\nG92 E0\nG1 E8.0 Z4.6 F200\nG92 E0\n\nG0 Z5.6 F200\nM107\n\nG0 X{( initial_extruder % 2 == 0 ? 137.0 : 187.0 )} F6840.0\nG0 Z0.3 F240.0\nM109 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))]} C3 W1\nG1 E3 F200\nG92 E0\nG1 X{( initial_extruder % 2 == 0 ? 0 : 324 )} E8.5437 F6840.0\nG92 E0\n\nG1 E-{retraction_length[initial_extruder]} F200\nG92 E0\nG0 Y20 F6840.0\n\n; ready [plate_name]",
  "machine_end_gcode": "G92 E0\n\nG0 Z{max_layer_z + 2.0} F600\n; retract the filament to make it easier to replace\nG0 E-10 F200\nG28\n\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]}\nM104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} S0\n  {endif}\n{if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]}\nM104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} S0\n  {endif}\nM140 S0\nM107\nM220 S100\nM84\n\n;\n; DON'T REMOVE these lines if you're using the smfix (https://github.com/macdylan/SMFix)\n; min_x = [first_layer_print_min_0]\n; min_y = [first_layer_print_min_1]\n; max_x = [first_layer_print_max_0]\n; max_y = [first_layer_print_max_1]\n; max_z = [max_layer_z]\n; total_layer_number = [layer_num]\n;",
  "change_filament_gcode": ";***** Update: 20240823\n{if current_extruder != next_extruder}\n; Change T[current_extruder] -> T[next_extruder] (layer [layer_num] [toolchange_count]/[total_toolchanges])\n; layer [layer_num] at [layer_z]mm\nT[next_extruder]\n\n M107 P[current_extruder] ;fan off T[current_extruder]\n\n{if layer_num == 1 &&\n ((filament_type[current_extruder] == \"PLA\" || filament_type[current_extruder] == \"TPU\")\n  || (filament_type[next_extruder] == \"PLA\" || filament_type[next_extruder] == \"TPU\"))\n}\n; set bed temp: {filament_type[current_extruder]}({bed_temperature[current_extruder]}) -> {filament_type[next_extruder]}({bed_temperature[next_extruder]})\nM140 S{min(bed_temperature[current_extruder], bed_temperature[next_extruder])}\n{endif}\n\nM2000 S200 V[travel_speed] A[travel_acceleration] ;quick switch extruders, S:200 mode/V:speed/A:acceleration\nM109 T[next_extruder] S{if layer_num < 1}[nozzle_temperature_initial_layer]{else}[nozzle_temperature]{endif} C3 W1 ;wait T[next_extruder]\n{if layer_z > first_layer_height && layer_num >= close_fan_the_first_x_layers[next_extruder]}\n  M106 P[next_extruder] S{fan_min_speed[next_extruder] * 255.0 / 100.0} ;restore fan speed for T[next_extruder]\n{endif}\n{endif}",
  "before_layer_change_gcode": "; layer_num: [layer_num]\nG92 E0"
}