{
    "version": 2,
    "name": "Weedo X40",
    "inherits": "fdmprinter",
    "metadata": {
        "author": "X40-Community.org",
        "manufacturer": "Weedo",
        "visible": true,
        "file_formats": "text/x-gcode",
        "platform": "weedo_x40.3mf",
        "platform_offset": [ 0, 193, 35],
        "has_machine_quality": true,
        "has_materials": true,
        "has_variants": true,
        "preferred_material": "generic_pla_175",
        "exclude_materials": [
            "3D-Fuel_PLA_PRO_Black",
            "3D-Fuel_PLA_SnapSupport",
            "bestfilament_abs_skyblue",
            "bestfilament_petg_orange",
            "bestfilament_pla_green",
            "leapfrog_abs_natural",
            "leapfrog_epla_natural",
            "leapfrog_pva_natural",
            "generic_pc_175",
            "generic_nylon_175",
            "goofoo_abs",
            "goofoo_asa",
            "goofoo_bronze_pla",
            "goofoo_emarble_pla",
            "goofoo_esilk_pla",
            "goofoo_hips",
            "goofoo_pa_cf",
            "goofoo_pa",
            "goofoo_pc",
            "goofoo_peek",
            "goofoo_petg",
            "goofoo_pla",
            "goofoo_pva",
            "goofoo_tpe_83a",
            "goofoo_tpu_87a",
            "goofoo_tpu_95a",
            "goofoo_wood_pla",
            "emotiontech_abs",
            "emotiontech_absx",
            "emotiontech_acetate",
            "emotiontech_asax",
            "emotiontech_bvoh",
            "emotiontech_copa",
            "emotiontech_hips",
            "emotiontech_nylon_1030",
            "emotiontech_nylon_1030cf",
            "emotiontech_nylon_1070",
            "emotiontech_pc",
            "emotiontech_pekk",
            "emotiontech_petg",
            "emotiontech_pla",
            "emotiontech_pla_hr_870",
            "emotiontech_pva-m",
            "emotiontech_pva-s",
            "emotiontech_tpu98a",
            "eryone_petg",
            "eryone_pla_glow",
            "eryone_pla_matte",
            "eryone_pla_wood",
            "eryone_pla",          
            "eSUN_PETG_Black",
            "eSUN_PETG_Grey",
            "eSUN_PETG_Purple",
            "eSUN_PLA_PRO_Black",
            "eSUN_PLA_PRO_Grey",
            "eSUN_PLA_PRO_Purple",
            "eSUN_PLA_PRO_White",
            "Vertex_Delta_ABS",
            "Vertex_Delta_PET",
            "Vertex_Delta_PLA",
            "Vertex_Delta_TPU",
            "chromatik_pla",
            "dsm_arnitel2045_175",
            "dsm_novamid1070_175",
            "fabtotum_abs",
            "fabtotum_nylon",
            "fabtotum_pla",
            "fabtotum_tpu",
            "fdplast_abs_tomato",
            "fdplast_petg_gray",
            "fdplast_pla_olive",
            "fiberlogy_hd_pla",
            "filo3d_pla",
            "filo3d_pla_green",
            "filo3d_pla_red",
            "imade3d_petg_green",
            "imade3d_petg_pink",
            "imade3d_pla_green",
            "imade3d_pla_pink",
            "imade3d_petg_175",
            "imade3d_pla_175",
            "innofill_innoflex60_175",
            "layer_one_black_pla",
            "layer_one_dark_gray_pla",
            "layer_one_white_pla",
            "octofiber_pla",
            "polyflex_pla",
            "polymax_pla",
            "polyplus_pla",
            "polywood_pla",
            "redd_abs",
            "redd_asa",
            "redd_hips",
            "redd_nylon",
            "redd_petg",
            "redd_pla",
            "redd_tpe",            
            "tizyx_abs",
            "tizyx_flex",
            "tizyx_petg",
            "tizyx_pla_bois",
            "tizyx_pla",
            "tizyx_pva",
            "Vertex_Delta_ABS",
            "Vertex_Delta_PET",
            "Vertex_Delta_PLA_Glitter",
            "Vertex_Delta_PLA_Mat",
            "Vertex_Delta_PLA_Satin",
            "Vertex_Delta_PLA_Wood",
            "Vertex_Delta_PLA",
            "Vertex_Delta_TPU",
            "volumic_abs_ultra",
            "volumic_arma_ultra",
            "volumic_asa_ultra",
            "volumic_br80_ultra",
            "volumic_bumper_ultra",
            "volumic_cu80_ultra",
            "volumic_flex93_ultra",
            "volumic_medical_ultra",
            "volumic_nylon_ultra",
            "volumic_pekk_carbone",
            "volumic_petg_ultra",
            "volumic_petgcarbone_ultra",
            "volumic_pla_ultra",
            "volumic_pp_ultra",
            "volumic_strong_ultra",
            "volumic_support_ultra",
            "zyyx_pro_flex",
            "zyyx_pro_pla"
        ],
        "preferred_variant_name": "0.4mm Nozzle",
        "preferred_quality_type": "normal",
        "variants_name": "Nozzle Type",
        "machine_extruder_trains":
        {
            "0": "weedo_x40_extruder_left_0",
            "1": "weedo_x40_extruder_right_0"
        }
    },
    
    "overrides": {
        "machine_name": { "default_value": "Weedo X40" },
        "machine_width": { "default_value": 300 },
        "machine_depth": { "default_value": 300 },
        "machine_height": { "default_value": 400 },
        "machine_heated_bed": { "default_value": true },
        "machine_nozzle_heat_up_speed": { "default_value": 1.6 },
        "machine_nozzle_cool_down_speed": { "default_value": 0.75 },
        "machine_head_with_fans_polygon":
        {
            "default_value":
            [
                [ -42.5, 18 ],
                [ -42.5, -50 ],
                [ 24.5, 18 ],
                [ 24.5, -50.0 ]
            ]
        },
        "machine_max_feedrate_x": { "value": 500 },
        "machine_max_feedrate_y": { "value": 500 },
        "machine_max_feedrate_z": { "value": 10 },
        "machine_max_feedrate_e": { "value": 50 },       
        "machine_acceleration": { "value": 500 },
        "machine_max_acceleration_x": { "value": 500 },
        "machine_max_acceleration_y": { "value": 500 },
        "machine_max_acceleration_z": { "value": 100 },
        "machine_max_acceleration_e": { "value": 5000 },
        "gantry_height": { "value": "12" },
        "machine_extruder_count": { "default_value": 2 },
        "machine_start_gcode": {"default_value": "; x40-community.org configuration Rev. 08\n;(**** start.gcode for WEEDO X40 DUAL****)\nT{initial_extruder_nr} S ; Selected start extruder\nM140 S{material_bed_temperature_layer_0} ; Preheat bed\nM109 S{material_print_temperature_layer_0}; Preheat nozzle\nM73 P0 ; Set current print progress percentage\nG21 ; Millimeter Units\nG90 ; Absolute positioning\nM82 ; Extruder in absolute mode\nT0 S ; Select left extruder\nM301 H1 P15.53 I1.32 D45.75 ; PID left extruder with Weedo X40 coolingsystem\n;M301 H1 P13.32 I0.98 D45.13 ; PID left extruder with X40 Community coolingsystem\nM92 E94.90 ; Calibrate left extruder\nT1 S ; Select right extruder\nM301 H1 P15.44 I1.29 D46.11 ; PID right extruder with Weedo X40 coolingsystem\n;M301 H1 P13.32 I0.98 D45.13 ; PID right extruder with X40 Community coolingsystem\nM92 E94.90 ; Calibrate right extruder\nT0 S ; Select left extruder\nG28 ; Auto home\nG29 ; Bed Leveling\nG1 X-47 F3000 ; Move left nozzle to parking position\nT1 S ; select right extruder\nG1 X351 F3000 ; Move right nozzle to parking position\nM107 P0 ; Turn off left fan\nM107 P1 ; Turn off right fan\nT{initial_extruder_nr} S ; Set start extruder\nM190 S{material_bed_temperature_layer_0} ; Waiting for bed temperature\nG1 E50 F100 ; Extrude in parking position\nM77 ; Stop heat up timer\nM75 ; Start print timer\n" 
        },
        "machine_end_gcode": {"default_value": "(*********end X40 End.gcode*******)\nG28 X Y F3000\nG91 ; Relative positioning\nG1 E-6 ; Reduce filament pressure\nG90 ; Absolute positioning\nG0 Y300 F3000 ; Move headbed\nM104 S0 T0 ; Cool down left extruder\nM104 S0 T1 ; Cool down right extruder\nM140 S0 ; Cool down heatbed\nM107 P0 ; Turn off left fan\nM107 P1 ; Turn off right fan\nM82; Extruder in absolute mode\nM73 P100 ; Set print progress to 100%" },
        
        "speed_travel":
        {
            "maximum_value": "150",
            "value": "150"
        },

        "acceleration_enabled": { "value": false },
        "acceleration_print": { "value": 1000 },
        "acceleration_support": { "value": "math.ceil(acceleration_print * 2000 / 4000)" },
        "acceleration_support_interface": { "value": "acceleration_topbottom" },
        "acceleration_topbottom": { "value": "math.ceil(acceleration_print * 500 / 4000)" },
        "acceleration_wall": { "value": "math.ceil(acceleration_print * 1000 / 4000)" },
        "acceleration_wall_0": { "value": "math.ceil(acceleration_wall * 500 / 1000)" },
        "acceleration_travel": { "value": 2000 },
        "acceleration_travel_layer_0": { "value": "acceleration_travel / 2" },
        "acceleration_roofing": { "enabled": "acceleration_enabled and roofing_layer_count > 0 and top_layers > 0" },
        "adhesion_type": { "value": "'brim'" },        
        "brim_width": { "value": "8" },
        "bridge_settings_enabled": { "default_value": true },
        "cool_fan_full_at_height": { "value": "layer_height_0 + 2 * layer_height" },
        "cool_fan_speed": { "value": "50" },
        "cool_fan_speed_max": { "value": "100" },
        "cool_min_speed": { "value": "7" },
        "fill_perimeter_gaps": { "value": "'everywhere'" },
        "fill_outline_gaps": { "value": false },
        "filter_out_tiny_gaps": { "value": false },
        "infill_line_width": { "value": "round(line_width * 0.42 / 0.35, 2)" },
        "infill_overlap": { "value": 30.0 },
        "infill_pattern": { "value": "'lines' if infill_sparse_density > 50 else 'cubic'" },
        "infill_wipe_dist": { "value": 0.0 },
        "infill_sparse_density": { "value": "20" },
        "infill_before_walls": { "value": false },
        "jerk_enabled": { "value": false },
        "jerk_print": { "value": 11 },
       
        "jerk_wall": { "value": "jerk_print - 2" },
        "jerk_travel": { "value": 18 },
        "jerk_travel_layer_0": { "value": "jerk_travel" },
        "layer_height_0": { "value": "round(layer_height * 1.5, 2)" },      
        "line_width": { "value": "machine_nozzle_size" },
        "machine_min_cool_heat_time_window": { "default_value": 360 },
        "machine_max_jerk_xy": { "value": 10 },
        "machine_max_jerk_z": { "value": 0.4 },
        "machine_max_jerk_e": { "value": 5 },
        "machine_center_is_zero": { "default_value": false },
        "material_diameter": { "default_value": 1.75 },
        "material_flow": { "value": 100 },
        "material_standby_temperature": { "value": "100" },
        "material_print_temp_prepend": { "default_value":false },      
        "prime_tower_enable": { "default_value": false },
        "raft_airgap": { "default_value": 0.22 },
        "raft_base_speed":{ "value": 20 },
        "raft_interface_speed": { "value": 33 },
        "raft_margin": { "default_value": 8 },
        "retraction_enable": { "value": true },
        "retraction_amount": { "default_value": 4.5 },
        "retraction_count_max": { "value": 100 },
        "retraction_extrusion_window": { "value": 8 },
        "retraction_hop": { "value": 0.5 },
        "retraction_hop_enabled": { "value": "False" },
        "retraction_min_travel": { "value": 1.5 },
        "skin_overlap": { "value": 10.0 },
        "speed_layer_0": { "value": "round(speed_print / 2.5, 2)" },
        "speed_print": { "value": 50.0 },
        "speed_support": { "value": "speed_wall_0" },
        "speed_support_interface": { "value": "speed_print" },
        "speed_topbottom": { "value": "speed_print / 2" }, 
        "speed_wall": { "value": "speed_print / 2" },
        "speed_wall_0": { "value": "speed_wall" },
        "speed_wall_x": { "value": "speed_wall" },
        "speed_infill": { "value": "speed_print" },
        "speed_support_infill": { "value": 58.0 },
        "speed_print_layer_0": { "value": "speed_layer_0" },
        "speed_travel_layer_0": { "value": 60 },
        "speed_support_roof": { "value": 39.0 },
        "speed_support_bottom": { "value": 39.0 },
        "speed_roofing": { "value": 30.0 },
        "support_angle": { "default_value": 45 },
        "support_pattern": { "value": "'zigzag'" },
        "support_use_towers": { "value": true },
        "support_fan_enable": { "value": true },
        "support_xy_distance": { "value": "wall_line_width_0 * 2" },
        "support_xy_distance_overhang": { "value": "wall_line_width_0" },
        "support_z_distance": { "value": "layer_height if layer_height >= 0.16 else layer_height*2" },
        "support_supported_skin_fan_speed": { "value": 100 },
        "switch_extruder_retraction_amount": { "value": 0 },
        "travel_compensate_overlapping_walls_0_enabled": { "value": "False" },
        "travel_avoid_other_parts": { "value": true },
        "travel_retract_before_outer_wall": { "value": true },
        "top_bottom_thickness": {"value":  "line_width * 2" },
        "travel_avoid_supports": { "value": true },
        "wall_thickness": {"value": "line_width * 2" },
        "wall_0_wipe_dist": { "value": 0.0 },
        "meshfix_maximum_resolution": { "value": "0.25" },
        "optimize_wall_printing_order": { "value": "True" },
        "ooze_shield_enabled":{ "default_value":false },
        "ooze_shield_dist":{ "default_value":3.0 },
        "retraction_combing": { "value": "'off' if retraction_hop_enabled else 'noskin'" },
        "retraction_combing_max_distance": { "value": 30 },
        "retraction_speed": { "default_value": 28 },
        "z_seam_type": { "value": "'back'" },
        "z_seam_corner": { "value": "'z_seam_corner_weighted'" } 
    }
}
