{
    "type": "machine",
    "name": "Qidi Q2 0.4 nozzle",
    "inherits": "fdm_q_common",
    "from": "system",
    "setting_id": "GM001",
    "instantiation": "true",
    "box_id": "1",
    "printer_model": "Qidi Q2",
    "gcode_flavor": "klipper",
    "default_print_profile": "0.20mm Standard @Qidi Q2",
    "printer_settings_id": "Qidi",
    "bed_exclude_area": [
        "0x0,11x0,11x16,0x16"
    ],
    "change_filament_gcode": "G1 Z{max_layer_z + 3.0} F1200\nTOOL_CHANGE_START F=[current_extruder] T=[next_extruder]\nDISABLE_ALL_SENSOR\n{if long_retractions_when_cut[previous_extruder]}\nMOVE_TO_TRASH\nG1 E-{retraction_distances_when_cut[previous_extruder]} F{old_filament_e_feedrate}\nM400\n{endif}\nCUT_FILAMENT T=[current_extruder]\nMOVE_TO_TRASH\nM106 S25\nM106 P2 S0\nUNLOAD_T[current_extruder]\n{if nozzle_temperature_range_high[current_extruder] >= nozzle_temperature_range_high[next_extruder]}\nM104 S{nozzle_temperature_range_high[current_extruder]}\n{else}\nM104 S{nozzle_temperature_range_high[next_extruder]}\n{endif}\nT[next_extruder]\n{if nozzle_temperature_range_high[current_extruder] >= nozzle_temperature_range_high[next_extruder]}\nSET_HEATER_TEMPERATURE HEATER=extruder TARGET={nozzle_temperature_range_high[current_extruder]} WAIT=1\n{else}\nSET_HEATER_TEMPERATURE HEATER=extruder TARGET={nozzle_temperature_range_high[next_extruder]} WAIT=1\n{endif}\n; FLUSH_START\nG1 E15 F900\nG1 E30 F300\n; FLUSH_END\n{if long_retractions_when_cut[previous_extruder]}\nG1 E{retraction_distances_when_cut[previous_extruder]} F{old_filament_e_feedrate}\n{endif}\n{if flush_length_1 > 1}\n; FLUSH_START\n{if flush_length_1 > 23.7}\nG1 E23.7 F{old_filament_e_feedrate}\nG1 E{(flush_length_1 - 23.7) * 0.02} F50\nG1 E{(flush_length_1 - 23.7) * 0.23} F{old_filament_e_feedrate}\nG1 E{(flush_length_1 - 23.7) * 0.02} F50\nG1 E{(flush_length_1 - 23.7) * 0.23} F{new_filament_e_feedrate}\nG1 E{(flush_length_1 - 23.7) * 0.02} F50\nG1 E{(flush_length_1 - 23.7) * 0.23} F{new_filament_e_feedrate}\nG1 E{(flush_length_1 - 23.7) * 0.02} F50\nG1 E{(flush_length_1 - 23.7) * 0.23} F{new_filament_e_feedrate}\n{else}\nG1 E{flush_length_1} F{old_filament_e_feedrate}\n{endif}\nG1 E-[old_retract_length_toolchange] F1800\n; FLUSH_END\n{endif}\n{if flush_length_2 > 1}\n; FLUSH_START\nG1 E[old_retract_length_toolchange] F300\nG1 E{flush_length_2 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_2 * 0.02} F50\nG1 E{flush_length_2 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_2 * 0.02} F50\nG1 E{flush_length_2 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_2 * 0.02} F50\nG1 E{flush_length_2 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_2 * 0.02} F50\nG1 E{flush_length_2 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_2 * 0.02} F50\nG1 E-[new_retract_length_toolchange] F1800\n; FLUSH_END\n{endif}\n{if flush_length_3 > 1}\nG1 X88 F9000\n; FLUSH_START\nG1 E[new_retract_length_toolchange] F300\nG1 E{flush_length_3 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_3 * 0.02} F50\nG1 E{flush_length_3 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_3 * 0.02} F50\nG1 E{flush_length_3 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_3 * 0.02} F50\nG1 E{flush_length_3 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_3 * 0.02} F50\nG1 E{flush_length_3 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_3 * 0.02} F50\nG1 E-[new_retract_length_toolchange] F1800\n; FLUSH_END\n{endif}\n{if flush_length_4 > 1}\n; FLUSH_START\nG1 E[new_retract_length_toolchange] F300\nG1 E{flush_length_4 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_4 * 0.02} F50\nG1 E{flush_length_4 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_4 * 0.02} F50\nG1 E{flush_length_4 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_4 * 0.02} F50\nG1 E{flush_length_4 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_4 * 0.02} F50\nG1 E{flush_length_4 * 0.18} F{new_filament_e_feedrate}\nG1 E{flush_length_4 * 0.02} F50\nG1 E-[new_retract_length_toolchange] F1800\n; FLUSH_END\n{endif}\nM400\nM106 S255\nM104 S[new_filament_temp]\nG1 X89 F60\nG1 X85 F60\nG1 X89 F60\nM109 S[new_filament_temp]\nCLEAR_OOZE\nTOOL_CHANGE_END\nG1 Y270 F5000\nM106 S0\nENABLE_ALL_SENSOR",
    "default_filament_profile": [
        "QIDI PLA Rapido @Qidi Q2 0.4 nozzle"
    ],
    "enable_long_retraction_when_cut": "2",
    "extruder_clearance_radius": "70",
    "extruder_clearance_height_to_rod": "40",
    "extruder_clearance_height_to_lid": "120",
    "is_support_3mf": "1",
    "is_support_timelapse": "1",
    "is_support_multi_box": "1",
    "layer_change_gcode": "{if timelapse_type == 1} ; timelapse with wipe tower\nG92 E0\nG1 E-[retraction_length] F1800\nG2 Z{layer_z + 0.4} I0.86 J0.86 P1 F20000 ; spiral lift a little\nG1 Y235 F20000\nG1 X97 F20000\n{if layer_z <=25}\nG1 Z25\n{endif}\nG1 Y254 F2000\nG92 E0\nM400\nTIMELAPSE_TAKE_FRAME\nG1 E[retraction_length] F300\nG1 X85 F2000\nG1 X97 F2000\nG1 Y220 F2000\n{if layer_z <=25}\nG1 Z[layer_z]\n{endif}\n{elsif timelapse_type == 0} ; timelapse without wipe tower\nTIMELAPSE_TAKE_FRAME\n{endif}\nG92 E0\nSET_PRINT_STATS_INFO CURRENT_LAYER={layer_num + 1}",
    "machine_end_gcode": "DISABLE_BOX_HEATER\nM141 S0\nM140 S0\nDISABLE_ALL_SENSOR\nG1 E-3 F1800\nG0 Z{max_layer_z + 3} F600\nUNLOAD_FILAMENT T=[current_extruder]\nG0 Y270 F12000\nG0 X90 Y270 F12000\n{if max_layer_z < max_print_height / 2}G1 Z{max_print_height / 2 + 10} F600{else}G1 Z{min(max_print_height, max_layer_z + 3)}{endif}\nM104 S0",
    "machine_load_filament_time": "35",
    "machine_max_jerk_e": [
        "4"
    ],
    "machine_max_jerk_x": [
        "9"
    ],
    "machine_max_jerk_y": [
        "9"
    ],
    "machine_max_jerk_z": [
        "4"
    ],
    "machine_max_speed_z": [
        "20"
    ],
    "machine_pause_gcode": "M0",
    "machine_start_gcode": "PRINT_START BED=[bed_temperature_initial_layer_single] HOTEND=[nozzle_temperature_initial_layer] CHAMBER=[chamber_temperature] EXTRUDER=[initial_no_support_extruder]\nSET_PRINT_STATS_INFO TOTAL_LAYER=[total_layer_count]\nM83\nM140 S[bed_temperature_initial_layer_single]\nM104 S[nozzle_temperature_initial_layer]\nM141 S[chamber_temperature]\nG4 P3000\nT[initial_tool]\nG1 X108.000 Y1 F30000\nG0 Z[initial_layer_print_height] F600\n;G1 E3 F1800\nG90\nM83\nG0 X128 E8  F{outer_wall_volumetric_speed/(24/20)    * 60}\nG0 X133 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)/4     * 60}\nG0 X138 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)     * 60}\nG0 X143 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)/4     * 60}\nG0 X148 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)     * 60}\nG0 X153 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)/4     * 60}\nG91\nG1 X1 Z-0.300\nG1 X4\nG1 Z1 F1200\nG90\nM400\nG1 X108.000 Y2.5 F30000\nG0 Z[initial_layer_print_height] F600\nM83\nG0 X128 E10  F{outer_wall_volumetric_speed/(24/20)    * 60}\nG0 X133 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)/4     * 60}\nG0 X138 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)     * 60}\nG0 X143 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)/4     * 60}\nG0 X148 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)     * 60}\nG0 X153 E.3742  F{outer_wall_volumetric_speed/(0.3*0.5)/4     * 60}\nG91\nG1 X1 Z-0.300\nG1 X4\nG1 Z1 F1200\nG90\nM400\nG1 Z1 F600",
    "machine_unload_filament_time": "35",
    "nozzle_diameter": [
        "0.4"
    ],
    "nozzle_volume": [
        "125"
    ],
    "printable_area": [
        "0x0",
        "270x0",
        "270x270",
        "0x270"
    ],
    "printable_height": "256",
    "retract_lift_below": [
        "259"
    ],
    "support_box_temp_control": "1",
    "thumbnails_format": "PNG",
    "thumbnail_size": [
        "50x50"
    ]
}
