diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json index ca2afafa24..cd1de6b7e4 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Plus 0.4 nozzle.json @@ -156,7 +156,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json index 63c52ab260..bab2091fdd 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X3Pro 0.4 nozzle.json @@ -156,7 +156,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json index 6541d48fb2..e72063a41c 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Plus 0.4 nozzle.json @@ -156,7 +156,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json index 3f2e3ca406..59b4db5f67 100644 --- a/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json +++ b/resources/profiles/Artillery/process/0.20mm Standard @Artillery X4Pro 0.4 nozzle.json @@ -156,7 +156,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "none", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/Comgrow/process/fdm_process_comgrow_common.json b/resources/profiles/Comgrow/process/fdm_process_comgrow_common.json index 8f144ff59a..194e40a196 100644 --- a/resources/profiles/Comgrow/process/fdm_process_comgrow_common.json +++ b/resources/profiles/Comgrow/process/fdm_process_comgrow_common.json @@ -128,7 +128,7 @@ "role_based_wipe_speed": "1", "seam_gap": "5%", "seam_position": "aligned", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "3", "skirt_height": "2", "skirt_loops": "0", diff --git a/resources/profiles/Custom.json b/resources/profiles/Custom.json index a6015b1a4e..e4dae5bd72 100644 --- a/resources/profiles/Custom.json +++ b/resources/profiles/Custom.json @@ -1,6 +1,6 @@ { "name": "Custom Printer", - "version": "02.01.01.00", + "version": "02.01.04.00", "force_update": "0", "description": "My configurations", "machine_model_list": [ @@ -15,6 +15,10 @@ { "name": "Generic RRF Printer", "sub_path": "machine/MyRRF.json" + }, + { + "name": "Generic ToolChanger Printer", + "sub_path": "machine/MyToolChanger.json" } ], "process_list": [ @@ -34,6 +38,10 @@ "name": "fdm_process_marlin_common", "sub_path": "process/fdm_process_marlin_common.json" }, + { + "name": "fdm_process_mytoolchanger_common", + "sub_path": "process/fdm_process_mytoolchanger_common.json" + }, { "name": "0.08mm Extra Fine @MyKlipper", "sub_path": "process/0.08mm Extra Fine @MyKlipper.json" @@ -121,6 +129,46 @@ { "name": "0.28mm Extra Draft @MyMarlin", "sub_path": "process/0.28mm Extra Draft @MyMarlin.json" + }, + { + "name": "0.08mm Extra Fine @MyToolChanger", + "sub_path": "process/0.08mm Extra Fine @MyToolChanger.json" + }, + { + "name": "0.12mm Fine @MyToolChanger", + "sub_path": "process/0.12mm Fine @MyToolChanger.json" + }, + { + "name": "0.15mm Optimal @MyToolChanger", + "sub_path": "process/0.15mm Optimal @MyToolChanger.json" + }, + { + "name": "0.16mm Optimal @MyToolChanger", + "sub_path": "process/0.16mm Optimal @MyToolChanger.json" + }, + { + "name": "0.20mm Standard @MyToolChanger", + "sub_path": "process/0.20mm Standard @MyToolChanger.json" + }, + { + "name": "0.24mm Draft @MyToolChanger", + "sub_path": "process/0.24mm Draft @MyToolChanger.json" + }, + { + "name": "0.28mm Extra Draft @MyToolChanger", + "sub_path": "process/0.28mm Extra Draft @MyToolChanger.json" + }, + { + "name": "0.32mm Extra Draft @MyToolChanger", + "sub_path": "process/0.32mm Extra Draft @MyToolChanger.json" + }, + { + "name": "0.40mm Extra Draft @MyToolChanger", + "sub_path": "process/0.40mm Extra Draft @MyToolChanger.json" + }, + { + "name": "0.56mm Extra Draft @MyToolChanger", + "sub_path": "process/0.56mm Extra Draft @MyToolChanger.json" } ], "filament_list": [ @@ -199,6 +247,46 @@ { "name": "My Generic PA-CF", "sub_path": "filament/My Generic PA-CF.json" + }, + { + "name": "My Generic PLA @MyToolChanger", + "sub_path": "filament/My Generic PLA @MyToolChanger.json" + }, + { + "name": "My Generic PLA-CF @MyToolChanger", + "sub_path": "filament/My Generic PLA-CF @MyToolChanger.json" + }, + { + "name": "My Generic PETG @MyToolChanger", + "sub_path": "filament/My Generic PETG @MyToolChanger.json" + }, + { + "name": "My Generic ABS @MyToolChanger", + "sub_path": "filament/My Generic ABS @MyToolChanger.json" + }, + { + "name": "My Generic TPU @MyToolChanger", + "sub_path": "filament/My Generic TPU @MyToolChanger.json" + }, + { + "name": "My Generic ASA @MyToolChanger", + "sub_path": "filament/My Generic ASA @MyToolChanger.json" + }, + { + "name": "My Generic PC @MyToolChanger", + "sub_path": "filament/My Generic PC @MyToolChanger.json" + }, + { + "name": "My Generic PVA @MyToolChanger", + "sub_path": "filament/My Generic PVA @MyToolChanger.json" + }, + { + "name": "My Generic PA @MyToolChanger", + "sub_path": "filament/My Generic PA @MyToolChanger.json" + }, + { + "name": "My Generic PA-CF @MyToolChanger", + "sub_path": "filament/My Generic PA-CF @MyToolChanger.json" } ], "machine_list": [ @@ -214,6 +302,10 @@ "name": "fdm_rrf_common", "sub_path": "machine/fdm_rrf_common.json" }, + { + "name": "fdm_toolchanger_common", + "sub_path": "machine/fdm_toolchanger_common.json" + }, { "name": "MyKlipper 0.4 nozzle", "sub_path": "machine/MyKlipper 0.4 nozzle.json" @@ -237,6 +329,22 @@ { "name": "MyRRF 0.4 nozzle", "sub_path": "machine/MyRRF 0.4 nozzle.json" + }, + { + "name": "MyToolChanger 0.4 nozzle", + "sub_path": "machine/MyToolChanger 0.4 nozzle.json" + }, + { + "name": "MyToolChanger 0.2 nozzle", + "sub_path": "machine/MyToolChanger 0.2 nozzle.json" + }, + { + "name": "MyToolChanger 0.6 nozzle", + "sub_path": "machine/MyToolChanger 0.6 nozzle.json" + }, + { + "name": "MyToolChanger 0.8 nozzle", + "sub_path": "machine/MyToolChanger 0.8 nozzle.json" } ] -} +} \ No newline at end of file diff --git a/resources/profiles/Custom/Custom_350_bed.stl b/resources/profiles/Custom/Custom_350_bed.stl new file mode 100644 index 0000000000..d2a9a49792 Binary files /dev/null and b/resources/profiles/Custom/Custom_350_bed.stl differ diff --git a/resources/profiles/Custom/Generic ToolChanger Printer_cover.png b/resources/profiles/Custom/Generic ToolChanger Printer_cover.png new file mode 100644 index 0000000000..cf85288d7a Binary files /dev/null and b/resources/profiles/Custom/Generic ToolChanger Printer_cover.png differ diff --git a/resources/profiles/Custom/filament/My Generic ABS @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic ABS @MyToolChanger.json new file mode 100644 index 0000000000..fb8f51bf95 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic ABS @MyToolChanger.json @@ -0,0 +1,57 @@ +{ + "type": "filament", + "filament_id": "GFB99", + "setting_id": "GFB99_MTC_0", + "name": "My Generic ABS @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_abs", + "filament_flow_ratio": [ + "0.926" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic ASA @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic ASA @MyToolChanger.json new file mode 100644 index 0000000000..05bab114b4 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic ASA @MyToolChanger.json @@ -0,0 +1,57 @@ +{ + "type": "filament", + "filament_id": "GFB98", + "setting_id": "GFB98_MTC_0", + "name": "My Generic ASA @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_asa", + "filament_flow_ratio": [ + "0.93" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PA @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PA @MyToolChanger.json new file mode 100644 index 0000000000..17a9b793cc --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PA @MyToolChanger.json @@ -0,0 +1,60 @@ +{ + "type": "filament", + "filament_id": "GFN99", + "setting_id": "GFN99_MTC_0", + "name": "My Generic PA @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pa", + "nozzle_temperature_initial_layer": [ + "280" + ], + "nozzle_temperature": [ + "280" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PA-CF @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PA-CF @MyToolChanger.json new file mode 100644 index 0000000000..0b0f065eed --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PA-CF @MyToolChanger.json @@ -0,0 +1,63 @@ +{ + "type": "filament", + "filament_id": "GFN98", + "setting_id": "GFN98_MTC_0", + "name": "My Generic PA-CF @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pa", + "filament_type": [ + "PA-CF" + ], + "nozzle_temperature_initial_layer": [ + "280" + ], + "nozzle_temperature": [ + "280" + ], + "filament_max_volumetric_speed": [ + "8" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PC @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PC @MyToolChanger.json new file mode 100644 index 0000000000..7ae24c6774 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PC @MyToolChanger.json @@ -0,0 +1,57 @@ +{ + "type": "filament", + "filament_id": "GFC99", + "setting_id": "GFC99_MTC_0", + "name": "My Generic PC @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pc", + "filament_max_volumetric_speed": [ + "12" + ], + "filament_flow_ratio": [ + "0.94" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PETG @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PETG @MyToolChanger.json new file mode 100644 index 0000000000..f9cb2e0b16 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PETG @MyToolChanger.json @@ -0,0 +1,87 @@ +{ + "type": "filament", + "filament_id": "GFG99", + "setting_id": "GFG99_MTC_0", + "name": "My Generic PETG @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pet", + "reduce_fan_stop_start_freq": [ + "1" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "fan_cooling_layer_time": [ + "30" + ], + "overhang_fan_speed": [ + "90" + ], + "overhang_fan_threshold": [ + "25%" + ], + "fan_max_speed": [ + "90" + ], + "fan_min_speed": [ + "40" + ], + "slow_down_min_speed": [ + "10" + ], + "slow_down_layer_time": [ + "8" + ], + "filament_flow_ratio": [ + "0.95" + ], + "filament_max_volumetric_speed": [ + "10" + ], + "filament_start_gcode": [ + "; filament start gcode\n" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PLA @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PLA @MyToolChanger.json new file mode 100644 index 0000000000..facaf08984 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PLA @MyToolChanger.json @@ -0,0 +1,60 @@ +{ + "type": "filament", + "filament_id": "GFL99", + "setting_id": "GFL99_MTC_0", + "name": "My Generic PLA @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pla", + "filament_flow_ratio": [ + "0.98" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "slow_down_layer_time": [ + "8" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PLA-CF @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PLA-CF @MyToolChanger.json new file mode 100644 index 0000000000..8adf8d53d2 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PLA-CF @MyToolChanger.json @@ -0,0 +1,63 @@ +{ + "type": "filament", + "filament_id": "GFL98", + "setting_id": "GFL98_MTC_0", + "name": "My Generic PLA-CF @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pla", + "filament_flow_ratio": [ + "0.95" + ], + "filament_type": [ + "PLA-CF" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "slow_down_layer_time": [ + "7" + ], + "filament_cooling_final_speed": [ + "3.5" + ], + "filament_cooling_initial_speed": [ + "10" + ], + "filament_cooling_moves": [ + "2" + ], + "filament_load_time": [ + "10.5" + ], + "filament_loading_speed": [ + "10" + ], + "filament_loading_speed_start": [ + "50" + ], + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_unload_time": [ + "8.5" + ], + "filament_unloading_speed": [ + "100" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic PVA @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic PVA @MyToolChanger.json new file mode 100644 index 0000000000..a2dd357753 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic PVA @MyToolChanger.json @@ -0,0 +1,27 @@ +{ + "type": "filament", + "filament_id": "GFS99", + "setting_id": "GFS99_MTC_0", + "name": "My Generic PVA @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pva", + "filament_flow_ratio": [ + "0.95" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "slow_down_layer_time": [ + "7" + ], + "slow_down_min_speed": [ + "10" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/filament/My Generic TPU @MyToolChanger.json b/resources/profiles/Custom/filament/My Generic TPU @MyToolChanger.json new file mode 100644 index 0000000000..54c4a15a19 --- /dev/null +++ b/resources/profiles/Custom/filament/My Generic TPU @MyToolChanger.json @@ -0,0 +1,18 @@ +{ + "type": "filament", + "filament_id": "GFU99", + "setting_id": "GFU99_MTC_0", + "name": "My Generic TPU @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_tpu", + "filament_max_volumetric_speed": [ + "3.2" + ], + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/machine/MyToolChanger 0.2 nozzle.json b/resources/profiles/Custom/machine/MyToolChanger 0.2 nozzle.json new file mode 100644 index 0000000000..f23384aee7 --- /dev/null +++ b/resources/profiles/Custom/machine/MyToolChanger 0.2 nozzle.json @@ -0,0 +1,30 @@ +{ + "type": "machine", + "setting_id": "GM_CUSTOM_001", + "name": "MyToolChanger 0.2 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_toolchanger_common", + "printer_model": "Generic ToolChanger Printer", + "nozzle_diameter": [ + "0.2", + "0.2", + "0.2", + "0.2", + "0.2" + ], + "max_layer_height": [ + "0.16" + ], + "min_layer_height": [ + "0.04" + ], + "printer_variant": "0.2", + "printable_area": [ + "0x0", + "350x0", + "350x350", + "0x350" + ], + "printable_height": "300" +} \ No newline at end of file diff --git a/resources/profiles/Custom/machine/MyToolChanger 0.4 nozzle.json b/resources/profiles/Custom/machine/MyToolChanger 0.4 nozzle.json new file mode 100644 index 0000000000..cf43dd0a41 --- /dev/null +++ b/resources/profiles/Custom/machine/MyToolChanger 0.4 nozzle.json @@ -0,0 +1,24 @@ +{ + "type": "machine", + "setting_id": "GM_CUSTOM_002", + "name": "MyToolChanger 0.4 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_toolchanger_common", + "printer_model": "Generic ToolChanger Printer", + "nozzle_diameter": [ + "0.4", + "0.4", + "0.4", + "0.4", + "0.4" + ], + "printer_variant": "0.4", + "printable_area": [ + "0x0", + "350x0", + "350x350", + "0x350" + ], + "printable_height": "300" +} \ No newline at end of file diff --git a/resources/profiles/Custom/machine/MyToolChanger 0.6 nozzle.json b/resources/profiles/Custom/machine/MyToolChanger 0.6 nozzle.json new file mode 100644 index 0000000000..b8d387573f --- /dev/null +++ b/resources/profiles/Custom/machine/MyToolChanger 0.6 nozzle.json @@ -0,0 +1,30 @@ +{ + "type": "machine", + "setting_id": "GM_CUSTOM_003", + "name": "MyToolChanger 0.6 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_toolchanger_common", + "printer_model": "Generic ToolChanger Printer", + "nozzle_diameter": [ + "0.6", + "0.6", + "0.6", + "0.6", + "0.6" + ], + "max_layer_height": [ + "0.4" + ], + "min_layer_height": [ + "0.12" + ], + "printer_variant": "0.6", + "printable_area": [ + "0x0", + "350x0", + "350x350", + "0x350" + ], + "printable_height": "300" +} \ No newline at end of file diff --git a/resources/profiles/Custom/machine/MyToolChanger 0.8 nozzle.json b/resources/profiles/Custom/machine/MyToolChanger 0.8 nozzle.json new file mode 100644 index 0000000000..2ce7029dce --- /dev/null +++ b/resources/profiles/Custom/machine/MyToolChanger 0.8 nozzle.json @@ -0,0 +1,30 @@ +{ + "type": "machine", + "setting_id": "GM_CUSTOM_004", + "name": "MyToolChanger 0.8 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_toolchanger_common", + "printer_model": "Generic ToolChanger Printer", + "nozzle_diameter": [ + "0.8", + "0.8", + "0.8", + "0.8", + "0.8" + ], + "max_layer_height": [ + "0.6" + ], + "min_layer_height": [ + "0.2" + ], + "printer_variant": "0.8", + "printable_area": [ + "0x0", + "350x0", + "350x350", + "0x350" + ], + "printable_height": "300" +} \ No newline at end of file diff --git a/resources/profiles/Custom/machine/MyToolChanger.json b/resources/profiles/Custom/machine/MyToolChanger.json new file mode 100644 index 0000000000..9c927e4be2 --- /dev/null +++ b/resources/profiles/Custom/machine/MyToolChanger.json @@ -0,0 +1,12 @@ +{ + "type": "machine_model", + "name": "Generic ToolChanger Printer", + "model_id": "my_toolchanger_01", + "nozzle_diameter": "0.4;0.2;0.6;0.8", + "machine_tech": "FFF", + "family": "MyPrinter", + "bed_model": "Custom_350_bed.stl", + "bed_texture": "orcaslicer_bed_texture.svg", + "hotend_model": "", + "default_materials": "My Generic PLA @MyToolChanger;My Generic ABS @MyToolChanger;My Generic PLA-CF @MyToolChanger;My Generic PETG @MyToolChanger;My Generic TPU @MyToolChanger;My Generic ASA @MyToolChanger;My Generic PC @MyToolChanger;My Generic PVA @MyToolChanger;My Generic PA @MyToolChanger;My Generic PA-CF @MyToolChanger" +} diff --git a/resources/profiles/Custom/machine/fdm_toolchanger_common.json b/resources/profiles/Custom/machine/fdm_toolchanger_common.json new file mode 100644 index 0000000000..0d1fe9c165 --- /dev/null +++ b/resources/profiles/Custom/machine/fdm_toolchanger_common.json @@ -0,0 +1,189 @@ +{ + "type": "machine", + "name": "fdm_toolchanger_common", + "from": "system", + "instantiation": "false", + "inherits": "fdm_klipper_common", + "gcode_flavor": "klipper", + "single_extruder_multi_material": "0", + "default_filament_profile": [ + "My Generic PLA @MyToolChanger" + ], + "default_print_profile": "0.20mm Standard @MyToolChanger", + "max_layer_height": [ + "0.32", + "0.32", + "0.32", + "0.32", + "0.32" + ], + "min_layer_height": [ + "0.08", + "0.08", + "0.08", + "0.08", + "0.08" + ], + "deretraction_speed": [ + "30", + "30", + "30", + "30", + "30" + ], + "extruder_colour": [ + "#FCE94F", + "#FCE94F", + "#FCE94F", + "#FCE94F", + "#FCE94F" + ], + "extruder_offset": [ + "0x0", + "0x0", + "0x0", + "0x0", + "0x0" + ], + "long_retractions_when_cut": [ + "0", + "0", + "0", + "0", + "0" + ], + "nozzle_diameter": [ + "0.4", + "0.4", + "0.4", + "0.4", + "0.4" + ], + "retract_before_wipe": [ + "70%", + "70%", + "70%", + "70%", + "70%" + ], + "retract_length_toolchange": [ + "2", + "2", + "2", + "2", + "2" + ], + "retract_lift_above": [ + "0", + "0", + "0", + "0", + "0" + ], + "retract_lift_below": [ + "0", + "0", + "0", + "0", + "0" + ], + "retract_lift_enforce": [ + "All Surfaces", + "All Surfaces", + "All Surfaces", + "All Surfaces", + "All Surfaces" + ], + "retract_restart_extra": [ + "0", + "0", + "0", + "0", + "0" + ], + "retract_restart_extra_toolchange": [ + "0", + "0", + "0", + "0", + "0" + ], + "retract_when_changing_layer": [ + "1", + "1", + "1", + "1", + "1" + ], + "retraction_distances_when_cut": [ + "18", + "18", + "18", + "18", + "18" + ], + "retraction_length": [ + "0.8", + "0.8", + "0.8", + "0.8", + "0.8" + ], + "retraction_minimum_travel": [ + "1", + "1", + "1", + "1", + "1" + ], + "retraction_speed": [ + "30", + "30", + "30", + "30", + "30" + ], + "travel_slope": [ + "3", + "3", + "3", + "3", + "3" + ], + "version": "2.1.1.1", + "wipe": [ + "1", + "1", + "1", + "1", + "1" + ], + "wipe_distance": [ + "1", + "1", + "1", + "1", + "1" + ], + "z_hop": [ + "0.4", + "0.4", + "0.4", + "0.4", + "0.4" + ], + "z_hop_types": [ + "Normal Lift", + "Normal Lift", + "Normal Lift", + "Normal Lift", + "Normal Lift" + ], + "purge_in_prime_tower": "0", + "machine_pause_gcode": "M601", + "machine_start_gcode": "PRINT_START TOOL_TEMP={first_layer_temperature[initial_tool]} {if is_extruder_used[0]}T0_TEMP={first_layer_temperature[0]}{endif} {if is_extruder_used[1]}T1_TEMP={first_layer_temperature[1]}{endif} {if is_extruder_used[2]}T2_TEMP={first_layer_temperature[2]}{endif} {if is_extruder_used[3]}T3_TEMP={first_layer_temperature[3]}{endif} {if is_extruder_used[4]}T4_TEMP={first_layer_temperature[4]}{endif} {if is_extruder_used[5]}T5_TEMP={first_layer_temperature[5]}{endif} BED_TEMP=[first_layer_bed_temperature] TOOL=[initial_tool]\n\n", + "change_filament_gcode": "", + "scan_first_layer": "0", + "nozzle_type": "undefine", + "auxiliary_fan": "0" +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.08mm Extra Fine @MyToolChanger.json b/resources/profiles/Custom/process/0.08mm Extra Fine @MyToolChanger.json new file mode 100644 index 0000000000..4ce1736916 --- /dev/null +++ b/resources/profiles/Custom/process/0.08mm Extra Fine @MyToolChanger.json @@ -0,0 +1,19 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.08mm Extra Fine @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "layer_height": "0.08", + "bottom_shell_layers": "7", + "top_shell_layers": "9", + "support_top_z_distance": "0.08", + "support_bottom_z_distance": "0.08", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.12mm Fine @MyToolChanger.json b/resources/profiles/Custom/process/0.12mm Fine @MyToolChanger.json new file mode 100644 index 0000000000..1117ba588f --- /dev/null +++ b/resources/profiles/Custom/process/0.12mm Fine @MyToolChanger.json @@ -0,0 +1,19 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.12mm Fine @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "layer_height": "0.12", + "bottom_shell_layers": "5", + "top_shell_layers": "6", + "support_top_z_distance": "0.08", + "support_bottom_z_distance": "0.08", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.15mm Optimal @MyToolChanger.json b/resources/profiles/Custom/process/0.15mm Optimal @MyToolChanger.json new file mode 100644 index 0000000000..13254161c8 --- /dev/null +++ b/resources/profiles/Custom/process/0.15mm Optimal @MyToolChanger.json @@ -0,0 +1,20 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Optimal @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "bottom_shell_layers": "4", + "top_shell_layers": "5", + "layer_height": "0.15", + "support_top_z_distance": "0.15", + "support_bottom_z_distance": "0.15", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.16mm Optimal @MyToolChanger.json b/resources/profiles/Custom/process/0.16mm Optimal @MyToolChanger.json new file mode 100644 index 0000000000..f3fa8058a5 --- /dev/null +++ b/resources/profiles/Custom/process/0.16mm Optimal @MyToolChanger.json @@ -0,0 +1,20 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.16mm Optimal @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "bottom_shell_layers": "4", + "top_shell_layers": "5", + "support_top_z_distance": "0.16", + "support_bottom_z_distance": "0.16", + "layer_height": "0.16", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.2 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.20mm Standard @MyToolChanger.json b/resources/profiles/Custom/process/0.20mm Standard @MyToolChanger.json new file mode 100644 index 0000000000..812886e486 --- /dev/null +++ b/resources/profiles/Custom/process/0.20mm Standard @MyToolChanger.json @@ -0,0 +1,14 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Standard @MyToolChanger", + "from": "system", + "inherits": "fdm_process_mytoolchanger_common", + "instantiation": "true", + "layer_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} diff --git a/resources/profiles/Custom/process/0.24mm Draft @MyToolChanger.json b/resources/profiles/Custom/process/0.24mm Draft @MyToolChanger.json new file mode 100644 index 0000000000..af372cc109 --- /dev/null +++ b/resources/profiles/Custom/process/0.24mm Draft @MyToolChanger.json @@ -0,0 +1,17 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.24mm Draft @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "layer_height": "0.24", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.28mm Extra Draft @MyToolChanger.json b/resources/profiles/Custom/process/0.28mm Extra Draft @MyToolChanger.json new file mode 100644 index 0000000000..71f435467b --- /dev/null +++ b/resources/profiles/Custom/process/0.28mm Extra Draft @MyToolChanger.json @@ -0,0 +1,15 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.28mm Extra Draft @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "layer_height": "0.28", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.32mm Extra Draft @MyToolChanger.json b/resources/profiles/Custom/process/0.32mm Extra Draft @MyToolChanger.json new file mode 100644 index 0000000000..d5282eecef --- /dev/null +++ b/resources/profiles/Custom/process/0.32mm Extra Draft @MyToolChanger.json @@ -0,0 +1,17 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.32mm Standard @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "support_top_z_distance": "0.24", + "support_bottom_z_distance": "0.24", + "layer_height": "0.32", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.4 nozzle", + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.40mm Extra Draft @MyToolChanger.json b/resources/profiles/Custom/process/0.40mm Extra Draft @MyToolChanger.json new file mode 100644 index 0000000000..940d51d8bf --- /dev/null +++ b/resources/profiles/Custom/process/0.40mm Extra Draft @MyToolChanger.json @@ -0,0 +1,16 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.40mm Standard @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "support_top_z_distance": "0.24", + "support_bottom_z_distance": "0.24", + "layer_height": "0.40", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.6 nozzle", + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/0.56mm Extra Draft @MyToolChanger.json b/resources/profiles/Custom/process/0.56mm Extra Draft @MyToolChanger.json new file mode 100644 index 0000000000..ea4ba5c07d --- /dev/null +++ b/resources/profiles/Custom/process/0.56mm Extra Draft @MyToolChanger.json @@ -0,0 +1,15 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.56mm Standard @MyToolChanger", + "from": "system", + "instantiation": "true", + "inherits": "fdm_process_mytoolchanger_common", + "support_top_z_distance": "0.24", + "support_bottom_z_distance": "0.24", + "layer_height": "0.56", + "initial_layer_print_height": "0.2", + "compatible_printers": [ + "MyToolChanger 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Custom/process/fdm_process_mytoolchanger_common.json b/resources/profiles/Custom/process/fdm_process_mytoolchanger_common.json new file mode 100644 index 0000000000..88a499c8d6 --- /dev/null +++ b/resources/profiles/Custom/process/fdm_process_mytoolchanger_common.json @@ -0,0 +1,31 @@ +{ + "type": "process", + "name": "fdm_process_mytoolchanger_common", + "from": "system", + "instantiation": "false", + "inherits": "fdm_process_klipper_common", + "default_acceleration": "5000", + "top_surface_acceleration": "3000", + "travel_acceleration": "7000", + "inner_wall_acceleration": "5000", + "outer_wall_acceleration": "3000", + "initial_layer_acceleration": "500", + "initial_layer_speed": "50", + "initial_layer_infill_speed": "105", + "outer_wall_speed": "120", + "inner_wall_speed": "200", + "internal_solid_infill_speed": "200", + "top_surface_speed": "100", + "gap_infill_speed": "100", + "sparse_infill_speed": "200", + "travel_speed": "350", + "exclude_object": "1", + "enable_prime_tower": "1", + "wipe_tower_cone_angle": "25", + "wipe_tower_extra_spacing": "150%", + "wipe_tower_rotation_angle": "90", + "ooze_prevention": "1", + "standby_temperature_delta": "-40", + "preheat_time": "30", + "preheat_steps": "1" +} \ No newline at end of file diff --git a/resources/profiles/Flashforge/process/0.20mm Standard @Flashforge G3U 0.4 Nozzle.json b/resources/profiles/Flashforge/process/0.20mm Standard @Flashforge G3U 0.4 Nozzle.json index 6995772a4d..15f4fa3add 100644 --- a/resources/profiles/Flashforge/process/0.20mm Standard @Flashforge G3U 0.4 Nozzle.json +++ b/resources/profiles/Flashforge/process/0.20mm Standard @Flashforge G3U 0.4 Nozzle.json @@ -136,7 +136,7 @@ "role_based_wipe_speed": "1", "seam_gap": "10%", "seam_position": "aligned", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "2", diff --git a/resources/profiles/FlyingBear/process/S1/fdm_process_common_S1.json b/resources/profiles/FlyingBear/process/S1/fdm_process_common_S1.json index 43964daced..e116191460 100644 --- a/resources/profiles/FlyingBear/process/S1/fdm_process_common_S1.json +++ b/resources/profiles/FlyingBear/process/S1/fdm_process_common_S1.json @@ -115,7 +115,7 @@ "role_based_wipe_speed": "1", "seam_gap": "10%", "seam_position": "aligned", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/FlyingBear/process/fdm_process_common.json b/resources/profiles/FlyingBear/process/fdm_process_common.json index 6f9e1e1fcb..8e20a992b1 100644 --- a/resources/profiles/FlyingBear/process/fdm_process_common.json +++ b/resources/profiles/FlyingBear/process/fdm_process_common.json @@ -115,7 +115,7 @@ "role_based_wipe_speed": "1", "seam_gap": "10%", "seam_position": "aligned", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/Ginger Additive/process/fdm_process_common.json b/resources/profiles/Ginger Additive/process/fdm_process_common.json index 11b16c1391..81075c236f 100644 --- a/resources/profiles/Ginger Additive/process/fdm_process_common.json +++ b/resources/profiles/Ginger Additive/process/fdm_process_common.json @@ -154,7 +154,7 @@ "seam_slope_start_height": "0", "seam_slope_steps": "10", "seam_slope_type": "external", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "1", diff --git a/resources/profiles/InfiMech/process/HSN/fdm_process_common_HSN.json b/resources/profiles/InfiMech/process/HSN/fdm_process_common_HSN.json index fc457c76d8..2afeaf2cb0 100644 --- a/resources/profiles/InfiMech/process/HSN/fdm_process_common_HSN.json +++ b/resources/profiles/InfiMech/process/HSN/fdm_process_common_HSN.json @@ -114,7 +114,7 @@ "role_based_wipe_speed": "1", "seam_gap": "10%", "seam_position": "aligned", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/InfiMech/process/fdm_process_common.json b/resources/profiles/InfiMech/process/fdm_process_common.json index cb944ca97d..0bb51b5c68 100644 --- a/resources/profiles/InfiMech/process/fdm_process_common.json +++ b/resources/profiles/InfiMech/process/fdm_process_common.json @@ -114,7 +114,7 @@ "role_based_wipe_speed": "1", "seam_gap": "10%", "seam_position": "aligned", - "single_extruder_multi_material_priming": "1", + "single_extruder_multi_material_priming": "0", "skirt_distance": "2", "skirt_height": "1", "skirt_loops": "0", diff --git a/resources/profiles/Prusa.json b/resources/profiles/Prusa.json index 1845bd173b..b9a7435e4b 100644 --- a/resources/profiles/Prusa.json +++ b/resources/profiles/Prusa.json @@ -1,6 +1,6 @@ { "name": "Prusa", - "version": "02.01.01.00", + "version": "02.01.02.40", "force_update": "0", "description": "Prusa configurations", "machine_model_list": [ @@ -23,6 +23,10 @@ { "name": "Prusa XL", "sub_path": "machine/Prusa XL.json" + }, + { + "name": "Prusa XL 5T", + "sub_path": "machine/Prusa XL 5T.json" } ], "process_list": [ @@ -54,6 +58,10 @@ "name": "process_common_xl", "sub_path": "process/process_common_xl.json" }, + { + "name": "process_common_xl_5t", + "sub_path": "process/process_common_xl_5t.json" + }, { "name": "0.20mm Standard @MINI 0.25", "sub_path": "process/0.20mm Standard @MINI 0.25.json" @@ -389,6 +397,134 @@ { "name": "0.30mm Detail @Prusa XL 0.8", "sub_path": "process/0.30mm Detail @Prusa XL 0.8.json" + }, + { + "name": "0.15mm Structural @Prusa XL 5T 0.25", + "sub_path": "process/0.15mm Structural @Prusa XL 5T 0.25.json" + }, + { + "name": "0.15mm Speed @Prusa XL 5T 0.25", + "sub_path": "process/0.15mm Speed @Prusa XL 5T 0.25.json" + }, + { + "name": "0.12mm Structural @Prusa XL 5T 0.25", + "sub_path": "process/0.12mm Structural @Prusa XL 5T 0.25.json" + }, + { + "name": "0.12mm Speed @Prusa XL 5T 0.25", + "sub_path": "process/0.12mm Speed @Prusa XL 5T 0.25.json" + }, + { + "name": "0.07mm Detail @Prusa XL 5T 0.25", + "sub_path": "process/0.07mm Detail @Prusa XL 5T 0.25.json" + }, + { + "name": "0.05mm Detail @Prusa XL 5T 0.25", + "sub_path": "process/0.05mm Detail @Prusa XL 5T 0.25.json" + }, + { + "name": "0.20mm Speed @Prusa XL 5T 0.3", + "sub_path": "process/0.20mm Speed @Prusa XL 5T 0.3.json" + }, + { + "name": "0.16mm Structural @Prusa XL 5T 0.3", + "sub_path": "process/0.16mm Structural @Prusa XL 5T 0.3.json" + }, + { + "name": "0.16mm Speed @Prusa XL 5T 0.3", + "sub_path": "process/0.16mm Speed @Prusa XL 5T 0.3.json" + }, + { + "name": "0.12mm Structural @Prusa XL 5T 0.3", + "sub_path": "process/0.12mm Structural @Prusa XL 5T 0.3.json" + }, + { + "name": "0.25mm Structural @Prusa XL 5T 0.4", + "sub_path": "process/0.25mm Structural @Prusa XL 5T 0.4.json" + }, + { + "name": "0.20mm Structural @Prusa XL 5T 0.4", + "sub_path": "process/0.20mm Structural @Prusa XL 5T 0.4.json" + }, + { + "name": "0.20mm Speed @Prusa XL 5T 0.4", + "sub_path": "process/0.20mm Speed @Prusa XL 5T 0.4.json" + }, + { + "name": "0.15mm Structural @Prusa XL 5T 0.4", + "sub_path": "process/0.15mm Structural @Prusa XL 5T 0.4.json" + }, + { + "name": "0.15mm Speed @Prusa XL 5T 0.4", + "sub_path": "process/0.15mm Speed @Prusa XL 5T 0.4.json" + }, + { + "name": "0.10mm FastDetail @Prusa XL 5T 0.4", + "sub_path": "process/0.10mm FastDetail @Prusa XL 5T 0.4.json" + }, + { + "name": "0.25mm Structural @Prusa XL 5T 0.5", + "sub_path": "process/0.25mm Structural @Prusa XL 5T 0.5.json" + }, + { + "name": "0.25mm Speed @Prusa XL 5T 0.5", + "sub_path": "process/0.25mm Speed @Prusa XL 5T 0.5.json" + }, + { + "name": "0.20mm Structural @Prusa XL 5T 0.5", + "sub_path": "process/0.20mm Structural @Prusa XL 5T 0.5.json" + }, + { + "name": "0.20mm Speed @Prusa XL 5T 0.5", + "sub_path": "process/0.20mm Speed @Prusa XL 5T 0.5.json" + }, + { + "name": "0.15mm Structural @Prusa XL 5T 0.5", + "sub_path": "process/0.15mm Structural @Prusa XL 5T 0.5.json" + }, + { + "name": "0.10mm Structural @Prusa XL 5T 0.5", + "sub_path": "process/0.10mm Structural @Prusa XL 5T 0.5.json" + }, + { + "name": "0.32mm Structural @Prusa XL 5T 0.6", + "sub_path": "process/0.32mm Structural @Prusa XL 5T 0.6.json" + }, + { + "name": "0.32mm Speed @Prusa XL 5T 0.6", + "sub_path": "process/0.32mm Speed @Prusa XL 5T 0.6.json" + }, + { + "name": "0.25mm Structural @Prusa XL 5T 0.6", + "sub_path": "process/0.25mm Structural @Prusa XL 5T 0.6.json" + }, + { + "name": "0.25mm Speed @Prusa XL 5T 0.6", + "sub_path": "process/0.25mm Speed @Prusa XL 5T 0.6.json" + }, + { + "name": "0.20mm Structural @Prusa XL 5T 0.6", + "sub_path": "process/0.20mm Structural @Prusa XL 5T 0.6.json" + }, + { + "name": "0.20mm Speed @Prusa XL 5T 0.6", + "sub_path": "process/0.20mm Speed @Prusa XL 5T 0.6.json" + }, + { + "name": "0.15mm Structural @Prusa XL 5T 0.6", + "sub_path": "process/0.15mm Structural @Prusa XL 5T 0.6.json" + }, + { + "name": "0.55mm Draft @Prusa XL 5T 0.8", + "sub_path": "process/0.55mm Draft @Prusa XL 5T 0.8.json" + }, + { + "name": "0.40mm Quality @Prusa XL 5T 0.8", + "sub_path": "process/0.40mm Quality @Prusa XL 5T 0.8.json" + }, + { + "name": "0.30mm Detail @Prusa XL 5T 0.8", + "sub_path": "process/0.30mm Detail @Prusa XL 5T 0.8.json" } ], "filament_list": [ @@ -464,18 +600,6 @@ "name": "Prusa Generic PLA @MINIIS", "sub_path": "filament/Prusa Generic PLA @MINIIS.json" }, - { - "name": "Prusa Generic PLA @XL", - "sub_path": "filament/Prusa Generic PLA @XL.json" - }, - { - "name": "Prusament PLA @XL", - "sub_path": "filament/Prusament PLA @XL.json" - }, - { - "name": "Prusament rPLA @XL", - "sub_path": "filament/Prusament rPLA @XL.json" - }, { "name": "Prusa Generic PLA-CF", "sub_path": "filament/Prusa Generic PLA-CF.json" @@ -520,14 +644,6 @@ "name": "Prusa Generic PETG @MINIIS 0.8", "sub_path": "filament/Prusa Generic PETG @MINIIS 0.8.json" }, - { - "name": "Prusa Generic PETG @XL", - "sub_path": "filament/Prusa Generic PETG @XL.json" - }, - { - "name": "Prusament PETG @XL", - "sub_path": "filament/Prusament PETG @XL.json" - }, { "name": "Prusa Generic ABS", "sub_path": "filament/Prusa Generic ABS.json" @@ -552,10 +668,6 @@ "name": "Prusa Generic ABS @MINIIS 0.8", "sub_path": "filament/Prusa Generic ABS @MINIIS 0.8.json" }, - { - "name": "Prusa Generic ABS @XL", - "sub_path": "filament/Prusa Generic ABS @XL.json" - }, { "name": "Prusa Generic TPU", "sub_path": "filament/Prusa Generic TPU.json" @@ -592,10 +704,6 @@ "name": "Prusa Generic ASA @MINIIS 0.8", "sub_path": "filament/Prusa Generic ASA @MINIIS 0.8.json" }, - { - "name": "Prusament ASA @XL", - "sub_path": "filament/Prusament ASA @XL.json" - }, { "name": "Prusa Generic PC", "sub_path": "filament/Prusa Generic PC.json" @@ -616,14 +724,6 @@ "name": "Prusa Generic PC @MINIIS 0.8", "sub_path": "filament/Prusa Generic PC @MINIIS 0.8.json" }, - { - "name": "Prusament PC Blend @XL", - "sub_path": "filament/Prusament PC Blend @XL.json" - }, - { - "name": "Prusament PC-CF @XL", - "sub_path": "filament/Prusament PC-CF @XL.json" - }, { "name": "Prusa Generic PVA", "sub_path": "filament/Prusa Generic PVA.json" @@ -644,10 +744,6 @@ "name": "Prusa Generic PVA @MINIIS 0.8", "sub_path": "filament/Prusa Generic PVA @MINIIS 0.8.json" }, - { - "name": "Prusament PVB @XL", - "sub_path": "filament/Prusament PVB @XL.json" - }, { "name": "Prusa Generic PA", "sub_path": "filament/Prusa Generic PA.json" @@ -688,15 +784,107 @@ "name": "Prusa Generic PA-CF @MINIIS 0.8", "sub_path": "filament/Prusa Generic PA-CF @MINIIS 0.8.json" }, + { + "name": "Prusa Generic PLA @XL", + "sub_path": "filament/Prusa Generic PLA @XL.json" + }, + { + "name": "Prusament PLA @XL", + "sub_path": "filament/Prusament PLA @XL.json" + }, + { + "name": "Prusament rPLA @XL", + "sub_path": "filament/Prusament rPLA @XL.json" + }, + { + "name": "Prusament PVB @XL", + "sub_path": "filament/Prusament PVB @XL.json" + }, + { + "name": "Prusament ASA @XL", + "sub_path": "filament/Prusament ASA @XL.json" + }, + { + "name": "Prusa Generic PETG @XL", + "sub_path": "filament/Prusa Generic PETG @XL.json" + }, + { + "name": "Prusament PETG @XL", + "sub_path": "filament/Prusament PETG @XL.json" + }, + { + "name": "Prusa Generic ABS @XL", + "sub_path": "filament/Prusa Generic ABS @XL.json" + }, + { + "name": "Prusament PC Blend @XL", + "sub_path": "filament/Prusament PC Blend @XL.json" + }, + { + "name": "Prusament PC-CF @XL", + "sub_path": "filament/Prusament PC-CF @XL.json" + }, { "name": "Prusament PA-CF @XL", "sub_path": "filament/Prusament PA-CF @XL.json" + }, + { + "name": "Prusa Generic PLA @XL 5T", + "sub_path": "filament/Prusa Generic PLA @XL 5T.json" + }, + { + "name": "Prusament PLA @XL 5T", + "sub_path": "filament/Prusament PLA @XL 5T.json" + }, + { + "name": "Prusament rPLA @XL 5T", + "sub_path": "filament/Prusament rPLA @XL 5T.json" + }, + { + "name": "Prusament PVB @XL 5T", + "sub_path": "filament/Prusament PVB @XL 5T.json" + }, + { + "name": "Prusament ASA @XL 5T", + "sub_path": "filament/Prusament ASA @XL 5T.json" + }, + { + "name": "Prusa Generic PETG @XL 5T", + "sub_path": "filament/Prusa Generic PETG @XL 5T.json" + }, + { + "name": "Prusament PETG @XL 5T", + "sub_path": "filament/Prusament PETG @XL 5T.json" + }, + { + "name": "Prusa Generic ABS @XL 5T", + "sub_path": "filament/Prusa Generic ABS @XL 5T.json" + }, + { + "name": "Prusament PC Blend @XL 5T", + "sub_path": "filament/Prusament PC Blend @XL 5T.json" + }, + { + "name": "Prusament PC-CF @XL 5T", + "sub_path": "filament/Prusament PC-CF @XL 5T.json" + }, + { + "name": "Prusament PA-CF @XL 5T", + "sub_path": "filament/Prusament PA-CF @XL 5T.json" } ], "machine_list": [ { "name": "fdm_machine_common", "sub_path": "machine/fdm_machine_common.json" + }, + { + "name": "fdm_machine_common_xl", + "sub_path": "machine/fdm_machine_common_xl.json" + }, + { + "name": "fdm_machine_common_xl_5t", + "sub_path": "machine/fdm_machine_common_xl_5t.json" }, { "name": "Prusa MK3S 0.25 nozzle", @@ -785,6 +973,30 @@ { "name": "Prusa XL 0.8 nozzle", "sub_path": "machine/Prusa XL 0.8 nozzle.json" + }, + { + "name": "Prusa XL 5T 0.25 nozzle", + "sub_path": "machine/Prusa XL 5T 0.25 nozzle.json" + }, + { + "name": "Prusa XL 5T 0.3 nozzle", + "sub_path": "machine/Prusa XL 5T 0.3 nozzle.json" + }, + { + "name": "Prusa XL 5T 0.4 nozzle", + "sub_path": "machine/Prusa XL 5T 0.4 nozzle.json" + }, + { + "name": "Prusa XL 5T 0.5 nozzle", + "sub_path": "machine/Prusa XL 5T 0.5 nozzle.json" + }, + { + "name": "Prusa XL 5T 0.6 nozzle", + "sub_path": "machine/Prusa XL 5T 0.6 nozzle.json" + }, + { + "name": "Prusa XL 5T 0.8 nozzle", + "sub_path": "machine/Prusa XL 5T 0.8 nozzle.json" } ] } diff --git a/resources/profiles/Prusa/Prusa XL 5T_cover.png b/resources/profiles/Prusa/Prusa XL 5T_cover.png new file mode 100644 index 0000000000..2a302857e6 Binary files /dev/null and b/resources/profiles/Prusa/Prusa XL 5T_cover.png differ diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.25.json index f1f91d3f78..b4d82f7794 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99_5", "setting_id": "GFSA04", "name": "Prusa Generic ABS @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.6.json index 3ef1005948..1a76559cbd 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99_3", "setting_id": "GFSA04", "name": "Prusa Generic ABS @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.8.json index 8a3fefe1b4..1668805ca4 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99_4", "setting_id": "GFSA04", "name": "Prusa Generic ABS @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS.json index 08495b61ac..97779cd277 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99_2", "setting_id": "GFSA04", "name": "Prusa Generic ABS @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @MK4.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @MK4.json index 0de674b7fe..7a98f46d84 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS @MK4.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @MK4.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99_1", "setting_id": "GFSA04", "name": "Prusa Generic ABS @MK4", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @XL 5T.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @XL 5T.json new file mode 100644 index 0000000000..a80bfb533d --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @XL 5T.json @@ -0,0 +1,68 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusa Generic ABS @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_abs", + "nozzle_temperature_intial_layer": "255", + "nozzle_temperature": "255", + "hot_plate_temp_initial_layer": "100", + "hot_plate_temp": "105", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "slow_down_layer_time": [ + "20" + ], + "fan_max_speed": [ + "15" + ], + "fan_min_speed": [ + "15" + ], + "overhang_fan_speed": [ + "25" + ], + "close_fan_the_first_x_layers": [ + "4" + ], + "filament_loading_speed_start": "19", + "filament_loading_speed": "14", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "20", + "filament_load_time": "15", + "filament_unload_time": "12", + "filament_cooling_moves": "5", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "50", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.04{elsif nozzle_diameter[0]==0.25}0.1{elsif nozzle_diameter[0]==0.3}0.06{elsif nozzle_diameter[0]==0.35}0.05{elsif nozzle_diameter[0]==0.5}0.03{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.01{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.02{elsif nozzle_diameter[0]==0.5}0.018{elsif nozzle_diameter[0]==0.6}0.012{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.25}0.09{elsif nozzle_diameter[0]==0.3}0.065{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S40 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS @XL.json b/resources/profiles/Prusa/filament/Prusa Generic ABS @XL.json index 544d644b27..eaaa8223dc 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS @XL.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99_1", "setting_id": "GFSA04", "name": "Prusa Generic ABS @XL", "from": "system", @@ -42,7 +41,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "50", "filament_retract_lift_below": "1.5", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.04{elsif nozzle_diameter[0]==0.25}0.1{elsif nozzle_diameter[0]==0.3}0.06{elsif nozzle_diameter[0]==0.35}0.05{elsif nozzle_diameter[0]==0.5}0.03{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.01{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.02{elsif nozzle_diameter[0]==0.5}0.018{elsif nozzle_diameter[0]==0.6}0.012{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.25}0.09{elsif nozzle_diameter[0]==0.3}0.065{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S40 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.04{elsif nozzle_diameter[0]==0.25}0.1{elsif nozzle_diameter[0]==0.3}0.06{elsif nozzle_diameter[0]==0.35}0.05{elsif nozzle_diameter[0]==0.5}0.03{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.01{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.02{elsif nozzle_diameter[0]==0.5}0.018{elsif nozzle_diameter[0]==0.6}0.012{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.25}0.09{elsif nozzle_diameter[0]==0.3}0.065{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S40 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ABS.json b/resources/profiles/Prusa/filament/Prusa Generic ABS.json index a23cd0693e..724c0a3f80 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ABS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ABS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB99", "setting_id": "GFSA04", "name": "Prusa Generic ABS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.25.json index 577d06c5ea..8dd21dc40a 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98_5", "setting_id": "GFSA04", "name": "Prusa Generic ASA @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.6.json index 8d9c6edd6a..f2016a0eeb 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98_3", "setting_id": "GFSA04", "name": "Prusa Generic ASA @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.8.json index 6eff61395e..739c7b2078 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98_4", "setting_id": "GFSA04", "name": "Prusa Generic ASA @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS.json index 5fd2131170..f6dd7710f7 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ASA @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98_2", "setting_id": "GFSA04", "name": "Prusa Generic ASA @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ASA @MK4.json b/resources/profiles/Prusa/filament/Prusa Generic ASA @MK4.json index de823b2306..5fea76436a 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ASA @MK4.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ASA @MK4.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98_1", "setting_id": "GFSA04", "name": "Prusa Generic ASA @MK4", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic ASA.json b/resources/profiles/Prusa/filament/Prusa Generic ASA.json index 5631cd38e8..86444714c3 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic ASA.json +++ b/resources/profiles/Prusa/filament/Prusa Generic ASA.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98", "setting_id": "GFSA04", "name": "Prusa Generic ASA", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.25.json index b6576cc0d1..8f37a5bd49 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN99_4", "setting_id": "GFSA04", "name": "Prusa Generic PA @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.6.json index bdb64a4a8b..ef375d0645 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN99_2", "setting_id": "GFSA04", "name": "Prusa Generic PA @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.8.json index 2075ae25ed..b3660df86a 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN99_3", "setting_id": "GFSA04", "name": "Prusa Generic PA @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS.json index ff8c622dec..df2b3e8bdb 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN99_1", "setting_id": "GFSA04", "name": "Prusa Generic PA @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.25.json index 68b628210d..6107892792 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN98_4", "setting_id": "GFSA04", "name": "Prusa Generic PA-CF @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.6.json index f19a1545d6..558ed7aac4 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN98_2", "setting_id": "GFSA04", "name": "Prusa Generic PA-CF @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.8.json index c4dbec0528..6d2c69a00a 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN98_3", "setting_id": "GFSA04", "name": "Prusa Generic PA-CF @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS.json index a0a6b78914..36dbe45128 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA-CF @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN98_1", "setting_id": "GFSA04", "name": "Prusa Generic PA-CF @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA-CF.json b/resources/profiles/Prusa/filament/Prusa Generic PA-CF.json index 8b389957c7..338e3fceb5 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA-CF.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA-CF.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN98", "setting_id": "GFSA04", "name": "Prusa Generic PA-CF", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PA.json b/resources/profiles/Prusa/filament/Prusa Generic PA.json index c92b0a981e..d573a9185c 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PA.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PA.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN99", "setting_id": "GFSA04", "name": "Prusa Generic PA", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.25.json index e1ca18d3ae..5eae079a9b 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFC99_4", "setting_id": "GFSA04", "name": "Prusa Generic PC @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.6.json index 2636f59ea3..de41d697a5 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFC99_2", "setting_id": "GFSA04", "name": "Prusa Generic PC @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.8.json index e7bac7b4eb..a336739fda 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFC99_3", "setting_id": "GFSA04", "name": "Prusa Generic PC @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS.json index 3dadd23764..e07f12a355 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PC @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFC99_1", "setting_id": "GFSA04", "name": "Prusa Generic PC @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PC.json b/resources/profiles/Prusa/filament/Prusa Generic PC.json index b1821e1d4d..88844a11bb 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PC.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PC.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFC99", "setting_id": "GFSA04", "name": "Prusa Generic PC", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.25.json index 8090554d09..4c64f88db2 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFG99_5", "setting_id": "GFSA04", "name": "Prusa Generic PETG @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.6.json index 8dad5b26e8..8a32807d15 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFG99_3", "setting_id": "GFSA04", "name": "Prusa Generic PETG @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.8.json index 8829ea6f8f..e53595ee01 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFG99_4", "setting_id": "GFSA04", "name": "Prusa Generic PETG @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS.json index e9b57ebada..7ce30af419 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFG99_2", "setting_id": "GFSA04", "name": "Prusa Generic PETG @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @MK4.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @MK4.json index 9caa793e9f..7eedb38b60 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG @MK4.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @MK4.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFG99_1", "setting_id": "GFSA04", "name": "Prusa Generic PETG @MK4", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @XL 5T.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @XL 5T.json new file mode 100644 index 0000000000..ef5778964f --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @XL 5T.json @@ -0,0 +1,71 @@ +{ + "type": "filament", + "setting_id": "GFG99_PRUSA_0", + "name": "Prusa Generic PETG @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pet", + "nozzle_temperature_intial_layer": "230", + "nozzle_temperature": "240", + "hot_plate_temp_initial_layer": "80", + "hot_plate_temp": "80", + "full_fan_speed_layer": "5", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "filament_max_volumetric_speed": [ + "9" + ], + "slow_down_layer_time": [ + "9" + ], + "fan_max_speed": [ + "50" + ], + "fan_min_speed": [ + "30" + ], + "overhang_fan_speed": [ + "50" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "filament_loading_speed_start": "50", + "filament_loading_speed": "10", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "100", + "filament_load_time": "10.5", + "filament_unload_time": "8.5", + "filament_cooling_moves": "3", + "filament_cooling_initial_speed": "5", + "filament_cooling_final_speed": "2.5", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_wipe": "1", + "filament_retract_before_wipe": "20%", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.053{elsif nozzle_diameter[0]==0.5}0.042{elsif nozzle_diameter[0]==0.6}0.032{elsif nozzle_diameter[0]==0.8}0.018{elsif nozzle_diameter[0]==0.25}0.18{elsif nozzle_diameter[0]==0.3}0.1{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG @XL.json b/resources/profiles/Prusa/filament/Prusa Generic PETG @XL.json index c2c535cd91..4767e5ef77 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG @XL.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusa Generic PETG @XL", "from": "system", @@ -45,7 +44,7 @@ "filament_retract_lift_below": "1.5", "filament_wipe": "1", "filament_retract_before_wipe": "20%", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.053{elsif nozzle_diameter[0]==0.5}0.042{elsif nozzle_diameter[0]==0.6}0.032{elsif nozzle_diameter[0]==0.8}0.018{elsif nozzle_diameter[0]==0.25}0.18{elsif nozzle_diameter[0]==0.3}0.1{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.053{elsif nozzle_diameter[0]==0.5}0.042{elsif nozzle_diameter[0]==0.6}0.032{elsif nozzle_diameter[0]==0.8}0.018{elsif nozzle_diameter[0]==0.25}0.18{elsif nozzle_diameter[0]==0.3}0.1{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PETG.json b/resources/profiles/Prusa/filament/Prusa Generic PETG.json index 9076a6c3aa..532ad318d0 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PETG.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PETG.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFG99", "setting_id": "GFSA04", "name": "Prusa Generic PETG", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.25.json index 9df6c863c0..bc64fdef61 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_5", "setting_id": "GFSA04", "name": "Prusa Generic PLA @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.6.json index 667c98c801..5eaa277a93 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_3", "setting_id": "GFSA04", "name": "Prusa Generic PLA @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.8.json index 711b271b1c..4f4b21eab2 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_4", "setting_id": "GFSA04", "name": "Prusa Generic PLA @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS.json index 2ac1386e71..fcb2e730ba 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_2", "setting_id": "GFSA04", "name": "Prusa Generic PLA @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @MK4.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @MK4.json index d3293a39cc..6f8952d40e 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA @MK4.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @MK4.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusa Generic PLA @MK4", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @XL 5T.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @XL 5T.json new file mode 100644 index 0000000000..fc3fea69cd --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @XL 5T.json @@ -0,0 +1,66 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusa Generic PLA @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pla", + "nozzle_temperature_intial_layer": "215", + "nozzle_temperature": "210", + "hot_plate_temp_initial_layer": "60", + "hot_plate_temp": "60", + "full_fan_speed_layer": "3", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "filament_max_volumetric_speed": [ + "15" + ], + "slow_down_layer_time": [ + "10" + ], + "fan_max_speed": [ + "100" + ], + "fan_min_speed": [ + "100" + ], + "overhang_fan_speed": [ + "100" + ], + "filament_loading_speed_start": "50", + "filament_loading_speed": "10", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "100", + "filament_load_time": "10.5", + "filament_unload_time": "8.5", + "filament_cooling_moves": "2", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "3.5", + "filament_retract_lift_below": "0.6", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA @XL.json b/resources/profiles/Prusa/filament/Prusa Generic PLA @XL.json index 06acddef20..6ab8b011ee 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA @XL.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusa Generic PLA @XL", "from": "system", @@ -40,7 +39,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "3.5", "filament_retract_lift_below": "0.6", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.25.json index 929fe26671..e9c5476044 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL98_5", "setting_id": "GFSA04", "name": "Prusa Generic PLA-CF @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.6.json index cee0363300..f095249c54 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL98_3", "setting_id": "GFSA04", "name": "Prusa Generic PLA-CF @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.8.json index 1bfce10352..c784a473ab 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL98_4", "setting_id": "GFSA04", "name": "Prusa Generic PLA-CF @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS.json index 24559261d9..740c2bfe19 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL98_1", "setting_id": "GFSA04", "name": "Prusa Generic PLA-CF @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF.json b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF.json index 4461005ad3..6bb298a0f4 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA-CF.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA-CF.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL98", "setting_id": "GFSA04", "name": "Prusa Generic PLA-CF", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PLA.json b/resources/profiles/Prusa/filament/Prusa Generic PLA.json index f31ec71c51..049691036c 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PLA.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PLA.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99", "setting_id": "GFSA04", "name": "Prusa Generic PLA", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.25.json b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.25.json index bbbc4a6aa9..34ce1a84e4 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.25.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.25.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFS99_4", "setting_id": "GFSA04", "name": "Prusa Generic PVA @MINIIS 0.25", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.6.json b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.6.json index d9f64abbed..3ee44fa9a6 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.6.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.6.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFS99_2", "setting_id": "GFSA04", "name": "Prusa Generic PVA @MINIIS 0.6", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.8.json b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.8.json index 5e0055a5fb..eeb2dbd43d 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.8.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS 0.8.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFS99_3", "setting_id": "GFSA04", "name": "Prusa Generic PVA @MINIIS 0.8", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS.json index 164b717964..b5f5602f37 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PVA @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFS99_1", "setting_id": "GFSA04", "name": "Prusa Generic PVA @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic PVA.json b/resources/profiles/Prusa/filament/Prusa Generic PVA.json index 2c0e2017e3..c5cdfa8518 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic PVA.json +++ b/resources/profiles/Prusa/filament/Prusa Generic PVA.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFS99", "setting_id": "GFSA04", "name": "Prusa Generic PVA", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic TPU @MINIIS.json b/resources/profiles/Prusa/filament/Prusa Generic TPU @MINIIS.json index b9214b3031..3baf1ac2e4 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic TPU @MINIIS.json +++ b/resources/profiles/Prusa/filament/Prusa Generic TPU @MINIIS.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFU99_2", "setting_id": "GFSA04", "name": "Prusa Generic TPU @MINIIS", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic TPU @MK4.json b/resources/profiles/Prusa/filament/Prusa Generic TPU @MK4.json index ac940c00aa..27fbaa6601 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic TPU @MK4.json +++ b/resources/profiles/Prusa/filament/Prusa Generic TPU @MK4.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFU99_1", "setting_id": "GFSA04", "name": "Prusa Generic TPU @MK4", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusa Generic TPU.json b/resources/profiles/Prusa/filament/Prusa Generic TPU.json index 47239a500e..5384820c98 100644 --- a/resources/profiles/Prusa/filament/Prusa Generic TPU.json +++ b/resources/profiles/Prusa/filament/Prusa Generic TPU.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFU99", "setting_id": "GFSA04", "name": "Prusa Generic TPU", "from": "system", diff --git a/resources/profiles/Prusa/filament/Prusament ASA @XL 5T.json b/resources/profiles/Prusa/filament/Prusament ASA @XL 5T.json new file mode 100644 index 0000000000..2022485fab --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament ASA @XL 5T.json @@ -0,0 +1,70 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament ASA @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_asa", + "nozzle_temperature_intial_layer": "260", + "nozzle_temperature": "260", + "hot_plate_temp_initial_layer": "100", + "hot_plate_temp": "105", + "filament_flow_ratio": [ + "1" + ], + "fan_max_speed": [ + "10" + ], + "fan_min_speed": [ + "10" + ], + "overhang_fan_speed": [ + "30" + ], + "close_fan_the_first_x_layers": [ + "4" + ], + "slow_down_min_speed": [ + "15" + ], + "slow_down_layer_time": [ + "15" + ], + "filament_max_volumetric_speed": [ + "12" + ], + "filament_loading_speed_start": "19", + "filament_loading_speed": "14", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "20", + "filament_load_time": "15", + "filament_unload_time": "12", + "filament_cooling_moves": "5", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "50", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.04{elsif nozzle_diameter[0]==0.25}0.1{elsif nozzle_diameter[0]==0.3}0.06{elsif nozzle_diameter[0]==0.35}0.05{elsif nozzle_diameter[0]==0.5}0.03{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.01{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.02{elsif nozzle_diameter[0]==0.5}0.018{elsif nozzle_diameter[0]==0.6}0.012{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.25}0.09{elsif nozzle_diameter[0]==0.3}0.065{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S40 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament ASA @XL.json b/resources/profiles/Prusa/filament/Prusament ASA @XL.json index 36e1f6c601..496d63fd1f 100644 --- a/resources/profiles/Prusa/filament/Prusament ASA @XL.json +++ b/resources/profiles/Prusa/filament/Prusament ASA @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFB98", "setting_id": "GFSA04", "name": "Prusament ASA @XL", "from": "system", @@ -44,7 +43,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "50", "filament_retract_lift_below": "1.5", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.04{elsif nozzle_diameter[0]==0.25}0.1{elsif nozzle_diameter[0]==0.3}0.06{elsif nozzle_diameter[0]==0.35}0.05{elsif nozzle_diameter[0]==0.5}0.03{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.01{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.02{elsif nozzle_diameter[0]==0.5}0.018{elsif nozzle_diameter[0]==0.6}0.012{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.25}0.09{elsif nozzle_diameter[0]==0.3}0.065{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S40 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.04{elsif nozzle_diameter[0]==0.25}0.1{elsif nozzle_diameter[0]==0.3}0.06{elsif nozzle_diameter[0]==0.35}0.05{elsif nozzle_diameter[0]==0.5}0.03{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.01{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.02{elsif nozzle_diameter[0]==0.5}0.018{elsif nozzle_diameter[0]==0.6}0.012{elsif nozzle_diameter[0]==0.8}0.01{elsif nozzle_diameter[0]==0.25}0.09{elsif nozzle_diameter[0]==0.3}0.065{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S40 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament PA-CF @XL 5T.json b/resources/profiles/Prusa/filament/Prusament PA-CF @XL 5T.json new file mode 100644 index 0000000000..c15ee9784e --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament PA-CF @XL 5T.json @@ -0,0 +1,70 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament PA-CF @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pa11cf", + "nozzle_temperature_intial_layer": "275", + "nozzle_temperature": "285", + "hot_plate_temp_initial_layer": "100", + "hot_plate_temp": "105", + "filament_flow_ratio": [ + "1.05" + ], + "fan_max_speed": [ + "20" + ], + "fan_min_speed": [ + "20" + ], + "overhang_fan_speed": [ + "30" + ], + "close_fan_the_first_x_layers": [ + "4" + ], + "slow_down_min_speed": [ + "15" + ], + "slow_down_layer_time": [ + "20" + ], + "filament_max_volumetric_speed": [ + "6.5" + ], + "filament_loading_speed_start": "19", + "filament_loading_speed": "14", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "20", + "filament_load_time": "15", + "filament_unload_time": "12", + "filament_cooling_moves": "5", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "50", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/filament/Prusament PA-CF @XL.json b/resources/profiles/Prusa/filament/Prusament PA-CF @XL.json index 28d4862819..d718cf7966 100644 --- a/resources/profiles/Prusa/filament/Prusament PA-CF @XL.json +++ b/resources/profiles/Prusa/filament/Prusament PA-CF @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFN98", "setting_id": "GFSA04", "name": "Prusament PA-CF @XL", "from": "system", @@ -44,7 +43,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "50", "filament_retract_lift_below": "1.5", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament PC Blend @XL 5T.json b/resources/profiles/Prusa/filament/Prusament PC Blend @XL 5T.json new file mode 100644 index 0000000000..aad5ab31ef --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament PC Blend @XL 5T.json @@ -0,0 +1,70 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament PC Blend @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pc", + "nozzle_temperature_intial_layer": "275", + "nozzle_temperature": "275", + "hot_plate_temp_initial_layer": "100", + "hot_plate_temp": "105", + "filament_flow_ratio": [ + "1" + ], + "fan_max_speed": [ + "10" + ], + "fan_min_speed": [ + "10" + ], + "overhang_fan_speed": [ + "30" + ], + "close_fan_the_first_x_layers": [ + "4" + ], + "slow_down_min_speed": [ + "15" + ], + "slow_down_layer_time": [ + "20" + ], + "filament_max_volumetric_speed": [ + "9" + ], + "filament_loading_speed_start": "19", + "filament_loading_speed": "14", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "20", + "filament_load_time": "15", + "filament_unload_time": "12", + "filament_cooling_moves": "5", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "50", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament PC Blend @XL.json b/resources/profiles/Prusa/filament/Prusament PC Blend @XL.json index a2bfaada98..025cc39eee 100644 --- a/resources/profiles/Prusa/filament/Prusament PC Blend @XL.json +++ b/resources/profiles/Prusa/filament/Prusament PC Blend @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusament PC Blend @XL", "from": "system", @@ -44,7 +43,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "50", "filament_retract_lift_below": "1.5", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament PC-CF @XL 5T.json b/resources/profiles/Prusa/filament/Prusament PC-CF @XL 5T.json new file mode 100644 index 0000000000..1bba76b7c4 --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament PC-CF @XL 5T.json @@ -0,0 +1,70 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament PC-CF @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pccf", + "nozzle_temperature_intial_layer": "285", + "nozzle_temperature": "285", + "hot_plate_temp_initial_layer": "100", + "hot_plate_temp": "105", + "filament_flow_ratio": [ + "1.04" + ], + "fan_max_speed": [ + "10" + ], + "fan_min_speed": [ + "10" + ], + "overhang_fan_speed": [ + "30" + ], + "close_fan_the_first_x_layers": [ + "4" + ], + "slow_down_min_speed": [ + "15" + ], + "slow_down_layer_time": [ + "20" + ], + "filament_max_volumetric_speed": [ + "8" + ], + "filament_loading_speed_start": "19", + "filament_loading_speed": "14", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "20", + "filament_load_time": "15", + "filament_unload_time": "12", + "filament_cooling_moves": "5", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "50", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament PC-CF @XL.json b/resources/profiles/Prusa/filament/Prusament PC-CF @XL.json index 79c707f999..44bbd20d6a 100644 --- a/resources/profiles/Prusa/filament/Prusament PC-CF @XL.json +++ b/resources/profiles/Prusa/filament/Prusament PC-CF @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusament PC-CF @XL", "from": "system", @@ -44,7 +43,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "50", "filament_retract_lift_below": "1.5", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.6}0.025{elsif nozzle_diameter[0]==0.8}0.016{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.09{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S45 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament PETG @XL 5T.json b/resources/profiles/Prusa/filament/Prusament PETG @XL 5T.json new file mode 100644 index 0000000000..5c62c313cc --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament PETG @XL 5T.json @@ -0,0 +1,71 @@ +{ + "type": "filament", + "setting_id": "GFG99_PRUSA_1", + "name": "Prusament PETG @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pet", + "nozzle_temperature_intial_layer": "240", + "nozzle_temperature": "250", + "hot_plate_temp_initial_layer": "80", + "hot_plate_temp": "80", + "full_fan_speed_layer": "5", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "filament_max_volumetric_speed": [ + "9.5" + ], + "slow_down_layer_time": [ + "9" + ], + "fan_max_speed": [ + "50" + ], + "fan_min_speed": [ + "30" + ], + "overhang_fan_speed": [ + "50" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "filament_loading_speed_start": "50", + "filament_loading_speed": "10", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "100", + "filament_load_time": "10.5", + "filament_unload_time": "8.5", + "filament_cooling_moves": "3", + "filament_cooling_initial_speed": "5", + "filament_cooling_final_speed": "2.5", + "filament_retract_lift_below": "1.5", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "10" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_wipe": "1", + "filament_retract_before_wipe": "20%", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.053{elsif nozzle_diameter[0]==0.5}0.042{elsif nozzle_diameter[0]==0.6}0.032{elsif nozzle_diameter[0]==0.8}0.018{elsif nozzle_diameter[0]==0.25}0.18{elsif nozzle_diameter[0]==0.3}0.1{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament PETG @XL.json b/resources/profiles/Prusa/filament/Prusament PETG @XL.json index c4505feda5..da28d7d588 100644 --- a/resources/profiles/Prusa/filament/Prusament PETG @XL.json +++ b/resources/profiles/Prusa/filament/Prusament PETG @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusament PETG @XL", "from": "system", @@ -45,7 +44,7 @@ "filament_retract_lift_below": "1.5", "filament_wipe": "1", "filament_retract_before_wipe": "20%", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.053{elsif nozzle_diameter[0]==0.5}0.042{elsif nozzle_diameter[0]==0.6}0.032{elsif nozzle_diameter[0]==0.8}0.018{elsif nozzle_diameter[0]==0.25}0.18{elsif nozzle_diameter[0]==0.3}0.1{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.07{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.09{elsif nozzle_diameter[0]==0.35}0.08{elsif nozzle_diameter[0]==0.6}0.04{elsif nozzle_diameter[0]==0.5}0.05{elsif nozzle_diameter[0]==0.8}0.02{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.053{elsif nozzle_diameter[0]==0.5}0.042{elsif nozzle_diameter[0]==0.6}0.032{elsif nozzle_diameter[0]==0.8}0.018{elsif nozzle_diameter[0]==0.25}0.18{elsif nozzle_diameter[0]==0.3}0.1{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament PLA @XL 5T.json b/resources/profiles/Prusa/filament/Prusament PLA @XL 5T.json new file mode 100644 index 0000000000..b3efef6127 --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament PLA @XL 5T.json @@ -0,0 +1,66 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament PLA @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pla", + "nozzle_temperature_intial_layer": "215", + "nozzle_temperature": "215", + "hot_plate_temp_initial_layer": "60", + "hot_plate_temp": "60", + "full_fan_speed_layer": "3", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "filament_max_volumetric_speed": [ + "15" + ], + "slow_down_layer_time": [ + "10" + ], + "fan_max_speed": [ + "100" + ], + "fan_min_speed": [ + "100" + ], + "overhang_fan_speed": [ + "100" + ], + "filament_loading_speed_start": "50", + "filament_loading_speed": "10", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "100", + "filament_load_time": "10.5", + "filament_unload_time": "8.5", + "filament_cooling_moves": "2", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "3.5", + "filament_retract_lift_below": "0.6", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament PLA @XL.json b/resources/profiles/Prusa/filament/Prusament PLA @XL.json index 949dfb23b3..fe9f0b5281 100644 --- a/resources/profiles/Prusa/filament/Prusament PLA @XL.json +++ b/resources/profiles/Prusa/filament/Prusament PLA @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusament PLA @XL", "from": "system", @@ -40,7 +39,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "3.5", "filament_retract_lift_below": "0.6", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament PVB @XL 5T.json b/resources/profiles/Prusa/filament/Prusament PVB @XL 5T.json new file mode 100644 index 0000000000..354f904cef --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament PVB @XL 5T.json @@ -0,0 +1,71 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament PVB @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pvb", + "nozzle_temperature_intial_layer": "215", + "nozzle_temperature": "215", + "hot_plate_temp_initial_layer": "75", + "hot_plate_temp": "75", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "filament_max_volumetric_speed": [ + "8" + ], + "slow_down_layer_time": [ + "10" + ], + "fan_max_speed": [ + "100" + ], + "fan_min_speed": [ + "100" + ], + "overhang_fan_speed": [ + "100" + ], + "close_fan_the_first_x_layers": [ + "1" + ], + "full_fan_speed_layer": [ + "3" + ], + "filament_loading_speed_start": "50", + "filament_loading_speed": "10", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "100", + "filament_load_time": "10.5", + "filament_unload_time": "8.5", + "filament_cooling_moves": "2", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "3.5", + "filament_retract_lift_below": "0.6", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament PVB @XL.json b/resources/profiles/Prusa/filament/Prusament PVB @XL.json index c7e1e5fe0e..67b2c9501c 100644 --- a/resources/profiles/Prusa/filament/Prusament PVB @XL.json +++ b/resources/profiles/Prusa/filament/Prusament PVB @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFS99", "setting_id": "GFSA04", "name": "Prusament PVB @XL", "from": "system", @@ -45,7 +44,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "3.5", "filament_retract_lift_below": "0.6", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/Prusament rPLA @XL 5T.json b/resources/profiles/Prusa/filament/Prusament rPLA @XL 5T.json new file mode 100644 index 0000000000..9a7cce6455 --- /dev/null +++ b/resources/profiles/Prusa/filament/Prusament rPLA @XL 5T.json @@ -0,0 +1,69 @@ +{ + "type": "filament", + "setting_id": "GFSA04", + "name": "Prusament rPLA @XL 5T", + "from": "system", + "instantiation": "true", + "inherits": "fdm_filament_pla", + "nozzle_temperature_intial_layer": "205", + "nozzle_temperature": "205", + "hot_plate_temp_initial_layer": "60", + "hot_plate_temp": "60", + "full_fan_speed_layer": "3", + "slow_down_min_speed": "15", + "filament_flow_ratio": [ + "1" + ], + "close_fan_the_first_x_layers": [ + "1" + ], + "slow_down_layer_time": [ + "10" + ], + "fan_max_speed": [ + "100" + ], + "fan_min_speed": [ + "100" + ], + "overhang_fan_speed": [ + "100" + ], + "filament_max_volumetric_speed": [ + "10" + ], + "filament_loading_speed_start": "50", + "filament_loading_speed": "10", + "filament_unloading_speed_start": "100", + "filament_unloading_speed": "100", + "filament_load_time": "10.5", + "filament_unload_time": "8.5", + "filament_cooling_moves": "2", + "filament_cooling_initial_speed": "10", + "filament_cooling_final_speed": "3.5", + "filament_retract_lift_below": "0.6", + "filament_multitool_ramming": [ + "1" + ], + "filament_multitool_ramming_volume": [ + "5" + ], + "filament_multitool_ramming_flow": [ + "40" + ], + "filament_stamping_distance": [ + "45" + ], + "filament_stamping_loading_speed": [ + "29" + ], + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle", + "Prusa XL 5T 0.3 nozzle", + "Prusa XL 5T 0.4 nozzle", + "Prusa XL 5T 0.5 nozzle", + "Prusa XL 5T 0.6 nozzle", + "Prusa XL 5T 0.8 nozzle" + ] +} diff --git a/resources/profiles/Prusa/filament/Prusament rPLA @XL.json b/resources/profiles/Prusa/filament/Prusament rPLA @XL.json index 6fa3b54c17..cfe956641f 100644 --- a/resources/profiles/Prusa/filament/Prusament rPLA @XL.json +++ b/resources/profiles/Prusa/filament/Prusament rPLA @XL.json @@ -1,6 +1,5 @@ { "type": "filament", - "filament_id": "GFL99_1", "setting_id": "GFSA04", "name": "Prusament rPLA @XL", "from": "system", @@ -43,7 +42,7 @@ "filament_cooling_initial_speed": "10", "filament_cooling_final_speed": "3.5", "filament_retract_lift_below": "0.6", - "filament_start_gcode": "; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp", + "filament_start_gcode": ["; filament start gcode\nM900 K{if nozzle_diameter[0]==0.4}0.05{elsif nozzle_diameter[0]==0.25}0.14{elsif nozzle_diameter[0]==0.3}0.07{elsif nozzle_diameter[0]==0.35}0.06{elsif nozzle_diameter[0]==0.6}0.03{elsif nozzle_diameter[0]==0.5}0.035{elsif nozzle_diameter[0]==0.8}0.015{else}0{endif} ; Filament gcode\n\n{if printer_notes=~/.*PRINTER_MODEL_XLIS.*/}\nM572 S{if nozzle_diameter[0]==0.4}0.036{elsif nozzle_diameter[0]==0.5}0.025{elsif nozzle_diameter[0]==0.6}0.02{elsif nozzle_diameter[0]==0.8}0.014{elsif nozzle_diameter[0]==0.25}0.12{elsif nozzle_diameter[0]==0.3}0.08{else}0{endif} ; Filament gcode\n{endif}\n\nM142 S36 ; set heatbreak target temp"], "compatible_printers": [ "Prusa XL 0.25 nozzle", "Prusa XL 0.3 nozzle", diff --git a/resources/profiles/Prusa/filament/fdm_filament_abs.json b/resources/profiles/Prusa/filament/fdm_filament_abs.json index 7e478a37f3..d60e0c16bd 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_abs.json +++ b/resources/profiles/Prusa/filament/fdm_filament_abs.json @@ -4,22 +4,23 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", - "cool_plate_temp" : [ + "filament_id": "GFB99", + "cool_plate_temp": [ "105" ], - "eng_plate_temp" : [ + "eng_plate_temp": [ "105" ], - "hot_plate_temp" : [ + "hot_plate_temp": [ "105" ], - "cool_plate_temp_initial_layer" : [ + "cool_plate_temp_initial_layer": [ "105" ], - "eng_plate_temp_initial_layer" : [ + "eng_plate_temp_initial_layer": [ "105" ], - "hot_plate_temp_initial_layer" : [ + "hot_plate_temp_initial_layer": [ "105" ], "slow_down_for_layer_cooling": [ @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "260" ], @@ -79,4 +81,4 @@ "slow_down_layer_time": [ "3" ] -} +} \ No newline at end of file diff --git a/resources/profiles/Prusa/filament/fdm_filament_asa.json b/resources/profiles/Prusa/filament/fdm_filament_asa.json index 29a752a4ee..7aa9917aa4 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_asa.json +++ b/resources/profiles/Prusa/filament/fdm_filament_asa.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFB98", "cool_plate_temp" : [ "105" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "260" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pa.json b/resources/profiles/Prusa/filament/fdm_filament_pa.json index e75e2e9f6c..c473b6a203 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pa.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pa.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFN99", "cool_plate_temp" : [ "0" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "290" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pa11cf.json b/resources/profiles/Prusa/filament/fdm_filament_pa11cf.json index 3be757e798..2afd4c1696 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pa11cf.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pa11cf.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFN98", "cool_plate_temp" : [ "0" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "290" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pc.json b/resources/profiles/Prusa/filament/fdm_filament_pc.json index 89f770017e..2a152fe354 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pc.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pc.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFC99", "cool_plate_temp" : [ "0" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "270" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pccf.json b/resources/profiles/Prusa/filament/fdm_filament_pccf.json index 483e28036a..1c6e13f360 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pccf.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pccf.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFC98", "cool_plate_temp" : [ "0" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "270" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pet.json b/resources/profiles/Prusa/filament/fdm_filament_pet.json index 2f98be665f..b494b4d3a7 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pet.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pet.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFT02", "cool_plate_temp" : [ "60" ], @@ -43,6 +44,7 @@ "filament_cost": [ "30" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "255" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pla.json b/resources/profiles/Prusa/filament/fdm_filament_pla.json index 9e1e42db6b..9e7c6746f2 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pla.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pla.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFL99", "fan_cooling_layer_time": [ "100" ], @@ -37,6 +38,7 @@ "hot_plate_temp_initial_layer" : [ "60" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "220" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pva.json b/resources/profiles/Prusa/filament/fdm_filament_pva.json index f529bb39af..ee8e4311e3 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pva.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pva.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFS99", "cool_plate_temp" : [ "35" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "220" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_pvb.json b/resources/profiles/Prusa/filament/fdm_filament_pvb.json index db5fa7823b..b4fed01543 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_pvb.json +++ b/resources/profiles/Prusa/filament/fdm_filament_pvb.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFS98", "cool_plate_temp" : [ "35" ], @@ -43,6 +44,7 @@ "filament_cost": [ "20" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "220" ], diff --git a/resources/profiles/Prusa/filament/fdm_filament_tpu.json b/resources/profiles/Prusa/filament/fdm_filament_tpu.json index d5cc57fbcc..27a8b984b7 100644 --- a/resources/profiles/Prusa/filament/fdm_filament_tpu.json +++ b/resources/profiles/Prusa/filament/fdm_filament_tpu.json @@ -4,6 +4,7 @@ "from": "system", "instantiation": "false", "inherits": "fdm_filament_common", + "filament_id": "GFU99", "cool_plate_temp" : [ "30" ], @@ -40,6 +41,7 @@ "filament_retraction_length": [ "0.4" ], + "idle_temperature": "0", "nozzle_temperature_initial_layer": [ "240" ], diff --git a/resources/profiles/Prusa/machine/Prusa XL 0.25 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 0.25 nozzle.json index a8a7cd75da..ade0d249c8 100644 --- a/resources/profiles/Prusa/machine/Prusa XL 0.25 nozzle.json +++ b/resources/profiles/Prusa/machine/Prusa XL 0.25 nozzle.json @@ -4,115 +4,18 @@ "name": "Prusa XL 0.25 nozzle", "from": "system", "instantiation": "true", - "inherits": "fdm_machine_common", + "inherits": "fdm_machine_common_xl", "gcode_flavor": "marlin2", "printer_model": "Prusa XL", "default_filament_profile": "Prusa Generic PLA @XL", "default_print_profile": "0.15mm Speed @Prusa XL 0.25", - "extruder_clearance_radius": "67", - "extruder_clearance_height_to_rod": "21", - "extruder_clearance_height_to_lid": "21", "printer_variant": "0.25", "nozzle_diameter": [ "0.25" ], "max_layer_height": "0.15", "min_layer_height": "0.05", - "bed_exclude_area": [ - "0x0" - ], - "printable_area": [ - "0x0", - "360x0", - "360x360", - "0x360" - ], - "machine_max_acceleration_e": [ - "2500", - "2500" - ], - "machine_max_acceleration_extruding": [ - "4000", - "4000" - ], - "machine_max_acceleration_retracting": [ - "1200", - "1200" - ], - "machine_max_acceleration_x": [ - "7000", - "7000" - ], - "machine_max_acceleration_y": [ - "7000", - "7000" - ], - "machine_max_acceleration_z": [ - "200", - "200" - ], - "machine_max_acceleration_travel": [ - "2500", - "2500" - ], - "machine_max_speed_e": [ - "100", - "100" - ], - "machine_max_speed_x": [ - "400", - "400" - ], - "machine_max_speed_y": [ - "400", - "400" - ], - "machine_max_speed_z": [ - "12", - "12" - ], - "machine_max_jerk_e": [ - "10", - "10" - ], - "machine_max_jerk_x": [ - "8", - "8" - ], - "machine_max_jerk_y": [ - "8", - "8" - ], - "machine_max_jerk_z": [ - "2", - "2" - ], "retraction_length": "0.8", "retraction_speed": "35", - "detraction_speed": "25", - "retraction_minimum_travel": "1.5", - "retract_when_changing_layer": "1", - "wipe": "1", - "retract_before_wipe": "80%", - "retract_lift_below": "1.5", - "z_hop_types": "Auto Lift", - "host_type": "prusalink", - "printable_height": "360", - "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", - "machine_pause_gcode": "M601", - "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", - "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", - "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", - "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", - "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_XLIS\nPG\nINPUT_SHAPER", - "scan_first_layer": "0", - "nozzle_type": "hardened_steel", - "auxiliary_fan": "0", - "thumbnails": [ - "16x16/QOI", - "313x173/QOI", - "440x240/QOI", - "480x240/QOI", - "640x480/PNG" - ] + "detraction_speed": "25" } diff --git a/resources/profiles/Prusa/machine/Prusa XL 0.3 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 0.3 nozzle.json index e83f1871a1..b678114c03 100644 --- a/resources/profiles/Prusa/machine/Prusa XL 0.3 nozzle.json +++ b/resources/profiles/Prusa/machine/Prusa XL 0.3 nozzle.json @@ -1,118 +1,21 @@ { - "type": "machine", - "setting_id": "GM003", - "name": "Prusa XL 0.3 nozzle", - "from": "system", - "instantiation": "true", - "inherits": "fdm_machine_common", - "gcode_flavor": "marlin2", - "printer_model": "Prusa XL", - "default_filament_profile": "Prusa Generic PLA @XL", - "default_print_profile": "0.20mm Speed @Prusa XL 0.3", - "extruder_clearance_radius": "67", - "extruder_clearance_height_to_rod": "21", - "extruder_clearance_height_to_lid": "21", - "printer_variant": "0.3", - "nozzle_diameter": [ - "0.3" - ], - "max_layer_height": "0.22", - "min_layer_height": "0.05", - "bed_exclude_area": [ - "0x0" - ], - "printable_area": [ - "0x0", - "360x0", - "360x360", - "0x360" - ], - "machine_max_acceleration_e": [ - "2500", - "2500" - ], - "machine_max_acceleration_extruding": [ - "4000", - "4000" - ], - "machine_max_acceleration_retracting": [ - "1200", - "1200" - ], - "machine_max_acceleration_x": [ - "7000", - "7000" - ], - "machine_max_acceleration_y": [ - "7000", - "7000" - ], - "machine_max_acceleration_z": [ - "200", - "200" - ], - "machine_max_acceleration_travel": [ - "3000", - "3000" - ], - "machine_max_speed_e": [ - "100", - "100" - ], - "machine_max_speed_x": [ - "400", - "400" - ], - "machine_max_speed_y": [ - "400", - "400" - ], - "machine_max_speed_z": [ - "12", - "12" - ], - "machine_max_jerk_e": [ - "10", - "10" - ], - "machine_max_jerk_x": [ - "8", - "8" - ], - "machine_max_jerk_y": [ - "8", - "8" - ], - "machine_max_jerk_z": [ - "2", - "2" - ], - "retraction_length": "0.7", - "retraction_speed": "35", - "detraction_speed": "25", - "retraction_minimum_travel": "1.5", - "retract_when_changing_layer": "1", - "wipe": "1", - "retract_before_wipe": "80%", - "retract_lift_below": "1.5", - "z_hop_types": "Auto Lift", - "host_type": "prusalink", - "printable_height": "360", - "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", - "machine_pause_gcode": "M601", - "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", - "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", - "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", - "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", - "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_XLIS\nPG\nINPUT_SHAPER", - "scan_first_layer": "0", - "nozzle_type": "hardened_steel", - "auxiliary_fan": "0", - "thumbnails": [ - "16x16/QOI", - "313x173/QOI", - "440x240/QOI", - "480x240/QOI", - "640x480/PNG" - ] -} + "type": "machine", + "setting_id": "GM003", + "name": "Prusa XL 0.3 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL", + "default_filament_profile": "Prusa Generic PLA @XL", + "default_print_profile": "0.20mm Speed @Prusa XL 0.3", + "printer_variant": "0.3", + "nozzle_diameter": [ + "0.3" + ], + "max_layer_height": "0.22", + "min_layer_height": "0.05", + "retraction_length": "0.7", + "retraction_speed": "35", + "detraction_speed": "25" +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 0.4 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 0.4 nozzle.json index cbb286aa5b..3bf1b6fa02 100644 --- a/resources/profiles/Prusa/machine/Prusa XL 0.4 nozzle.json +++ b/resources/profiles/Prusa/machine/Prusa XL 0.4 nozzle.json @@ -1,118 +1,19 @@ { - "type": "machine", - "setting_id": "GM003", - "name": "Prusa XL 0.4 nozzle", - "from": "system", - "instantiation": "true", - "inherits": "fdm_machine_common", - "gcode_flavor": "marlin2", - "printer_model": "Prusa XL", - "default_filament_profile": "Prusa Generic PLA @XL", - "default_print_profile": "0.20mm Speed @Prusa XL 0.4", - "extruder_clearance_radius": "67", - "extruder_clearance_height_to_rod": "21", - "extruder_clearance_height_to_lid": "21", - "printer_variant": "0.4", - "nozzle_diameter": [ - "0.4" - ], - "max_layer_height": "0.3", - "min_layer_height": "0.07", - "bed_exclude_area": [ - "0x0" - ], - "printable_area": [ - "0x0", - "360x0", - "360x360", - "0x360" - ], - "machine_max_acceleration_e": [ - "2500", - "2500" - ], - "machine_max_acceleration_extruding": [ - "4000", - "4000" - ], - "machine_max_acceleration_retracting": [ - "1200", - "1200" - ], - "machine_max_acceleration_x": [ - "7000", - "7000" - ], - "machine_max_acceleration_y": [ - "7000", - "7000" - ], - "machine_max_acceleration_z": [ - "200", - "200" - ], - "machine_max_acceleration_travel": [ - "5000", - "5000" - ], - "machine_max_speed_e": [ - "100", - "100" - ], - "machine_max_speed_x": [ - "400", - "400" - ], - "machine_max_speed_y": [ - "400", - "400" - ], - "machine_max_speed_z": [ - "12", - "12" - ], - "machine_max_jerk_e": [ - "10", - "10" - ], - "machine_max_jerk_x": [ - "8", - "8" - ], - "machine_max_jerk_y": [ - "8", - "8" - ], - "machine_max_jerk_z": [ - "2", - "2" - ], - "retraction_length": "0.8", - "retraction_speed": "35", - "detraction_speed": "25", - "retraction_minimum_travel": "1.5", - "retract_when_changing_layer": "1", - "wipe": "1", - "retract_before_wipe": "80%", - "retract_lift_below": "1.5", - "z_hop_types": "Auto Lift", - "host_type": "prusalink", - "printable_height": "360", - "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", - "machine_pause_gcode": "M601", - "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", - "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", - "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", - "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", - "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_XLIS\nPG\nINPUT_SHAPER", - "scan_first_layer": "0", - "nozzle_type": "hardened_steel", - "auxiliary_fan": "0", - "thumbnails": [ - "16x16/QOI", - "313x173/QOI", - "440x240/QOI", - "480x240/QOI", - "640x480/PNG" - ] -} + "type": "machine", + "setting_id": "GM003", + "name": "Prusa XL 0.4 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL", + "default_filament_profile": "Prusa Generic PLA @XL", + "default_print_profile": "0.20mm Speed @Prusa XL 0.4", + "printer_variant": "0.4", + "nozzle_diameter": [ + "0.4" + ], + "max_layer_height": "0.3", + "min_layer_height": "0.07", + "retraction_length": "0.8" +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 0.5 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 0.5 nozzle.json index 937e88f016..3f65ffc759 100644 --- a/resources/profiles/Prusa/machine/Prusa XL 0.5 nozzle.json +++ b/resources/profiles/Prusa/machine/Prusa XL 0.5 nozzle.json @@ -1,118 +1,19 @@ { - "type": "machine", - "setting_id": "GM003", - "name": "Prusa XL 0.5 nozzle", - "from": "system", - "instantiation": "true", - "inherits": "fdm_machine_common", - "gcode_flavor": "marlin2", - "printer_model": "Prusa XL", - "default_filament_profile": "Prusa Generic PLA @XL", - "default_print_profile": "0.25mm Speed @Prusa XL 0.5", - "extruder_clearance_radius": "67", - "extruder_clearance_height_to_rod": "21", - "extruder_clearance_height_to_lid": "21", - "printer_variant": "0.5", - "nozzle_diameter": [ - "0.5" - ], - "max_layer_height": "0.32", - "min_layer_height": "0.07", - "bed_exclude_area": [ - "0x0" - ], - "printable_area": [ - "0x0", - "360x0", - "360x360", - "0x360" - ], - "machine_max_acceleration_e": [ - "2500", - "2500" - ], - "machine_max_acceleration_extruding": [ - "4000", - "4000" - ], - "machine_max_acceleration_retracting": [ - "1200", - "1200" - ], - "machine_max_acceleration_x": [ - "7000", - "7000" - ], - "machine_max_acceleration_y": [ - "7000", - "7000" - ], - "machine_max_acceleration_z": [ - "200", - "200" - ], - "machine_max_acceleration_travel": [ - "5000", - "5000" - ], - "machine_max_speed_e": [ - "100", - "100" - ], - "machine_max_speed_x": [ - "400", - "400" - ], - "machine_max_speed_y": [ - "400", - "400" - ], - "machine_max_speed_z": [ - "12", - "12" - ], - "machine_max_jerk_e": [ - "10", - "10" - ], - "machine_max_jerk_x": [ - "8", - "8" - ], - "machine_max_jerk_y": [ - "8", - "8" - ], - "machine_max_jerk_z": [ - "2", - "2" - ], - "retraction_length": "0.7", - "retraction_speed": "35", - "detraction_speed": "25", - "retraction_minimum_travel": "1.5", - "retract_when_changing_layer": "1", - "wipe": "1", - "retract_before_wipe": "80%", - "retract_lift_below": "1.5", - "z_hop_types": "Auto Lift", - "host_type": "prusalink", - "printable_height": "360", - "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", - "machine_pause_gcode": "M601", - "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", - "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", - "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", - "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", - "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_XLIS\nPG\nINPUT_SHAPER", - "scan_first_layer": "0", - "nozzle_type": "hardened_steel", - "auxiliary_fan": "0", - "thumbnails": [ - "16x16/QOI", - "313x173/QOI", - "440x240/QOI", - "480x240/QOI", - "640x480/PNG" - ] -} + "type": "machine", + "setting_id": "GM003", + "name": "Prusa XL 0.5 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL", + "default_filament_profile": "Prusa Generic PLA @XL", + "default_print_profile": "0.25mm Speed @Prusa XL 0.5", + "printer_variant": "0.5", + "nozzle_diameter": [ + "0.5" + ], + "max_layer_height": "0.32", + "min_layer_height": "0.07", + "retraction_length": "0.7" +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 0.6 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 0.6 nozzle.json index e0d47b46c6..1239ddb447 100644 --- a/resources/profiles/Prusa/machine/Prusa XL 0.6 nozzle.json +++ b/resources/profiles/Prusa/machine/Prusa XL 0.6 nozzle.json @@ -1,118 +1,19 @@ { - "type": "machine", - "setting_id": "GM003", - "name": "Prusa XL 0.6 nozzle", - "from": "system", - "instantiation": "true", - "inherits": "fdm_machine_common", - "gcode_flavor": "marlin2", - "printer_model": "Prusa XL", - "default_filament_profile": "Prusa Generic PLA @XL", - "default_print_profile": "0.32mm Speed @Prusa XL 0.6", - "extruder_clearance_radius": "67", - "extruder_clearance_height_to_rod": "21", - "extruder_clearance_height_to_lid": "21", - "printer_variant": "0.6", - "nozzle_diameter": [ - "0.6" - ], - "max_layer_height": "0.4", - "min_layer_height": "0.15", - "bed_exclude_area": [ - "0x0" - ], - "printable_area": [ - "0x0", - "360x0", - "360x360", - "0x360" - ], - "machine_max_acceleration_e": [ - "2500", - "2500" - ], - "machine_max_acceleration_extruding": [ - "4000", - "4000" - ], - "machine_max_acceleration_retracting": [ - "1200", - "1200" - ], - "machine_max_acceleration_x": [ - "7000", - "7000" - ], - "machine_max_acceleration_y": [ - "7000", - "7000" - ], - "machine_max_acceleration_z": [ - "200", - "200" - ], - "machine_max_acceleration_travel": [ - "5000", - "5000" - ], - "machine_max_speed_e": [ - "100", - "100" - ], - "machine_max_speed_x": [ - "400", - "400" - ], - "machine_max_speed_y": [ - "400", - "400" - ], - "machine_max_speed_z": [ - "12", - "12" - ], - "machine_max_jerk_e": [ - "10", - "10" - ], - "machine_max_jerk_x": [ - "8", - "8" - ], - "machine_max_jerk_y": [ - "8", - "8" - ], - "machine_max_jerk_z": [ - "2", - "2" - ], - "retraction_length": "0.7", - "retraction_speed": "35", - "detraction_speed": "25", - "retraction_minimum_travel": "1.5", - "retract_when_changing_layer": "1", - "wipe": "1", - "retract_before_wipe": "0%", - "retract_lift_below": "1.5", - "z_hop_types": "Auto Lift", - "host_type": "prusalink", - "printable_height": "360", - "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", - "machine_pause_gcode": "M601", - "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", - "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", - "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", - "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", - "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_XLIS\nPG\nINPUT_SHAPER", - "scan_first_layer": "0", - "nozzle_type": "hardened_steel", - "auxiliary_fan": "0", - "thumbnails": [ - "16x16/QOI", - "313x173/QOI", - "440x240/QOI", - "480x240/QOI", - "640x480/PNG" - ] -} + "type": "machine", + "setting_id": "GM003", + "name": "Prusa XL 0.6 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL", + "default_filament_profile": "Prusa Generic PLA @XL", + "default_print_profile": "0.32mm Speed @Prusa XL 0.6", + "printer_variant": "0.6", + "nozzle_diameter": [ + "0.6" + ], + "max_layer_height": "0.4", + "min_layer_height": "0.15", + "retraction_length": "0.7" +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 0.8 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 0.8 nozzle.json index 85c1631bcb..b0a2468a68 100644 --- a/resources/profiles/Prusa/machine/Prusa XL 0.8 nozzle.json +++ b/resources/profiles/Prusa/machine/Prusa XL 0.8 nozzle.json @@ -4,115 +4,18 @@ "name": "Prusa XL 0.8 nozzle", "from": "system", "instantiation": "true", - "inherits": "fdm_machine_common", + "inherits": "fdm_machine_common_xl", "gcode_flavor": "marlin2", "printer_model": "Prusa XL", "default_filament_profile": "Prusa Generic PLA @XL", "default_print_profile": "0.40mm Quality @Prusa XL 0.8", - "extruder_clearance_radius": "67", - "extruder_clearance_height_to_rod": "21", - "extruder_clearance_height_to_lid": "21", "printer_variant": "0.8", "nozzle_diameter": [ "0.8" ], "max_layer_height": "0.6", "min_layer_height": "0.2", - "bed_exclude_area": [ - "0x0" - ], - "printable_area": [ - "0x0", - "360x0", - "360x360", - "0x360" - ], - "machine_max_acceleration_e": [ - "2500", - "2500" - ], - "machine_max_acceleration_extruding": [ - "4000", - "4000" - ], - "machine_max_acceleration_retracting": [ - "1200", - "1200" - ], - "machine_max_acceleration_x": [ - "7000", - "7000" - ], - "machine_max_acceleration_y": [ - "7000", - "7000" - ], - "machine_max_acceleration_z": [ - "200", - "200" - ], - "machine_max_acceleration_travel": [ - "5000", - "5000" - ], - "machine_max_speed_e": [ - "100", - "100" - ], - "machine_max_speed_x": [ - "400", - "400" - ], - "machine_max_speed_y": [ - "400", - "400" - ], - "machine_max_speed_z": [ - "12", - "12" - ], - "machine_max_jerk_e": [ - "10", - "10" - ], - "machine_max_jerk_x": [ - "8", - "8" - ], - "machine_max_jerk_y": [ - "8", - "8" - ], - "machine_max_jerk_z": [ - "2", - "2" - ], "retraction_length": "0.6", "retraction_speed": "25", - "detraction_speed": "15", - "retraction_minimum_travel": "1.5", - "retract_when_changing_layer": "1", - "wipe": "1", - "retract_before_wipe": "50%", - "retract_lift_below": "1.5", - "z_hop_types": "Auto Lift", - "host_type": "prusalink", - "printable_height": "360", - "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", - "machine_pause_gcode": "M601", - "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", - "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", - "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", - "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", - "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_XLIS\nPG\nINPUT_SHAPER", - "scan_first_layer": "0", - "nozzle_type": "hardened_steel", - "auxiliary_fan": "0", - "thumbnails": [ - "16x16/QOI", - "313x173/QOI", - "440x240/QOI", - "480x240/QOI", - "640x480/PNG" - ] + "detraction_speed": "15" } diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T 0.25 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 5T 0.25 nozzle.json new file mode 100644 index 0000000000..2fc6b341b5 --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T 0.25 nozzle.json @@ -0,0 +1,20 @@ +{ + "type": "machine", + "setting_id": "GM_PRUSA_007", + "name": "Prusa XL 5T 0.25 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl_5t", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL 5T", + "default_filament_profile": "Prusa Generic PLA @XL 5T", + "default_print_profile": "0.15mm Speed @Prusa XL 5T 0.25", + "printer_variant": "0.25", + "nozzle_diameter": [ + "0.25", + "0.25", + "0.25", + "0.25", + "0.25" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T 0.3 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 5T 0.3 nozzle.json new file mode 100644 index 0000000000..a495d26349 --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T 0.3 nozzle.json @@ -0,0 +1,20 @@ +{ + "type": "machine", + "setting_id": "GM_PRUSA_001", + "name": "Prusa XL 5T 0.3 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl_5t", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL 5T", + "default_filament_profile": "Prusa Generic PLA @XL 5T", + "default_print_profile": "0.20mm Speed @Prusa XL 5T 0.3", + "printer_variant": "0.3", + "nozzle_diameter": [ + "0.3", + "0.3", + "0.3", + "0.3", + "0.3" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T 0.4 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 5T 0.4 nozzle.json new file mode 100644 index 0000000000..4dbd7d9b22 --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T 0.4 nozzle.json @@ -0,0 +1,20 @@ +{ + "type": "machine", + "setting_id": "GM_PRUSA_002", + "name": "Prusa XL 5T 0.4 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl_5t", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL 5T", + "default_filament_profile": "Prusa Generic PLA @XL 5T", + "default_print_profile": "0.20mm Speed @Prusa XL 5T 0.4", + "printer_variant": "0.4", + "nozzle_diameter": [ + "0.4", + "0.4", + "0.4", + "0.4", + "0.4" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T 0.5 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 5T 0.5 nozzle.json new file mode 100644 index 0000000000..69e355ea2f --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T 0.5 nozzle.json @@ -0,0 +1,20 @@ +{ + "type": "machine", + "setting_id": "GM_PRUSA_004", + "name": "Prusa XL 5T 0.5 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl_5t", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL 5T", + "default_filament_profile": "Prusa Generic PLA @XL 5T", + "default_print_profile": "0.25mm Speed @Prusa XL 5T 0.5", + "printer_variant": "0.5", + "nozzle_diameter": [ + "0.5", + "0.5", + "0.5", + "0.5", + "0.5" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T 0.6 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 5T 0.6 nozzle.json new file mode 100644 index 0000000000..03ef5d97ff --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T 0.6 nozzle.json @@ -0,0 +1,20 @@ +{ + "type": "machine", + "setting_id": "GM_PRUSA_005", + "name": "Prusa XL 5T 0.6 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl_5t", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL 5T", + "default_filament_profile": "Prusa Generic PLA @XL 5T", + "default_print_profile": "0.32mm Speed @Prusa XL 5T 0.6", + "printer_variant": "0.6", + "nozzle_diameter": [ + "0.6", + "0.6", + "0.6", + "0.6", + "0.6" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T 0.8 nozzle.json b/resources/profiles/Prusa/machine/Prusa XL 5T 0.8 nozzle.json new file mode 100644 index 0000000000..27656c4072 --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T 0.8 nozzle.json @@ -0,0 +1,20 @@ +{ + "type": "machine", + "setting_id": "GM_PRUSA_006", + "name": "Prusa XL 5T 0.8 nozzle", + "from": "system", + "instantiation": "true", + "inherits": "fdm_machine_common_xl_5t", + "gcode_flavor": "marlin2", + "printer_model": "Prusa XL 5T", + "default_filament_profile": "Prusa Generic PLA @XL 5T", + "default_print_profile": "0.40mm Quality @Prusa XL 5T 0.8", + "printer_variant": "0.8", + "nozzle_diameter": [ + "0.8", + "0.8", + "0.8", + "0.8", + "0.8" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/Prusa XL 5T.json b/resources/profiles/Prusa/machine/Prusa XL 5T.json new file mode 100644 index 0000000000..81486d711a --- /dev/null +++ b/resources/profiles/Prusa/machine/Prusa XL 5T.json @@ -0,0 +1,12 @@ +{ + "type": "machine_model", + "name": "Prusa XL 5T", + "model_id": "prusa_xl_5t_01", + "nozzle_diameter": "0.25;0.3;0.4;0.5;0.6;0.8", + "machine_tech": "FFF", + "family": "Prusa", + "bed_model": "Prusa XL_bed.stl", + "bed_texture": "Prusa XL.svg", + "hotend_model": "", + "default_materials": "Prusa Generic PLA @XL 5T;Prusament PLA @XL 5T;Prusament rPLA @XL 5T;Prusa Generic PETG @XL 5T;Prusament PETG @XL 5T;Prusa Generic ABS @XL 5T;Prusament ASA @XL 5T;Prusament PC Blend @XL 5T;Prusament PC-CF @XL 5T;Prusament PVB @XL 5T;Prusament PA-CF @XL 5T" +} diff --git a/resources/profiles/Prusa/machine/fdm_machine_common_xl.json b/resources/profiles/Prusa/machine/fdm_machine_common_xl.json new file mode 100644 index 0000000000..7c917d151a --- /dev/null +++ b/resources/profiles/Prusa/machine/fdm_machine_common_xl.json @@ -0,0 +1,114 @@ +{ + "type": "machine", + "name": "fdm_machine_common_xl", + "from": "system", + "inherits": "fdm_machine_common", + "instantiation": "false", + "gcode_flavor": "marlin2", + "extruder_clearance_radius": "67", + "extruder_clearance_height_to_rod": "21", + "extruder_clearance_height_to_lid": "21", + "printer_variant": "0.4", + "nozzle_diameter": [ + "0.4" + ], + "max_layer_height": "0.3", + "min_layer_height": "0.07", + "bed_exclude_area": [ + "0x0" + ], + "printable_area": [ + "0x0", + "360x0", + "360x360", + "0x360" + ], + "machine_max_acceleration_e": [ + "2500", + "2500" + ], + "machine_max_acceleration_extruding": [ + "4000", + "4000" + ], + "machine_max_acceleration_retracting": [ + "1200", + "1200" + ], + "machine_max_acceleration_x": [ + "7000", + "7000" + ], + "machine_max_acceleration_y": [ + "7000", + "7000" + ], + "machine_max_acceleration_z": [ + "200", + "200" + ], + "machine_max_acceleration_travel": [ + "5000", + "5000" + ], + "machine_max_speed_e": [ + "100", + "100" + ], + "machine_max_speed_x": [ + "400", + "400" + ], + "machine_max_speed_y": [ + "400", + "400" + ], + "machine_max_speed_z": [ + "12", + "12" + ], + "machine_max_jerk_e": [ + "10", + "10" + ], + "machine_max_jerk_x": [ + "8", + "8" + ], + "machine_max_jerk_y": [ + "8", + "8" + ], + "machine_max_jerk_z": [ + "2", + "2" + ], + "retraction_length": "0.8", + "retraction_speed": "35", + "detraction_speed": "25", + "retraction_minimum_travel": "1.5", + "retract_when_changing_layer": "1", + "wipe": "1", + "retract_before_wipe": "80%", + "retract_lift_below": "1.5", + "z_hop_types": "Auto Lift", + "host_type": "prusalink", + "printable_height": "360", + "machine_end_gcode": "{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+2, max_print_height)} F720{endif} ; Move bed down\nM104 S0 ; turn off temperature\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nG1 X6 Y350 F6000 ; park\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+100, max_print_height)} F300{endif} ; Move bed down\nM900 K0 ; reset LA\nM142 S36 ; reset heatbreak target temp\nM221 S100 ; reset flow percentage\nM84 ; disable motors\n; max_layer_z = [max_layer_z]", + "machine_pause_gcode": "M601", + "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM115 U6.0.1+14848\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\nM862.1 P[nozzle_diameter]\n; set & wait for bed and extruder temp for MBL\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; home carriage, pick tool, home all\nG28 XY\nM84 E ; turn off E motor\nG28 Z\nM190 S[first_layer_bed_temperature] ; wait for bed temp\nG29 G ; absorb heat\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F4800\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z10 F480 ; move away in Z\n{if first_layer_bed_temperature[0] > 60}\nG0 Z70 F480 ; move away (a bit more) in Z\nG0 X30 Y{print_bed_min[1]} F6000 ; move away in X/Y for higher bed temperatures\n{endif}\nM106 S100 ; cool off the nozzle\nM107 ; stop cooling off the nozzle - turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 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\nM104 S[first_layer_temperature] ; set extruder temp\nG1 Z10 F720 ; move away in Z\nG0 X30 Y-8 F6000 ; move next to the sheet\n; wait for extruder temp\nM109 T0 S{first_layer_temperature[0]}\n;\n; purge\n;\nG92 E0 ; reset extruder position\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -8 : -5.5)} ; move close to the sheet's edge\nG1 E{(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; deretraction after the initial one before nozzle cleaning\nG0 E10 X40 Z0.2 F500 ; purge\nG0 X70 E9 F800 ; purge\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG92 E0 ; reset extruder position", + "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]", + "change_filament_gcode": "M600\nG1 E0.3 F1500 ; prime after color change", + "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", + "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_XLIS\nPG\nINPUT_SHAPER", + "scan_first_layer": "0", + "nozzle_type": "hardened_steel", + "auxiliary_fan": "0", + "thumbnails": [ + "16x16/QOI", + "313x173/QOI", + "440x240/QOI", + "480x240/QOI", + "640x480/PNG" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/machine/fdm_machine_common_xl_5t.json b/resources/profiles/Prusa/machine/fdm_machine_common_xl_5t.json new file mode 100644 index 0000000000..7bdc573b39 --- /dev/null +++ b/resources/profiles/Prusa/machine/fdm_machine_common_xl_5t.json @@ -0,0 +1,22 @@ +{ + "type": "machine", + "name": "fdm_machine_common_xl_5t", + "from": "system", + "inherits": "fdm_machine_common_xl", + "instantiation": "false", + "gcode_flavor": "marlin2", + "purge_in_prime_tower": "0", + "single_extruder_multi_material": "0", + "extruder_clearance_radius": "67", + "extruder_clearance_height_to_rod": "21", + "extruder_clearance_height_to_lid": "21", + "printer_variant": "0.4", + "machine_pause_gcode": "M601", + "machine_start_gcode": "M17 ; enable steppers\nM862.3 P \"XL\" ; printer model check\nM862.5 P2 ; g-code level check\nM862.6 P\"Input shaper\" ; FW feature check\nM115 U6.0.3+14902\nG90 ; use absolute coordinates\nM83 ; extruder relative mode\n; set print area\nM555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}\n; inform about nozzle diameter\n{if (is_extruder_used[0])}M862.1 T0 P{nozzle_diameter[0]}{endif}\n{if (is_extruder_used[1])}M862.1 T1 P{nozzle_diameter[1]}{endif}\n{if (is_extruder_used[2])}M862.1 T2 P{nozzle_diameter[2]}{endif}\n{if (is_extruder_used[3])}M862.1 T3 P{nozzle_diameter[3]}{endif}\n{if (is_extruder_used[4])}M862.1 T4 P{nozzle_diameter[4]}{endif}\n\n; turn off unused heaters\n{if ! is_extruder_used[0]} M104 T0 S0 {endif}\n{if ! is_extruder_used[1]} M104 T1 S0 {endif}\n{if num_extruders > 2 and ! is_extruder_used[2]} M104 T2 S0 {endif}\n{if num_extruders > 3 and ! is_extruder_used[3]} M104 T3 S0 {endif}\n{if num_extruders > 4 and ! is_extruder_used[4]} M104 T4 S0 {endif}\n\nM217 Z{max(zhop, 2.0)} ; set toolchange z hop to 2mm, or zhop variable from slicer if higher\n; set bed and extruder temp for MBL\nM140 S[first_layer_bed_temperature] ; set bed temp\nG0 Z5 ; add Z clearance\nM109 T{initial_tool} S{((filament_notes[initial_tool]=~/.*HT_MBL10.*/) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == \"PC\" or filament_type[initial_tool] == \"PA\") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == \"FLEX\") ? 210 : (filament_type[initial_tool]=~/.*PET.*/) ? 175 : 170)} ; wait for temp\n\n; Home XY\nG28 XY\n; try picking tools used in print\nG1 F{travel_speed * 60}\n{if (is_extruder_used[0]) and (initial_tool != 0)}T0 S1 L0 D0{endif}\n{if (is_extruder_used[1]) and (initial_tool != 1)}T1 S1 L0 D0{endif}\n{if (is_extruder_used[2]) and (initial_tool != 2)}T2 S1 L0 D0{endif}\n{if (is_extruder_used[3]) and (initial_tool != 3)}T3 S1 L0 D0{endif}\n{if (is_extruder_used[4]) and (initial_tool != 4)}T4 S1 L0 D0{endif}\n; select tool that will be used to home & MBL\nT{initial_tool} S1 L0 D0\n; home Z with MBL tool\nM84 E ; turn off E motor\nG28 Z\nG0 Z5 ; add Z clearance\n\nM104 T{initial_tool} S{if idle_temperature[initial_tool] == 0}70{else}{idle_temperature[initial_tool]}{endif} ; set idle temp\nM190 S[first_layer_bed_temperature] ; wait for bed temp\n\nG29 G ; absorb heat\n\nM109 T{initial_tool} S{((filament_notes[initial_tool]=~/.*HT_MBL10.*/) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == \"PC\" or filament_type[initial_tool] == \"PA\") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == \"FLEX\") ? 210 : (filament_type[initial_tool]=~/.*PET.*/) ? 175 : 170)} ; wait for temp\n\n; move to the nozzle cleanup area\nG1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F{(travel_speed * 60)}\nM302 S160 ; lower cold extrusion limit to 160C\nG1 E{-(filament_type[0] == \"FLEX\" ? 4 : 2)} F2400 ; retraction for nozzle cleanup\n; nozzle cleanup\nM84 E ; turn off E motor\nG29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}\nG0 Z5 F480 ; move away in Z\nM107 ; turn off the fan\n; MBL\nM84 E ; turn off E motor\nG29 P1 ; invalidate mbl & probe print area\nG29 P1 X30 Y0 W{(((is_extruder_used[4]) or ((is_extruder_used[3]) or (is_extruder_used[2]))) ? \"300\" : ((is_extruder_used[1]) ? \"130\" : \"50\"))} H20 C ; probe near purge place\nG29 P3.2 ; interpolate mbl probes\nG29 P3.13 ; extrapolate mbl outside probe area\nG29 A ; activate mbl\nG1 Z10 F720 ; move away in Z\nG1 F{travel_speed * 60}\nP0 S1 L1 D0; park the tool\n; set extruder temp\n{if first_layer_temperature[0] > 0 and (is_extruder_used[0])}M104 T0 S{first_layer_temperature[0]}{endif}\n{if first_layer_temperature[1] > 0 and (is_extruder_used[1])}M104 T1 S{first_layer_temperature[1]}{endif}\n{if first_layer_temperature[2] > 0 and (is_extruder_used[2])}M104 T2 S{first_layer_temperature[2]}{endif}\n{if first_layer_temperature[3] > 0 and (is_extruder_used[3])}M104 T3 S{first_layer_temperature[3]}{endif}\n{if first_layer_temperature[4] > 0 and (is_extruder_used[4])}M104 T4 S{first_layer_temperature[4]}{endif}\n{if (is_extruder_used[0]) and initial_tool != 0}\n;\n; purge first tool\n;\nG1 F{travel_speed * 60}\nP0 S1 L2 D0; park the tool\nM109 T0 S{first_layer_temperature[0]}\nT0 S1 L0 D0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[0]}10{else}30{endif} X40 Z0.2 F{if filament_multitool_ramming[0]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X70 E9 F800 ; continue purging and wipe the nozzle\nG0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[0]} F2400 ; retract\n{e_retracted[0] = 1.5 * retract_length[0]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[0] == 0 ? (first_layer_temperature[0] + standby_temperature_delta) : (idle_temperature[0]))} T0\n{endif}\n{if (is_extruder_used[1]) and initial_tool != 1}\n;\n; purge second tool\n;\nG1 F{travel_speed * 60}\nP0 S1 L2 D0; park the tool\nM109 T1 S{first_layer_temperature[1]}\nT1 S1 L0 D0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(1 == 0 ? 30 : (1 == 1 ? 150 : (1 == 2 ? 210 : 330)))} Y{(1 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[1]}10{else}30{endif} X140 Z0.2 F{if filament_multitool_ramming[1]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X110 E9 F800 ; continue purging and wipe the nozzle\nG0 X{110 - 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{110 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[1]} F2400 ; retract\n{e_retracted[1] = 1.5 * retract_length[1]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[1] == 0 ? (first_layer_temperature[1] + standby_temperature_delta) : (idle_temperature[1]))} T1\n{endif}\n{if (is_extruder_used[2]) and initial_tool != 2}\n;\n; purge third tool\n;\nG1 F{travel_speed * 60}\nP0 S1 L2 D0; park the tool\nM109 T2 S{first_layer_temperature[2]}\nT2 S1 L0 D0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(2 == 0 ? 30 : (2 == 1 ? 150 : (2 == 2 ? 210 : 330)))} Y{(2 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[2]}10{else}30{endif} X220 Z0.2 F{if filament_multitool_ramming[2]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X250 E9 F800 ; continue purging and wipe the nozzle\nG0 X{250 + 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{250 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[2]} F2400 ; retract\n{e_retracted[2] = 1.5 * retract_length[2]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[2] == 0 ? (first_layer_temperature[2] + standby_temperature_delta) : (idle_temperature[2]))} T2\n{endif}\n{if (is_extruder_used[3]) and initial_tool != 3}\n;\n; purge fourth tool\n;\nG1 F{travel_speed * 60}\nP0 S1 L2 D0; park the tool\nM109 T3 S{first_layer_temperature[3]}\nT3 S1 L0 D0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(3 == 0 ? 30 : (3 == 1 ? 150 : (3 == 2 ? 210 : 330)))} Y{(3 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[3]}10{else}30{endif} X320 Z0.2 F{if filament_multitool_ramming[3]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X290 E9 F800 ; continue purging and wipe the nozzle\nG0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[3]} F2400 ; retract\n{e_retracted[3] = 1.5 * retract_length[3]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[3] == 0 ? (first_layer_temperature[3] + standby_temperature_delta) : (idle_temperature[3]))} T3\n{endif}\n{if (is_extruder_used[4]) and initial_tool != 4}\n;\n; purge fifth tool\n;\nG1 F{travel_speed * 60}\nP0 S1 L2 D0; park the tool\nM109 T4 S{first_layer_temperature[4]}\nT4 S1 L0 D0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(4 == 0 ? 30 : (4 == 1 ? 150 : (4 == 2 ? 210 : 330)))} Y{(4 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[4]}10{else}30{endif} X320 Z0.2 F{if filament_multitool_ramming[4]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X290 E9 F800 ; continue purging and wipe the nozzle\nG0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[4]} F2400 ; retract\n{e_retracted[4] = 1.5 * retract_length[4]} ; update slicer internal retract variable\nG92 E0 ; reset extruder position\n\nM104 S{(idle_temperature[4] == 0 ? (first_layer_temperature[4] + standby_temperature_delta) : (idle_temperature[4]))} T4\n{endif}\n;\n; purge initial tool\n;\nG1 F{travel_speed * 60}\nP0 S1 L2 D0; park the tool\nM109 T{initial_tool} S{first_layer_temperature[initial_tool]}\nT{initial_tool} S1 L0 D0; pick the tool\nG92 E0 ; reset extruder position\n\nG0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330)))} Y{(initial_tool < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge\nG0 E{if filament_multitool_ramming[initial_tool]}10{else}30{endif} X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 10)} Z0.2 F{if filament_multitool_ramming[initial_tool]}500{else}170{endif} ; purge while moving towards the sheet\nG0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40)} E9 F800 ; continue purging and wipe the nozzle\nG0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3)} Z{0.05} F{8000} ; wipe, move close to the bed\nG0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3 * 2)} Z0.2 F{8000} ; wipe, move quickly away from the bed\nG1 E{- 1.5 * retract_length[initial_tool]} F2400 ; retract\n{e_retracted[initial_tool] = 1.5 * retract_length[initial_tool]}\nG92 E0 ; reset extruder position\n", + "machine_end_gcode": "G4 ; wait\n\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+5, max_print_height)}{endif} ; Move bed down\n\nP0 S1 ; park tool\n\n{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+97, max_print_height)} F300{endif} ; Move bed further down\n\n; turn off extruder heaters\n{if is_extruder_used[0]} M104 T0 S0 {endif}\n{if is_extruder_used[1]} M104 T1 S0 {endif}\n{if is_extruder_used[2]} M104 T2 S0 {endif}\n{if is_extruder_used[3]} M104 T3 S0 {endif}\n{if is_extruder_used[4]} M104 T4 S0 {endif}\n\nM140 S0 ; turn off heatbed\nM107 ; turn off fan\nM221 S100 ; reset flow percentage\nM84 ; disable motors\nM77 ; stop print timer\n; max_layer_z = [max_layer_z]", + "change_filament_gcode": "; Change Tool[previous_extruder] -> Tool[next_extruder] (layer [layer_num])\n{\nlocal max_speed_toolchange = 350.0;\nlocal wait_for_extruder_temp = true;\nposition[2] = position[2] + 2.0;\n\nlocal speed_toolchange = max_speed_toolchange;\nif travel_speed < max_speed_toolchange then\n speed_toolchange = travel_speed;\nendif\n\"G1 F\" + (speed_toolchange * 60) + \"\n\";\nif wait_for_extruder_temp and not((layer_num < 0) and (next_extruder == initial_tool)) then\n \"P0 S1 L2 D0\n\";\n \"; \" + layer_num + \"\n\";\n if layer_num == 0 then\n \"M109 S\" + first_layer_temperature[next_extruder] + \" T\" + next_extruder + \"\n\";\n else\n \"M109 S\" + temperature[next_extruder] + \" T\" + next_extruder + \"\n\";\n endif\nendif\n\"T\" + next_extruder + \" S1 L0 D0\n\";\n}", + + "before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\nG92 E0.0\n;[layer_z]\n", + "layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]", + "printer_notes": "Do not remove the keywords below.\nPRINTER_VENDOR_PRUSA3D\nPRINTER_MODEL_XLIS\nPG\nINPUT_SHAPER" +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.05mm Detail @Prusa XL 5T 0.25.json b/resources/profiles/Prusa/process/0.05mm Detail @Prusa XL 5T 0.25.json new file mode 100644 index 0000000000..3eac921d29 --- /dev/null +++ b/resources/profiles/Prusa/process/0.05mm Detail @Prusa XL 5T 0.25.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.05mm Detail @Prusa XL 5T 0.25", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.05", + "wall_loops": "3", + "top_shell_layers": "13", + "bottom_shell_layers": "10", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "95%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.1", + "support_top_z_distance": "0.1", + "support_bottom_z_distance": "0.1", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "150%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "65", + "small_perimeter_speed": "40", + "outer_wall_speed": "40", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "100", + "top_surface_speed": "60", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "25", + "gap_infill_speed": "40", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "1500", + "outer_wall_acceleration": "800", + "inner_wall_acceleration": "1200", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2000", + "sparse_infill_acceleration": "2500", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "4000", + "line_width": "0.27", + "initial_layer_line_width": "0.32", + "inner_wall_line_width": "0.25", + "outer_wall_line_width": "0.25", + "sparse_infill_line_width": "0.25", + "internal_solid_infill_line_width": "0.25", + "top_surface_line_width": "0.27", + "support_line_width": "0.25", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.07mm Detail @Prusa XL 5T 0.25.json b/resources/profiles/Prusa/process/0.07mm Detail @Prusa XL 5T 0.25.json new file mode 100644 index 0000000000..b30595bd93 --- /dev/null +++ b/resources/profiles/Prusa/process/0.07mm Detail @Prusa XL 5T 0.25.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.07mm Detail @Prusa XL 5T 0.25", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.07", + "wall_loops": "3", + "top_shell_layers": "11", + "bottom_shell_layers": "9", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "95%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.1", + "support_top_z_distance": "0.09", + "support_bottom_z_distance": "0.09", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "150%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "65", + "small_perimeter_speed": "40", + "outer_wall_speed": "40", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "140", + "top_surface_speed": "70", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "40", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "1500", + "outer_wall_acceleration": "800", + "inner_wall_acceleration": "1200", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2000", + "sparse_infill_acceleration": "2500", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "4000", + "line_width": "0.27", + "initial_layer_line_width": "0.32", + "inner_wall_line_width": "0.25", + "outer_wall_line_width": "0.25", + "sparse_infill_line_width": "0.25", + "internal_solid_infill_line_width": "0.25", + "top_surface_line_width": "0.27", + "support_line_width": "0.25", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.10mm FastDetail @Prusa XL 5T 0.4.json b/resources/profiles/Prusa/process/0.10mm FastDetail @Prusa XL 5T 0.4.json new file mode 100644 index 0000000000..e1149bb214 --- /dev/null +++ b/resources/profiles/Prusa/process/0.10mm FastDetail @Prusa XL 5T 0.4.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.10mm FastDetail @Prusa XL 5T 0.4", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.1", + "wall_loops": "3", + "top_shell_layers": "8", + "bottom_shell_layers": "7", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.15", + "support_top_z_distance": "0.17", + "support_bottom_z_distance": "0.17", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "140", + "small_perimeter_speed": "140", + "outer_wall_speed": "140", + "sparse_infill_speed": "140", + "internal_solid_infill_speed": "200", + "top_surface_speed": "100", + "support_speed": "120", + "support_interface_speed": "50", + "bridge_speed": "40", + "gap_infill_speed": "120", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2500", + "outer_wall_acceleration": "2000", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.45", + "initial_layer_line_width": "0.5", + "inner_wall_line_width": "0.45", + "outer_wall_line_width": "0.45", + "sparse_infill_line_width": "0.45", + "internal_solid_infill_line_width": "0.45", + "top_surface_line_width": "0.4", + "support_line_width": "0.36", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.4 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.10mm Structural @Prusa XL 5T 0.5.json b/resources/profiles/Prusa/process/0.10mm Structural @Prusa XL 5T 0.5.json new file mode 100644 index 0000000000..4c463eaa2e --- /dev/null +++ b/resources/profiles/Prusa/process/0.10mm Structural @Prusa XL 5T 0.5.json @@ -0,0 +1,68 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.10mm Structural @Prusa XL 5T 0.5", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.1", + "wall_loops": "2", + "top_shell_layers": "8", + "bottom_shell_layers": "7", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "infill_anchor_max": "15", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.22", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "70", + "small_perimeter_speed": "40", + "outer_wall_speed": "40", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "200", + "top_surface_speed": "70", + "support_speed": "75", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "40", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "3000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.55", + "initial_layer_line_width": "0.55", + "inner_wall_line_width": "0.5", + "outer_wall_line_width": "0.5", + "sparse_infill_line_width": "0.5", + "internal_solid_infill_line_width": "0.5", + "top_surface_line_width": "0.45", + "support_line_width": "0.4", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.5 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.12mm Speed @Prusa XL 5T 0.25.json b/resources/profiles/Prusa/process/0.12mm Speed @Prusa XL 5T 0.25.json new file mode 100644 index 0000000000..171c4eb15d --- /dev/null +++ b/resources/profiles/Prusa/process/0.12mm Speed @Prusa XL 5T 0.25.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.12mm Speed @Prusa XL 5T 0.25", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.12", + "wall_loops": "3", + "top_shell_layers": "9", + "bottom_shell_layers": "6", + "top_shell_thickness": "0.6", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "95%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.08", + "support_top_z_distance": "0.09", + "support_bottom_z_distance": "0.09", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "150%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "120", + "small_perimeter_speed": "120", + "outer_wall_speed": "120", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "140", + "top_surface_speed": "60", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "3000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "4000", + "line_width": "0.27", + "initial_layer_line_width": "0.32", + "inner_wall_line_width": "0.27", + "outer_wall_line_width": "0.27", + "sparse_infill_line_width": "0.27", + "internal_solid_infill_line_width": "0.27", + "top_surface_line_width": "0.27", + "support_line_width": "0.25", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.12mm Structural @Prusa XL 5T 0.25.json b/resources/profiles/Prusa/process/0.12mm Structural @Prusa XL 5T 0.25.json new file mode 100644 index 0000000000..d1cbccfcde --- /dev/null +++ b/resources/profiles/Prusa/process/0.12mm Structural @Prusa XL 5T 0.25.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.12mm Structural @Prusa XL 5T 0.25", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.12", + "wall_loops": "3", + "top_shell_layers": "9", + "bottom_shell_layers": "7", + "top_shell_thickness": "0.6", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "95%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.08", + "support_top_z_distance": "0.09", + "support_bottom_z_distance": "0.09", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "150%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "70", + "small_perimeter_speed": "40", + "outer_wall_speed": "40", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "140", + "top_surface_speed": "60", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1000", + "inner_wall_acceleration": "1500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "2500", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "4000", + "line_width": "0.27", + "initial_layer_line_width": "0.32", + "inner_wall_line_width": "0.27", + "outer_wall_line_width": "0.27", + "sparse_infill_line_width": "0.27", + "internal_solid_infill_line_width": "0.27", + "top_surface_line_width": "0.27", + "support_line_width": "0.25", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.12mm Structural @Prusa XL 5T 0.3.json b/resources/profiles/Prusa/process/0.12mm Structural @Prusa XL 5T 0.3.json new file mode 100644 index 0000000000..57ce297d8c --- /dev/null +++ b/resources/profiles/Prusa/process/0.12mm Structural @Prusa XL 5T 0.3.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.12mm Structural @Prusa XL 5T 0.3", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.12", + "wall_loops": "3", + "top_shell_layers": "7", + "bottom_shell_layers": "6", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "90%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.12", + "support_top_z_distance": "0.12", + "support_bottom_z_distance": "0.12", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "100%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "40", + "outer_wall_speed": "40", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "200", + "top_surface_speed": "40", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "1500", + "outer_wall_acceleration": "1200", + "inner_wall_acceleration": "1500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "3000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.34", + "initial_layer_line_width": "0.4", + "inner_wall_line_width": "0.34", + "outer_wall_line_width": "0.34", + "sparse_infill_line_width": "0.34", + "internal_solid_infill_line_width": "0.34", + "top_surface_line_width": "0.3", + "support_line_width": "0.3", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.3 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.15mm Speed @Prusa XL 5T 0.25.json b/resources/profiles/Prusa/process/0.15mm Speed @Prusa XL 5T 0.25.json new file mode 100644 index 0000000000..1f99efe994 --- /dev/null +++ b/resources/profiles/Prusa/process/0.15mm Speed @Prusa XL 5T 0.25.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Speed @Prusa XL 5T 0.25", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.15", + "wall_loops": "3", + "top_shell_layers": "6", + "bottom_shell_layers": "7", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "95%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.08", + "support_top_z_distance": "0.09", + "support_bottom_z_distance": "0.09", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "150%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "120", + "small_perimeter_speed": "120", + "outer_wall_speed": "120", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "140", + "top_surface_speed": "60", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "3000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "4000", + "line_width": "0.27", + "initial_layer_line_width": "0.32", + "inner_wall_line_width": "0.27", + "outer_wall_line_width": "0.27", + "sparse_infill_line_width": "0.27", + "internal_solid_infill_line_width": "0.27", + "top_surface_line_width": "0.27", + "support_line_width": "0.25", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.15mm Speed @Prusa XL 5T 0.4.json b/resources/profiles/Prusa/process/0.15mm Speed @Prusa XL 5T 0.4.json new file mode 100644 index 0000000000..b371e07e86 --- /dev/null +++ b/resources/profiles/Prusa/process/0.15mm Speed @Prusa XL 5T 0.4.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Speed @Prusa XL 5T 0.4", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.15", + "wall_loops": "2", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.15", + "support_top_z_distance": "0.17", + "support_bottom_z_distance": "0.17", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "170", + "small_perimeter_speed": "170", + "outer_wall_speed": "170", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "200", + "top_surface_speed": "100", + "support_speed": "120", + "support_interface_speed": "50", + "bridge_speed": "45", + "gap_infill_speed": "120", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "3500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.45", + "initial_layer_line_width": "0.5", + "inner_wall_line_width": "0.45", + "outer_wall_line_width": "0.45", + "sparse_infill_line_width": "0.45", + "internal_solid_infill_line_width": "0.45", + "top_surface_line_width": "0.42", + "support_line_width": "0.36", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.4 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.25.json b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.25.json new file mode 100644 index 0000000000..9b7cbf961d --- /dev/null +++ b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.25.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Structural @Prusa XL 5T 0.25", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.15", + "wall_loops": "3", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "95%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.08", + "support_top_z_distance": "0.09", + "support_bottom_z_distance": "0.09", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "150%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "70", + "small_perimeter_speed": "40", + "outer_wall_speed": "40", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "140", + "top_surface_speed": "60", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1000", + "inner_wall_acceleration": "1500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "3000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "4000", + "line_width": "0.27", + "initial_layer_line_width": "0.32", + "inner_wall_line_width": "0.27", + "outer_wall_line_width": "0.27", + "sparse_infill_line_width": "0.27", + "internal_solid_infill_line_width": "0.27", + "top_surface_line_width": "0.27", + "support_line_width": "0.25", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.25 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.4.json b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.4.json new file mode 100644 index 0000000000..69ad3b4487 --- /dev/null +++ b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.4.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Structural @Prusa XL 5T 0.4", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.15", + "wall_loops": "2", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.15", + "support_top_z_distance": "0.17", + "support_bottom_z_distance": "0.17", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "110", + "internal_solid_infill_speed": "140", + "top_surface_speed": "75", + "support_speed": "120", + "support_interface_speed": "50", + "bridge_speed": "45", + "gap_infill_speed": "65", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.45", + "initial_layer_line_width": "0.5", + "inner_wall_line_width": "0.45", + "outer_wall_line_width": "0.45", + "sparse_infill_line_width": "0.45", + "internal_solid_infill_line_width": "0.45", + "top_surface_line_width": "0.42", + "support_line_width": "0.36", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.4 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.5.json b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.5.json new file mode 100644 index 0000000000..fb209d319c --- /dev/null +++ b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.5.json @@ -0,0 +1,68 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Structural @Prusa XL 5T 0.5", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.15", + "wall_loops": "2", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "infill_anchor_max": "15", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.22", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "180", + "top_surface_speed": "70", + "support_speed": "75", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "3000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.55", + "initial_layer_line_width": "0.55", + "inner_wall_line_width": "0.55", + "outer_wall_line_width": "0.55", + "sparse_infill_line_width": "0.55", + "internal_solid_infill_line_width": "0.55", + "top_surface_line_width": "0.5", + "support_line_width": "0.4", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.5 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..24b3b29311 --- /dev/null +++ b/resources/profiles/Prusa/process/0.15mm Structural @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.15mm Structural @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.15", + "wall_loops": "2", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.22", + "support_bottom_z_distance": "0.22", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "105", + "internal_solid_infill_speed": "160", + "top_surface_speed": "70", + "support_speed": "110", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "75", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.6", + "outer_wall_line_width": "0.6", + "sparse_infill_line_width": "0.6", + "internal_solid_infill_line_width": "0.6", + "top_surface_line_width": "0.5", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.16mm Speed @Prusa XL 5T 0.3.json b/resources/profiles/Prusa/process/0.16mm Speed @Prusa XL 5T 0.3.json new file mode 100644 index 0000000000..e076cd44fa --- /dev/null +++ b/resources/profiles/Prusa/process/0.16mm Speed @Prusa XL 5T 0.3.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.16mm Speed @Prusa XL 5T 0.3", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.16", + "wall_loops": "3", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "90%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.12", + "support_top_z_distance": "0.12", + "support_bottom_z_distance": "0.12", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "100%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "140", + "small_perimeter_speed": "120", + "outer_wall_speed": "120", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "200", + "top_surface_speed": "50", + "support_speed": "100", + "support_interface_speed": "45%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.34", + "initial_layer_line_width": "0.4", + "inner_wall_line_width": "0.34", + "outer_wall_line_width": "0.34", + "sparse_infill_line_width": "0.34", + "internal_solid_infill_line_width": "0.34", + "top_surface_line_width": "0.3", + "support_line_width": "0.3", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.3 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.16mm Structural @Prusa XL 5T 0.3.json b/resources/profiles/Prusa/process/0.16mm Structural @Prusa XL 5T 0.3.json new file mode 100644 index 0000000000..c87fd0fbb6 --- /dev/null +++ b/resources/profiles/Prusa/process/0.16mm Structural @Prusa XL 5T 0.3.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.16mm Structural @Prusa XL 5T 0.3", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.16", + "wall_loops": "3", + "top_shell_layers": "6", + "bottom_shell_layers": "5", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "90%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.12", + "support_top_z_distance": "0.12", + "support_bottom_z_distance": "0.12", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "100%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "200", + "top_surface_speed": "50", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.34", + "initial_layer_line_width": "0.4", + "inner_wall_line_width": "0.34", + "outer_wall_line_width": "0.34", + "sparse_infill_line_width": "0.34", + "internal_solid_infill_line_width": "0.34", + "top_surface_line_width": "0.3", + "support_line_width": "0.3", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.3 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.3.json b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.3.json new file mode 100644 index 0000000000..429f8d2c07 --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.3.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Speed @Prusa XL 5T 0.3", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "3", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "1", + "brim_object_gap": "0", + "support_threshold_angle": "40", + "raft_first_layer_density": "90%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.12", + "support_top_z_distance": "0.12", + "support_bottom_z_distance": "0.12", + "support_base_pattern_spacing": "1", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "100%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "140", + "small_perimeter_speed": "120", + "outer_wall_speed": "120", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "200", + "top_surface_speed": "50", + "support_speed": "100", + "support_interface_speed": "45%", + "bridge_speed": "30", + "gap_infill_speed": "50", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.34", + "initial_layer_line_width": "0.4", + "inner_wall_line_width": "0.34", + "outer_wall_line_width": "0.34", + "sparse_infill_line_width": "0.34", + "internal_solid_infill_line_width": "0.34", + "top_surface_line_width": "0.3", + "support_line_width": "0.3", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0", + "compatible_printers": [ + "Prusa XL 5T 0.3 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.4.json b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.4.json new file mode 100644 index 0000000000..d6e23c2a08 --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.4.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Speed @Prusa XL 5T 0.4", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.15", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "170", + "small_perimeter_speed": "170", + "outer_wall_speed": "170", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "200", + "top_surface_speed": "100", + "support_speed": "110", + "support_interface_speed": "50%", + "bridge_speed": "50", + "gap_infill_speed": "120", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "4000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.45", + "initial_layer_line_width": "0.5", + "inner_wall_line_width": "0.45", + "outer_wall_line_width": "0.45", + "sparse_infill_line_width": "0.45", + "internal_solid_infill_line_width": "0.45", + "top_surface_line_width": "0.42", + "support_line_width": "0.36", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.4 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.5.json b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.5.json new file mode 100644 index 0000000000..01e10672ef --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.5.json @@ -0,0 +1,68 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Speed @Prusa XL 5T 0.5", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "infill_anchor_max": "15", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.22", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "140", + "small_perimeter_speed": "140", + "outer_wall_speed": "140", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "135", + "top_surface_speed": "70", + "support_speed": "120", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.55", + "initial_layer_line_width": "0.55", + "inner_wall_line_width": "0.55", + "outer_wall_line_width": "0.55", + "sparse_infill_line_width": "0.55", + "internal_solid_infill_line_width": "0.55", + "top_surface_line_width": "0.5", + "support_line_width": "0.4", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.5 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..e44f3cb46b --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Speed @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Speed @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.22", + "support_bottom_z_distance": "0.22", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "120", + "small_perimeter_speed": "120", + "outer_wall_speed": "120", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "110", + "top_surface_speed": "70", + "support_speed": "110", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "75", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "50", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.62", + "outer_wall_line_width": "0.62", + "sparse_infill_line_width": "0.62", + "internal_solid_infill_line_width": "0.62", + "top_surface_line_width": "0.5", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.4.json b/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.4.json new file mode 100644 index 0000000000..147386cef3 --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.4.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Structural @Prusa XL 5T 0.4", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.15", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "140", + "top_surface_speed": "75", + "support_speed": "120", + "support_interface_speed": "50", + "bridge_speed": "50", + "gap_infill_speed": "65", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.45", + "initial_layer_line_width": "0.5", + "inner_wall_line_width": "0.45", + "outer_wall_line_width": "0.45", + "sparse_infill_line_width": "0.45", + "internal_solid_infill_line_width": "0.45", + "top_surface_line_width": "0.42", + "support_line_width": "0.36", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.4 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.5.json b/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.5.json new file mode 100644 index 0000000000..f761f98424 --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.5.json @@ -0,0 +1,68 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Structural @Prusa XL 5T 0.5", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "infill_anchor_max": "15", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.22", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "120", + "top_surface_speed": "70", + "support_speed": "75", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.55", + "initial_layer_line_width": "0.55", + "inner_wall_line_width": "0.55", + "outer_wall_line_width": "0.55", + "sparse_infill_line_width": "0.55", + "internal_solid_infill_line_width": "0.55", + "top_surface_line_width": "0.5", + "support_line_width": "0.4", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.5 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..a9951b4632 --- /dev/null +++ b/resources/profiles/Prusa/process/0.20mm Structural @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.20mm Structural @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.2", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.22", + "support_bottom_z_distance": "0.22", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "110", + "top_surface_speed": "70", + "support_speed": "110", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "75", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.6", + "outer_wall_line_width": "0.6", + "sparse_infill_line_width": "0.6", + "internal_solid_infill_line_width": "0.6", + "top_surface_line_width": "0.5", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.25mm Speed @Prusa XL 5T 0.5.json b/resources/profiles/Prusa/process/0.25mm Speed @Prusa XL 5T 0.5.json new file mode 100644 index 0000000000..f55bd6d6d8 --- /dev/null +++ b/resources/profiles/Prusa/process/0.25mm Speed @Prusa XL 5T 0.5.json @@ -0,0 +1,68 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.25mm Speed @Prusa XL 5T 0.5", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.25", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "infill_anchor_max": "15", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.22", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "140", + "small_perimeter_speed": "140", + "outer_wall_speed": "140", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "110", + "top_surface_speed": "70", + "support_speed": "120", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.55", + "initial_layer_line_width": "0.55", + "inner_wall_line_width": "0.55", + "outer_wall_line_width": "0.55", + "sparse_infill_line_width": "0.55", + "internal_solid_infill_line_width": "0.55", + "top_surface_line_width": "0.5", + "support_line_width": "0.4", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.5 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.25mm Speed @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.25mm Speed @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..678d72f718 --- /dev/null +++ b/resources/profiles/Prusa/process/0.25mm Speed @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.25mm Speed @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.25", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "80", + "outer_wall_speed": "80", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "90", + "top_surface_speed": "60", + "support_speed": "80", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "50", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.68", + "outer_wall_line_width": "0.68", + "sparse_infill_line_width": "0.68", + "internal_solid_infill_line_width": "0.68", + "top_surface_line_width": "0.55", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.4.json b/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.4.json new file mode 100644 index 0000000000..a5d0d3eef0 --- /dev/null +++ b/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.4.json @@ -0,0 +1,67 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.25mm Structural @Prusa XL 5T 0.4", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.25", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.15", + "support_top_z_distance": "0.2", + "support_bottom_z_distance": "0.2", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.2", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "120", + "internal_solid_infill_speed": "140", + "top_surface_speed": "75", + "support_speed": "120", + "support_interface_speed": "50", + "bridge_speed": "50", + "gap_infill_speed": "65", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.45", + "initial_layer_line_width": "0.5", + "inner_wall_line_width": "0.45", + "outer_wall_line_width": "0.45", + "sparse_infill_line_width": "0.45", + "internal_solid_infill_line_width": "0.45", + "top_surface_line_width": "0.42", + "support_line_width": "0.36", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.4 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.5.json b/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.5.json new file mode 100644 index 0000000000..3d39489dd7 --- /dev/null +++ b/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.5.json @@ -0,0 +1,68 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.25mm Structural @Prusa XL 5T 0.5", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.25", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "0.7", + "bottom_shell_thickness": "0.5", + "sparse_infill_density": "15%", + "infill_anchor": "2", + "infill_anchor_max": "15", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.22", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "200", + "internal_solid_infill_speed": "110", + "top_surface_speed": "70", + "support_speed": "75", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "25", + "overhang_3_4_speed": "30", + "overhang_4_4_speed": "80%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "2500", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.55", + "initial_layer_line_width": "0.55", + "inner_wall_line_width": "0.55", + "outer_wall_line_width": "0.55", + "sparse_infill_line_width": "0.55", + "internal_solid_infill_line_width": "0.55", + "top_surface_line_width": "0.5", + "support_line_width": "0.4", + "infill_wall_overlap": "15%", + "resolution": "0.008", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.5 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..44e36b1d88 --- /dev/null +++ b/resources/profiles/Prusa/process/0.25mm Structural @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.25mm Structural @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.25", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "80", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "95", + "top_surface_speed": "70", + "support_speed": "80", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.68", + "outer_wall_line_width": "0.68", + "sparse_infill_line_width": "0.68", + "internal_solid_infill_line_width": "0.68", + "top_surface_line_width": "0.55", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.30mm Detail @Prusa XL 5T 0.8.json b/resources/profiles/Prusa/process/0.30mm Detail @Prusa XL 5T 0.8.json new file mode 100644 index 0000000000..70c48a8b27 --- /dev/null +++ b/resources/profiles/Prusa/process/0.30mm Detail @Prusa XL 5T 0.8.json @@ -0,0 +1,71 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.30mm Detail @Prusa XL 5T 0.8", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.3", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "1.2", + "bottom_shell_thickness": "0.8", + "thick_bridges": "1", + "seam_position": "nearest", + "sparse_infill_density": "15%", + "sparse_infill_pattern": "crosshatch", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.2", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.35", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "70", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "50", + "top_surface_speed": "35", + "support_speed": "65", + "support_interface_speed": "85%", + "bridge_speed": "22", + "gap_infill_speed": "40", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.9", + "initial_layer_line_width": "1", + "inner_wall_line_width": "0.9", + "outer_wall_line_width": "0.9", + "sparse_infill_line_width": "0.9", + "internal_solid_infill_line_width": "0.9", + "top_surface_line_width": "0.7", + "support_line_width": "0.65", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.32mm Speed @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.32mm Speed @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..bd6799243e --- /dev/null +++ b/resources/profiles/Prusa/process/0.32mm Speed @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.32mm Speed @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.32", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "70", + "small_perimeter_speed": "70", + "outer_wall_speed": "70", + "sparse_infill_speed": "100", + "internal_solid_infill_speed": "70", + "top_surface_speed": "60", + "support_speed": "70", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "65", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "50", + "default_acceleration": "2500", + "outer_wall_acceleration": "2500", + "inner_wall_acceleration": "3000", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.68", + "outer_wall_line_width": "0.68", + "sparse_infill_line_width": "0.68", + "internal_solid_infill_line_width": "0.68", + "top_surface_line_width": "0.55", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.32mm Structural @Prusa XL 5T 0.6.json b/resources/profiles/Prusa/process/0.32mm Structural @Prusa XL 5T 0.6.json new file mode 100644 index 0000000000..78980e2136 --- /dev/null +++ b/resources/profiles/Prusa/process/0.32mm Structural @Prusa XL 5T 0.6.json @@ -0,0 +1,69 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.32mm Structural @Prusa XL 5T 0.6", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.32", + "wall_loops": "2", + "top_shell_layers": "5", + "bottom_shell_layers": "4", + "top_shell_thickness": "0.9", + "bottom_shell_thickness": "0.6", + "sparse_infill_density": "20%", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.25", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.25", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_branch_diameter_double_wall": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "70", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "70", + "internal_solid_infill_speed": "70", + "top_surface_speed": "70", + "support_speed": "80", + "support_interface_speed": "75%", + "bridge_speed": "40", + "gap_infill_speed": "70", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "90%", + "default_acceleration": "2500", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2500", + "top_surface_acceleration": "1500", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1500", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.68", + "initial_layer_line_width": "0.68", + "inner_wall_line_width": "0.68", + "outer_wall_line_width": "0.68", + "sparse_infill_line_width": "0.68", + "internal_solid_infill_line_width": "0.68", + "top_surface_line_width": "0.55", + "support_line_width": "0.55", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.6 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.40mm Quality @Prusa XL 5T 0.8.json b/resources/profiles/Prusa/process/0.40mm Quality @Prusa XL 5T 0.8.json new file mode 100644 index 0000000000..7e407ebb9a --- /dev/null +++ b/resources/profiles/Prusa/process/0.40mm Quality @Prusa XL 5T 0.8.json @@ -0,0 +1,71 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.40mm Quality @Prusa XL 5T 0.8", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.4", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "1.2", + "bottom_shell_thickness": "0.8", + "thick_bridges": "1", + "seam_position": "nearest", + "sparse_infill_density": "15%", + "sparse_infill_pattern": "crosshatch", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.2", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.35", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "50", + "small_perimeter_speed": "45", + "outer_wall_speed": "45", + "sparse_infill_speed": "90", + "internal_solid_infill_speed": "45", + "top_surface_speed": "35", + "support_speed": "50", + "support_interface_speed": "85%", + "bridge_speed": "22", + "gap_infill_speed": "35", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.9", + "initial_layer_line_width": "1", + "inner_wall_line_width": "0.9", + "outer_wall_line_width": "0.9", + "sparse_infill_line_width": "0.9", + "internal_solid_infill_line_width": "0.9", + "top_surface_line_width": "0.75", + "support_line_width": "0.65", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/0.55mm Draft @Prusa XL 5T 0.8.json b/resources/profiles/Prusa/process/0.55mm Draft @Prusa XL 5T 0.8.json new file mode 100644 index 0000000000..0e51ca2592 --- /dev/null +++ b/resources/profiles/Prusa/process/0.55mm Draft @Prusa XL 5T 0.8.json @@ -0,0 +1,71 @@ +{ + "type": "process", + "setting_id": "GP004", + "name": "0.55mm Draft @Prusa XL 5T 0.8", + "from": "system", + "instantiation": "true", + "inherits": "process_common_xl_5t", + "inital_layer_height": "0.2", + "layer_height": "0.55", + "wall_loops": "2", + "top_shell_layers": "4", + "bottom_shell_layers": "3", + "top_shell_thickness": "1.2", + "bottom_shell_thickness": "0.8", + "thick_bridges": "1", + "seam_position": "nearest", + "sparse_infill_density": "15%", + "sparse_infill_pattern": "crosshatch", + "infill_anchor": "2.5", + "infill_anchor_max": "20", + "brim_object_gap": "0.1", + "support_threshold_angle": "40", + "raft_first_layer_density": "80%", + "raft_first_layer_expansion": "3.5", + "raft_contact_distance": "0.2", + "support_top_z_distance": "0.25", + "support_bottom_z_distance": "0.25", + "support_base_pattern_spacing": "2", + "support_interface_top_layers": "5", + "support_interface_spacing": "0.35", + "support_object_xy_distance": "80%", + "tree_support_bramch_diameter_angle": "5", + "tree_support_tip_diameter": "0.8", + "inner_wall_speed": "40", + "small_perimeter_speed": "35", + "outer_wall_speed": "35", + "sparse_infill_speed": "55", + "internal_solid_infill_speed": "35", + "top_surface_speed": "30", + "support_speed": "35", + "support_interface_speed": "85%", + "bridge_speed": "22", + "gap_infill_speed": "30", + "overhang_1_4_speed": "15", + "overhang_2_4_speed": "20", + "overhang_3_4_speed": "25", + "overhang_4_4_speed": "80%", + "default_acceleration": "2000", + "outer_wall_acceleration": "1500", + "inner_wall_acceleration": "2000", + "top_surface_acceleration": "1000", + "internal_solid_infill_acceleration": "3000", + "sparse_infill_acceleration": "4000", + "bridge_acceleration": "1000", + "initial_layer_acceleration": "500", + "travel_acceleration": "5000", + "line_width": "0.9", + "initial_layer_line_width": "1", + "inner_wall_line_width": "1", + "outer_wall_line_width": "1", + "sparse_infill_line_width": "0.9", + "internal_solid_infill_line_width": "0.9", + "top_surface_line_width": "0.75", + "support_line_width": "0.65", + "infill_wall_overlap": "15%", + "resolution": "0.0125", + "elefant_foot_compensation": "0.2", + "compatible_printers": [ + "Prusa XL 5T 0.8 nozzle" + ] +} \ No newline at end of file diff --git a/resources/profiles/Prusa/process/process_common_xl.json b/resources/profiles/Prusa/process/process_common_xl.json index f3f2a7e791..65622abadb 100644 --- a/resources/profiles/Prusa/process/process_common_xl.json +++ b/resources/profiles/Prusa/process/process_common_xl.json @@ -92,5 +92,7 @@ "min_bead_width": "85%", "min_feature_size": "25%", "filename_format": "{input_filename_base}_{layer_height}mm_{filament_type[initial_tool]}_{print_time}.gcode", - "gcode_label_objects": "1" + "gcode_label_objects": "1", + "exclude_object": "1" + } \ No newline at end of file diff --git a/resources/profiles/Prusa/process/process_common_xl_5t.json b/resources/profiles/Prusa/process/process_common_xl_5t.json new file mode 100644 index 0000000000..1fe313aabe --- /dev/null +++ b/resources/profiles/Prusa/process/process_common_xl_5t.json @@ -0,0 +1,16 @@ +{ + "type": "process", + "name": "process_common_xl_5t", + "from": "system", + "instantiation": "false", + "inherits": "process_common_xl", + "enable_prime_tower": "1", + "wipe_tower_cone_angle": "25", + "wipe_tower_extra_spacing": "150%", + "wipe_tower_rotation_angle": "90", + "single_extruder_multi_material_priming": "0", + "ooze_prevention": "1", + "standby_temperature_delta": "-40", + "preheat_time": "120", + "preheat_steps": "10" +} \ No newline at end of file diff --git a/src/libslic3r/Fill/FillCrossHatch.cpp b/src/libslic3r/Fill/FillCrossHatch.cpp index a6f05b65d5..7b9f96fa78 100644 --- a/src/libslic3r/Fill/FillCrossHatch.cpp +++ b/src/libslic3r/Fill/FillCrossHatch.cpp @@ -1,3 +1,4 @@ +#include "../ClipperUtils.hpp" #include "../ShortestPath.hpp" #include diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index ee49764808..2c901ab405 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -255,27 +255,23 @@ static std::vector get_path_of_change_filament(const Print& print) { std::string gcode; - // move to the nearest standby point - if (!this->standby_points.empty()) { - // get current position in print coordinates - Vec3d writer_pos = gcodegen.writer().get_position(); - Point pos = Point::new_scale(writer_pos(0), writer_pos(1)); - - // find standby point - Point standby_point; - pos.nearest_point(this->standby_points, &standby_point); - - /* We don't call gcodegen.travel_to() because we don't need retraction (it was already - triggered by the caller) nor reduce_crossing_wall and also because the coordinates - of the destination point must not be transformed by origin nor current extruder offset. */ - gcode += gcodegen.writer().travel_to_xy(unscale(standby_point), - "move to standby position"); - } - - if (gcodegen.config().standby_temperature_delta.value != 0) { - // we assume that heating is always slower than cooling, so no need to block - gcode += gcodegen.writer().set_temperature - (this->_get_temp(gcodegen) + gcodegen.config().standby_temperature_delta.value, false, gcodegen.writer().extruder()->id()); + unsigned int extruder_id = gcodegen.writer().extruder()->id(); + const auto& filament_idle_temp = gcodegen.config().idle_temperature; + if (filament_idle_temp.get_at(extruder_id) == 0) { + // There is no idle temperature defined in filament settings. + // Use the delta value from print config. + if (gcodegen.config().standby_temperature_delta.value != 0) { + // we assume that heating is always slower than cooling, so no need to block + gcode += gcodegen.writer().set_temperature + (this->_get_temp(gcodegen) + gcodegen.config().standby_temperature_delta.value, false, extruder_id); + gcode.pop_back(); + gcode += " ;cooldown\n"; // this is a marker for GCodeProcessor, so it can supress the commands when needed + } + } else { + // Use the value from filament settings. That one is absolute, not delta. + gcode += gcodegen.writer().set_temperature(filament_idle_temp.get_at(extruder_id), false, extruder_id); + gcode.pop_back(); + gcode += " ;cooldown\n"; // this is a marker for GCodeProcessor, so it can supress the commands when needed } return gcode; @@ -288,14 +284,16 @@ static std::vector get_path_of_change_filament(const Print& print) std::string(); } - int - OozePrevention::_get_temp(GCode& gcodegen) + int OozePrevention::_get_temp(const GCode &gcodegen) const { - return (gcodegen.layer() != NULL && gcodegen.layer()->id() == 0) + // First layer temperature should be used when on the first layer (obviously) and when + // "other layers" is set to zero (which means it should not be used). + return (gcodegen.layer() == nullptr || gcodegen.layer()->id() == 0 + || gcodegen.config().nozzle_temperature.get_at(gcodegen.writer().extruder()->id()) == 0) ? gcodegen.config().nozzle_temperature_initial_layer.get_at(gcodegen.writer().extruder()->id()) : gcodegen.config().nozzle_temperature.get_at(gcodegen.writer().extruder()->id()); } - + // Orca: // Function to calculate the excess retraction length that should be retracted either before or after wiping // in order for the wipe operation to respect the filament retraction speed @@ -766,8 +764,13 @@ static std::vector get_path_of_change_filament(const Print& print) if (is_ramming) gcodegen.m_wipe.reset_path(); // We don't want wiping on the ramming lines. toolchange_gcode_str = gcodegen.set_extruder(new_extruder_id, tcr.print_z); // TODO: toolchange_z vs print_z - if (gcodegen.config().enable_prime_tower) - deretraction_str = gcodegen.unretract(); + if (gcodegen.config().enable_prime_tower) { + deretraction_str += gcodegen.writer().travel_to_z(z, "restore layer Z"); + Vec3d position{gcodegen.writer().get_position()}; + position.z() = z; + gcodegen.writer().set_position(position); + deretraction_str += gcodegen.unretract(); + } } // Insert the toolchange and deretraction gcode into the generated gcode. @@ -1112,14 +1115,14 @@ void GCode::PlaceholderParserIntegration::init(const GCodeWriter &writer) const std::vector &extruders = writer.extruders(); if (! extruders.empty()) { this->num_extruders = extruders.back().id() + 1; - this->e_retracted.assign(num_extruders, 0); - this->e_restart_extra.assign(num_extruders, 0); + this->e_retracted.assign(MAXIMUM_EXTRUDER_NUMBER, 0); + this->e_restart_extra.assign(MAXIMUM_EXTRUDER_NUMBER, 0); this->opt_e_retracted = new ConfigOptionFloats(e_retracted); this->opt_e_restart_extra = new ConfigOptionFloats(e_restart_extra); this->output_config.set_key_value("e_retracted", this->opt_e_retracted); this->output_config.set_key_value("e_restart_extra", this->opt_e_restart_extra); if (! writer.config.use_relative_e_distances) { - e_position.assign(num_extruders, 0); + e_position.assign(MAXIMUM_EXTRUDER_NUMBER, 0); opt_e_position = new ConfigOptionFloats(e_position); this->output_config.set_key_value("e_position", opt_e_position); } @@ -1151,8 +1154,8 @@ void GCode::PlaceholderParserIntegration::update_from_gcodewriter(const GCodeWri if (this->num_extruders > 0) { const std::vector &extruders = writer.extruders(); assert(! extruders.empty() && num_extruders == extruders.back().id() + 1); - this->e_retracted.assign(num_extruders, 0); - this->e_restart_extra.assign(num_extruders, 0); + this->e_retracted.assign(MAXIMUM_EXTRUDER_NUMBER, 0); + this->e_restart_extra.assign(MAXIMUM_EXTRUDER_NUMBER, 0); this->opt_extruded_volume->values.assign(num_extruders, 0); this->opt_extruded_weight->values.assign(num_extruders, 0); double total_volume = 0.; @@ -1172,7 +1175,7 @@ void GCode::PlaceholderParserIntegration::update_from_gcodewriter(const GCodeWri opt_e_retracted->values = this->e_retracted; opt_e_restart_extra->values = this->e_restart_extra; if (! writer.config.use_relative_e_distances) { - this->e_position.assign(num_extruders, 0); + this->e_position.assign(MAXIMUM_EXTRUDER_NUMBER, 0); for (const Extruder &e : extruders) this->e_position[e.id()] = e.position(); this->opt_e_position->values = this->e_position; @@ -1186,11 +1189,11 @@ void GCode::PlaceholderParserIntegration::validate_output_vector_variables() if (this->opt_position->values.size() != 3) throw Slic3r::RuntimeError("\"position\" output variable must not be resized by the script."); if (this->num_extruders > 0) { - if (this->opt_e_position && this->opt_e_position->values.size() != this->num_extruders) + if (this->opt_e_position && this->opt_e_position->values.size() != MAXIMUM_EXTRUDER_NUMBER) throw Slic3r::RuntimeError("\"e_position\" output variable must not be resized by the script."); - if (this->opt_e_retracted->values.size() != this->num_extruders) + if (this->opt_e_retracted->values.size() != MAXIMUM_EXTRUDER_NUMBER) throw Slic3r::RuntimeError("\"e_retracted\" output variable must not be resized by the script."); - if (this->opt_e_restart_extra->values.size() != this->num_extruders) + if (this->opt_e_restart_extra->values.size() != MAXIMUM_EXTRUDER_NUMBER) throw Slic3r::RuntimeError("\"e_restart_extra\" output variable must not be resized by the script."); } } @@ -1534,6 +1537,7 @@ void GCode::do_export(Print* print, const char* path, GCodeProcessorResult* resu path_tmp += ".tmp"; m_processor.initialize(path_tmp); + m_processor.set_print(print); GCodeOutputStream file(boost::nowide::fopen(path_tmp.c_str(), "wb"), m_processor); if (! file.is_open()) { BOOST_LOG_TRIVIAL(error) << std::string("G-code export to ") + path + " failed.\nCannot open the file for writing.\n" << std::endl; @@ -1726,34 +1730,7 @@ namespace DoExport { static void init_ooze_prevention(const Print &print, OozePrevention &ooze_prevention) { - // Calculate wiping points if needed - if (print.config().ooze_prevention.value && ! print.config().single_extruder_multi_material) { - Points skirt_points; - for (const ExtrusionEntity *ee : print.skirt().entities) - for (const ExtrusionPath &path : dynamic_cast(ee)->paths) - append(skirt_points, path.polyline.points); - if (! skirt_points.empty()) { - Polygon outer_skirt = Slic3r::Geometry::convex_hull(skirt_points); - Polygons skirts; - for (unsigned int extruder_id : print.extruders()) { - const Vec2d &extruder_offset = print.config().extruder_offset.get_at(extruder_id); - Polygon s(outer_skirt); - s.translate(Point::new_scale(-extruder_offset(0), -extruder_offset(1))); - skirts.emplace_back(std::move(s)); - } - ooze_prevention.enable = true; - ooze_prevention.standby_points = offset(Slic3r::Geometry::convex_hull(skirts), float(scale_(3.))).front().equally_spaced_points(float(scale_(10.))); - #if 0 - require "Slic3r/SVG.pm"; - Slic3r::SVG::output( - "ooze_prevention.svg", - red_polygons => \@skirts, - polygons => [$outer_skirt], - points => $gcodegen->ooze_prevention->standby_points, - ); - #endif - } - } + ooze_prevention.enable = print.config().ooze_prevention.value && ! print.config().single_extruder_multi_material; } // Fill in print_statistics and return formatted string containing filament statistics to be inserted into G-code comment section. @@ -2175,16 +2152,13 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato // No object to print was found, cancel the G-code export. throw Slic3r::SlicingError(_(L("No object can be printed. Maybe too small"))); has_wipe_tower = print.has_wipe_tower() && tool_ordering.has_wipe_tower(); - // BBS: priming logic is removed, so 1st layer tool_ordering also respect the object tool sequence -#if 0 - initial_extruder_id = (has_wipe_tower && !print.config().single_extruder_multi_material_priming) ? + // Orca: support all extruder priming + initial_extruder_id = (!is_bbl_printers && has_wipe_tower && !print.config().single_extruder_multi_material_priming) ? // The priming towers will be skipped. tool_ordering.all_extruders().back() : // Don't skip the priming towers. tool_ordering.first_extruder(); -#else - initial_extruder_id = tool_ordering.first_extruder(); -#endif + //BBS: try to find the non-support filament extruder if is multi color and initial_extruder is support filament if (initial_extruder_id != static_cast(-1)) { initial_non_support_extruder_id = initial_extruder_id; @@ -2256,9 +2230,11 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato this->placeholder_parser().set("initial_no_support_tool", initial_non_support_extruder_id); this->placeholder_parser().set("initial_no_support_extruder", initial_non_support_extruder_id); this->placeholder_parser().set("current_extruder", initial_extruder_id); - //set the key for compatibilty + //Orca: set the key for compatibilty this->placeholder_parser().set("retraction_distance_when_cut", m_config.retraction_distances_when_cut.get_at(initial_extruder_id)); this->placeholder_parser().set("long_retraction_when_cut", m_config.long_retractions_when_cut.get_at(initial_extruder_id)); + this->placeholder_parser().set("temperature", new ConfigOptionInts(print.config().nozzle_temperature)); + this->placeholder_parser().set("retraction_distances_when_cut", new ConfigOptionFloats(m_config.retraction_distances_when_cut)); this->placeholder_parser().set("long_retractions_when_cut",new ConfigOptionBools(m_config.long_retractions_when_cut)); @@ -2268,8 +2244,10 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato this->placeholder_parser().set("current_object_idx", 0); // For the start / end G-code to do the priming and final filament pull in case there is no wipe tower provided. this->placeholder_parser().set("has_wipe_tower", has_wipe_tower); - //this->placeholder_parser().set("has_single_extruder_multi_material_priming", has_wipe_tower && print.config().single_extruder_multi_material_priming); + this->placeholder_parser().set("has_single_extruder_multi_material_priming", !is_bbl_printers && has_wipe_tower && print.config().single_extruder_multi_material_priming); this->placeholder_parser().set("total_toolchanges", std::max(0, print.wipe_tower_data().number_of_toolchanges)); // Check for negative toolchanges (single extruder mode) and set to 0 (no tool change). + this->placeholder_parser().set("num_extruders", int(print.config().nozzle_diameter.values.size())); + this->placeholder_parser().set("retract_length", new ConfigOptionFloats(print.config().retraction_length)); // PlaceholderParser currently substitues non-existent vector values with the zero'th value, which is harmful in the // case of "is_extruder_used[]" as Slicer may lie about availability of such non-existent extruder. We rather @@ -2507,8 +2485,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato } } - // BBS: priming logic is removed, always set first extruer here. - //if (! (has_wipe_tower && print.config().single_extruder_multi_material_priming)) + // Orca: support extruder priming + if (is_bbl_printers || ! (has_wipe_tower && print.config().single_extruder_multi_material_priming)) { // Set initial extruder only after custom start G-code. // Ugly hack: Do not set the initial extruder if the extruder is primed using the MMU priming towers at the edge of the print bed. @@ -2637,8 +2615,8 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato m_wipe_tower.reset(new WipeTowerIntegration(print.config(), print.get_plate_index(), print.get_plate_origin(), * print.wipe_tower_data().priming.get(), print.wipe_tower_data().tool_changes, *print.wipe_tower_data().final_purge.get())); //BBS file.write(m_writer.travel_to_z(initial_layer_print_height + m_config.z_offset.value, "Move to the first layer height")); - #if 0 - if (print.config().single_extruder_multi_material_priming) { + + if (!is_bbl_printers && print.config().single_extruder_multi_material_priming) { file.write(m_wipe_tower->prime(*this)); // Verify, whether the print overaps the priming extrusions. BoundingBoxf bbox_print(get_print_extrusions_extents(print)); @@ -2662,19 +2640,17 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato file.write("M1 S10\n"); } } - //BBS: only support Marlin - //else { + else { // This is not Marlin, M1 command is probably not supported. - //if (overlap) { - // print.active_step_add_warning(PrintStateBase::WarningLevel::CRITICAL, - // _(L("Your print is very close to the priming regions. " - // "Make sure there is no collision."))); - //} else { - // // Just continue printing, no action necessary. - //} - //} + if (overlap) { + print.active_step_add_warning(PrintStateBase::WarningLevel::CRITICAL, + _(L("Your print is very close to the priming regions. " + "Make sure there is no collision."))); + } else { + // Just continue printing, no action necessary. + } + } } - #endif print.throw_if_canceled(); } // Process all layers of all objects (non-sequential mode) with a parallel pipeline: @@ -3269,8 +3245,12 @@ void GCode::_print_first_layer_extruder_temperatures(GCodeOutputStream &file, Pr // Set temperatures of all the printing extruders. for (unsigned int tool_id : print.extruders()) { int temp = print.config().nozzle_temperature_initial_layer.get_at(tool_id); - if (print.config().ooze_prevention.value) - temp += print.config().standby_temperature_delta.value; + if (print.config().ooze_prevention.value) { + if (print.config().idle_temperature.get_at(tool_id) == 0) + temp += print.config().standby_temperature_delta.value; + else + temp = print.config().idle_temperature.get_at(tool_id); + } if (temp > 0) file.write(m_writer.set_temperature(temp, wait, tool_id)); } @@ -3780,7 +3760,8 @@ LayerResult GCode::process_layer( // Transition from 1st to 2nd layer. Adjust nozzle temperatures as prescribed by the nozzle dependent // nozzle_temperature_initial_layer vs. temperature settings. for (const Extruder &extruder : m_writer.extruders()) { - if (print.config().single_extruder_multi_material.value && extruder.id() != m_writer.extruder()->id()) + if ((print.config().single_extruder_multi_material.value || m_ooze_prevention.enable) && + extruder.id() != m_writer.extruder()->id()) // In single extruder multi material mode, set the temperature for the current extruder only. continue; int temperature = print.config().nozzle_temperature.get_at(extruder.id()); @@ -6243,15 +6224,22 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b // if we are running a single-extruder setup, just set the extruder and return nothing if (!m_writer.multiple_extruders) { this->placeholder_parser().set("current_extruder", extruder_id); - this->placeholder_parser().set("retraction_distance_when_cut", m_config.retraction_distances_when_cut.get_at(extruder_id)); - this->placeholder_parser().set("long_retraction_when_cut", m_config.long_retractions_when_cut.get_at(extruder_id)); std::string gcode; // Append the filament start G-code. const std::string &filament_start_gcode = m_config.filament_start_gcode.get_at(extruder_id); if (! filament_start_gcode.empty()) { // Process the filament_start_gcode for the filament. - gcode += this->placeholder_parser_process("filament_start_gcode", filament_start_gcode, extruder_id); + DynamicConfig config; + config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index)); + config.set_key_value("layer_z", new ConfigOptionFloat(this->writer().get_position().z() - m_config.z_offset.value)); + config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z)); + config.set_key_value("filament_extruder_id", new ConfigOptionInt(int(extruder_id))); + config.set_key_value("retraction_distance_when_cut", + new ConfigOptionFloat(m_config.retraction_distances_when_cut.get_at(extruder_id))); + config.set_key_value("long_retraction_when_cut", new ConfigOptionBool(m_config.long_retractions_when_cut.get_at(extruder_id))); + + gcode += this->placeholder_parser_process("filament_start_gcode", filament_start_gcode, extruder_id, &config); check_add_eol(gcode); } if (m_config.enable_pressure_advance.get_at(extruder_id)) { @@ -6284,7 +6272,12 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b unsigned int old_extruder_id = m_writer.extruder()->id(); const std::string &filament_end_gcode = m_config.filament_end_gcode.get_at(old_extruder_id); if (! filament_end_gcode.empty()) { - gcode += placeholder_parser_process("filament_end_gcode", filament_end_gcode, old_extruder_id); + DynamicConfig config; + config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index)); + config.set_key_value("layer_z", new ConfigOptionFloat(m_writer.get_position().z() - m_config.z_offset.value)); + config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z)); + config.set_key_value("filament_extruder_id", new ConfigOptionInt(int(old_extruder_id))); + gcode += placeholder_parser_process("filament_end_gcode", filament_end_gcode, old_extruder_id, &config); check_add_eol(gcode); } } @@ -6396,6 +6389,8 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b std::string toolchange_gcode_parsed; //Orca: Ignore change_filament_gcode if is the first call for a tool change and manual_filament_change is enabled if (!change_filament_gcode.empty() && !(m_config.manual_filament_change.value && m_toolchange_count == 1)) { + dyn_config.set_key_value("toolchange_z", new ConfigOptionFloat(print_z)); + toolchange_gcode_parsed = placeholder_parser_process("change_filament_gcode", change_filament_gcode, extruder_id, &dyn_config); check_add_eol(toolchange_gcode_parsed); gcode += toolchange_gcode_parsed; @@ -6446,7 +6441,12 @@ std::string GCode::set_extruder(unsigned int extruder_id, double print_z, bool b const std::string &filament_start_gcode = m_config.filament_start_gcode.get_at(extruder_id); if (! filament_start_gcode.empty()) { // Process the filament_start_gcode for the new filament. - gcode += this->placeholder_parser_process("filament_start_gcode", filament_start_gcode, extruder_id); + DynamicConfig config; + config.set_key_value("layer_num", new ConfigOptionInt(m_layer_index)); + config.set_key_value("layer_z", new ConfigOptionFloat(this->writer().get_position().z() - m_config.z_offset.value)); + config.set_key_value("max_layer_z", new ConfigOptionFloat(m_max_layer_z)); + config.set_key_value("filament_extruder_id", new ConfigOptionInt(int(extruder_id))); + gcode += this->placeholder_parser_process("filament_start_gcode", filament_start_gcode, extruder_id, &config); check_add_eol(gcode); } // Set the new extruder to the operating temperature. @@ -6534,10 +6534,12 @@ Vec2d GCode::point_to_gcode(const Point &point) const // convert a model-space scaled point into G-code coordinates Point GCode::gcode_to_point(const Vec2d &point) const { - Vec2d extruder_offset = EXTRUDER_CONFIG(extruder_offset); - return Point( - scale_(point(0) - m_origin(0) + extruder_offset(0)), - scale_(point(1) - m_origin(1) + extruder_offset(1))); + Vec2d pt = point - m_origin; + if (const Extruder *extruder = m_writer.extruder(); extruder) + // This function may be called at the very start from toolchange G-code when the extruder is not assigned yet. + pt += m_config.extruder_offset.get_at(extruder->id()); + return scaled(pt); + } Vec2d GCode::point_to_gcode_quantized(const Point& point) const diff --git a/src/libslic3r/GCode.hpp b/src/libslic3r/GCode.hpp index 141ad2f366..256853c48c 100644 --- a/src/libslic3r/GCode.hpp +++ b/src/libslic3r/GCode.hpp @@ -45,14 +45,13 @@ class ConstPrintObjectPtrsAdaptor; class OozePrevention { public: bool enable; - Points standby_points; OozePrevention() : enable(false) {} std::string pre_toolchange(GCode &gcodegen); std::string post_toolchange(GCode &gcodegen); private: - int _get_temp(GCode &gcodegen); + int _get_temp(const GCode &gcodegen) const; }; class Wipe { diff --git a/src/libslic3r/GCode/GCodeProcessor.cpp b/src/libslic3r/GCode/GCodeProcessor.cpp index a70dbcbda0..c8d61bc488 100644 --- a/src/libslic3r/GCode/GCodeProcessor.cpp +++ b/src/libslic3r/GCode/GCodeProcessor.cpp @@ -1,4 +1,5 @@ #include "ExtrusionEntity.hpp" +#include "GCodeWriter.hpp" #include "PrintConfig.hpp" #include "libslic3r/libslic3r.h" #include "libslic3r/Utils.hpp" @@ -20,6 +21,7 @@ #include #include #include +#include #include #if __has_include() @@ -371,7 +373,7 @@ void GCodeProcessor::TimeMachine::calculate_time(size_t keep_last_n_blocks, floa //BBS if (block.flags.prepare_stage) prepare_time += block_time; - g1_times_cache.push_back({ block.g1_line_id, time }); + g1_times_cache.push_back({ block.g1_line_id, block.remaining_internal_g1_lines, time }); // update times for remaining time to printer stop placeholders auto it_stop_time = std::lower_bound(stop_times.begin(), stop_times.end(), block.g1_line_id, [](const StopTime& t, unsigned int value) { return t.g1_line_id < value; }); @@ -945,6 +947,7 @@ void GCodeProcessorResult::reset() { printable_height = 0.0f; settings_ids.reset(); extruders_count = 0; + backtrace_enabled = false; extruder_colors = std::vector(); filament_diameters = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_DIAMETER); required_nozzle_HRC = std::vector(MIN_EXTRUDERS_COUNT, DEFAULT_FILAMENT_HRC); @@ -1052,10 +1055,20 @@ void GCodeProcessor::apply_config(const PrintConfig& config) m_flavor = config.gcode_flavor; - // BBS + m_single_extruder_multi_material = config.single_extruder_multi_material; + size_t extruders_count = config.filament_diameter.values.size(); m_result.extruders_count = extruders_count; + // Orca: + m_is_XL_printer = is_XL_printer(config); + m_preheat_time = config.preheat_time; + m_preheat_steps = config.preheat_steps; + // sanity check + if(m_preheat_steps < 1) + m_preheat_steps = 1; + m_result.backtrace_enabled = m_preheat_time > 0 && (m_is_XL_printer || (!m_single_extruder_multi_material && extruders_count > 1)); + m_extruder_offsets.resize(extruders_count); m_extruder_colors.resize(extruders_count); m_result.filament_diameters.resize(extruders_count); @@ -1065,11 +1078,19 @@ void GCodeProcessor::apply_config(const PrintConfig& config) m_result.filament_costs.resize(extruders_count); m_result.filament_flow_ratios.resize(extruders_count); m_extruder_temps.resize(extruders_count); + m_extruder_temps_config.resize(extruders_count); + m_extruder_temps_first_layer_config.resize(extruders_count); m_result.nozzle_hrc = static_cast(config.nozzle_hrc.getInt()); m_result.nozzle_type = config.nozzle_type; for (size_t i = 0; i < extruders_count; ++ i) { m_extruder_offsets[i] = to_3d(config.extruder_offset.get_at(i).cast().eval(), 0.f); m_extruder_colors[i] = static_cast(i); + m_extruder_temps_first_layer_config[i] = static_cast(config.nozzle_temperature_initial_layer.get_at(i)); + m_extruder_temps_config[i] = static_cast(config.nozzle_temperature.get_at(i)); + if (m_extruder_temps_config[i] == 0) { + // This means the value should be ignored and first layer temp should be used. + m_extruder_temps_config[i] = m_extruder_temps_first_layer_config[i]; + } m_result.filament_diameters[i] = static_cast(config.filament_diameter.get_at(i)); m_result.required_nozzle_HRC[i] = static_cast(config.required_nozzle_HRC.get_at(i)); m_result.filament_densities[i] = static_cast(config.filament_density.get_at(i)); @@ -1558,6 +1579,8 @@ void GCodeProcessor::reset() m_detect_layer_based_on_tag = false; m_seams_count = 0; + m_preheat_time = 0.f; + m_preheat_steps = 1; #if ENABLE_GCODE_VIEWER_DATA_CHECKING m_mm3_per_mm_compare.reset(); @@ -1720,6 +1743,9 @@ void GCodeProcessor::finalize(bool post_process) #endif // ENABLE_GCODE_VIEWER_STATISTICS //BBS: update slice warning update_slice_warnings(); + + if (post_process) + run_post_process(); } float GCodeProcessor::get_time(PrintEstimatedStatistics::ETimeMode mode) const @@ -2931,7 +2957,7 @@ void GCodeProcessor::process_G0(const GCodeReader::GCodeLine& line) process_G1(line); } -void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) +void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line, const std::optional& remaining_internal_g1_lines) { float filament_diameter = (static_cast(m_extruder_id) < m_result.filament_diameters.size()) ? m_result.filament_diameters[m_extruder_id] : m_result.filament_diameters.back(); float filament_flowratio = (static_cast(m_extruder_id) < m_result.filament_flow_ratios.size()) ? m_result.filament_flow_ratios[m_extruder_id] : m_result.filament_flow_ratios.back(); @@ -2963,7 +2989,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) type = (delta_pos[Z] == 0.0f) ? EMoveType::Unretract : EMoveType::Travel; else if (delta_pos[X] != 0.0f || delta_pos[Y] != 0.0f) type = EMoveType::Extrude; - } + } else if (delta_pos[X] != 0.0f || delta_pos[Y] != 0.0f || delta_pos[Z] != 0.0f) type = EMoveType::Travel; @@ -3113,6 +3139,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) block.role = (type != EMoveType::Travel || m_extrusion_role == erCustom) ? m_extrusion_role : erNone; block.distance = distance; block.g1_line_id = m_g1_line_id; + block.remaining_internal_g1_lines = remaining_internal_g1_lines.has_value() ? *remaining_internal_g1_lines : 0; block.layer_id = std::max(1, m_layer_id); block.flags.prepare_stage = m_processing_start_custom_gcode; @@ -3167,7 +3194,7 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) } // calculates block acceleration - float acceleration = + float acceleration = (type == EMoveType::Travel) ? get_travel_acceleration(static_cast(i)) : (is_extrusion_only_move(delta_pos) ? get_retract_acceleration(static_cast(i)) : @@ -3307,10 +3334,10 @@ void GCodeProcessor::process_G1(const GCodeReader::GCodeLine& line) if (!m_seams_detector.has_first_vertex()) { m_seams_detector.set_first_vertex(new_pos); } else if (m_detect_layer_based_on_tag) { - // We may have sloped loop, drop any previous start pos if we have z increment - const std::optional first_vertex = m_seams_detector.get_first_vertex(); - if (new_pos.z() > first_vertex->z()) { - m_seams_detector.set_first_vertex(new_pos); + // We may have sloped loop, drop any previous start pos if we have z increment + const std::optional first_vertex = m_seams_detector.get_first_vertex(); + if (new_pos.z() > first_vertex->z()) { + m_seams_detector.set_first_vertex(new_pos); } } } @@ -4355,6 +4382,729 @@ void GCodeProcessor::process_T(const std::string_view command) } } } +static void update_lines_ends_and_out_file_pos(const std::string& out_string, std::vector& lines_ends, size_t* out_file_pos) +{ + for (size_t i = 0; i < out_string.size(); ++i) { + if (out_string[i] == '\n') + lines_ends.emplace_back((out_file_pos != nullptr) ? *out_file_pos + i + 1 : i + 1); + } + if (out_file_pos != nullptr) + *out_file_pos += out_string.size(); +} + +void GCodeProcessor::run_post_process() +{ + FilePtr in{ boost::nowide::fopen(m_result.filename.c_str(), "rb") }; + if (in.f == nullptr) + throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nCannot open file for reading.\n")); + + // temporary file to contain modified gcode + std::string out_path = m_result.filename + ".postprocess"; + FilePtr out{ boost::nowide::fopen(out_path.c_str(), "wb") }; + if (out.f == nullptr) + throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nCannot open file for writing.\n")); + + std::vector filament_mm(m_result.extruders_count, 0.0); + std::vector filament_cm3(m_result.extruders_count, 0.0); + std::vector filament_g(m_result.extruders_count, 0.0); + std::vector filament_cost(m_result.extruders_count, 0.0); + + double filament_total_g = 0.0; + double filament_total_cost = 0.0; + + for (const auto& [id, volume] : m_result.print_statistics.total_volumes_per_extruder) { + filament_mm[id] = volume / (static_cast(M_PI) * sqr(0.5 * m_result.filament_diameters[id])); + filament_cm3[id] = volume * 0.001; + filament_g[id] = filament_cm3[id] * double(m_result.filament_densities[id]); + filament_cost[id] = filament_g[id] * double(m_result.filament_costs[id]) * 0.001; + filament_total_g += filament_g[id]; + filament_total_cost += filament_cost[id]; + } + + double total_g_wipe_tower = m_print->print_statistics().total_wipe_tower_filament; + + + auto time_in_minutes = [](float time_in_seconds) { + assert(time_in_seconds >= 0.f); + return int((time_in_seconds + 0.5f) / 60.0f); + }; + + auto time_in_last_minute = [](float time_in_seconds) { + assert(time_in_seconds <= 60.0f); + return time_in_seconds / 60.0f; + }; + + auto format_line_M73_main = [](const std::string& mask, int percent, int time) { + char line_M73[64]; + sprintf(line_M73, mask.c_str(), + std::to_string(percent).c_str(), + std::to_string(time).c_str()); + return std::string(line_M73); + }; + + auto format_line_M73_stop_int = [](const std::string& mask, int time) { + char line_M73[64]; + sprintf(line_M73, mask.c_str(), std::to_string(time).c_str()); + return std::string(line_M73); + }; + + auto format_time_float = [](float time) { + return Slic3r::float_to_string_decimal_point(time, 2); + }; + + auto format_line_M73_stop_float = [format_time_float](const std::string& mask, float time) { + char line_M73[64]; + sprintf(line_M73, mask.c_str(), format_time_float(time).c_str()); + return std::string(line_M73); + }; + + std::string gcode_line; + size_t g1_lines_counter = 0; + // keeps track of last exported pair + std::array, static_cast(PrintEstimatedStatistics::ETimeMode::Count)> last_exported_main; + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + last_exported_main[i] = { 0, time_in_minutes(m_time_processor.machines[i].time) }; + } + + // keeps track of last exported remaining time to next printer stop + std::array(PrintEstimatedStatistics::ETimeMode::Count)> last_exported_stop; + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + last_exported_stop[i] = time_in_minutes(m_time_processor.machines[i].time); + } + + // Helper class to modify and export gcode to file + class ExportLines + { + public: + struct Backtrace + { + float time{ 60.0f }; + int steps{ 10 }; + float time_step() const { return time / float(steps); } + }; + + enum class EWriteType + { + BySize, + ByTime + }; + + private: + struct LineData + { + std::string line; + std::array(PrintEstimatedStatistics::ETimeMode::Count)> times{ 0.0f, 0.0f }; + }; + + enum ETimeMode + { + Normal = static_cast(PrintEstimatedStatistics::ETimeMode::Normal), + Stealth = static_cast(PrintEstimatedStatistics::ETimeMode::Stealth) + }; + +#ifndef NDEBUG + class Statistics + { + ExportLines& m_parent; + size_t m_max_size{ 0 }; + size_t m_lines_count{ 0 }; + size_t m_max_lines_count{ 0 }; + + public: + explicit Statistics(ExportLines& parent) + : m_parent(parent) + {} + + void add_line(size_t line_size) { + ++m_lines_count; + m_max_size = std::max(m_max_size, m_parent.get_size() + line_size); + m_max_lines_count = std::max(m_max_lines_count, m_lines_count); + } + + void remove_line() { --m_lines_count; } + void remove_all_lines() { m_lines_count = 0; } + }; + + Statistics m_statistics; +#endif // NDEBUG + + EWriteType m_write_type{ EWriteType::BySize }; + // Time machines containing g1 times cache + const std::array(PrintEstimatedStatistics::ETimeMode::Count)>& m_machines; + // Current time + std::array(PrintEstimatedStatistics::ETimeMode::Count)> m_times{ 0.0f, 0.0f }; + // Current size in bytes + size_t m_size{ 0 }; + + // gcode lines cache + std::deque m_lines; + size_t m_added_lines_counter{ 0 }; + // map of gcode line ids from original to final + // used to update m_result.moves[].gcode_id + std::vector> m_gcode_lines_map; + + size_t m_times_cache_id{ 0 }; + size_t m_out_file_pos{ 0 }; + + + public: + ExportLines(EWriteType type, + const std::array(PrintEstimatedStatistics::ETimeMode::Count)>& machines) +#ifndef NDEBUG + : m_statistics(*this), m_write_type(type), m_machines(machines) {} +#else + : m_write_type(type), m_machines(machines) {} +#endif // NDEBUG + + // return: number of internal G1 lines (from G2/G3 splitting) processed + unsigned int update(const std::string& line, size_t lines_counter, size_t g1_lines_counter) { + unsigned int ret = 0; + m_gcode_lines_map.push_back({ lines_counter, 0 }); + + if (GCodeReader::GCodeLine::cmd_is(line, "G0") || + GCodeReader::GCodeLine::cmd_is(line, "G1") || + GCodeReader::GCodeLine::cmd_is(line, "G2") || + GCodeReader::GCodeLine::cmd_is(line, "G3") || + GCodeReader::GCodeLine::cmd_is(line, "G28")) + ++g1_lines_counter; + else + return ret; + + auto init_it = m_machines[Normal].g1_times_cache.begin() + m_times_cache_id; + auto it = init_it; + while (it != m_machines[Normal].g1_times_cache.end() && it->id < g1_lines_counter) { + ++it; + ++m_times_cache_id; + } + + if (it == m_machines[Normal].g1_times_cache.end() || it->id > g1_lines_counter) + return ret; + + // search for internal G1 lines + if (GCodeReader::GCodeLine::cmd_is(line, "G2") || GCodeReader::GCodeLine::cmd_is(line, "G3")) { + while (it != m_machines[Normal].g1_times_cache.end() && it->remaining_internal_g1_lines > 0) { + ++it; + ++m_times_cache_id; + ++g1_lines_counter; + ++ret; + } + } + + if (it != m_machines[Normal].g1_times_cache.end() && it->id == g1_lines_counter) { + m_times[Normal] = it->elapsed_time; + if (!m_machines[Stealth].g1_times_cache.empty()) + m_times[Stealth] = (m_machines[Stealth].g1_times_cache.begin() + std::distance(m_machines[Normal].g1_times_cache.begin(), it))->elapsed_time; + } + + return ret; + } + + // add the given gcode line to the cache + void append_line(const std::string& line) { + m_lines.push_back({ line, m_times }); +#ifndef NDEBUG + m_statistics.add_line(line.length()); +#endif // NDEBUG + m_size += line.length(); + ++m_added_lines_counter; + assert(!m_gcode_lines_map.empty()); + m_gcode_lines_map.back().second = m_added_lines_counter; + } + + // Insert the gcode lines required by the command cmd by backtracing into the cache + void insert_lines(const Backtrace& backtrace, const std::string& cmd, + std::function&)> line_inserter, + std::function line_replacer) { + // Orca: find start pos by seaching G28/G29/PRINT_START/START_PRINT commands + auto is_start_pos = [](const std::string& curr_cmd) { + return boost::iequals(curr_cmd, "G28") + || boost::iequals(curr_cmd, "G29") + || boost::iequals(curr_cmd, "PRINT_START") + || boost::iequals(curr_cmd, "START_PRINT"); + }; + assert(!m_lines.empty()); + const float time_step = backtrace.time_step(); + size_t rev_it_dist = 0; // distance from the end of the cache of the starting point of the backtrace + float last_time_insertion = 0.0f; // used to avoid inserting two lines at the same time + for (int i = 0; i < backtrace.steps; ++i) { + const float backtrace_time_i = (i + 1) * time_step; + const float time_threshold_i = m_times[Normal] - backtrace_time_i; + auto rev_it = m_lines.rbegin() + rev_it_dist; + auto start_rev_it = rev_it; + + std::string curr_cmd = GCodeReader::GCodeLine::extract_cmd(rev_it->line); + // backtrace into the cache to find the place where to insert the line + while (rev_it != m_lines.rend() && rev_it->times[Normal] > time_threshold_i && curr_cmd != cmd && !is_start_pos(curr_cmd)) { + rev_it->line = line_replacer(rev_it->line); + ++rev_it; + if (rev_it != m_lines.rend()) + curr_cmd = GCodeReader::GCodeLine::extract_cmd(rev_it->line); + } + + // we met the previous evenience of cmd, or the start position, stop inserting lines + if (rev_it != m_lines.rend() && (curr_cmd == cmd || is_start_pos(curr_cmd))) + break; + + // insert the line for the current step + if (rev_it != m_lines.rend() && rev_it != start_rev_it && rev_it->times[Normal] != last_time_insertion) { + last_time_insertion = rev_it->times[Normal]; + std::vector time_diffs; + time_diffs.push_back(m_times[Normal] - last_time_insertion); + if (!m_machines[Stealth].g1_times_cache.empty()) + time_diffs.push_back(m_times[Stealth] - rev_it->times[Stealth]); + const std::string out_line = line_inserter(i + 1, time_diffs); + rev_it_dist = std::distance(m_lines.rbegin(), rev_it) + 1; + m_lines.insert(rev_it.base(), { out_line, rev_it->times }); +#ifndef NDEBUG + m_statistics.add_line(out_line.length()); +#endif // NDEBUG + m_size += out_line.length(); + // synchronize gcode lines map + for (auto map_it = m_gcode_lines_map.rbegin(); map_it != m_gcode_lines_map.rbegin() + rev_it_dist - 1; ++map_it) { + ++map_it->second; + } + + ++m_added_lines_counter; + } + } + } + + // write to file: + // m_write_type == EWriteType::ByTime - all lines older than m_time - backtrace_time + // m_write_type == EWriteType::BySize - all lines if current size is greater than 65535 bytes + void write(FilePtr& out, float backtrace_time, GCodeProcessorResult& result, const std::string& out_path) { + if (m_lines.empty()) + return; + + // collect lines to write into a single string + std::string out_string; + if (!m_lines.empty()) { + if (m_write_type == EWriteType::ByTime) { + while (m_lines.front().times[Normal] < m_times[Normal] - backtrace_time) { + const LineData& data = m_lines.front(); + out_string += data.line; + m_size -= data.line.length(); + m_lines.pop_front(); +#ifndef NDEBUG + m_statistics.remove_line(); +#endif // NDEBUG + } + } + else { + if (m_size > 65535) { + while (!m_lines.empty()) { + out_string += m_lines.front().line; + m_lines.pop_front(); + } + m_size = 0; +#ifndef NDEBUG + m_statistics.remove_all_lines(); +#endif // NDEBUG + } + } + } + + { + write_to_file(out, out_string, result, out_path); + update_lines_ends_and_out_file_pos(out_string, result.lines_ends, &m_out_file_pos); + } + } + + // flush the current content of the cache to file + void flush(FilePtr& out, GCodeProcessorResult& result, const std::string& out_path) { + // collect lines to flush into a single string + std::string out_string; + while (!m_lines.empty()) { + out_string += m_lines.front().line; + m_lines.pop_front(); + } + m_size = 0; +#ifndef NDEBUG + m_statistics.remove_all_lines(); +#endif // NDEBUG + + { + write_to_file(out, out_string, result, out_path); + update_lines_ends_and_out_file_pos(out_string, result.lines_ends, &m_out_file_pos); + } + } + + void synchronize_moves(GCodeProcessorResult& result) const { + auto it = m_gcode_lines_map.begin(); + for (GCodeProcessorResult::MoveVertex& move : result.moves) { + while (it != m_gcode_lines_map.end() && it->first < move.gcode_id) { + ++it; + } + if (it != m_gcode_lines_map.end() && it->first == move.gcode_id) + move.gcode_id = it->second; + } + } + + size_t get_size() const { return m_size; } + + private: + void write_to_file(FilePtr& out, const std::string& out_string, GCodeProcessorResult& result, const std::string& out_path) { + if (!out_string.empty()) { + if (true) { + fwrite((const void*)out_string.c_str(), 1, out_string.length(), out.f); + if (ferror(out.f)) { + out.close(); + boost::nowide::remove(out_path.c_str()); + throw Slic3r::RuntimeError("GCode processor post process export failed.\nIs the disk full?"); + } + } + } + } + }; + + ExportLines export_lines(m_result.backtrace_enabled ? ExportLines::EWriteType::ByTime : ExportLines::EWriteType::BySize, + m_time_processor.machines); + + // replace placeholder lines with the proper final value + // gcode_line is in/out parameter, to reduce expensive memory allocation + auto process_placeholders = [&](std::string& gcode_line) { + bool processed = false; + + // remove trailing '\n' + auto line = std::string_view(gcode_line).substr(0, gcode_line.length() - 1); + + if (line.length() > 1) { + line = line.substr(1); + if (true && + (line == reserved_tag(ETags::First_Line_M73_Placeholder) || line == reserved_tag(ETags::Last_Line_M73_Placeholder))) { + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + const TimeMachine& machine = m_time_processor.machines[i]; + if (machine.enabled) { + // export pair + export_lines.append_line(format_line_M73_main(machine.line_m73_main_mask.c_str(), + (line == reserved_tag(ETags::First_Line_M73_Placeholder)) ? 0 : 100, + (line == reserved_tag(ETags::First_Line_M73_Placeholder)) ? time_in_minutes(machine.time) : 0)); + processed = true; + + // export remaining time to next printer stop + if (line == reserved_tag(ETags::First_Line_M73_Placeholder) && !machine.stop_times.empty()) { + const int to_export_stop = time_in_minutes(machine.stop_times.front().elapsed_time); + export_lines.append_line(format_line_M73_stop_int(machine.line_m73_stop_mask.c_str(), to_export_stop)); + last_exported_stop[i] = to_export_stop; + } + } + } + } + else if (line == reserved_tag(ETags::Estimated_Printing_Time_Placeholder)) { + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + const TimeMachine& machine = m_time_processor.machines[i]; + PrintEstimatedStatistics::ETimeMode mode = static_cast(i); + if (mode == PrintEstimatedStatistics::ETimeMode::Normal || machine.enabled) { + char buf[128]; + sprintf(buf, "; estimated printing time (%s mode) = %s\n", + (mode == PrintEstimatedStatistics::ETimeMode::Normal) ? "normal" : "silent", + get_time_dhms(machine.time).c_str()); + export_lines.append_line(buf); + processed = true; + } + } + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + const TimeMachine& machine = m_time_processor.machines[i]; + PrintEstimatedStatistics::ETimeMode mode = static_cast(i); + if (mode == PrintEstimatedStatistics::ETimeMode::Normal || machine.enabled) { + char buf[128]; + sprintf(buf, "; estimated first layer printing time (%s mode) = %s\n", + (mode == PrintEstimatedStatistics::ETimeMode::Normal) ? "normal" : "silent", + get_time_dhms(machine.prepare_time).c_str()); + export_lines.append_line(buf); + processed = true; + } + } + } + } + + return processed; + }; + + auto process_used_filament = [&](std::string& gcode_line) { + // Prefilter for parsing speed. + if (gcode_line.size() < 8 || gcode_line[0] != ';' || gcode_line[1] != ' ') + return false; + if (const char c = gcode_line[2]; c != 'f' && c != 't') + return false; + auto process_tag = [](std::string& gcode_line, const std::string_view tag, const std::vector& values) { + if (boost::algorithm::starts_with(gcode_line, tag)) { + gcode_line = tag; + char buf[1024]; + for (size_t i = 0; i < values.size(); ++i) { + sprintf(buf, i == values.size() - 1 ? " %.2lf\n" : " %.2lf,", values[i]); + gcode_line += buf; + } + return true; + } + return false; + }; + + bool ret = false; + ret |= process_tag(gcode_line, PrintStatistics::FilamentUsedMmMask, filament_mm); + ret |= process_tag(gcode_line, PrintStatistics::FilamentUsedGMask, filament_g); + ret |= process_tag(gcode_line, PrintStatistics::TotalFilamentUsedGMask, { filament_total_g }); + ret |= process_tag(gcode_line, PrintStatistics::FilamentUsedCm3Mask, filament_cm3); + ret |= process_tag(gcode_line, PrintStatistics::FilamentCostMask, filament_cost); + ret |= process_tag(gcode_line, PrintStatistics::TotalFilamentCostMask, { filament_total_cost }); + return ret; + }; + + // check for temporary lines + auto is_temporary_decoration = [](const std::string_view gcode_line) { + // remove trailing '\n' + assert(!gcode_line.empty()); + assert(gcode_line.back() == '\n'); + + // return true for decorations which are used in processing the gcode but that should not be exported into the final gcode + // i.e.: + // bool ret = gcode_line.substr(0, gcode_line.length() - 1) == ";" + Layer_Change_Tag; + // ... + // return ret; + return false; + }; + + // Iterators for the normal and silent cached time estimate entry recently processed, used by process_line_G1. + auto g1_times_cache_it = Slic3r::reserve_vector::const_iterator>(m_time_processor.machines.size()); + for (const auto& machine : m_time_processor.machines) + g1_times_cache_it.emplace_back(machine.g1_times_cache.begin()); + + // add lines M73 to exported gcode + auto process_line_G1 = [this, + // Lambdas, mostly for string formatting, all with an empty capture block. + time_in_minutes, format_time_float, format_line_M73_main, format_line_M73_stop_int, format_line_M73_stop_float, time_in_last_minute, + // Caches, to be modified + &g1_times_cache_it, &last_exported_main, &last_exported_stop, + &export_lines] + (const size_t g1_lines_counter) { + if (true) { + for (size_t i = 0; i < static_cast(PrintEstimatedStatistics::ETimeMode::Count); ++i) { + const TimeMachine& machine = m_time_processor.machines[i]; + if (machine.enabled) { + // export pair + // Skip all machine.g1_times_cache below g1_lines_counter. + auto& it = g1_times_cache_it[i]; + while (it != machine.g1_times_cache.end() && it->id < g1_lines_counter) + ++it; + if (it != machine.g1_times_cache.end() && it->id == g1_lines_counter) { + std::pair to_export_main = { int(100.0f * it->elapsed_time / machine.time), + time_in_minutes(machine.time - it->elapsed_time) }; + if (last_exported_main[i] != to_export_main) { + export_lines.append_line(format_line_M73_main(machine.line_m73_main_mask.c_str(), + to_export_main.first, to_export_main.second)); + last_exported_main[i] = to_export_main; + } + // export remaining time to next printer stop + auto it_stop = std::upper_bound(machine.stop_times.begin(), machine.stop_times.end(), it->elapsed_time, + [](float value, const TimeMachine::StopTime& t) { return value < t.elapsed_time; }); + if (it_stop != machine.stop_times.end()) { + int to_export_stop = time_in_minutes(it_stop->elapsed_time - it->elapsed_time); + if (last_exported_stop[i] != to_export_stop) { + if (to_export_stop > 0) { + if (last_exported_stop[i] != to_export_stop) { + export_lines.append_line(format_line_M73_stop_int(machine.line_m73_stop_mask.c_str(), to_export_stop)); + last_exported_stop[i] = to_export_stop; + } + } + else { + bool is_last = false; + auto next_it = it + 1; + is_last |= (next_it == machine.g1_times_cache.end()); + + if (next_it != machine.g1_times_cache.end()) { + auto next_it_stop = std::upper_bound(machine.stop_times.begin(), machine.stop_times.end(), next_it->elapsed_time, + [](float value, const TimeMachine::StopTime& t) { return value < t.elapsed_time; }); + is_last |= (next_it_stop != it_stop); + + std::string time_float_str = format_time_float(time_in_last_minute(it_stop->elapsed_time - it->elapsed_time)); + std::string next_time_float_str = format_time_float(time_in_last_minute(it_stop->elapsed_time - next_it->elapsed_time)); + is_last |= (string_to_double_decimal_point(time_float_str) > 0. && string_to_double_decimal_point(next_time_float_str) == 0.); + } + + if (is_last) { + if (std::distance(machine.stop_times.begin(), it_stop) == static_cast(machine.stop_times.size() - 1)) + export_lines.append_line(format_line_M73_stop_int(machine.line_m73_stop_mask.c_str(), to_export_stop)); + else + export_lines.append_line(format_line_M73_stop_float(machine.line_m73_stop_mask.c_str(), time_in_last_minute(it_stop->elapsed_time - it->elapsed_time))); + + last_exported_stop[i] = to_export_stop; + } + } + } + } + } + } + } + } + }; + + // add lines M104 to exported gcode + auto process_line_T = [this, &export_lines](const std::string& gcode_line, const size_t g1_lines_counter, const ExportLines::Backtrace& backtrace) { + const std::string cmd = GCodeReader::GCodeLine::extract_cmd(gcode_line); + if (cmd.size() >= 2) { + std::stringstream ss(cmd.substr(1)); + int tool_number = -1; + ss >> tool_number; + if (tool_number != -1) { + if (tool_number < 0 || (int)m_extruder_temps_config.size() <= tool_number) { + // found an invalid value, clamp it to a valid one + tool_number = std::clamp(0, m_extruder_temps_config.size() - 1, tool_number); + // emit warning + std::string warning = "GCode Post-Processor encountered an invalid toolchange, maybe from a custom gcode:"; + warning += "\n> "; + warning += gcode_line; + warning += "Generated M104 lines may be incorrect."; + BOOST_LOG_TRIVIAL(error) << warning; + // Orca todo + if (m_print != nullptr) + m_print->active_step_add_warning(PrintStateBase::WarningLevel::CRITICAL, warning); + } + } + export_lines.insert_lines( + backtrace, cmd, + // line inserter + [tool_number, this](unsigned int id, const std::vector& time_diffs) { + const int temperature = int(m_layer_id != 1 ? m_extruder_temps_config[tool_number] : + m_extruder_temps_first_layer_config[tool_number]); + // Orca: M104.1 for XL printers, I can't find the documentation for this so I copied the C++ comments from + // Prusa-Firmware-Buddy here + /** + * M104.1: Early Set Hotend Temperature (preheat, and with stealth mode support) + * + * This GCode is used to tell the XL printer the time estimate when a tool will be used next, + * so that the printer can start preheating the tool in advance. + * + * ## Parameters + * - `P` - - time in seconds till the temperature S is required (in standard mode) + * - `Q` - - time in seconds till the temperature S is required (in stealth mode) + * The rest is same as M104 + */ + if (this->m_is_XL_printer) { + std::string out = "M104.1 T" + std::to_string(tool_number); + if (time_diffs.size() > 0) + out += " P" + std::to_string(int(std::round(time_diffs[0]))); + if (time_diffs.size() > 1) + out += " Q" + std::to_string(int(std::round(time_diffs[1]))); + out += " S" + std::to_string(temperature) + "\n"; + return out; + } else { + std::string comment = "preheat T" + std::to_string(tool_number) + + " time: " + std::to_string((int) std::round(time_diffs[0])) + "s"; + return GCodeWriter::set_temperature(temperature, this->m_flavor, false, tool_number, comment); + } + }, + // line replacer + [this, tool_number](const std::string& line) { + if (GCodeReader::GCodeLine::cmd_is(line, "M104")) { + GCodeReader::GCodeLine gline; + GCodeReader reader; + reader.parse_line(line, [&gline](GCodeReader& reader, const GCodeReader::GCodeLine& l) { gline = l; }); + + float val; + if (gline.has_value('T', val) && gline.raw().find("cooldown") != std::string::npos) { + if (static_cast(val) == tool_number) + return std::string("; removed M104\n"); + } + } + return line; + }); + } + }; + + m_result.lines_ends.clear(); + // m_result.lines_ends.emplace_back(std::vector()); + + unsigned int line_id = 0; + // Backtrace data for Tx gcode lines + const ExportLines::Backtrace backtrace_T = { m_preheat_time, m_preheat_steps }; + // In case there are multiple sources of backtracing, keeps track of the longest backtrack time needed + // to flush the backtrace cache accordingly + float max_backtrace_time = 120.0f; + + { + // Read the input stream 64kB at a time, extract lines and process them. + std::vector buffer(65536 * 10, 0); + // Line buffer. + assert(gcode_line.empty()); + for (;;) { + size_t cnt_read = ::fread(buffer.data(), 1, buffer.size(), in.f); + if (::ferror(in.f)) + throw Slic3r::RuntimeError(std::string("GCode processor post process export failed.\nError while reading from file.\n")); + bool eof = cnt_read == 0; + auto it = buffer.begin(); + auto it_bufend = buffer.begin() + cnt_read; + while (it != it_bufend || (eof && !gcode_line.empty())) { + // Find end of line. + bool eol = false; + auto it_end = it; + for (; it_end != it_bufend && !(eol = *it_end == '\r' || *it_end == '\n'); ++it_end); + // End of line is indicated also if end of file was reached. + eol |= eof && it_end == it_bufend; + gcode_line.insert(gcode_line.end(), it, it_end); + if (eol) { + ++line_id; + gcode_line += "\n"; + const unsigned int internal_g1_lines_counter = export_lines.update(gcode_line, line_id, g1_lines_counter); + // replace placeholder lines + bool processed = process_placeholders(gcode_line); + if (processed) + gcode_line.clear(); + if (!processed) + processed = process_used_filament(gcode_line); + if (!processed && !is_temporary_decoration(gcode_line)) { + if (GCodeReader::GCodeLine::cmd_is(gcode_line, "G0") || GCodeReader::GCodeLine::cmd_is(gcode_line, "G1")) { + export_lines.append_line(gcode_line); + // add lines M73 where needed + process_line_G1(g1_lines_counter++); + gcode_line.clear(); + } + else if (GCodeReader::GCodeLine::cmd_is(gcode_line, "G2") || GCodeReader::GCodeLine::cmd_is(gcode_line, "G3")) { + export_lines.append_line(gcode_line); + // add lines M73 where needed + process_line_G1(g1_lines_counter + internal_g1_lines_counter); + g1_lines_counter += (1 + internal_g1_lines_counter); + gcode_line.clear(); + } + else if (GCodeReader::GCodeLine::cmd_is(gcode_line, "G28")) { + ++g1_lines_counter; + } + else if (m_result.backtrace_enabled && GCodeReader::GCodeLine::cmd_starts_with(gcode_line, "T")) { + // add lines M104 where needed + process_line_T(gcode_line, g1_lines_counter, backtrace_T); + max_backtrace_time = std::max(max_backtrace_time, backtrace_T.time); + } + } + + if (!gcode_line.empty()) + export_lines.append_line(gcode_line); + export_lines.write(out, 1.1f * max_backtrace_time, m_result, out_path); + gcode_line.clear(); + } + // Skip EOL. + it = it_end; + if (it != it_bufend && *it == '\r') + ++it; + if (it != it_bufend && *it == '\n') + ++it; + } + if (eof) + break; + } + } + + export_lines.flush(out, m_result, out_path); + + + out.close(); + in.close(); + + const std::string result_filename = m_result.filename; + export_lines.synchronize_moves(m_result); + + if (rename_file(out_path, result_filename)) + throw Slic3r::RuntimeError(std::string("Failed to rename the output G-code file from ") + out_path + " to " + result_filename + '\n' + + "Is " + out_path + " locked?" + '\n'); +} void GCodeProcessor::store_move_vertex(EMoveType type, EMovePathType path_type) { diff --git a/src/libslic3r/GCode/GCodeProcessor.hpp b/src/libslic3r/GCode/GCodeProcessor.hpp index 1a1970e924..976f4541c5 100644 --- a/src/libslic3r/GCode/GCodeProcessor.hpp +++ b/src/libslic3r/GCode/GCodeProcessor.hpp @@ -17,6 +17,8 @@ namespace Slic3r { +class Print; + // slice warnings enum strings #define NOZZLE_HRC_CHECKER "the_actual_nozzle_hrc_smaller_than_the_required_nozzle_hrc" #define BED_TEMP_TOO_HIGH_THAN_FILAMENT "bed_temperature_too_high_than_filament" @@ -207,6 +209,7 @@ namespace Slic3r { float printable_height; SettingsIds settings_ids; size_t extruders_count; + bool backtrace_enabled; std::vector extruder_colors; std::vector filament_diameters; std::vector required_nozzle_HRC; @@ -378,6 +381,7 @@ namespace Slic3r { EMoveType move_type{ EMoveType::Noop }; ExtrusionRole role{ erNone }; unsigned int g1_line_id{ 0 }; + unsigned int remaining_internal_g1_lines; unsigned int layer_id{ 0 }; float distance{ 0.0f }; // mm float acceleration{ 0.0f }; // mm/s^2 @@ -426,6 +430,7 @@ namespace Slic3r { struct G1LinesCacheItem { unsigned int id; + unsigned int remaining_internal_g1_lines; float elapsed_time; }; @@ -710,6 +715,9 @@ namespace Slic3r { unsigned char m_last_extruder_id; ExtruderColors m_extruder_colors; ExtruderTemps m_extruder_temps; + ExtruderTemps m_extruder_temps_config; + ExtruderTemps m_extruder_temps_first_layer_config; + bool m_is_XL_printer = false; int m_highest_bed_temp; float m_extruded_last_z; float m_first_layer_height; // mm @@ -723,6 +731,9 @@ namespace Slic3r { size_t m_last_default_color_id; bool m_detect_layer_based_on_tag {false}; int m_seams_count; + bool m_single_extruder_multi_material; + float m_preheat_time; + int m_preheat_steps; #if ENABLE_GCODE_VIEWER_STATISTICS std::chrono::time_point m_start_time; #endif // ENABLE_GCODE_VIEWER_STATISTICS @@ -747,6 +758,8 @@ namespace Slic3r { TimeProcessor m_time_processor; UsedFilaments m_used_filaments; + Print* m_print{ nullptr }; + GCodeProcessorResult m_result; static unsigned int s_result_id; @@ -760,6 +773,7 @@ namespace Slic3r { GCodeProcessor(); void apply_config(const PrintConfig& config); + void set_print(Print* print) { m_print = print; } void enable_stealth_time_estimator(bool enabled); bool is_stealth_time_estimator_enabled() const { return m_time_processor.machines[static_cast(PrintEstimatedStatistics::ETimeMode::Stealth)].enabled; @@ -816,7 +830,7 @@ namespace Slic3r { // Move void process_G0(const GCodeReader::GCodeLine& line); - void process_G1(const GCodeReader::GCodeLine& line); + void process_G1(const GCodeReader::GCodeLine& line, const std::optional& remaining_internal_g1_lines = std::nullopt); void process_G2_G3(const GCodeReader::GCodeLine& line); // BBS: handle delay command @@ -931,6 +945,11 @@ namespace Slic3r { void process_T(const GCodeReader::GCodeLine& line); void process_T(const std::string_view command); + // post process the file with the given filename to: + // 1) add remaining time lines M73 and update moves' gcode ids accordingly + // 2) update used filament data + void run_post_process(); + //BBS: different path_type is only used for arc move void store_move_vertex(EMoveType type, EMovePathType path_type = EMovePathType::Noop_move); @@ -944,7 +963,7 @@ namespace Slic3r { Vec3f get_xyz_max_jerk(PrintEstimatedStatistics::ETimeMode mode) const; float get_retract_acceleration(PrintEstimatedStatistics::ETimeMode mode) const; void set_retract_acceleration(PrintEstimatedStatistics::ETimeMode mode, float value); - float get_acceleration(PrintEstimatedStatistics::ETimeMode mode) const; + float get_acceleration(PrintEstimatedStatistics::ETimeMode mode) const; void set_acceleration(PrintEstimatedStatistics::ETimeMode mode, float value); float get_travel_acceleration(PrintEstimatedStatistics::ETimeMode mode) const; void set_travel_acceleration(PrintEstimatedStatistics::ETimeMode mode, float value); diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp index 84f1521733..b117d5a622 100644 --- a/src/libslic3r/GCode/ToolOrdering.cpp +++ b/src/libslic3r/GCode/ToolOrdering.cpp @@ -871,7 +871,7 @@ void ToolOrdering::reorder_extruders_for_minimum_flush_volume() return false; }; - std::optionalcurrent_extruder_id; + std::optionalcurrent_extruder_id(-1); for (int i = 0; i < m_layer_tools.size(); ++i) { LayerTools& lt = m_layer_tools[i]; if (lt.extruders.empty()) diff --git a/src/libslic3r/GCode/WipeTower2.cpp b/src/libslic3r/GCode/WipeTower2.cpp index 5b5a332419..521dd9b746 100644 --- a/src/libslic3r/GCode/WipeTower2.cpp +++ b/src/libslic3r/GCode/WipeTower2.cpp @@ -1,6 +1,4 @@ -// Orca: This file is ported from latest PrusaSlicer - -// Original PrusaSlicer Copyright: +// Orca: WipeTower2 for all non bbl printers, support all MMU device and toolchanger. #include "WipeTower2.hpp" #include @@ -26,6 +24,20 @@ namespace Slic3r { +// Calculates length of extrusion line to extrude given volume +static float volume_to_length(float volume, float line_width, float layer_height) +{ + return std::max(0.f, volume / (layer_height * (line_width - layer_height * (1.f - float(M_PI) / 4.f)))); +} + +static float length_to_volume(float length, float line_width, float layer_height) +{ + return std::max(0.f, length * layer_height * (line_width - layer_height * (1.f - float(M_PI) / 4.f))); +} + + + + class WipeTowerWriter2 { public: @@ -37,12 +49,9 @@ public: m_extrusion_flow(0.f), m_preview_suppressed(false), m_elapsed_time(0.f), -#if ENABLE_GCODE_VIEWER_DATA_CHECKING - m_default_analyzer_line_width(line_width), -#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING - m_gcode_flavor(flavor), - m_filpar(filament_parameters) - { + m_gcode_flavor(flavor), + m_filpar(filament_parameters) + { // ORCA: This class is only used by non BBL printers, so set the parameter appropriately. // This fixes an issue where the wipe tower was using BBL tags resulting in statistics for purging in the purge tower not being displayed. GCodeProcessor::s_IsBBLPrinter = false; @@ -62,18 +71,6 @@ public: return *this; } -#if ENABLE_GCODE_VIEWER_DATA_CHECKING - WipeTowerWriter2& change_analyzer_mm3_per_mm(float len, float e) { - static const float area = float(M_PI) * 1.75f * 1.75f / 4.f; - float mm3_per_mm = (len == 0.f ? 0.f : area * e / len); - // adds tag for processor: - std::stringstream str; - str << ";" << GCodeProcessor::Mm3_Per_Mm_Tag << mm3_per_mm << "\n"; - m_gcode += str.str(); - return *this; - } -#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING - WipeTowerWriter2& set_initial_position(const Vec2f &pos, float width = 0.f, float depth = 0.f, float internal_angle = 0.f) { m_wipe_tower_width = width; m_wipe_tower_depth = depth; @@ -109,16 +106,16 @@ public: return *this; } + WipeTowerWriter2& switch_filament_monitoring(bool enable) { + m_gcode += std::string("G4 S0\n") + "M591 " + (enable ? "R" : "S0") + "\n"; + return *this; + } + // Suppress / resume G-code preview in Slic3r. Slic3r will have difficulty to differentiate the various // filament loading and cooling moves from normal extrusion moves. Therefore the writer // is asked to suppres output of some lines, which look like extrusions. -#if ENABLE_GCODE_VIEWER_DATA_CHECKING - WipeTowerWriter2& suppress_preview() { change_analyzer_line_width(0.f); m_preview_suppressed = true; return *this; } - WipeTowerWriter2& resume_preview() { change_analyzer_line_width(m_default_analyzer_line_width); m_preview_suppressed = false; return *this; } -#else WipeTowerWriter2& suppress_preview() { m_preview_suppressed = true; return *this; } - WipeTowerWriter2& resume_preview() { m_preview_suppressed = false; return *this; } -#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING + WipeTowerWriter2& resume_preview() { m_preview_suppressed = false; return *this; } WipeTowerWriter2& feedrate(float f) { @@ -140,8 +137,8 @@ public: float get_and_reset_used_filament_length() { float temp = m_used_filament_length; m_used_filament_length = 0.f; return temp; } // Extrude with an explicitely provided amount of extrusion. - WipeTowerWriter2& extrude_explicit(float x, float y, float e, float f = 0.f, bool record_length = false, bool limit_volumetric_flow = true) - { + WipeTowerWriter2& extrude_explicit(float x, float y, float e, float f = 0.f, bool record_length = false, bool limit_volumetric_flow = true) + { if (x == m_current_pos.x() && y == m_current_pos.y() && e == 0.f && (f == 0.f || f == m_current_feedrate)) // Neither extrusion nor a travel move. return *this; @@ -157,12 +154,9 @@ public: Vec2f rot(this->rotate(Vec2f(x,y))); // this is where we want to go if (! m_preview_suppressed && e > 0.f && len > 0.f) { -#if ENABLE_GCODE_VIEWER_DATA_CHECKING - change_analyzer_mm3_per_mm(len, e); -#endif // ENABLE_GCODE_VIEWER_DATA_CHECKING - // Width of a squished extrusion, corrected for the roundings of the squished extrusions. + // Width of a squished extrusion, corrected for the roundings of the squished extrusions. // This is left zero if it is a travel move. - float width = e * m_filpar[0].filament_area / (len * m_layer_height); + float width = e * m_filpar[0].filament_area / (len * m_layer_height); // Correct for the roundings of a squished extrusion. width += m_layer_height * float(1. - M_PI / 4.); if (m_extrusions.empty() || m_extrusions.back().pos != rotated_current_pos) @@ -204,17 +198,17 @@ public: return *this; } - WipeTowerWriter2& extrude_explicit(const Vec2f &dest, float e, float f = 0.f, bool record_length = false, bool limit_volumetric_flow = true) - { return extrude_explicit(dest.x(), dest.y(), e, f, record_length); } + WipeTowerWriter2& extrude_explicit(const Vec2f &dest, float e, float f = 0.f, bool record_length = false, bool limit_volumetric_flow = true) + { return extrude_explicit(dest.x(), dest.y(), e, f, record_length); } - // Travel to a new XY position. f=0 means use the current value. + // Travel to a new XY position. f=0 means use the current value. WipeTowerWriter2& travel(float x, float y, float f = 0.f) - { return extrude_explicit(x, y, 0.f, f); } + { return extrude_explicit(x, y, 0.f, f); } - WipeTowerWriter2& travel(const Vec2f &dest, float f = 0.f) - { return extrude_explicit(dest.x(), dest.y(), 0.f, f); } + WipeTowerWriter2& travel(const Vec2f &dest, float f = 0.f) + { return extrude_explicit(dest.x(), dest.y(), 0.f, f); } - // Extrude a line from current position to x, y with the extrusion amount given by m_extrusion_flow. + // Extrude a line from current position to x, y with the extrusion amount given by m_extrusion_flow. WipeTowerWriter2& extrude(float x, float y, float f = 0.f) { float dx = x - m_current_pos.x(); @@ -222,8 +216,8 @@ public: return extrude_explicit(x, y, std::sqrt(dx*dx+dy*dy) * m_extrusion_flow, f, true); } - WipeTowerWriter2& extrude(const Vec2f &dest, const float f = 0.f) - { return extrude(dest.x(), dest.y(), f); } + WipeTowerWriter2& extrude(const Vec2f &dest, const float f = 0.f) + { return extrude(dest.x(), dest.y(), f); } WipeTowerWriter2& rectangle(const Vec2f& ld,float width,float height,const float f = 0.f) { @@ -291,6 +285,25 @@ public: return extrude_explicit(end_point, y(), loading_dist, x_speed * 60.f, false, false); } + // Loads filament while also moving towards given point in x-axis. Unlike the previous function, this one respects + // both the loading_speed and x_speed. Can shorten the move. + WipeTowerWriter2& load_move_x_advanced_there_and_back(float farthest_x, float e_dist, float e_speed, float x_speed) + { + float old_x = x(); + float time = std::abs(e_dist / e_speed); // time that the whole move must take + float x_max_dist = std::abs(farthest_x - x()); // max x-distance that we can travel + float x_dist = x_speed * time; // totel x-distance to travel during the move + int n = int(x_dist / (2*x_max_dist) + 1.f); // how many there and back moves should we do + float r = 2*n*x_max_dist / x_dist; // actual/required dist if the move is not shortened + + float end_point = x() + (farthest_x > x() ? 1.f : -1.f) * x_max_dist / r; + for (int i=0; i& m_filpar; @@ -533,7 +544,9 @@ WipeTower2::WipeTower2(const PrintConfig& config, const PrintRegionConfig& defau m_wipe_tower_rotation_angle(float(config.wipe_tower_rotation_angle)), m_wipe_tower_brim_width(float(config.prime_tower_brim_width)), m_wipe_tower_cone_angle(float(config.wipe_tower_cone_angle)), - m_extra_spacing(float(config.wipe_tower_extra_spacing/100.)), + m_extra_flow(float(config.wipe_tower_extra_flow/100.)), + m_extra_spacing_wipe(float(config.wipe_tower_extra_spacing/100. * config.wipe_tower_extra_flow/100.)), + m_extra_spacing_ramming(float(config.wipe_tower_extra_spacing/100.)), m_y_shift(0.f), m_z_pos(0.f), m_bridging(float(config.wipe_tower_bridging)), @@ -571,6 +584,8 @@ WipeTower2::WipeTower2(const PrintConfig& config, const PrintRegionConfig& defau m_set_extruder_trimpot = config.high_current_on_filament_swap; } + m_is_mk4mmu3 = boost::icontains(config.printer_notes.value, "PRINTER_MODEL_MK4") && boost::icontains(config.printer_notes.value, "MMU"); + // Calculate where the priming lines should be - very naive test not detecting parallelograms etc. const std::vector& bed_points = config.printable_area.values; BoundingBoxf bb(bed_points); @@ -605,6 +620,7 @@ void WipeTower2::set_extruder(size_t idx, const PrintConfig& config) m_filpar[idx].is_soluble = config.filament_soluble.get_at(idx); m_filpar[idx].temperature = config.nozzle_temperature.get_at(idx); m_filpar[idx].first_layer_temperature = config.nozzle_temperature_initial_layer.get_at(idx); + m_filpar[idx].filament_minimal_purge_on_wipe_tower = config.filament_minimal_purge_on_wipe_tower.get_at(idx); // If this is a single extruder MM printer, we will use all the SE-specific config values. // Otherwise, the defaults will be used to turn off the SE stuff. @@ -617,6 +633,8 @@ void WipeTower2::set_extruder(size_t idx, const PrintConfig& config) m_filpar[idx].cooling_moves = config.filament_cooling_moves.get_at(idx); m_filpar[idx].cooling_initial_speed = float(config.filament_cooling_initial_speed.get_at(idx)); m_filpar[idx].cooling_final_speed = float(config.filament_cooling_final_speed.get_at(idx)); + m_filpar[idx].filament_stamping_loading_speed = float(config.filament_stamping_loading_speed.get_at(idx)); + m_filpar[idx].filament_stamping_distance = float(config.filament_stamping_distance.get_at(idx)); } m_filpar[idx].filament_area = float((M_PI/4.f) * pow(config.filament_diameter.get_at(idx), 2)); // all extruders are assumed to have the same filament diameter at this point @@ -730,7 +748,7 @@ std::vector WipeTower2::prime( toolchange_Wipe(writer, cleaning_box , 20.f); WipeTower::box_coordinates box = cleaning_box; box.translate(0.f, writer.y() - cleaning_box.ld.y() + m_perimeter_width); - toolchange_Unload(writer, box , m_filpar[m_current_tool].material, m_filpar[tools[idx_tool + 1]].first_layer_temperature); + toolchange_Unload(writer, box , m_filpar[m_current_tool].material, m_filpar[m_current_tool].first_layer_temperature, m_filpar[tools[idx_tool + 1]].first_layer_temperature); cleaning_box.translate(prime_section_width, 0.f); writer.travel(cleaning_box.ld, 7200); } @@ -777,7 +795,7 @@ WipeTower::ToolChangeResult WipeTower2::tool_change(size_t tool) for (const auto &b : m_layer_info->tool_changes) if ( b.new_tool == tool ) { wipe_volume = b.wipe_volume; - wipe_area = b.required_depth * m_layer_info->extra_spacing; + wipe_area = b.required_depth; break; } } @@ -797,10 +815,10 @@ WipeTower::ToolChangeResult WipeTower2::tool_change(size_t tool) .set_initial_tool(m_current_tool) .set_y_shift(m_y_shift + (tool!=(unsigned int)(-1) && (m_current_shape == SHAPE_REVERSED) ? m_layer_info->depth - m_layer_info->toolchanges_depth(): 0.f)) .append(";--------------------\n" - "; CP TOOLCHANGE START\n") - .comment_with_value(" toolchange #", m_num_tool_changes + 1); // the number is zero-based + "; CP TOOLCHANGE START\n"); if (tool != (unsigned)(-1)){ + writer.comment_with_value(" toolchange #", m_num_tool_changes + 1); // the number is zero-based writer.append(std::string("; material : " + (m_current_tool < m_filpar.size() ? m_filpar[m_current_tool].material : "(NONE)") + " -> " + m_filpar[tool].material + "\n").c_str()) .append(";--------------------\n"); writer.append(";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Wipe_Tower_Start) + "\n"); @@ -818,8 +836,10 @@ WipeTower::ToolChangeResult WipeTower2::tool_change(size_t tool) // Ram the hot material out of the melt zone, retract the filament into the cooling tubes and let it cool. if (tool != (unsigned int)-1){ // This is not the last change. + auto new_tool_temp = is_first_layer() ? m_filpar[tool].first_layer_temperature : m_filpar[tool].temperature; toolchange_Unload(writer, cleaning_box, m_filpar[m_current_tool].material, - is_first_layer() ? m_filpar[tool].first_layer_temperature : m_filpar[tool].temperature); + (is_first_layer() ? m_filpar[m_current_tool].first_layer_temperature : m_filpar[m_current_tool].temperature), + new_tool_temp); toolchange_Change(writer, tool, m_filpar[tool].material); // Change the tool, set a speed override for soluble and flex materials. toolchange_Load(writer, cleaning_box); writer.travel(writer.x(), writer.y()-m_perimeter_width); // cooling and loading were done a bit down the road @@ -827,7 +847,7 @@ WipeTower::ToolChangeResult WipeTower2::tool_change(size_t tool) writer.append(";" + GCodeProcessor::reserved_tag(GCodeProcessor::ETags::Wipe_Tower_End) + "\n"); ++ m_num_tool_changes; } else - toolchange_Unload(writer, cleaning_box, m_filpar[m_current_tool].material, m_filpar[m_current_tool].temperature); + toolchange_Unload(writer, cleaning_box, m_filpar[m_current_tool].material, m_filpar[m_current_tool].temperature, m_filpar[m_current_tool].temperature); m_depth_traversed += wipe_area; @@ -854,13 +874,14 @@ void WipeTower2::toolchange_Unload( WipeTowerWriter2 &writer, const WipeTower::box_coordinates &cleaning_box, const std::string& current_material, + const int old_temperature, const int new_temperature) { float xl = cleaning_box.ld.x() + 1.f * m_perimeter_width; float xr = cleaning_box.rd.x() - 1.f * m_perimeter_width; const float line_width = m_perimeter_width * m_filpar[m_current_tool].ramming_line_width_multiplicator; // desired ramming line thickness - const float y_step = line_width * m_filpar[m_current_tool].ramming_step_multiplicator * m_extra_spacing; // spacing between lines in mm + const float y_step = line_width * m_filpar[m_current_tool].ramming_step_multiplicator * m_extra_spacing_ramming; // spacing between lines in mm const Vec2f ramming_start_pos = Vec2f(xl, cleaning_box.ld.y() + m_depth_traversed + y_step/2.f); @@ -873,10 +894,14 @@ void WipeTower2::toolchange_Unload( float e_done = 0; // measures E move done from each segment const bool do_ramming = m_enable_filament_ramming && (m_semm || m_filpar[m_current_tool].multitool_ramming); + const bool cold_ramming = m_is_mk4mmu3; if (do_ramming) { writer.travel(ramming_start_pos); // move to starting position - writer.disable_linear_advance(); + if (! m_is_mk4mmu3) + writer.disable_linear_advance(); + if (cold_ramming) + writer.set_extruder_temp(old_temperature - 20); } else writer.set_position(ramming_start_pos); @@ -897,7 +922,7 @@ void WipeTower2::toolchange_Unload( if (tch.old_tool == m_current_tool) { sum_of_depths += tch.ramming_depth; float ramming_end_y = sum_of_depths; - ramming_end_y -= (y_step/m_extra_spacing-m_perimeter_width) / 2.f; // center of final ramming line + ramming_end_y -= (y_step/m_extra_spacing_ramming-m_perimeter_width) / 2.f; // center of final ramming line if ( (m_current_shape == SHAPE_REVERSED && ramming_end_y < sparse_beginning_y - 0.5f*m_perimeter_width ) || (m_current_shape == SHAPE_NORMAL && ramming_end_y > sparse_beginning_y + 0.5f*m_perimeter_width ) ) @@ -910,6 +935,11 @@ void WipeTower2::toolchange_Unload( sum_of_depths += tch.required_depth; } } + + if (m_is_mk4mmu3) { + writer.switch_filament_monitoring(false); + writer.wait(1.5f); + } // now the ramming itself: @@ -953,32 +983,70 @@ void WipeTower2::toolchange_Unload( .retract(0.10f * total_retraction_distance, 0.3f * m_filpar[m_current_tool].unloading_speed * 60.f) .resume_preview(); } + + const int& number_of_cooling_moves = m_filpar[m_current_tool].cooling_moves; + const bool cooling_will_happen = m_semm && number_of_cooling_moves > 0 && m_cooling_tube_length != 0; + bool change_temp_later = false; + // Wipe tower should only change temperature with single extruder MM. Otherwise, all temperatures should // be already set and there is no need to change anything. Also, the temperature could be changed // for wrong extruder. if (m_semm) { - if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer()) ) { // Set the extruder temperature, but don't wait. + if (new_temperature != 0 && (new_temperature != m_old_temperature || is_first_layer() || cold_ramming) ) { // Set the extruder temperature, but don't wait. // If the required temperature is the same as last time, don't emit the M104 again (if user adjusted the value, it would be reset) // However, always change temperatures on the first layer (this is to avoid issues with priming lines turned off). - writer.set_extruder_temp(new_temperature, false); + if (cold_ramming && cooling_will_happen) + change_temp_later = true; + else + writer.set_extruder_temp(new_temperature, false); m_old_temperature = new_temperature; } } // Cooling: - const int& number_of_moves = m_filpar[m_current_tool].cooling_moves; - if (m_semm && number_of_moves > 0 && m_cooling_tube_length != 0) { + if (cooling_will_happen) { writer.append("; Cooling\n"); const float& initial_speed = m_filpar[m_current_tool].cooling_initial_speed; const float& final_speed = m_filpar[m_current_tool].cooling_final_speed; - float speed_inc = (final_speed - initial_speed) / (2.f * number_of_moves - 1.f); + float speed_inc = (final_speed - initial_speed) / (2.f * number_of_cooling_moves - 1.f); + + if (m_is_mk4mmu3) + writer.disable_linear_advance(); writer.suppress_preview() .travel(writer.x(), writer.y() + y_step); old_x = writer.x(); turning_point = xr-old_x > old_x-xl ? xr : xl; - for (int i=0; i0 && m_filpar[m_current_tool].filament_stamping_distance != 0) { + + // Stamping turning point shall be no farther than 20mm from the current nozzle position: + float stamping_turning_point = std::clamp(old_x + 20.f * (turning_point - old_x > 0.f ? 1.f : -1.f), xl, xr); + + // Only last 5mm will be done with the fast x travel. The point is to spread possible blobs + // along the whole wipe tower. + if (stamping_dist_e > 5) { + float cent = writer.x(); + writer.load_move_x_advanced(stamping_turning_point, (stamping_dist_e - 5), m_filpar[m_current_tool].filament_stamping_loading_speed, 200); + writer.load_move_x_advanced(cent, 5, m_filpar[m_current_tool].filament_stamping_loading_speed, m_travel_speed); + writer.travel(cent, writer.y()); + } else + writer.load_move_x_advanced_there_and_back(stamping_turning_point, stamping_dist_e, m_filpar[m_current_tool].filament_stamping_loading_speed, m_travel_speed); + + // Retract while the print head is stationary, so if there is a blob, it is not dragged along. + writer.retract(stamping_dist_e, m_filpar[m_current_tool].unloading_speed * 60.f); + } + + if (i == number_of_cooling_moves - 1 && change_temp_later) { + // If cold_ramming, the temperature change should be done before the last cooling move. + writer.set_extruder_temp(new_temperature, false); + } + float speed = initial_speed + speed_inc * 2*i; writer.load_move_x_advanced(turning_point, m_cooling_tube_length, speed); speed += speed_inc; @@ -998,7 +1066,7 @@ void WipeTower2::toolchange_Unload( // this is to align ramming and future wiping extrusions, so the future y-steps can be uniform from the start: // the perimeter_width will later be subtracted, it is there to not load while moving over just extruded material - Vec2f pos = Vec2f(end_of_ramming.x(), end_of_ramming.y() + (y_step/m_extra_spacing-m_perimeter_width) / 2.f + m_perimeter_width); + Vec2f pos = Vec2f(end_of_ramming.x(), end_of_ramming.y() + (y_step/m_extra_spacing_ramming-m_perimeter_width) / 2.f + m_perimeter_width); if (do_ramming) writer.travel(pos, 2400.f); else @@ -1018,11 +1086,14 @@ void WipeTower2::toolchange_Change( if (m_current_tool < m_used_filament_length.size()) m_used_filament_length[m_current_tool] += writer.get_and_reset_used_filament_length(); - // This is where we want to place the custom gcodes. We will use placeholders for this. // These will be substituted by the actual gcodes when the gcode is generated. + //writer.append("[end_filament_gcode]\n"); writer.append("[change_filament_gcode]\n"); + if (m_is_mk4mmu3) + writer.switch_filament_monitoring(true); + // Travel to where we assume we are. Custom toolchange or some special T code handling (parking extruder etc) // gcode could have left the extruder somewhere, we cannot just start extruding. We should also inform the // postprocessor that we absolutely want to have this in the gcode, even if it thought it is the same as before. @@ -1030,10 +1101,11 @@ void WipeTower2::toolchange_Change( writer.feedrate(m_travel_speed * 60.f) // see https://github.com/prusa3d/PrusaSlicer/issues/5483 .append(std::string("G1 X") + Slic3r::float_to_string_decimal_point(current_pos.x()) + " Y" + Slic3r::float_to_string_decimal_point(current_pos.y()) - + never_skip_tag() + "\n"); + + never_skip_tag() + "\n" + ); + writer.append("[deretraction_from_wipe_tower_generator]"); - // Orca TODO: handle multi extruders // The toolchange Tn command will be inserted later, only in case that the user does // not provide a custom toolchange gcode. writer.set_tool(new_tool); // This outputs nothing, the writer just needs to know the tool has changed. @@ -1084,21 +1156,25 @@ void WipeTower2::toolchange_Wipe( const float& xl = cleaning_box.ld.x(); const float& xr = cleaning_box.rd.x(); + writer.set_extrusion_flow(m_extrusion_flow * m_extra_flow); + const float line_width = m_perimeter_width * m_extra_flow; + writer.change_analyzer_line_width(line_width); + // Variables x_to_wipe and traversed_x are here to be able to make sure it always wipes at least // the ordered volume, even if it means violating the box. This can later be removed and simply // wipe until the end of the assigned area. - float x_to_wipe = volume_to_length(wipe_volume, m_perimeter_width, m_layer_height) * (is_first_layer() ? m_extra_spacing : 1.f); - float dy = (is_first_layer() ? 1.f : m_extra_spacing) * m_perimeter_width; // Don't use the extra spacing for the first layer. + float x_to_wipe = volume_to_length(wipe_volume, m_perimeter_width, m_layer_height) / m_extra_flow; + float dy = (is_first_layer() ? m_extra_flow : m_extra_spacing_wipe) * m_perimeter_width; // Don't use the extra spacing for the first layer, but do use the spacing resulting from increased flow. // All the calculations in all other places take the spacing into account for all the layers. // If spare layers are excluded->if 1 or less toolchange has been done, it must be sill the first layer, too.So slow down. const float target_speed = is_first_layer() || (m_num_tool_changes <= 1 && m_no_sparse_layers) ? m_first_layer_speed * 60.f : std::min(m_wipe_tower_max_purge_speed * 60.f, m_infill_speed * 60.f); float wipe_speed = 0.33f * target_speed; - // if there is less than 2.5*m_perimeter_width to the edge, advance straightaway (there is likely a blob anyway) - if ((m_left_to_right ? xr-writer.x() : writer.x()-xl) < 2.5f*m_perimeter_width) { - writer.travel((m_left_to_right ? xr-m_perimeter_width : xl+m_perimeter_width),writer.y()+dy); + // if there is less than 2.5*line_width to the edge, advance straightaway (there is likely a blob anyway) + if ((m_left_to_right ? xr-writer.x() : writer.x()-xl) < 2.5f*line_width) { + writer.travel((m_left_to_right ? xr-line_width : xl+line_width),writer.y()+dy); m_left_to_right = !m_left_to_right; } @@ -1113,21 +1189,21 @@ void WipeTower2::toolchange_Wipe( float traversed_x = writer.x(); if (m_left_to_right) - writer.extrude(xr - (i % 4 == 0 ? 0 : 1.5f*m_perimeter_width), writer.y(), wipe_speed); + writer.extrude(xr - (i % 4 == 0 ? 0 : 1.5f*line_width), writer.y(), wipe_speed); else - writer.extrude(xl + (i % 4 == 1 ? 0 : 1.5f*m_perimeter_width), writer.y(), wipe_speed); + writer.extrude(xl + (i % 4 == 1 ? 0 : 1.5f*line_width), writer.y(), wipe_speed); - if (writer.y()+float(EPSILON) > cleaning_box.lu.y()-0.5f*m_perimeter_width) + if (writer.y()+float(EPSILON) > cleaning_box.lu.y()-0.5f*line_width) break; // in case next line would not fit traversed_x -= writer.x(); x_to_wipe -= std::abs(traversed_x); if (x_to_wipe < WT_EPSILON) { - writer.travel(m_left_to_right ? xl + 1.5f*m_perimeter_width : xr - 1.5f*m_perimeter_width, writer.y(), 7200); + writer.travel(m_left_to_right ? xl + 1.5f*line_width : xr - 1.5f*line_width, writer.y(), 7200); break; } // stepping to the next line: - writer.extrude(writer.x() + (i % 4 == 0 ? -1.f : (i % 4 == 1 ? 1.f : 0.f)) * 1.5f*m_perimeter_width, writer.y() + dy); + writer.extrude(writer.x() + (i % 4 == 0 ? -1.f : (i % 4 == 1 ? 1.f : 0.f)) * 1.5f*line_width, writer.y() + dy); m_left_to_right = !m_left_to_right; } @@ -1141,6 +1217,7 @@ void WipeTower2::toolchange_Wipe( m_left_to_right = !m_left_to_right; writer.set_extrusion_flow(m_extrusion_flow); // Reset the extrusion flow. + writer.change_analyzer_line_width(m_perimeter_width); } @@ -1414,16 +1491,15 @@ std::vector> WipeTower2::extract_wipe_volumes(const PrintConf std::vector wiping_matrix(cast(config.flush_volumes_matrix.values)); auto scale = config.flush_multiplier; - // Orca todo: currently we only/always support SEMM. // The values shall only be used when SEMM is enabled. The purging for other printers // is determined by filament_minimal_purge_on_wipe_tower. - if (! config.purge_in_prime_tower.value) + if (! config.purge_in_prime_tower.value || ! config.single_extruder_multi_material.value) std::fill(wiping_matrix.begin(), wiping_matrix.end(), 0.f); // Extract purging volumes for each extruder pair: std::vector> wipe_volumes; const unsigned int number_of_extruders = (unsigned int)(sqrt(wiping_matrix.size())+EPSILON); - for (unsigned int i = 0; i(wiping_matrix.begin()+i*number_of_extruders, wiping_matrix.begin()+(i+1)*number_of_extruders)); // Also include filament_minimal_purge_on_wipe_tower. This is needed for the preview. @@ -1434,6 +1510,14 @@ std::vector> WipeTower2::extract_wipe_volumes(const PrintConf return wipe_volumes; } +static float get_wipe_depth(float volume, float layer_height, float perimeter_width, float extra_flow, float extra_spacing, float width) +{ + float length_to_extrude = (volume_to_length(volume, perimeter_width, layer_height)) / extra_flow; + length_to_extrude = std::max(length_to_extrude,0.f); + + return (int(length_to_extrude / width) + 1) * perimeter_width * extra_spacing; +} + // Appends a toolchange into m_plan and calculates neccessary depth of the corresponding box void WipeTower2::plan_toolchange(float z_par, float layer_height_par, unsigned int old_tool, unsigned int new_tool, float wipe_volume) @@ -1449,23 +1533,18 @@ void WipeTower2::plan_toolchange(float z_par, float layer_height_par, unsigned i if (old_tool == new_tool) // new layer without toolchanges - we are done return; - // this is an actual toolchange - let's calculate depth to reserve on the wipe tower - float depth = 0.f; - float width = m_wipe_tower_width - 3*m_perimeter_width; + // this is an actual toolchange - let's calculate depth to reserve on the wipe tower + float width = m_wipe_tower_width - 3*m_perimeter_width; float length_to_extrude = volume_to_length(0.25f * std::accumulate(m_filpar[old_tool].ramming_speed.begin(), m_filpar[old_tool].ramming_speed.end(), 0.f), m_perimeter_width * m_filpar[old_tool].ramming_line_width_multiplicator, layer_height_par); - depth = (int(length_to_extrude / width) + 1) * (m_perimeter_width * m_filpar[old_tool].ramming_line_width_multiplicator * m_filpar[old_tool].ramming_step_multiplicator); - float ramming_depth = depth; - length_to_extrude = width*((length_to_extrude / width)-int(length_to_extrude / width)) - width; - float first_wipe_line = -length_to_extrude; - length_to_extrude += volume_to_length(wipe_volume, m_perimeter_width, layer_height_par); - length_to_extrude = std::max(length_to_extrude,0.f); + float ramming_depth = (int(length_to_extrude / width) + 1) * (m_perimeter_width * m_filpar[old_tool].ramming_line_width_multiplicator * m_filpar[old_tool].ramming_step_multiplicator) * m_extra_spacing_ramming; + float first_wipe_line = - (width*((length_to_extrude / width)-int(length_to_extrude / width)) - width); - depth += (int(length_to_extrude / width) + 1) * m_perimeter_width; - depth *= m_extra_spacing; - - m_plan.back().tool_changes.push_back(WipeTowerInfo::ToolChange(old_tool, new_tool, depth, ramming_depth, first_wipe_line, wipe_volume)); + float first_wipe_volume = length_to_volume(first_wipe_line, m_perimeter_width * m_extra_flow, layer_height_par); + float wiping_depth = get_wipe_depth(wipe_volume - first_wipe_volume, layer_height_par, m_perimeter_width, m_extra_flow, m_extra_spacing_wipe, width); + + m_plan.back().tool_changes.push_back(WipeTowerInfo::ToolChange(old_tool, new_tool, ramming_depth + wiping_depth, ramming_depth, first_wipe_line, wipe_volume)); } @@ -1505,20 +1584,25 @@ void WipeTower2::save_on_last_wipe() // Which toolchange will finish_layer extrusions be subtracted from? int idx = first_toolchange_to_nonsoluble(m_layer_info->tool_changes); + if (idx == -1) { + // In this case, finish_layer will be called at the very beginning. + finish_layer().total_extrusion_length_in_plane(); + } + for (int i=0; itool_changes.size()); ++i) { auto& toolchange = m_layer_info->tool_changes[i]; tool_change(toolchange.new_tool); if (i == idx) { float width = m_wipe_tower_width - 3*m_perimeter_width; // width we draw into - float length_to_save = finish_layer().total_extrusion_length_in_plane(); - float length_to_wipe = volume_to_length(toolchange.wipe_volume, - m_perimeter_width, m_layer_info->height) - toolchange.first_wipe_line - length_to_save; - length_to_wipe = std::max(length_to_wipe,0.f); - float depth_to_wipe = m_perimeter_width * (std::floor(length_to_wipe/width) + ( length_to_wipe > 0.f ? 1.f : 0.f ) ) * m_extra_spacing; + float volume_to_save = length_to_volume(finish_layer().total_extrusion_length_in_plane(), m_perimeter_width, m_layer_info->height); + float volume_left_to_wipe = std::max(m_filpar[toolchange.new_tool].filament_minimal_purge_on_wipe_tower, toolchange.wipe_volume_total - volume_to_save); + float volume_we_need_depth_for = std::max(0.f, volume_left_to_wipe - length_to_volume(toolchange.first_wipe_line, m_perimeter_width*m_extra_flow, m_layer_info->height)); + float depth_to_wipe = get_wipe_depth(volume_we_need_depth_for, m_layer_info->height, m_perimeter_width, m_extra_flow, m_extra_spacing_wipe, width); toolchange.required_depth = toolchange.ramming_depth + depth_to_wipe; + toolchange.wipe_volume = volume_left_to_wipe; } } } @@ -1563,7 +1647,7 @@ void WipeTower2::generate(std::vector> return; plan_tower(); - for (int i=0;i<5;++i) { + for (int i = 0; i<5; ++i) { save_on_last_wipe(); plan_tower(); } @@ -1579,14 +1663,15 @@ void WipeTower2::generate(std::vector> } } - for (auto& used : m_used_filament_length) // reset used filament stats - used = 0.f; + m_used_filament_length.assign(m_used_filament_length.size(), 0.f); // reset used filament stats + assert(m_used_filament_length_until_layer.empty()); + m_used_filament_length_until_layer.emplace_back(0.f, m_used_filament_length); m_old_temperature = -1; // reset last temperature written in the gcode - std::vector layer_result; for (const WipeTower2::WipeTowerInfo& layer : m_plan) { + std::vector layer_result; set_layer(layer.z, layer.height, 0, false/*layer.z == m_plan.front().z*/, layer.z == m_plan.back().z); m_internal_rotation += 180.f; @@ -1623,6 +1708,10 @@ void WipeTower2::generate(std::vector> } result.emplace_back(std::move(layer_result)); + + if (m_used_filament_length_until_layer.empty() || m_used_filament_length_until_layer.back().first != layer.z) + m_used_filament_length_until_layer.emplace_back(); + m_used_filament_length_until_layer.back() = std::make_pair(layer.z, m_used_filament_length); } } diff --git a/src/libslic3r/GCode/WipeTower2.hpp b/src/libslic3r/GCode/WipeTower2.hpp index 58bdd6fc39..0f377d00f7 100644 --- a/src/libslic3r/GCode/WipeTower2.hpp +++ b/src/libslic3r/GCode/WipeTower2.hpp @@ -1,6 +1,5 @@ -// Orca: This file is ported from latest PrusaSlicer +// Orca: WipeTower2 for all non bbl printers, support all MMU device and toolchanger -// Original PrusaSlicer Copyright: #ifndef WipeTower2_ #define WipeTower2_ @@ -128,6 +127,7 @@ public: } std::vector get_used_filament() const { return m_used_filament_length; } + std::vector>> get_used_filament_until_layer() const { return m_used_filament_length_until_layer; } int get_number_of_toolchanges() const { return m_num_tool_changes; } struct FilamentParameters { @@ -140,6 +140,10 @@ public: float unloading_speed = 0.f; float unloading_speed_start = 0.f; float delay = 0.f ; + + float filament_stamping_loading_speed = 0.f; + float filament_stamping_distance = 0.f; + int cooling_moves = 0; float cooling_initial_speed = 0.f; float cooling_final_speed = 0.f; @@ -151,6 +155,7 @@ public: float filament_area; bool multitool_ramming; float multitool_ramming_time = 0.f; + float filament_minimal_purge_on_wipe_tower = 0.f; }; private: @@ -169,6 +174,7 @@ private: bool m_semm = true; // Are we using a single extruder multimaterial printer? bool m_enable_filament_ramming = true; + bool m_is_mk4mmu3 = false; Vec2f m_wipe_tower_pos; // Left front corner of the wipe tower in mm. float m_wipe_tower_width; // Width of the wipe tower. float m_wipe_tower_depth = 0.f; // Depth of the wipe tower @@ -219,8 +225,7 @@ private: // State of the wipe tower generator. unsigned int m_num_layer_changes = 0; // Layer change counter for the output statistics. unsigned int m_num_tool_changes = 0; // Tool change change counter for the output statistics. - ///unsigned int m_idx_tool_change_in_layer = 0; // Layer change counter in this layer. Counting up to m_max_color_changes. - bool m_print_brim = true; + // A fill-in direction (positive Y, negative Y) alternates with each layer. wipe_shape m_current_shape = SHAPE_NORMAL; size_t m_current_tool = 0; @@ -229,7 +234,9 @@ private: float m_depth_traversed = 0.f; // Current y position at the wipe tower. bool m_current_layer_finished = false; bool m_left_to_right = true; - float m_extra_spacing = 1.f; + float m_extra_flow = 1.f; + float m_extra_spacing_wipe = 1.f; + float m_extra_spacing_ramming = 1.f; bool is_first_layer() const { return size_t(m_layer_info - m_plan.begin()) == m_first_layer_idx; } @@ -241,21 +248,13 @@ private: return layer_height * ( m_perimeter_width - layer_height * (1.f-float(M_PI)/4.f)) / filament_area(); } - // Calculates length of extrusion line to extrude given volume - float volume_to_length(float volume, float line_width, float layer_height) const { - return std::max(0.f, volume / (layer_height * (line_width - layer_height * (1.f - float(M_PI) / 4.f)))); - } // Calculates depth for all layers and propagates them downwards void plan_tower(); - // Goes through m_plan and recalculates depths and width of the WT to make it exactly square - experimental - void make_wipe_tower_square(); - // Goes through m_plan, calculates border and finish_layer extrusions and subtracts them from last wipe void save_on_last_wipe(); - // to store information about tool changes for a given layer struct WipeTowerInfo{ struct ToolChange { @@ -265,19 +264,19 @@ private: float ramming_depth; float first_wipe_line; float wipe_volume; + float wipe_volume_total; ToolChange(size_t old, size_t newtool, float depth=0.f, float ramming_depth=0.f, float fwl=0.f, float wv=0.f) - : old_tool{old}, new_tool{newtool}, required_depth{depth}, ramming_depth{ramming_depth}, first_wipe_line{fwl}, wipe_volume{wv} {} + : old_tool{old}, new_tool{newtool}, required_depth{depth}, ramming_depth{ramming_depth}, first_wipe_line{fwl}, wipe_volume{wv}, wipe_volume_total{wv} {} }; float z; // z position of the layer float height; // layer height float depth; // depth of the layer based on all layers above - float extra_spacing; float toolchanges_depth() const { float sum = 0.f; for (const auto &a : tool_changes) sum += a.required_depth; return sum; } std::vector tool_changes; WipeTowerInfo(float z_par, float layer_height_par) - : z{z_par}, height{layer_height_par}, depth{0}, extra_spacing{1.f} {} + : z{z_par}, height{layer_height_par}, depth{0} {} }; std::vector m_plan; // Stores information about all layers and toolchanges for the future wipe tower (filled by plan_toolchange(...)) @@ -289,6 +288,7 @@ private: // Stores information about used filament length per extruder: std::vector m_used_filament_length; + std::vector>> m_used_filament_length_until_layer; // Return index of first toolchange that switches to non-soluble extruder // ot -1 if there is no such toolchange. @@ -299,6 +299,7 @@ private: WipeTowerWriter2 &writer, const WipeTower::box_coordinates &cleaning_box, const std::string& current_material, + const int old_temperature, const int new_temperature); void toolchange_Change( @@ -316,6 +317,9 @@ private: float wipe_volume); }; + + + } // namespace Slic3r -#endif // WipeTowerPrusaMM_hpp_ +#endif // slic3r_GCode_WipeTower_hpp_ diff --git a/src/libslic3r/GCodeReader.hpp b/src/libslic3r/GCodeReader.hpp index c0b868c6f7..bcfabd7bbb 100644 --- a/src/libslic3r/GCodeReader.hpp +++ b/src/libslic3r/GCodeReader.hpp @@ -79,6 +79,16 @@ public: return strncmp(cmd, cmd_test, len) == 0 && GCodeReader::is_end_of_word(cmd[len]); } + static bool cmd_starts_with(const std::string& gcode_line, const char* cmd_test) { + return strncmp(GCodeReader::skip_whitespaces(gcode_line.c_str()), cmd_test, strlen(cmd_test)) == 0; + } + + static std::string extract_cmd(const std::string& gcode_line) { + GCodeLine temp; + temp.m_raw = gcode_line; + const std::string_view cmd = temp.cmd(); + return { cmd.begin(), cmd.end() }; + } private: std::string m_raw; float m_axis[NUM_AXES]; diff --git a/src/libslic3r/GCodeWriter.cpp b/src/libslic3r/GCodeWriter.cpp index d4ebb64362..f60d81a95a 100644 --- a/src/libslic3r/GCodeWriter.cpp +++ b/src/libslic3r/GCodeWriter.cpp @@ -90,48 +90,56 @@ std::string GCodeWriter::postamble() const return gcode.str(); } -std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool) const -{ - if (wait && (FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish))) +std::string GCodeWriter::set_temperature(unsigned int temperature, GCodeFlavor flavor, bool wait, int tool, std::string comment){ + if (wait && (flavor == gcfMakerWare || flavor == gcfSailfish)) return ""; - - std::string code, comment; - if (wait && FLAVOR_IS_NOT(gcfTeacup) && FLAVOR_IS_NOT(gcfRepRapFirmware)) { - code = "M109"; - comment = "set nozzle temperature and wait for it to be reached"; + + std::string code; + if (wait && flavor != gcfTeacup && flavor != gcfRepRapFirmware) { + code = "M109"; + if(comment.empty()) + comment = "set nozzle temperature and wait for it to be reached"; } else { - if (FLAVOR_IS(gcfRepRapFirmware)) { // M104 is deprecated on RepRapFirmware + if (flavor == gcfRepRapFirmware) { // M104 is deprecated on RepRapFirmware code = "G10"; } else { code = "M104"; } - comment = "set nozzle temperature"; + if(comment.empty()) + comment = "set nozzle temperature"; } - + std::ostringstream gcode; gcode << code << " "; - if (FLAVOR_IS(gcfMach3) || FLAVOR_IS(gcfMachinekit)) { + if (flavor == gcfMach3 || flavor == gcfMachinekit) { gcode << "P"; } else { gcode << "S"; } gcode << temperature; - bool multiple_tools = this->multiple_extruders && ! m_single_extruder_multi_material; - if (tool != -1 && (multiple_tools || FLAVOR_IS(gcfMakerWare) || FLAVOR_IS(gcfSailfish)) ) { - if (FLAVOR_IS(gcfRepRapFirmware)) { + if (tool != -1) { + if (flavor == gcfRepRapFirmware) { gcode << " P" << tool; } else { gcode << " T" << tool; } } gcode << " ; " << comment << "\n"; - - if ((FLAVOR_IS(gcfTeacup) || FLAVOR_IS(gcfRepRapFirmware)) && wait) + + if ((flavor == gcfTeacup || flavor == gcfRepRapFirmware) && wait) gcode << "M116 ; wait for temperature to be reached\n"; - + return gcode.str(); } +std::string GCodeWriter::set_temperature(unsigned int temperature, bool wait, int tool) const +{ + // set tool to -1 to make sure we won't emit T parameter for single extruder or SEMM + if (!this->multiple_extruders || m_single_extruder_multi_material) + tool = -1; + return set_temperature(temperature, this->config.gcode_flavor, wait, tool); +} + // BBS std::string GCodeWriter::set_bed_temperature(int temperature, bool wait) { diff --git a/src/libslic3r/GCodeWriter.hpp b/src/libslic3r/GCodeWriter.hpp index 8e1effcc4e..ccdd460fe0 100644 --- a/src/libslic3r/GCodeWriter.hpp +++ b/src/libslic3r/GCodeWriter.hpp @@ -43,6 +43,8 @@ public: } std::string preamble(); std::string postamble() const; + static std::string set_temperature(unsigned int temperature, GCodeFlavor flavor, bool wait = false, int tool = -1, std::string comment = std::string()); + std::string set_temperature(unsigned int temperature, bool wait = false, int tool = -1) const; std::string set_bed_temperature(int temperature, bool wait = false); std::string set_chamber_temperature(int temperature, bool wait = false); @@ -80,7 +82,7 @@ public: std::string lift(LiftType lift_type = LiftType::NormalLift, bool spiral_vase = false); std::string unlift(); Vec3d get_position() const { return m_pos; } - void set_position(const Vec3d& in) { m_pos = in; } + void set_position(const Vec3d& in) { m_pos = in; } double get_zhop() const { return m_lifted; } //BBS: set offset for gcode writer diff --git a/src/libslic3r/PlaceholderParser.cpp b/src/libslic3r/PlaceholderParser.cpp index 22ef3705d8..04935ae481 100644 --- a/src/libslic3r/PlaceholderParser.cpp +++ b/src/libslic3r/PlaceholderParser.cpp @@ -1,6 +1,7 @@ #include "PlaceholderParser.hpp" #include "Exception.hpp" #include "Flow.hpp" +#include "Utils.hpp" #include #include #include @@ -40,19 +41,11 @@ #include #include #include -#if BOOST_VERSION >= 107800 #include #include #include #include #include -#else -#include -#include -#include -#include -#include -#endif #include #include #include @@ -73,11 +66,6 @@ namespace Slic3r { -//! macro used to mark string used at localization, -//! return same string -#define L(s) (s) -#define _(s) Slic3r::I18N::translate(s) - PlaceholderParser::PlaceholderParser(const DynamicConfig *external_config) : m_external_config(external_config) { this->set("version", std::string(SoftFever_VERSION)); @@ -180,30 +168,35 @@ namespace px = boost::phoenix; namespace client { - template + using Iterator = std::string::const_iterator; + using IteratorRange = boost::iterator_range; + struct OptWithPos { OptWithPos() {} - OptWithPos(ConfigOptionConstPtr opt, boost::iterator_range it_range) : opt(opt), it_range(it_range) {} + OptWithPos(ConfigOptionConstPtr opt, IteratorRange it_range, bool writable = false) : opt(opt), it_range(it_range), writable(writable) {} ConfigOptionConstPtr opt { nullptr }; bool writable { false }; // -1 means it is a scalar variable, or it is a vector variable and index was not assigned yet or the whole vector is considered. int index { -1 }; - boost::iterator_range it_range; + IteratorRange it_range; + bool empty() const { return opt == nullptr; } bool has_index() const { return index != -1; } }; - template - std::ostream& operator<<(std::ostream& os, OptWithPos const& opt) + std::ostream& operator<<(std::ostream& os, OptWithPos const& opt) { os << std::string(opt.it_range.begin(), opt.it_range.end()); return os; } - template struct expr { expr() {} + expr(const expr &rhs) : m_type(rhs.type()), it_range(rhs.it_range) + { if (rhs.type() == TYPE_STRING) m_data.s = new std::string(*rhs.m_data.s); else m_data.set(rhs.m_data); } + expr(expr &&rhs) : expr(std::move(rhs), rhs.it_range.begin(), rhs.it_range.end()) {} + explicit expr(bool b) : m_type(TYPE_BOOL) { m_data.b = b; } explicit expr(bool b, const Iterator &it_begin, const Iterator &it_end) : m_type(TYPE_BOOL), it_range(it_begin, it_end) { m_data.b = b; } explicit expr(int i) : m_type(TYPE_INT) { m_data.i = i; } @@ -212,13 +205,11 @@ namespace client explicit expr(double d, const Iterator &it_begin, const Iterator &it_end) : m_type(TYPE_DOUBLE), it_range(it_begin, it_end) { m_data.d = d; } explicit expr(const char *s) : m_type(TYPE_STRING) { m_data.s = new std::string(s); } explicit expr(const std::string &s) : m_type(TYPE_STRING) { m_data.s = new std::string(s); } + explicit expr(std::string &&s) : m_type(TYPE_STRING) { m_data.s = new std::string(std::move(s)); } explicit expr(const std::string &s, const Iterator &it_begin, const Iterator &it_end) : m_type(TYPE_STRING), it_range(it_begin, it_end) { m_data.s = new std::string(s); } - expr(const expr &rhs) : m_type(rhs.type()), it_range(rhs.it_range) - { if (rhs.type() == TYPE_STRING) m_data.s = new std::string(*rhs.m_data.s); else m_data.set(rhs.m_data); } - explicit expr(expr &&rhs) : expr(rhs, rhs.it_range.begin(), rhs.it_range.end()) {} explicit expr(expr &&rhs, const Iterator &it_begin, const Iterator &it_end) : m_type(rhs.type()), it_range{ it_begin, it_end } - { + { m_data.set(rhs.m_data); rhs.m_type = TYPE_EMPTY; } @@ -304,6 +295,9 @@ namespace client { std::string out; switch (this->type()) { + case TYPE_EMPTY: + // Inside an if / else block to be skipped. + break; case TYPE_BOOL: out = this->b() ? "true" : "false"; break; case TYPE_INT: out = std::to_string(this->i()); break; case TYPE_DOUBLE: @@ -328,15 +322,18 @@ namespace client // Range of input iterators covering this expression. // Used for throwing parse exceptions. - boost::iterator_range it_range; + IteratorRange it_range; expr unary_minus(const Iterator start_pos) const { switch (this->type()) { + case TYPE_EMPTY: + // Inside an if / else block to be skipped. + return expr(); case TYPE_INT : - return expr(- this->i(), start_pos, this->it_range.end()); + return expr(- this->i(), start_pos, this->it_range.end()); case TYPE_DOUBLE: - return expr(- this->d(), start_pos, this->it_range.end()); + return expr(- this->d(), start_pos, this->it_range.end()); default: this->throw_exception("Cannot apply unary minus operator."); } @@ -348,10 +345,13 @@ namespace client expr unary_integer(const Iterator start_pos) const { switch (this->type()) { + case TYPE_EMPTY: + // Inside an if / else block to be skipped. + return expr(); case TYPE_INT: - return expr(this->i(), start_pos, this->it_range.end()); + return expr(this->i(), start_pos, this->it_range.end()); case TYPE_DOUBLE: - return expr(static_cast(this->d()), start_pos, this->it_range.end()); + return expr(static_cast(this->d()), start_pos, this->it_range.end()); default: this->throw_exception("Cannot convert to integer."); } @@ -363,10 +363,13 @@ namespace client expr round(const Iterator start_pos) const { switch (this->type()) { + case TYPE_EMPTY: + // Inside an if / else block to be skipped. + return expr(); case TYPE_INT: - return expr(this->i(), start_pos, this->it_range.end()); + return expr(this->i(), start_pos, this->it_range.end()); case TYPE_DOUBLE: - return expr(static_cast(std::round(this->d())), start_pos, this->it_range.end()); + return expr(static_cast(std::round(this->d())), start_pos, this->it_range.end()); default: this->throw_exception("Cannot round a non-numeric value."); } @@ -378,8 +381,11 @@ namespace client expr unary_not(const Iterator start_pos) const { switch (this->type()) { + case TYPE_EMPTY: + // Inside an if / else block to be skipped. + return expr(); case TYPE_BOOL: - return expr(! this->b(), start_pos, this->it_range.end()); + return expr(! this->b(), start_pos, this->it_range.end()); default: this->throw_exception("Cannot apply a not operator."); } @@ -390,7 +396,9 @@ namespace client expr &operator+=(const expr &rhs) { - if (this->type() == TYPE_STRING) { + if (this->type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped. + } else if (this->type() == TYPE_STRING) { // Convert the right hand side to string and append. *m_data.s += rhs.to_string(); } else if (rhs.type() == TYPE_STRING) { @@ -405,78 +413,104 @@ namespace client else m_data.i += rhs.i(); } - this->it_range = boost::iterator_range(this->it_range.begin(), rhs.it_range.end()); + this->it_range = IteratorRange(this->it_range.begin(), rhs.it_range.end()); return *this; } expr &operator-=(const expr &rhs) { - const char *err_msg = "Cannot subtract non-numeric types."; - this->throw_if_not_numeric(err_msg); - rhs.throw_if_not_numeric(err_msg); - if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) - this->set_d_lite(this->as_d() - rhs.as_d()); - else - m_data.i -= rhs.i(); - this->it_range = boost::iterator_range(this->it_range.begin(), rhs.it_range.end()); + if (this->type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped. + this->reset(); + } else { + const char *err_msg = "Cannot subtract non-numeric types."; + this->throw_if_not_numeric(err_msg); + rhs.throw_if_not_numeric(err_msg); + if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) + this->set_d_lite(this->as_d() - rhs.as_d()); + else + m_data.i -= rhs.i(); + this->it_range = IteratorRange(this->it_range.begin(), rhs.it_range.end()); + } return *this; } expr &operator*=(const expr &rhs) { - const char *err_msg = "Cannot multiply with non-numeric type."; - this->throw_if_not_numeric(err_msg); - rhs.throw_if_not_numeric(err_msg); - if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) - this->set_d_lite(this->as_d() * rhs.as_d()); - else - m_data.i *= rhs.i(); - this->it_range = boost::iterator_range(this->it_range.begin(), rhs.it_range.end()); + if (this->type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped. + this->reset(); + } else { + const char *err_msg = "Cannot multiply with non-numeric type."; + this->throw_if_not_numeric(err_msg); + rhs.throw_if_not_numeric(err_msg); + if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) + this->set_d_lite(this->as_d() * rhs.as_d()); + else + m_data.i *= rhs.i(); + this->it_range = IteratorRange(this->it_range.begin(), rhs.it_range.end()); + } return *this; } expr &operator/=(const expr &rhs) { - this->throw_if_not_numeric("Cannot divide a non-numeric type."); - rhs.throw_if_not_numeric("Cannot divide with a non-numeric type."); - if (rhs.type() == TYPE_INT ? (rhs.i() == 0) : (rhs.d() == 0.)) - rhs.throw_exception("Division by zero"); - if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) - this->set_d_lite(this->as_d() / rhs.as_d()); - else - m_data.i /= rhs.i(); - this->it_range = boost::iterator_range(this->it_range.begin(), rhs.it_range.end()); + if (this->type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped. + this->reset(); + } else { + this->throw_if_not_numeric("Cannot divide a non-numeric type."); + rhs.throw_if_not_numeric("Cannot divide with a non-numeric type."); + if (rhs.type() == TYPE_INT ? (rhs.i() == 0) : (rhs.d() == 0.)) + rhs.throw_exception("Division by zero"); + if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) + this->set_d_lite(this->as_d() / rhs.as_d()); + else + m_data.i /= rhs.i(); + this->it_range = IteratorRange(this->it_range.begin(), rhs.it_range.end()); + } return *this; } expr &operator%=(const expr &rhs) { - this->throw_if_not_numeric("Cannot divide a non-numeric type."); - rhs.throw_if_not_numeric("Cannot divide with a non-numeric type."); - if (rhs.type() == TYPE_INT ? (rhs.i() == 0) : (rhs.d() == 0.)) - rhs.throw_exception("Division by zero"); - if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) - this->set_d_lite(std::fmod(this->as_d(), rhs.as_d())); - else - m_data.i %= rhs.i(); - this->it_range = boost::iterator_range(this->it_range.begin(), rhs.it_range.end()); + if (this->type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped. + this->reset(); + } else { + this->throw_if_not_numeric("Cannot divide a non-numeric type."); + rhs.throw_if_not_numeric("Cannot divide with a non-numeric type."); + if (rhs.type() == TYPE_INT ? (rhs.i() == 0) : (rhs.d() == 0.)) + rhs.throw_exception("Division by zero"); + if (this->type() == TYPE_DOUBLE || rhs.type() == TYPE_DOUBLE) + this->set_d_lite(std::fmod(this->as_d(), rhs.as_d())); + else + m_data.i %= rhs.i(); + this->it_range = IteratorRange(this->it_range.begin(), rhs.it_range.end()); + } return *this; } static void to_string2(expr &self, std::string &out) { - out = self.to_string(); + if (self.type() != TYPE_EMPTY) + // Not inside an if / else block to be skipped + out = self.to_string(); } static void evaluate_boolean(expr &self, bool &out) { - if (self.type() != TYPE_BOOL) - self.throw_exception("Not a boolean expression"); - out = self.b(); + if (self.type() != TYPE_EMPTY) { + // Not inside an if / else block to be skipped + if (self.type() != TYPE_BOOL) + self.throw_exception("Not a boolean expression"); + out = self.b(); + } } static void evaluate_boolean_to_string(expr &self, std::string &out) { + assert(self.type() != TYPE_EMPTY); if (self.type() != TYPE_BOOL) self.throw_exception("Not a boolean expression"); out = self.b() ? "true" : "false"; @@ -485,6 +519,9 @@ namespace client // Is lhs==rhs? Store the result into lhs. static void compare_op(expr &lhs, expr &rhs, char op, bool invert) { + if (lhs.type() == TYPE_EMPTY) + // Inside an if / else block to be skipped + return; bool value = false; if (lhs.numeric_type() && rhs.numeric_type()) { // Both types are numeric. @@ -541,6 +578,9 @@ namespace client // Store the result into param1. static void function_2params(expr ¶m1, expr ¶m2, Function2ParamsType fun) { + if (param1.type() == TYPE_EMPTY) + // Inside an if / else block to be skipped + return; throw_if_not_numeric(param1); throw_if_not_numeric(param2); if (param1.type() == TYPE_DOUBLE || param2.type() == TYPE_DOUBLE) { @@ -568,6 +608,9 @@ namespace client // Store the result into param1. static void random(expr ¶m1, expr ¶m2, std::mt19937 &rng) { + if (param1.type() == TYPE_EMPTY) + // Inside an if / else block to be skipped + return; throw_if_not_numeric(param1); throw_if_not_numeric(param2); if (param1.type() == TYPE_DOUBLE || param2.type() == TYPE_DOUBLE) @@ -581,6 +624,9 @@ namespace client template static void digits(expr ¶m1, expr ¶m2, expr ¶m3) { + if (param1.type() == TYPE_EMPTY) + // Inside an if / else block to be skipped + return; throw_if_not_numeric(param1); if (param2.type() != TYPE_INT) param2.throw_exception("digits: second parameter must be integer"); @@ -600,8 +646,11 @@ namespace client param1.set_s(buf); } - static void regex_op(const expr &lhs, boost::iterator_range &rhs, char op, expr &out) + static void regex_op(const expr &lhs, IteratorRange &rhs, char op, expr &out) { + if (lhs.type() == TYPE_EMPTY) + // Inside an if / else block to be skipped + return; const std::string *subject = nullptr; if (lhs.type() == TYPE_STRING) { // One type is string, the other could be converted to string. @@ -622,14 +671,19 @@ namespace client } } - static void regex_matches (expr &lhs, boost::iterator_range &rhs) { return regex_op(lhs, rhs, '=', lhs); } - static void regex_doesnt_match(expr &lhs, boost::iterator_range &rhs) { return regex_op(lhs, rhs, '!', lhs); } + static void regex_matches (expr &lhs, IteratorRange &rhs) { return regex_op(lhs, rhs, '=', lhs); } + static void regex_doesnt_match(expr &lhs, IteratorRange &rhs) { return regex_op(lhs, rhs, '!', lhs); } static void one_of_test_init(expr &out) { out.set_b(false); } template static void one_of_test(const expr &match, const expr &pattern, expr &out) { + if (match.type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped + out.reset(); + return; + } if (! out.b()) { if (match.type() != TYPE_STRING) match.throw_exception("one_of(): First parameter (the string to match against) has to be a string value"); @@ -646,7 +700,12 @@ namespace client out.set_b(match.s() == pattern.s()); } } - static void one_of_test_regex(const expr &match, boost::iterator_range &pattern, expr &out) { + static void one_of_test_regex(const expr &match, IteratorRange &pattern, expr &out) { + if (match.type() == TYPE_EMPTY) { + // Inside an if / else block to be skipped + out.reset(); + return; + } if (! out.b()) { if (match.type() != TYPE_STRING) match.throw_exception("one_of(): First parameter (the string to match against) has to be a string value"); @@ -656,6 +715,9 @@ namespace client static void logical_op(expr &lhs, expr &rhs, char op) { + if (lhs.type() == TYPE_EMPTY) + // Inside an if / else block to be skipped + return; bool value = false; if (lhs.type() == TYPE_BOOL && rhs.type() == TYPE_BOOL) { value = (op == '|') ? (lhs.b() || rhs.b()) : (lhs.b() && rhs.b()); @@ -668,24 +730,6 @@ namespace client static void logical_or (expr &lhs, expr &rhs) { logical_op(lhs, rhs, '|'); } static void logical_and(expr &lhs, expr &rhs) { logical_op(lhs, rhs, '&'); } - static void ternary_op(expr &lhs, expr &rhs1, expr &rhs2) - { - if (lhs.type() != TYPE_BOOL) - lhs.throw_exception("Not a boolean expression"); - if (lhs.b()) - lhs = std::move(rhs1); - else - lhs = std::move(rhs2); - } - - static void set_if(bool &cond, bool ¬_yet_consumed, std::string &str_in, std::string &str_out) - { - if (cond && not_yet_consumed) { - str_out = str_in; - not_yet_consumed = false; - } - } - void throw_exception(const char *message) const { boost::throw_exception(qi::expectation_failure( @@ -715,10 +759,9 @@ namespace client } m_data; }; - template - std::ostream& operator<<(std::ostream &os, const expr &expression) + std::ostream& operator<<(std::ostream &os, const expr &expression) { - typedef expr Expr; + typedef expr Expr; os << std::string(expression.it_range.begin(), expression.it_range.end()) << " - "; switch (expression.type()) { case Expr::TYPE_EMPTY: os << "empty"; break; @@ -732,11 +775,19 @@ namespace client } struct MyContext : public ConfigOptionResolver { + // Config provided as a parameter to PlaceholderParser invocation, overriding PlaceholderParser stored config. const DynamicConfig *external_config = nullptr; + // Config stored inside PlaceholderParser. const DynamicConfig *config = nullptr; + // Config provided as a parameter to PlaceholderParser invocation, evaluated after the two configs above. const DynamicConfig *config_override = nullptr; + // Config provided as a parameter to PlaceholderParser invocation, containing variables that will be read out + // and processed by the PlaceholderParser callee. mutable DynamicConfig *config_outputs = nullptr; + // Local variables, read / write + mutable DynamicConfig config_local; size_t current_extruder_id = 0; + // Random number generator and optionally global variables. PlaceholderParser::ContextData *context_data = nullptr; // If false, the macro_processor will evaluate a full macro. // If true, the macro processor will evaluate just a boolean condition using the full expressive power of the macro processor. @@ -746,7 +797,34 @@ namespace client // Table to translate symbol tag to a human readable error message. static std::map tag_to_error_message; - static void evaluate_full_macro(const MyContext *ctx, bool &result) { result = ! ctx->just_boolean_expression; } + // Should the parser consider the parsed string to be a macro or a boolean expression? + static bool evaluate_full_macro(const MyContext *ctx) { return ! ctx->just_boolean_expression; } + + // Entering a conditional block. + static void block_enter(const MyContext *ctx, const bool condition) + { + if (ctx->skipping() || ! condition) + ++ ctx->m_depth_suppressed; + } + // Exiting a conditional block. + static void block_exit(const MyContext *ctx, const bool condition, bool ¬_yet_consumed, std::string &data_in, std::string &data_out) + { + if (ctx->skipping()) + -- ctx->m_depth_suppressed; + else if (condition && not_yet_consumed) { + data_out = std::move(data_in); + not_yet_consumed = false; + } + } + static void block_exit_ternary(const MyContext* ctx, const bool condition, expr &data_in, expr &data_out) + { + if (ctx->skipping()) + -- ctx->m_depth_suppressed; + else if (condition) + data_out = std::move(data_in); + } + // Inside a block, which is conditionally suppressed? + bool skipping() const { return m_depth_suppressed > 0; } const ConfigOption* optptr(const t_config_option_key &opt_key) const override { @@ -761,14 +839,30 @@ namespace client } const ConfigOption* resolve_symbol(const std::string &opt_key) const { return this->optptr(opt_key); } - ConfigOption* resolve_output_symbol(const std::string &opt_key) const { return this->config_outputs ? this->config_outputs->optptr(opt_key, false) : nullptr; } + ConfigOption* resolve_output_symbol(const std::string &opt_key) const { + ConfigOption *out = nullptr; + if (this->config_outputs) + out = this->config_outputs->optptr(opt_key, false); + if (out == nullptr && this->context_data != nullptr && this->context_data->global_config) + out = this->context_data->global_config->optptr(opt_key); + if (out == nullptr) + out = this->config_local.optptr(opt_key); + return out; + } + void store_new_variable(const std::string &opt_key, std::unique_ptr &&opt, bool global_variable) { + assert(opt); + if (global_variable) { + assert(this->context_data != nullptr && this->context_data->global_config); + this->context_data->global_config->set_key_value(opt_key, opt.release()); + } else + this->config_local.set_key_value(opt_key, opt.release()); + } - template - static void legacy_variable_expansion( - const MyContext *ctx, - boost::iterator_range &opt_key, - std::string &output) + static void legacy_variable_expansion(const MyContext *ctx, IteratorRange &opt_key, std::string &output) { + if (ctx->skipping()) + return; + std::string opt_key_str(opt_key.begin(), opt_key.end()); const ConfigOption *opt = ctx->resolve_symbol(opt_key_str); size_t idx = ctx->current_extruder_id; @@ -783,29 +877,37 @@ namespace client char *endptr = nullptr; idx = strtol(opt_key_str.c_str() + idx + 1, &endptr, 10); if (endptr == nullptr || *endptr != 0) - ctx->throw_exception("Invalid vector index", boost::iterator_range(opt_key.begin() + idx + 1, opt_key.end())); + ctx->throw_exception("Invalid vector index", IteratorRange(opt_key.begin() + idx + 1, opt_key.end())); } } } if (opt == nullptr) - ctx->throw_exception("Variable does not exist", boost::iterator_range(opt_key.begin(), opt_key.end())); - if (opt->is_scalar()) + ctx->throw_exception("Variable does not exist", opt_key); + if (opt->is_scalar()) { + if (opt->is_nil()) + ctx->throw_exception("Trying to reference an undefined (nil) optional variable", opt_key); output = opt->serialize(); - else { + } else { const ConfigOptionVectorBase *vec = static_cast(opt); if (vec->empty()) ctx->throw_exception("Indexing an empty vector variable", opt_key); - output = vec->vserialize()[(idx >= vec->size()) ? 0 : idx]; + if (idx >= vec->size()) + idx = 0; + if (vec->is_nil(idx)) + ctx->throw_exception("Trying to reference an undefined (nil) element of vector of optional values", opt_key); + output = vec->vserialize()[idx]; } } - template static void legacy_variable_expansion2( - const MyContext *ctx, - boost::iterator_range &opt_key, - boost::iterator_range &opt_vector_index, - std::string &output) + const MyContext *ctx, + IteratorRange &opt_key, + IteratorRange &opt_vector_index, + std::string &output) { + if (ctx->skipping()) + return; + std::string opt_key_str(opt_key.begin(), opt_key.end()); const ConfigOption *opt = ctx->resolve_symbol(opt_key_str); if (opt == nullptr) { @@ -821,7 +923,7 @@ namespace client ctx->throw_exception("Trying to index a scalar variable", opt_key); const ConfigOptionVectorBase *vec = static_cast(opt); if (vec->empty()) - ctx->throw_exception("Indexing an empty vector variable", boost::iterator_range(opt_key.begin(), opt_key.end())); + ctx->throw_exception("Indexing an empty vector variable", opt_key); const ConfigOption *opt_index = ctx->resolve_symbol(std::string(opt_vector_index.begin(), opt_vector_index.end())); if (opt_index == nullptr) ctx->throw_exception("Variable does not exist", opt_key); @@ -830,133 +932,275 @@ namespace client int idx = opt_index->getInt(); if (idx < 0) ctx->throw_exception("Negative vector index", opt_key); - output = vec->vserialize()[(idx >= (int)vec->size()) ? 0 : idx]; + if (idx >= (int)vec->size()) + idx = 0; + if (vec->is_nil(idx)) + ctx->throw_exception("Trying to reference an undefined (nil) element of vector of optional values", opt_key); + output = vec->vserialize()[idx]; } - template static void resolve_variable( - const MyContext *ctx, - boost::iterator_range &opt_key, - OptWithPos &output) + const MyContext *ctx, + IteratorRange &opt_key, + OptWithPos &output) { - const ConfigOption *opt = ctx->resolve_symbol(std::string(opt_key.begin(), opt_key.end())); - if (opt == nullptr) { - opt = ctx->resolve_output_symbol(std::string(opt_key.begin(), opt_key.end())); - if (opt == nullptr) - ctx->throw_exception("Not a variable name", opt_key); - output.writable = true; + if (! ctx->skipping()) { + const std::string key{ opt_key.begin(), opt_key.end() }; + const ConfigOption *opt = ctx->resolve_symbol(key); + if (opt == nullptr) { + opt = ctx->resolve_output_symbol(key); + if (opt == nullptr) + ctx->throw_exception("Not a variable name", opt_key); + output.writable = true; + } + output.opt = opt; } - output.opt = opt; output.it_range = opt_key; } - template static void store_variable_index( - const MyContext *ctx, - OptWithPos &opt, - int index, - Iterator it_end, - OptWithPos &output) + const MyContext *ctx, + OptWithPos &opt, + int index, + Iterator it_end, + OptWithPos &output) { - if (! opt.opt->is_vector()) - ctx->throw_exception("Cannot index a scalar variable", opt.it_range); - if (index < 0) - ctx->throw_exception("Referencing a vector variable with a negative index", opt.it_range); - output = opt; - output.index = index; + if (! ctx->skipping()) { + if (! opt.opt->is_vector()) + ctx->throw_exception("Cannot index a scalar variable", opt.it_range); + if (index < 0) + ctx->throw_exception("Referencing a vector variable with a negative index", opt.it_range); + output = opt; + output.index = index; + } else + output = opt; output.it_range.end() = it_end; } - template - static void variable_value( - const MyContext *ctx, - OptWithPos &opt, - expr &output) + // Evaluating a scalar variable into expr, + // all possible ConfigOption types are supported. + static void scalar_variable_to_expr(const MyContext *ctx, OptWithPos &opt, expr &output) { - if (opt.opt->is_vector()) { - if (! opt.has_index()) - ctx->throw_exception("Referencing a vector variable when scalar is expected", opt.it_range); - const ConfigOptionVectorBase *vec = static_cast(opt.opt); - if (vec->empty()) - ctx->throw_exception("Indexing an empty vector variable", opt.it_range); - size_t idx = (opt.index < 0) ? 0 : (opt.index >= int(vec->size())) ? 0 : size_t(opt.index); - switch (opt.opt->type()) { - case coFloats: output.set_d(static_cast(opt.opt)->values[idx]); break; - case coInts: output.set_i(static_cast(opt.opt)->values[idx]); break; - case coStrings: output.set_s(static_cast(opt.opt)->values[idx]); break; - case coPercents: output.set_d(static_cast(opt.opt)->values[idx]); break; - case coPoints: output.set_s(to_string(static_cast(opt.opt)->values[idx])); break; - case coBools: output.set_b(static_cast(opt.opt)->values[idx] != 0); break; - // Orca: support enum vector variable type - case coEnums: output.set_i(static_cast(opt.opt)->values[idx]); break; - default: - ctx->throw_exception("Unknown vector variable type", opt.it_range); - } - } else { - assert(opt.opt->is_scalar()); - switch (opt.opt->type()) { - case coFloat: output.set_d(opt.opt->getFloat()); break; - case coInt: output.set_i(opt.opt->getInt()); break; - case coString: output.set_s(static_cast(opt.opt)->value); break; - case coPercent: output.set_d(opt.opt->getFloat()); break; - case coEnum: - case coPoint: output.set_s(opt.opt->serialize()); break; - case coBool: output.set_b(opt.opt->getBool()); break; - case coFloatOrPercent: - { - std::string opt_key(opt.it_range.begin(), opt.it_range.end()); - if (boost::ends_with(opt_key, "extrusion_width")) { - // Extrusion width supports defaults and a complex graph of dependencies. - output.set_d(Flow::extrusion_width(opt_key, *ctx, static_cast(ctx->current_extruder_id))); - } else if (! static_cast(opt.opt)->percent) { - // Not a percent, just return the value. - output.set_d(opt.opt->getFloat()); - } else { - // Resolve dependencies using the "ratio_over" link to a parent value. - const ConfigOptionDef *opt_def = print_config_def.get(opt_key); - assert(opt_def != nullptr); - double v = opt.opt->getFloat() * 0.01; // percent to ratio - for (;;) { - const ConfigOption *opt_parent = opt_def->ratio_over.empty() ? nullptr : ctx->resolve_symbol(opt_def->ratio_over); - if (opt_parent == nullptr) - ctx->throw_exception("FloatOrPercent variable failed to resolve the \"ratio_over\" dependencies", opt.it_range); - if (boost::ends_with(opt_def->ratio_over, "extrusion_width")) { - // Extrusion width supports defaults and a complex graph of dependencies. - assert(opt_parent->type() == coFloatOrPercent); - v *= Flow::extrusion_width(opt_def->ratio_over, static_cast(opt_parent), *ctx, static_cast(ctx->current_extruder_id)); - break; - } - if (opt_parent->type() == coFloat || opt_parent->type() == coFloatOrPercent) { - v *= opt_parent->getFloat(); - if (opt_parent->type() == coFloat || ! static_cast(opt_parent)->percent) - break; - v *= 0.01; // percent to ratio - } - // Continue one level up in the "ratio_over" hierarchy. - opt_def = print_config_def.get(opt_def->ratio_over); - assert(opt_def != nullptr); - } - output.set_d(v); - } - break; - } - default: - ctx->throw_exception("Unknown scalar variable type", opt.it_range); - } - } + if (ctx->skipping()) + return; + assert(opt.opt->is_scalar()); + + if (opt.opt->is_nil()) + ctx->throw_exception("Trying to reference an undefined (nil) optional variable", opt.it_range); + + switch (opt.opt->type()) { + case coFloat: output.set_d(opt.opt->getFloat()); break; + case coInt: output.set_i(opt.opt->getInt()); break; + case coString: output.set_s(static_cast(opt.opt)->value); break; + case coPercent: output.set_d(opt.opt->getFloat()); break; + case coEnum: + case coPoint: output.set_s(opt.opt->serialize()); break; + case coBool: output.set_b(opt.opt->getBool()); break; + case coFloatOrPercent: + { + std::string opt_key(opt.it_range.begin(), opt.it_range.end()); + if (boost::ends_with(opt_key, "extrusion_width")) { + // Extrusion width supports defaults and a complex graph of dependencies. + output.set_d(Flow::extrusion_width(opt_key, *ctx, static_cast(ctx->current_extruder_id))); + } else if (! static_cast(opt.opt)->percent) { + // Not a percent, just return the value. + output.set_d(opt.opt->getFloat()); + } else { + // Resolve dependencies using the "ratio_over" link to a parent value. + const ConfigOptionDef *opt_def = print_config_def.get(opt_key); + assert(opt_def != nullptr); + double v = opt.opt->getFloat() * 0.01; // percent to ratio + for (;;) { + const ConfigOption *opt_parent = opt_def->ratio_over.empty() ? nullptr : ctx->resolve_symbol(opt_def->ratio_over); + if (opt_parent == nullptr) + ctx->throw_exception("FloatOrPercent variable failed to resolve the \"ratio_over\" dependencies", opt.it_range); + if (boost::ends_with(opt_def->ratio_over, "extrusion_width")) { + // Extrusion width supports defaults and a complex graph of dependencies. + assert(opt_parent->type() == coFloatOrPercent); + v *= Flow::extrusion_width(opt_def->ratio_over, static_cast(opt_parent), *ctx, static_cast(ctx->current_extruder_id)); + break; + } + if (opt_parent->type() == coFloat || opt_parent->type() == coFloatOrPercent) { + v *= opt_parent->getFloat(); + if (opt_parent->type() == coFloat || ! static_cast(opt_parent)->percent) + break; + v *= 0.01; // percent to ratio + } + // Continue one level up in the "ratio_over" hierarchy. + opt_def = print_config_def.get(opt_def->ratio_over); + assert(opt_def != nullptr); + } + output.set_d(v); + } + break; + } + default: + ctx->throw_exception("Unsupported scalar variable type", opt.it_range); + } + } + + // Evaluating one element of a vector variable. + // all possible ConfigOption types are supported. + static void vector_element_to_expr(const MyContext *ctx, OptWithPos &opt, expr &output) + { + if (ctx->skipping()) + return; + + assert(opt.opt->is_vector()); + if (! opt.has_index()) + ctx->throw_exception("Referencing a vector variable when scalar is expected", opt.it_range); + const ConfigOptionVectorBase* vec = static_cast(opt.opt); + if (vec->empty()) + ctx->throw_exception("Indexing an empty vector variable", opt.it_range); + size_t idx = (opt.index < 0) ? 0 : (opt.index >= int(vec->size())) ? 0 : size_t(opt.index); + if (vec->is_nil(idx)) + ctx->throw_exception("Trying to reference an undefined (nil) element of vector of optional values", opt.it_range); + switch (opt.opt->type()) { + case coFloats: output.set_d(static_cast(opt.opt)->values[idx]); break; + case coInts: output.set_i(static_cast(opt.opt)->values[idx]); break; + case coStrings: output.set_s(static_cast(opt.opt)->values[idx]); break; + case coPercents: output.set_d(static_cast(opt.opt)->values[idx]); break; + case coPoints: output.set_s(to_string(static_cast(opt.opt)->values[idx])); break; + case coBools: output.set_b(static_cast(opt.opt)->values[idx] != 0); break; + case coEnums: output.set_i(static_cast(opt.opt)->values[idx]); break; + default: + ctx->throw_exception("Unsupported vector variable type", opt.it_range); + } + } + + static void check_writable(const MyContext *ctx, OptWithPos &opt) { + if (! opt.writable) + ctx->throw_exception("Cannot modify a read-only variable", opt.it_range); + } + + static void check_numeric(const expr ¶m) { + if (! param.numeric_type()) + param.throw_exception("Right side is not a numeric expression"); + }; + + static size_t evaluate_count(const expr &expr_count) { + if (expr_count.type() != expr::TYPE_INT) + expr_count.throw_exception("Expected number of elements to fill a vector with."); + int count = expr_count.i(); + if (count < 0) + expr_count.throw_exception("Negative number of elements specified."); + return size_t(count); + }; + + static void scalar_variable_assign_scalar(const MyContext *ctx, OptWithPos &lhs, const expr &rhs) + { + assert(! ctx->skipping()); + assert(lhs.opt->is_scalar()); + check_writable(ctx, lhs); + ConfigOption *wropt = const_cast(lhs.opt); + switch (wropt->type()) { + case coFloat: + check_numeric(rhs); + static_cast(wropt)->value = rhs.as_d(); + break; + case coInt: + check_numeric(rhs); + static_cast(wropt)->value = rhs.as_i(); + break; + case coString: + static_cast(wropt)->value = rhs.to_string(); + break; + case coPercent: + check_numeric(rhs); + static_cast(wropt)->value = rhs.as_d(); + break; + case coBool: + if (rhs.type() != expr::TYPE_BOOL) + ctx->throw_exception("Right side is not a boolean expression", rhs.it_range); + static_cast(wropt)->value = rhs.b(); + break; + default: + ctx->throw_exception("Unsupported output scalar variable type", lhs.it_range); + } + } + + static void vector_variable_element_assign_scalar(const MyContext *ctx, OptWithPos &lhs, const expr &rhs) + { + assert(! ctx->skipping()); + assert(lhs.opt->is_vector()); + check_writable(ctx, lhs); + if (! lhs.has_index()) + ctx->throw_exception("Referencing an output vector variable when scalar is expected", lhs.it_range); + ConfigOptionVectorBase *vec = const_cast(static_cast(lhs.opt)); + if (vec->empty()) + ctx->throw_exception("Indexing an empty vector variable", lhs.it_range); + if (lhs.index >= int(vec->size())) + ctx->throw_exception("Index out of range", lhs.it_range); + switch (lhs.opt->type()) { + case coFloats: + check_numeric(rhs); + static_cast(vec)->values[lhs.index] = rhs.as_d(); + break; + case coInts: + check_numeric(rhs); + static_cast(vec)->values[lhs.index] = rhs.as_i(); + break; + case coStrings: + static_cast(vec)->values[lhs.index] = rhs.to_string(); + break; + case coPercents: + check_numeric(rhs); + static_cast(vec)->values[lhs.index] = rhs.as_d(); + break; + case coBools: + if (rhs.type() != expr::TYPE_BOOL) + ctx->throw_exception("Right side is not a boolean expression", rhs.it_range); + static_cast(vec)->values[lhs.index] = rhs.b(); + break; + default: + ctx->throw_exception("Unsupported output vector variable type", lhs.it_range); + } + } + + static void vector_variable_assign_expr_with_count(const MyContext *ctx, OptWithPos &lhs, const expr &rhs_count, const expr &rhs_value) + { + assert(! ctx->skipping()); + size_t count = evaluate_count(rhs_count); + auto *opt = const_cast(lhs.opt); + switch (lhs.opt->type()) { + case coFloats: + check_numeric(rhs_value); + static_cast(opt)->values.assign(count, rhs_value.as_d()); + break; + case coInts: + check_numeric(rhs_value); + static_cast(opt)->values.assign(count, rhs_value.as_i()); + break; + case coStrings: + static_cast(opt)->values.assign(count, rhs_value.to_string()); + break; + case coBools: + if (rhs_value.type() != expr::TYPE_BOOL) + rhs_value.throw_exception("Right side is not a boolean expression"); + static_cast(opt)->values.assign(count, rhs_value.b()); + break; + default: assert(false); + } + } + + static void variable_value(const MyContext *ctx, OptWithPos &opt, expr &output) + { + if (! ctx->skipping()) { + if (opt.opt->is_vector()) + vector_element_to_expr(ctx, opt, output); + else + scalar_variable_to_expr(ctx, opt, output); + } output.it_range = opt.it_range; } // Return a boolean value, true if the scalar variable referenced by "opt" is nullable and it has a nil value. // Return a boolean value, true if an element of a vector variable referenced by "opt[index]" is nullable and it has a nil value. - template - static void is_nil_test( - const MyContext *ctx, - OptWithPos &opt, - expr &output) + static void is_nil_test(const MyContext *ctx, OptWithPos &opt, expr &output) { - if (opt.opt->is_vector()) { + if (ctx->skipping()) { + } else if (opt.opt->is_vector()) { if (! opt.has_index()) ctx->throw_exception("Referencing a vector variable when scalar is expected", opt.it_range); const ConfigOptionVectorBase *vec = static_cast(opt.opt); @@ -970,112 +1214,354 @@ namespace client output.it_range = opt.it_range; } - // Decoding a scalar variable symbol "opt", assigning it a value of "param". - template - static void variable_assign( - const MyContext *ctx, - OptWithPos &opt, - expr ¶m, - // Not used, just clear it. - std::string &out) + // Reference to an existing symbol, or a name of a new symbol. + struct NewOldVariable { + std::string name; + IteratorRange it_range; + ConfigOption *opt{ nullptr }; + }; + static void new_old_variable( + const MyContext *ctx, + bool global_variable, + const IteratorRange &it_range, + NewOldVariable &out) { - if (! opt.writable) - ctx->throw_exception("Cannot modify a read-only variable", opt.it_range); - auto check_numeric = [](const expr ¶m) { - if (! param.numeric_type()) - param.throw_exception("Right side is not a numeric expression"); - }; - if (opt.opt->is_vector()) { - if (! opt.has_index()) - ctx->throw_exception("Referencing an output vector variable when scalar is expected", opt.it_range); - ConfigOptionVectorBase *vec = const_cast(static_cast(opt.opt)); - if (vec->empty()) - ctx->throw_exception("Indexing an empty vector variable", opt.it_range); - if (opt.index >= int(vec->size())) - ctx->throw_exception("Index out of range", opt.it_range); - switch (opt.opt->type()) { - case coFloats: - check_numeric(param); - static_cast(vec)->values[opt.index] = param.as_d(); - break; - case coInts: - check_numeric(param); - static_cast(vec)->values[opt.index] = param.as_i(); - break; - case coStrings: - static_cast(vec)->values[opt.index] = param.to_string(); - break; - case coPercents: - check_numeric(param); - static_cast(vec)->values[opt.index] = param.as_d(); - break; - case coBools: - if (param.type() != expr::TYPE_BOOL) - ctx->throw_exception("Right side is not a boolean expression", param.it_range); - static_cast(vec)->values[opt.index] = param.b(); - break; - default: - ctx->throw_exception("Unsupported output vector variable type", opt.it_range); + if (! ctx->skipping()) { + t_config_option_key key(std::string(it_range.begin(), it_range.end())); + if (const ConfigOption* opt = ctx->resolve_symbol(key); opt) + ctx->throw_exception("Symbol is already defined in read-only system dictionary", it_range); + if (ctx->config_outputs && ctx->config_outputs->optptr(key)) + ctx->throw_exception("Symbol is already defined as system output variable", it_range); + bool has_global_dictionary = ctx->context_data != nullptr && ctx->context_data->global_config; + if (global_variable) { + if (! has_global_dictionary) + ctx->throw_exception("Global variables are not available in this context", it_range); + if (ctx->config_local.optptr(key)) + ctx->throw_exception("Variable name already defined in local scope", it_range); + out.opt = ctx->context_data->global_config->optptr(key); + } else { + if (has_global_dictionary && ctx->context_data->global_config->optptr(key)) + ctx->throw_exception("Variable name already defined in global scope", it_range); + out.opt = ctx->config_local.optptr(key); } + out.name = std::move(key); + } + out.it_range = it_range; + } + + // Decoding a scalar variable symbol "opt", assigning it a value of "param". + static void scalar_variable_assign_scalar_expression(const MyContext *ctx, OptWithPos &opt, const expr ¶m) + { + if (! ctx->skipping()) { + check_writable(ctx, opt); + if (opt.opt->is_vector()) + vector_variable_element_assign_scalar(ctx, opt, param); + else + scalar_variable_assign_scalar(ctx, opt, param); + } + } + + static void scalar_variable_new_from_scalar_expression( + const MyContext *ctx, + bool global_variable, + NewOldVariable &lhs, + const expr &rhs) + { + if (ctx->skipping()) { + } else if (lhs.opt) { + if (lhs.opt->is_vector()) + rhs.throw_exception("Cannot assign a scalar value to a vector variable."); + OptWithPos lhs_opt{ lhs.opt, lhs.it_range, true }; + scalar_variable_assign_scalar(ctx, lhs_opt, rhs); } else { - assert(opt.opt->is_scalar()); - ConfigOption *wropt = const_cast(opt.opt); - switch (wropt->type()) { - case coFloat: - check_numeric(param); - static_cast(wropt)->value = param.as_d(); - break; - case coInt: - check_numeric(param); - static_cast(wropt)->value = param.as_i(); - break; - case coString: - static_cast(wropt)->value = param.to_string(); - break; - case coPercent: - check_numeric(param); - static_cast(wropt)->value = param.as_d(); - break; - case coBool: - if (param.type() != expr::TYPE_BOOL) - ctx->throw_exception("Right side is not a boolean expression", param.it_range); - static_cast(wropt)->value = param.b(); - break; + std::unique_ptr opt_new; + switch (rhs.type()) { + case expr::TYPE_BOOL: opt_new = std::make_unique(rhs.b()); break; + case expr::TYPE_INT: opt_new = std::make_unique(rhs.i()); break; + case expr::TYPE_DOUBLE: opt_new = std::make_unique(rhs.d()); break; + case expr::TYPE_STRING: opt_new = std::make_unique(rhs.s()); break; + default: assert(false); + } + const_cast(ctx)->store_new_variable(lhs.name, std::move(opt_new), global_variable); + } + } + + static void vector_variable_new_from_array( + const MyContext *ctx, + bool global_variable, + NewOldVariable &lhs, + const expr &rhs_count, + const expr &rhs_value) + { + if (ctx->skipping()) { + } else if (lhs.opt) { + if (lhs.opt->is_scalar()) + rhs_value.throw_exception("Cannot assign a vector value to a scalar variable."); + OptWithPos lhs_opt{ lhs.opt, lhs.it_range, true }; + vector_variable_assign_expr_with_count(ctx, lhs_opt, rhs_count, rhs_value); + } else { + size_t count = evaluate_count(rhs_count); + std::unique_ptr opt_new; + switch (rhs_value.type()) { + case expr::TYPE_BOOL: opt_new = std::make_unique(count, rhs_value.b()); break; + case expr::TYPE_INT: opt_new = std::make_unique(count, rhs_value.i()); break; + case expr::TYPE_DOUBLE: opt_new = std::make_unique(count, rhs_value.d()); break; + case expr::TYPE_STRING: opt_new = std::make_unique(count, rhs_value.s()); break; + default: assert(false); + } + const_cast(ctx)->store_new_variable(lhs.name, std::move(opt_new), global_variable); + } + } + + static void vector_variable_assign_array( + const MyContext *ctx, + OptWithPos &lhs, + const expr &rhs_count, + const expr &rhs_value) + { + if (! ctx->skipping()) { + check_writable(ctx, lhs); + if (lhs.opt->is_scalar()) + rhs_value.throw_exception("Cannot assign a vector value to a scalar variable."); + vector_variable_assign_expr_with_count(ctx, lhs, rhs_count, rhs_value); + } + } + + template + static void fill_vector_from_initializer_list(ConfigOption *opt, const std::vector &il, RightValueEvaluate rv_eval) { + auto& out = static_cast(opt)->values; + out.clear(); + out.reserve(il.size()); + for (const expr& i : il) + out.emplace_back(rv_eval(i)); + } + + static void vector_variable_assign_initializer_list(const MyContext *ctx, OptWithPos &lhs, const std::vector &il) + { + if (ctx->skipping()) + return; + + check_writable(ctx, lhs); + + if (lhs.opt->is_scalar()) { + if (il.size() == 1) + // scalar_var = ( scalar ) + scalar_variable_assign_scalar_expression(ctx, lhs, il.front()); + else + // scalar_var = () + // or + // scalar_var = ( scalar, scalar, ... ) + ctx->throw_exception("Cannot assign a vector value to a scalar variable.", lhs.it_range); + } + + auto check_numeric_vector = [](const std::vector &il) { + for (auto &i : il) + if (! i.numeric_type()) + i.throw_exception("Right side is not a numeric expression"); + }; + + ConfigOption *opt = const_cast(lhs.opt); + switch (lhs.opt->type()) { + case coFloats: + check_numeric_vector(il); + fill_vector_from_initializer_list(opt, il, [](auto &v){ return v.as_d(); }); + break; + case coInts: + check_numeric_vector(il); + fill_vector_from_initializer_list(opt, il, [](auto &v){ return v.as_i(); }); + break; + case coStrings: + fill_vector_from_initializer_list(opt, il, [](auto &v){ return v.to_string(); }); + break; + case coBools: + for (auto &i : il) + if (i.type() != expr::TYPE_BOOL) + i.throw_exception("Right side is not a boolean expression"); + fill_vector_from_initializer_list(opt, il, [](auto &v){ return v.b(); }); + break; + default: assert(false); + } + } + + static void vector_variable_new_from_initializer_list( + const MyContext *ctx, + bool global_variable, + NewOldVariable &lhs, + const std::vector &il) + { + if (ctx->skipping()) + return; + + if (lhs.opt) { + // Assign to an existing vector variable. + OptWithPos lhs_opt{ lhs.opt, lhs.it_range, true }; + vector_variable_assign_initializer_list(ctx, lhs_opt, il); + } else { + if (il.empty()) + ctx->throw_exception("Cannot create vector variable from an empty initializer list, because its type cannot be deduced.", lhs.it_range); + // Allocate a new vector variable. + // First guesstimate type of the output vector. + size_t num_bool = 0; + size_t num_int = 0; + size_t num_double = 0; + size_t num_string = 0; + for (auto &i : il) + switch (i.type()) { + case expr::TYPE_BOOL: ++ num_bool; break; + case expr::TYPE_INT: ++ num_int; break; + case expr::TYPE_DOUBLE: ++ num_double; break; + case expr::TYPE_STRING: ++ num_string; break; + default: assert(false); + } + std::unique_ptr opt_new; + if (num_string > 0) + // Convert everything to strings. + opt_new = std::make_unique(); + else if (num_bool > 0) { + if (num_double + num_int > 0) + ctx->throw_exception("Right side is not valid: Mixing numeric and boolean types.", IteratorRange{ il.front().it_range.begin(), il.back().it_range.end() }); + opt_new = std::make_unique(); + } else { + // Output is numeric. + if (num_double == 0) + opt_new = std::make_unique(); + else + opt_new = std::make_unique(); + } + OptWithPos lhs_opt{ opt_new.get(), lhs.it_range, true }; + vector_variable_assign_initializer_list(ctx, lhs_opt, il); + const_cast(ctx)->store_new_variable(lhs.name, std::move(opt_new), global_variable); + } + } + + static bool is_vector_variable_reference(const OptWithPos &var) { + return ! var.empty() && ! var.has_index() && var.opt->is_vector(); + } + + // Called when checking whether the NewOldVariable could be assigned a vectir right hand side. + static bool could_be_vector_variable_reference(const NewOldVariable &var) { + return var.opt == nullptr || var.opt->is_vector(); + } + + static void copy_vector_variable_to_vector_variable(const MyContext *ctx, OptWithPos &lhs, const OptWithPos &rhs) + { + if (ctx->skipping()) + return; + + check_writable(ctx, lhs); + assert(lhs.opt->is_vector()); + if (rhs.has_index() || ! rhs.opt->is_vector()) + ctx->throw_exception("Cannot assign scalar to a vector", lhs.it_range); + if (rhs.opt->is_nil()) + ctx->throw_exception("Some elements of the right hand side vector variable of optional values are undefined (nil)", rhs.it_range); + if (lhs.opt->type() != rhs.opt->type()) { + // Vector types are not compatible. + switch (lhs.opt->type()) { + case coFloats: + ctx->throw_exception("Left hand side is a float vector, while the right hand side is not.", lhs.it_range); + case coInts: + ctx->throw_exception("Left hand side is an int vector, while the right hand side is not.", lhs.it_range); + case coStrings: + ctx->throw_exception("Left hand side is a string vector, while the right hand side is not.", lhs.it_range); + case coBools: + ctx->throw_exception("Left hand side is a bool vector, while the right hand side is not.", lhs.it_range); default: - ctx->throw_exception("Unsupported output scalar variable type", opt.it_range); + ctx->throw_exception("Left hand side / right hand side vectors are not compatible.", lhs.it_range); } } - out.clear(); + const_cast(lhs.opt)->set(rhs.opt); + } + + static bool vector_variable_new_from_copy( + const MyContext *ctx, + bool global_variable, + NewOldVariable &lhs, + const OptWithPos &rhs) + { + if (ctx->skipping()) + // Skipping, continue parsing. + return true; + + if (lhs.opt) { + assert(lhs.opt->is_vector()); + OptWithPos lhs_opt{ lhs.opt, lhs.it_range, true }; + copy_vector_variable_to_vector_variable(ctx, lhs_opt, rhs); + } else { + if (rhs.has_index() || ! rhs.opt->is_vector()) + // Stop parsing, let the other rules resolve this case. + return false; + if (rhs.opt->is_nil()) + ctx->throw_exception("Some elements of the right hand side vector variable of optional values are undefined (nil)", rhs.it_range); + // Clone the vector variable. + std::unique_ptr opt_new; + if (one_of(rhs.opt->type(), { coFloats, coInts, coStrings, coBools })) + opt_new = std::unique_ptr(rhs.opt->clone()); + else if (rhs.opt->type() == coPercents) + opt_new = std::make_unique(static_cast(rhs.opt)->values); + else + ctx->throw_exception("Duplicating this type of vector variable is not supported", rhs.it_range); + const_cast(ctx)->store_new_variable(lhs.name, std::move(opt_new), global_variable); + } + // Continue parsing. + return true; + } + + static void initializer_list_append(std::vector &list, expr ¶m) + { + if (param.type() != expr::TYPE_EMPTY) + // not skipping + list.emplace_back(std::move(param)); + } + + static void is_vector_empty(const MyContext *ctx, OptWithPos &opt, expr &out) + { + if (! ctx->skipping()) { + if (opt.has_index() || ! opt.opt->is_vector()) + ctx->throw_exception("parameter of empty() is not a vector variable", opt.it_range); + out.set_b(static_cast(opt.opt)->size() == 0); + } + out.it_range = opt.it_range; + } + + static void vector_size(const MyContext *ctx, OptWithPos &opt, expr &out) + { + if (! ctx->skipping()) { + if (opt.has_index() || ! opt.opt->is_vector()) + ctx->throw_exception("parameter of size() is not a vector variable", opt.it_range); + out.set_i(int(static_cast(opt.opt)->size())); + } + out.it_range = opt.it_range; } // Verify that the expression returns an integer, which may be used // to address a vector. - template - static void evaluate_index(expr &expr_index, int &output) + static void evaluate_index(expr &expr_index, int &output) { - if (expr_index.type() != expr::TYPE_INT) - expr_index.throw_exception("Non-integer index is not allowed to address a vector variable."); - output = expr_index.i(); + if (expr_index.type() != expr::TYPE_EMPTY) { + if (expr_index.type() != expr::TYPE_INT) + expr_index.throw_exception("Non-integer index is not allowed to address a vector variable."); + output = expr_index.i(); + } } - template - static void random(const MyContext *ctx, expr ¶m1, expr ¶m2) + static void random(const MyContext *ctx, expr ¶m1, expr ¶m2) { + if (ctx->skipping()) + return; + if (ctx->context_data == nullptr) ctx->throw_exception("Random number generator not available in this context.", - boost::iterator_range(param1.it_range.begin(), param2.it_range.end())); - expr::random(param1, param2, ctx->context_data->rng); + IteratorRange(param1.it_range.begin(), param2.it_range.end())); + expr::random(param1, param2, ctx->context_data->rng); } - template - static void throw_exception(const std::string &msg, const boost::iterator_range &it_range) + static void throw_exception(const std::string &msg, const IteratorRange &it_range) { // An asterix is added to the start of the string to differentiate the boost::spirit::info::tag content // between the grammer terminal / non-terminal symbol name and a free-form error message. - boost::throw_exception(qi::expectation_failure(it_range.begin(), it_range.end(), spirit::info(std::string("*") + msg))); + boost::throw_exception(qi::expectation_failure(it_range.begin(), it_range.end(), spirit::info(std::string("*") + msg))); } - template static void process_error_message(const MyContext *context, const boost::spirit::info &info, const Iterator &it_begin, const Iterator &it_end, const Iterator &it_error) { std::string &msg = const_cast(context)->error_message; @@ -1122,37 +1608,48 @@ namespace client msg += ' '; msg += "^\n"; } + + private: + // For skipping execution of inactive conditional branches. + mutable int m_depth_suppressed{ 0 }; }; - template struct InterpolateTableContext { struct Item { - double x; - boost::iterator_range it_range_x; - double y; + double x; + IteratorRange it_range_x; + double y; }; std::vector table; - static void init(const expr &x) { - if (!x.numeric_type()) - x.throw_exception("Interpolation value must be a number."); + static void init(const expr &x) { + if (x.type() != expr::TYPE_EMPTY) { + if (!x.numeric_type()) + x.throw_exception("Interpolation value must be a number."); + } } - static void add_pair(const expr &x, const expr &y, InterpolateTableContext &table) { - if (! x.numeric_type()) - x.throw_exception("X value of a table point must be a number."); - if (! y.numeric_type()) - y.throw_exception("Y value of a table point must be a number."); - table.table.push_back({ x.as_d(), x.it_range, y.as_d() }); + static void add_pair(const expr &x, const expr &y, InterpolateTableContext &table) { + if (x.type() != expr::TYPE_EMPTY) { + if (! x.numeric_type()) + x.throw_exception("X value of a table point must be a number."); + if (! y.numeric_type()) + y.throw_exception("Y value of a table point must be a number."); + table.table.push_back({ x.as_d(), x.it_range, y.as_d() }); + } } - static void evaluate(const expr &expr_x, const InterpolateTableContext &table, expr &out) { + static void evaluate(const expr &expr_x, const InterpolateTableContext &table, expr &out) { + if (expr_x.type() == expr::TYPE_EMPTY) + return; + // Check whether the table X values are sorted. double x = expr_x.as_d(); + assert(! std::isnan(x)); bool evaluated = false; for (size_t i = 1; i < table.table.size(); ++i) { double x0 = table.table[i - 1].x; double x1 = table.table[i].x; if (x0 > x1) - boost::throw_exception(qi::expectation_failure( + boost::throw_exception(qi::expectation_failure( table.table[i - 1].it_range_x.begin(), table.table[i].it_range_x.end(), spirit::info("X coordinates of the table must be increasing"))); if (! evaluated && x >= x0 && x <= x1) { double y0 = table.table[i - 1].y; @@ -1170,9 +1667,9 @@ namespace client } if (! evaluated) { // Clamp x into the table range with EPSILON. - if (x > table.table.front().x - EPSILON) + if (double x0 = table.table.front().x; x > x0 - EPSILON && x < x0) out.set_d(table.table.front().y); - else if (x < table.table.back().x + EPSILON) + else if (double x1 = table.table.back().x; x > x1 && x < x1 + EPSILON) out.set_d(table.table.back().y); else // The value is really outside the table range. @@ -1181,8 +1678,7 @@ namespace client } }; - template - std::ostream& operator<<(std::ostream &os, const InterpolateTableContext &table_context) + std::ostream& operator<<(std::ostream &os, const InterpolateTableContext &table_context) { for (const auto &item : table_context.table) os << "(" << item.x << "," << item.y << ")"; @@ -1196,6 +1692,7 @@ namespace client { "text", "Invalid text." }, { "text_block", "Invalid text block." }, { "macro", "Invalid macro." }, + { "repeat", "Unknown syntax error" }, { "if_else_output", "Not an {if}{else}{endif} macro." }, { "switch_output", "Not a {switch} macro." }, { "legacy_variable_expansion", "Expecting a legacy variable expansion format" }, @@ -1212,14 +1709,12 @@ namespace client { "optional_parameter", "Expecting a closing brace or an optional parameter." }, { "one_of_list", "Expecting a list of string patterns (simple text or rexep)" }, { "variable_reference", "Expecting a variable reference."}, - { "is_nil_test", "Expecting a scalar variable reference."}, { "variable", "Expecting a variable name."}, { "regular_expression", "Expecting a regular expression."} }; // For debugging the boost::spirit parsers. Print out the string enclosed in it_range. - template - std::ostream& operator<<(std::ostream& os, const boost::iterator_range &it_range) + std::ostream& operator<<(std::ostream& os, const IteratorRange &it_range) { os << std::string(it_range.begin(), it_range.end()); return os; @@ -1234,7 +1729,7 @@ namespace client // This parser is to be used inside a raw[] directive to accept a single valid UTF-8 character. // If an invalid UTF-8 sequence is encountered, a qi::expectation_failure is thrown. - struct utf8_char_skipper_parser : qi::primitive_parser + struct utf8_char_parser : qi::primitive_parser { // Define the attribute type exposed by this parser component template @@ -1243,9 +1738,10 @@ namespace client typedef wchar_t type; }; - // This function is called during the actual parsing process + // This function is called during the actual parsing process to skip whitespaces. + // Also it throws if it encounters valid or invalid UTF-8 sequence. template - bool parse(Iterator& first, Iterator const& last, Context& context, Skipper const& skipper, Attribute& attr) const + bool parse(Iterator &first, Iterator const &last, Context &context, Skipper const &skipper, Attribute& attr) const { // The skipper shall always be empty, any white space will be accepted. // skip_over(first, last, skipper); @@ -1283,7 +1779,7 @@ namespace client first = it; return true; err: - MyContext::throw_exception("Invalid utf8 sequence", boost::iterator_range(first, last)); + MyContext::throw_exception("Invalid utf8 sequence", IteratorRange(first, last)); return false; } @@ -1295,12 +1791,131 @@ namespace client } }; + // This parser is to be used inside a raw[] directive to accept a single valid UTF-8 character. + // If an invalid UTF-8 sequence is encountered, a qi::expectation_failure is thrown. + struct ascii_char_skipper_parser : public utf8_char_parser + { + // This function is called during the actual parsing process + template + bool parse(Iterator &first, Iterator const &last, Context &context, Skipper const &skipper, Attribute &attr) const + { + Iterator it = first; + // Let the UTF-8 parser throw if it encounters an invalid UTF-8 sequence. + if (! utf8_char_parser::parse(it, last, context, skipper, attr)) + return false; + char c = *first; + if (it - first > 1 || c < 0) + MyContext::throw_exception("Non-ASCII7 characters are only allowed inside text blocks and string literals, not inside code blocks.", IteratorRange(first, it)); + if (c == '\r' || c == '\n' || c == '\t' || c == ' ') { + // Skip the whitespaces + ++ first; + return true; + } else + // Stop skipping, let this 7bit ASCII character be processed. + return false; + } + + // This function is called during error handling to create a human readable string for the error context. + template + spirit::info what(Context&) const + { + return spirit::info("ASCII7_char"); + } + }; + + struct FactorActions { + static void set_start_pos(Iterator &start_pos, expr &out) + { out.it_range = IteratorRange(start_pos, start_pos); } + static void int_(const MyContext *ctx, int &value, Iterator &end_pos, expr &out) { + if (ctx->skipping()) { + out.reset(); + out.it_range.end() = end_pos; + } else + out = expr(value, out.it_range.begin(), end_pos); + } + static void double_(const MyContext *ctx, double &value, Iterator &end_pos, expr &out) { + if (ctx->skipping()) { + out.reset(); + out.it_range.end() = end_pos; + } else + out = expr(value, out.it_range.begin(), end_pos); + } + static void bool_(const MyContext *ctx, bool &value, Iterator &end_pos, expr &out) { + if (ctx->skipping()) { + out.reset(); + out.it_range.end() = end_pos; + } else + out = expr(value, out.it_range.begin(), end_pos); + } + static void string_(const MyContext *ctx, IteratorRange &it_range, expr &out) { + if (ctx->skipping()) { + out.reset(); + out.it_range = it_range; + } else { + // Unescape the string, UTF-8 safe. + std::string s; + auto begin = std::next(it_range.begin()); + auto end = std::prev(it_range.end()); + assert(begin <= end); + { + // 1) Get the size of the string after unescaping. + size_t len = 0; + for (auto it = begin; it != end;) { + if (*it == '\\') { + if (++ it == end || + (*it != 'r' && *it != 'n' && *it != '"' && *it != '\\')) + ctx->throw_exception("Invalid escape sequence", {std::prev(it), std::next(it) }); + ++ len; + ++ it; + } else { + size_t n = get_utf8_sequence_length(&*it, end - it); + len += n; + it += n; + } + } + // and reserve the string. + s.reserve(len); + } + // 2) Copy & unescape the string. + for (auto it = begin; it != end;) { + if (*it == '\\') { + char c = *(++ it); + if (c == 'r') + c = '\r'; + else if (c == 'n') + c = '\n'; + s += c; + ++ it; + } else { + size_t n = get_utf8_sequence_length(&*it, end - it); + s.append(&*it, n); + it += n; + } + } + out = expr(std::move(s), it_range.begin(), it_range.end()); + } + } + static void expr_(expr &value, Iterator &end_pos, expr &out) + { auto begin_pos = out.it_range.begin(); out = expr(std::move(value), begin_pos, end_pos); } + static void minus_(expr &value, expr &out) + { out = value.unary_minus(out.it_range.begin()); } + static void not_(expr &value, expr &out) + { out = value.unary_not(out.it_range.begin()); } + static void to_int(expr &value, expr &out) + { out = value.unary_integer(out.it_range.begin()); } + static void round(expr &value, expr &out) + { out = value.round(out.it_range.begin()); } + // For indicating "no optional parameter". + static void noexpr(expr &out) { out.reset(); } + }; + + using skipper = ascii_char_skipper_parser; + /////////////////////////////////////////////////////////////////////////// // Our macro_processor grammar /////////////////////////////////////////////////////////////////////////// // Inspired by the C grammar rules https://www.lysator.liu.se/c/ANSI-C-grammar-y.html - template - struct macro_processor : qi::grammar, spirit_encoding::space_type> + struct macro_processor : qi::grammar, skipper> { macro_processor() : macro_processor::base_type(start) { @@ -1314,7 +1929,7 @@ namespace client qi::no_skip_type no_skip; qi::real_parser strict_double; spirit_encoding::char_type char_; - utf8_char_skipper_parser utf8char; + utf8_char_parser utf8char; spirit::bool_type bool_; spirit::int_type int_; spirit::double_type double_; @@ -1339,19 +1954,19 @@ namespace client // Also the start symbol switches between the "full macro syntax" and a "boolean expression only", // depending on the context->just_boolean_expression flag. This way a single static expression parser // could serve both purposes. - start = eps[px::bind(&MyContext::evaluate_full_macro, _r1, _a)] > - ( (eps(_a==true) > text_block(_r1) [_val=_1]) - | conditional_expression(_r1) [ px::bind(&expr::evaluate_boolean_to_string, _1, _val) ] + start = + ( (eps(px::bind(&MyContext::evaluate_full_macro, _r1)) > text_block(_r1) [_val=_1]) + | conditional_expression(_r1) [ px::bind(&expr::evaluate_boolean_to_string, _1, _val) ] ) > eoi; start.name("start"); - qi::on_error(start, px::bind(&MyContext::process_error_message, _r1, _4, _1, _2, _3)); + qi::on_error(start, px::bind(&MyContext::process_error_message, _r1, _4, _1, _2, _3)); text_block = *( text [_val+=_1] // Allow back tracking after '{' in case of a text_block embedded inside a condition. // In that case the inner-most {else} wins and the {if}/{elsif}/{else} shall be paired. // {elsif}/{else} without an {if} will be allowed to back track from the embedded text_block. - | (lit('{') >> macro(_r1) [_val+=_1] > '}') + | (lit('{') >> (macros(_r1)[_val += _1] > '}') | '}') | (lit('[') > legacy_variable_expansion(_r1) [_val+=_1] > ']') ); text_block.name("text_block"); @@ -1363,41 +1978,61 @@ namespace client // New style of macro expansion. // The macro expansion may contain numeric or string expressions, ifs and cases. - macro = - (kw["if"] > if_else_output(_r1) [_val = _1]) -// | (kw["switch"] > switch_output(_r1) [_val = _1]) - | (assignment_statement(_r1) [_val = _1]) - | (additive_expression(_r1) [ px::bind(&expr::to_string2, _1, _val) ]) + macros = + +(block(_r1)[_val += _1] | (statement(_r1) > (+lit(';') | &lit('}')))[_val += _1] | +lit(';')); + macros.name("macro"); + // if_macros and else_macros only differ by the look-ahead ending condition, which is to not have to repeat the last semicolon + // at the end of the block. + if_macros = kw["then"] > *(block(_r1)[_val += _1] | (statement(_r1) > (+lit(';') | &(kw["elsif"] | kw["else"] | kw["endif"])))[_val += _1] | +lit(';')); + if_macros.name("if_macros"); + else_macros = *(block(_r1)[_val += _1] | (statement(_r1) > (+lit(';') | &kw["endif"]))[_val += _1] | +lit(';')); + else_macros.name("else_macros"); + + // Blocks do not require a separating semicolon. + block = + (kw["if"] > if_else_output(_r1)[_val = _1]) + // (kw["switch"] ... + ; + block.name("block"); + + // Statements require a separating semicolon. + statement = + (assignment_statement(_r1) [_val = _1]) + | (new_variable_statement(_r1)[_val = _1]) + | (conditional_expression(_r1)[px::bind(&expr::to_string2, _1, _val)]) ; - macro.name("macro"); // An if expression enclosed in {} (the outmost {} are already parsed by the caller). + // Also }{ could be replaced with ; to simplify writing of pure code. if_else_output = - eps[_b=true] > - bool_expr_eval(_r1)[_a=_1] > '}' > - text_block(_r1)[px::bind(&expr::set_if, _a, _b, _1, _val)] > '{' > - *(kw["elsif"] > bool_expr_eval(_r1)[_a=_1] > '}' > - text_block(_r1)[px::bind(&expr::set_if, _a, _b, _1, _val)] > '{') > - -(kw["else"] > lit('}') > - text_block(_r1)[px::bind(&expr::set_if, _b, _b, _1, _val)] > '{') > + eps[_a=true] > + (bool_expr_eval(_r1)[px::bind(&MyContext::block_enter, _r1, _1)] > (if_text_block(_r1) | if_macros(_r1))) + [px::bind(&MyContext::block_exit, _r1, _1, _a, _2, _val)] > + *((kw["elsif"] > bool_expr_eval(_r1)[px::bind(&MyContext::block_enter, _r1, _1 && _a)] > (if_text_block(_r1) | if_macros(_r1))) + [px::bind(&MyContext::block_exit, _r1, _1, _a, _2, _val)]) > + -(kw["else"] > eps[px::bind(&MyContext::block_enter, _r1, _a)] > (if_text_block(_r1) | else_macros(_r1))) + [px::bind(&MyContext::block_exit, _r1, _a, _a, _1, _val)] > kw["endif"]; if_else_output.name("if_else_output"); + if_text_block = (lit('}') > text_block(_r1) > '{'); + if_text_block.name("if_text_block"); + // A switch expression enclosed in {} (the outmost {} are already parsed by the caller). /* switch_output = eps[_b=true] > - omit[expr(_r1)[_a=_1]] > '}' > text_block(_r1)[px::bind(&expr::set_if_equal, _a, _b, _1, _val)] > '{' > - *("elsif" > omit[bool_expr_eval(_r1)[_a=_1]] > '}' > text_block(_r1)[px::bind(&expr::set_if, _a, _b, _1, _val)]) >> - -("else" > '}' >> text_block(_r1)[px::bind(&expr::set_if, _b, _b, _1, _val)]) > + omit[expr(_r1)[_a=_1]] > '}' > text_block(_r1)[px::bind(&expr::set_if_equal, _a, _b, _1, _val)] > '{' > + *("elsif" > omit[bool_expr_eval(_r1)[_a=_1]] > '}' > text_block(_r1)[px::bind(&expr::set_if, _a, _b, _1, _val)]) >> + -("else" > '}' >> text_block(_r1)[px::bind(&expr::set_if, _b, _b, _1, _val)]) > "endif"; */ // Legacy variable expansion of the original Slic3r, in the form of [scalar_variable] or [vector_variable_index]. legacy_variable_expansion = (identifier >> &lit(']')) - [ px::bind(&MyContext::legacy_variable_expansion, _r1, _1, _val) ] + [ px::bind(&MyContext::legacy_variable_expansion, _r1, _1, _val) ] | (identifier > lit('[') > identifier > ']') - [ px::bind(&MyContext::legacy_variable_expansion2, _r1, _1, _2, _val) ] + [ px::bind(&MyContext::legacy_variable_expansion2, _r1, _1, _2, _val) ] ; legacy_variable_expansion.name("legacy_variable_expansion"); @@ -1407,41 +2042,44 @@ namespace client identifier.name("identifier"); conditional_expression = - logical_or_expression(_r1) [_val = _1] - >> -('?' > conditional_expression(_r1) > ':' > conditional_expression(_r1)) [px::bind(&expr::ternary_op, _val, _1, _2)]; + logical_or_expression(_r1) [_val = _1] + >> -('?' > eps[px::bind(&expr::evaluate_boolean, _val, _a)] > + eps[px::bind(&MyContext::block_enter, _r1, _a)] > conditional_expression(_r1)[px::bind(&MyContext::block_exit_ternary, _r1, _a, _1, _val)] + > ':' > + eps[px::bind(&MyContext::block_enter, _r1, ! _a)] > conditional_expression(_r1)[px::bind(&MyContext::block_exit_ternary, _r1, ! _a, _1, _val)]); conditional_expression.name("conditional_expression"); logical_or_expression = logical_and_expression(_r1) [_val = _1] - >> *( ((kw["or"] | "||") > logical_and_expression(_r1) ) [px::bind(&expr::logical_or, _val, _1)] ); + >> *( ((kw["or"] | "||") > logical_and_expression(_r1) ) [px::bind(&expr::logical_or, _val, _1)] ); logical_or_expression.name("logical_or_expression"); logical_and_expression = equality_expression(_r1) [_val = _1] - >> *( ((kw["and"] | "&&") > equality_expression(_r1) ) [px::bind(&expr::logical_and, _val, _1)] ); + >> *( ((kw["and"] | "&&") > equality_expression(_r1) ) [px::bind(&expr::logical_and, _val, _1)] ); logical_and_expression.name("logical_and_expression"); equality_expression = relational_expression(_r1) [_val = _1] - >> *( ("==" > relational_expression(_r1) ) [px::bind(&expr::equal, _val, _1)] - | ("!=" > relational_expression(_r1) ) [px::bind(&expr::not_equal, _val, _1)] - | ("<>" > relational_expression(_r1) ) [px::bind(&expr::not_equal, _val, _1)] - | ("=~" > regular_expression ) [px::bind(&expr::regex_matches, _val, _1)] - | ("!~" > regular_expression ) [px::bind(&expr::regex_doesnt_match, _val, _1)] + >> *( ("==" > relational_expression(_r1) ) [px::bind(&expr::equal, _val, _1)] + | ("!=" > relational_expression(_r1) ) [px::bind(&expr::not_equal, _val, _1)] + | ("<>" > relational_expression(_r1) ) [px::bind(&expr::not_equal, _val, _1)] + | ("=~" > regular_expression ) [px::bind(&expr::regex_matches, _val, _1)] + | ("!~" > regular_expression ) [px::bind(&expr::regex_doesnt_match, _val, _1)] ); equality_expression.name("bool expression"); // Evaluate a boolean expression stored as expr into a boolean value. // Throw if the equality_expression does not produce a expr of boolean type. - bool_expr_eval = conditional_expression(_r1) [ px::bind(&expr::evaluate_boolean, _1, _val) ]; + bool_expr_eval = conditional_expression(_r1) [ px::bind(&expr::evaluate_boolean, _1, _val) ]; bool_expr_eval.name("bool_expr_eval"); relational_expression = additive_expression(_r1) [_val = _1] - >> *( ("<=" > additive_expression(_r1) ) [px::bind(&expr::leq, _val, _1)] - | (">=" > additive_expression(_r1) ) [px::bind(&expr::geq, _val, _1)] - | (lit('<') > additive_expression(_r1) ) [px::bind(&expr::lower, _val, _1)] - | (lit('>') > additive_expression(_r1) ) [px::bind(&expr::greater, _val, _1)] + >> *( ("<=" > additive_expression(_r1) ) [px::bind(&expr::leq, _val, _1)] + | (">=" > additive_expression(_r1) ) [px::bind(&expr::geq, _val, _1)] + | (lit('<') > additive_expression(_r1) ) [px::bind(&expr::lower, _val, _1)] + | (lit('>') > additive_expression(_r1) ) [px::bind(&expr::greater, _val, _1)] ); relational_expression.name("relational_expression"); @@ -1461,71 +2099,83 @@ namespace client multiplicative_expression.name("multiplicative_expression"); assignment_statement = - (variable_reference(_r1) >> '=' > additive_expression(_r1)) - [px::bind(&MyContext::variable_assign, _r1, _1, _2, _val)]; + (variable_reference(_r1)[_a = _1] >> '=') > + ( // Consumes also '(' conditional_expression ')', that means enclosing an expression into braces makes it a single value vector initializer. + initializer_list(_r1)[px::bind(&MyContext::vector_variable_assign_initializer_list, _r1, _a, _1)] + // Process it before conditional_expression, as conditional_expression requires a vector reference to be augmented with an index. + // Only process such variable references, which return a naked vector variable. + | eps(px::bind(&MyContext::is_vector_variable_reference, _a)) >> + variable_reference(_r1)[px::bind(&MyContext::copy_vector_variable_to_vector_variable, _r1, _a, _1)] + // Would NOT consume '(' conditional_expression ')' because such value was consumed with the expression above. + | conditional_expression(_r1) + [px::bind(&MyContext::scalar_variable_assign_scalar_expression, _r1, _a, _1)] + | (kw["repeat"] > "(" > additive_expression(_r1) > "," > conditional_expression(_r1) > ")") + [px::bind(&MyContext::vector_variable_assign_array, _r1, _a, _1, _2)] + ); + + new_variable_statement = + (kw["local"][_a = false] | kw["global"][_a = true]) > identifier[px::bind(&MyContext::new_old_variable, _r1, _a, _1, _b)] > lit('=') > + ( // Consumes also '(' conditional_expression ')', that means enclosing an expression into braces makes it a single value vector initializer. + initializer_list(_r1)[px::bind(&MyContext::vector_variable_new_from_initializer_list, _r1, _a, _b, _1)] + // Process it before conditional_expression, as conditional_expression requires a vector reference to be augmented with an index. + // Only process such variable references, which return a naked vector variable. + // Orca todo: following code cause strange build errors with MSVC C++17 + // | eps(px::bind(&MyContext::could_be_vector_variable_reference, _b)) >> + // variable_reference(_r1)[px::val(qi::_pass) = px::bind(&MyContext::vector_variable_new_from_copy, _r1, _a, _b, _1)] + // Would NOT consume '(' conditional_expression ')' because such value was consumed with the expression above. + | conditional_expression(_r1) + [px::bind(&MyContext::scalar_variable_new_from_scalar_expression, _r1, _a, _b, _1)] + | (kw["repeat"] > "(" > additive_expression(_r1) > "," > conditional_expression(_r1) > ")") + [px::bind(&MyContext::vector_variable_new_from_array, _r1, _a, _b, _1, _2)] + ); + initializer_list = lit('(') > + ( lit(')') | + ( conditional_expression(_r1)[px::bind(&MyContext::initializer_list_append, _val, _1)] > + *(lit(',') > conditional_expression(_r1)[px::bind(&MyContext::initializer_list_append, _val, _1)]) > + lit(')') + ) + ); - struct FactorActions { - static void set_start_pos(Iterator &start_pos, expr &out) - { out.it_range = boost::iterator_range(start_pos, start_pos); } - static void int_(int &value, Iterator &end_pos, expr &out) - { out = expr(value, out.it_range.begin(), end_pos); } - static void double_(double &value, Iterator &end_pos, expr &out) - { out = expr(value, out.it_range.begin(), end_pos); } - static void bool_(bool &value, Iterator &end_pos, expr &out) - { out = expr(value, out.it_range.begin(), end_pos); } - static void string_(boost::iterator_range &it_range, expr &out) - { out = expr(std::string(it_range.begin() + 1, it_range.end() - 1), it_range.begin(), it_range.end()); } - static void expr_(expr &value, Iterator &end_pos, expr &out) - { auto begin_pos = out.it_range.begin(); out = expr(std::move(value), begin_pos, end_pos); } - static void minus_(expr &value, expr &out) - { out = value.unary_minus(out.it_range.begin()); } - static void not_(expr &value, expr &out) - { out = value.unary_not(out.it_range.begin()); } - static void to_int(expr &value, expr &out) - { out = value.unary_integer(out.it_range.begin()); } - static void round(expr &value, expr &out) - { out = value.round(out.it_range.begin()); } - // For indicating "no optional parameter". - static void noexpr(expr &out) { out.reset(); } - }; unary_expression = iter_pos[px::bind(&FactorActions::set_start_pos, _1, _val)] >> ( - variable_reference(_r1) [px::bind(&MyContext::variable_value, _r1, _1, _val)] + variable_reference(_r1) [px::bind(&MyContext::variable_value, _r1, _1, _val)] | (lit('(') > conditional_expression(_r1) > ')' > iter_pos) [ px::bind(&FactorActions::expr_, _1, _2, _val) ] | (lit('-') > unary_expression(_r1) ) [ px::bind(&FactorActions::minus_, _1, _val) ] | (lit('+') > unary_expression(_r1) > iter_pos) [ px::bind(&FactorActions::expr_, _1, _2, _val) ] | ((kw["not"] | '!') > unary_expression(_r1) > iter_pos) [ px::bind(&FactorActions::not_, _1, _val) ] | (kw["min"] > '(' > conditional_expression(_r1) [_val = _1] > ',' > conditional_expression(_r1) > ')') - [ px::bind(&expr::min, _val, _2) ] + [ px::bind(&expr::min, _val, _2) ] | (kw["max"] > '(' > conditional_expression(_r1) [_val = _1] > ',' > conditional_expression(_r1) > ')') - [ px::bind(&expr::max, _val, _2) ] + [ px::bind(&expr::max, _val, _2) ] | (kw["random"] > '(' > conditional_expression(_r1) [_val = _1] > ',' > conditional_expression(_r1) > ')') - [ px::bind(&MyContext::random, _r1, _val, _2) ] + [ px::bind(&MyContext::random, _r1, _val, _2) ] | (kw["digits"] > '(' > conditional_expression(_r1) [_val = _1] > ',' > conditional_expression(_r1) > optional_parameter(_r1)) - [ px::bind(&expr::template digits, _val, _2, _3) ] + [ px::bind(&expr::digits, _val, _2, _3) ] | (kw["zdigits"] > '(' > conditional_expression(_r1) [_val = _1] > ',' > conditional_expression(_r1) > optional_parameter(_r1)) - [ px::bind(&expr::template digits, _val, _2, _3) ] + [ px::bind(&expr::digits, _val, _2, _3) ] | (kw["int"] > '(' > conditional_expression(_r1) > ')') [ px::bind(&FactorActions::to_int, _1, _val) ] | (kw["round"] > '(' > conditional_expression(_r1) > ')') [ px::bind(&FactorActions::round, _1, _val) ] - | (kw["is_nil"] > '(' > is_nil_test(_r1) > ')') [ _val = _1 ] + | (kw["is_nil"] > '(' > variable_reference(_r1) > ')') [px::bind(&MyContext::is_nil_test, _r1, _1, _val)] | (kw["one_of"] > '(' > one_of(_r1) > ')') [ _val = _1 ] + | (kw["empty"] > '(' > variable_reference(_r1) > ')') [px::bind(&MyContext::is_vector_empty, _r1, _1, _val)] + | (kw["size"] > '(' > variable_reference(_r1) > ')') [px::bind(&MyContext::vector_size, _r1, _1, _val)] | (kw["interpolate_table"] > '(' > interpolate_table(_r1) > ')') [ _val = _1 ] - | (strict_double > iter_pos) [ px::bind(&FactorActions::double_, _1, _2, _val) ] - | (int_ > iter_pos) [ px::bind(&FactorActions::int_, _1, _2, _val) ] - | (kw[bool_] > iter_pos) [ px::bind(&FactorActions::bool_, _1, _2, _val) ] + | (strict_double > iter_pos) [ px::bind(&FactorActions::double_, _r1, _1, _2, _val) ] + | (int_ > iter_pos) [ px::bind(&FactorActions::int_, _r1, _1, _2, _val) ] + | (kw[bool_] > iter_pos) [ px::bind(&FactorActions::bool_, _r1, _1, _2, _val) ] | raw[lexeme['"' > *((utf8char - char_('\\') - char_('"')) | ('\\' > char_)) > '"']] - [ px::bind(&FactorActions::string_, _1, _val) ] + [ px::bind(&FactorActions::string_, _r1, _1, _val) ] ); unary_expression.name("unary_expression"); one_of = (unary_expression(_r1)[_a = _1] > one_of_list(_r1, _a))[_val = _2]; one_of.name("one_of"); one_of_list = - eps[px::bind(&expr::one_of_test_init, _val)] > + eps[px::bind(&expr::one_of_test_init, _val)] > ( ( ',' > *( ( - unary_expression(_r1)[px::bind(&expr::template one_of_test, _r2, _1, _val)] - | (lit('~') > unary_expression(_r1))[px::bind(&expr::template one_of_test, _r2, _1, _val)] - | regular_expression[px::bind(&expr::one_of_test_regex, _r2, _1, _val)] + unary_expression(_r1)[px::bind(&expr::one_of_test, _r2, _1, _val)] + | (lit('~') > unary_expression(_r1))[px::bind(&expr::one_of_test, _r2, _1, _val)] + | regular_expression[px::bind(&expr::one_of_test_regex, _r2, _1, _val)] ) >> -lit(',')) ) | eps @@ -1533,12 +2183,12 @@ namespace client one_of_list.name("one_of_list"); interpolate_table = (unary_expression(_r1)[_a = _1] > ',' > interpolate_table_list(_r1, _a)) - [px::bind(&InterpolateTableContext::evaluate, _a, _2, _val)]; + [px::bind(&InterpolateTableContext::evaluate, _a, _2, _val)]; interpolate_table.name("interpolate_table"); interpolate_table_list = - eps[px::bind(&InterpolateTableContext::init, _r2)] > + eps[px::bind(&InterpolateTableContext::init, _r2)] > ( *(( lit('(') > unary_expression(_r1) > ',' > unary_expression(_r1) > ')' ) - [px::bind(&InterpolateTableContext::add_pair, _1, _2, _val)] >> -lit(',')) ); + [px::bind(&InterpolateTableContext::add_pair, _1, _2, _val)] >> -lit(',')) ); interpolate_table.name("interpolate_table_list"); optional_parameter = iter_pos[px::bind(&FactorActions::set_start_pos, _1, _val)] >> ( @@ -1547,20 +2197,17 @@ namespace client ); optional_parameter.name("optional_parameter"); - is_nil_test = variable_reference(_r1)[px::bind(&MyContext::is_nil_test, _r1, _1, _val)]; - is_nil_test.name("is_nil test"); - variable_reference = variable(_r1)[_a=_1] >> ( - ('[' > additive_expression(_r1)[px::bind(&MyContext::evaluate_index, _1, _b)] > ']' > iter_pos) - [px::bind(&MyContext::store_variable_index, _r1, _a, _b, _2, _val)] + ('[' > additive_expression(_r1)[px::bind(&MyContext::evaluate_index, _1, _b)] > ']' > iter_pos) + [px::bind(&MyContext::store_variable_index, _r1, _a, _b, _2, _val)] | eps[_val=_a] ); variable_reference.name("variable reference"); - variable = identifier[ px::bind(&MyContext::resolve_variable, _r1, _1, _val) ]; - variable.name("variable reference"); + variable = identifier[ px::bind(&MyContext::resolve_variable, _r1, _1, _val) ]; + variable.name("variable name"); regular_expression = raw[lexeme['/' > *((utf8char - char_('\\') - char_('/')) | ('\\' > char_)) > '/']]; regular_expression.name("regular_expression"); @@ -1569,29 +2216,34 @@ namespace client ("and") ("digits") ("zdigits") + ("empty") ("if") ("int") ("is_nil") + ("local") //("inf") ("else") ("elsif") ("endif") ("false") + ("global") ("interpolate_table") ("min") ("max") ("random") + ("repeat") ("round") ("not") ("one_of") ("or") + ("size") ("true"); if (0) { debug(start); debug(text); debug(text_block); - debug(macro); + debug(macros); debug(if_else_output); debug(interpolate_table); // debug(switch_output); @@ -1613,28 +2265,27 @@ namespace client debug(optional_parameter); debug(variable_reference); debug(variable); - debug(is_nil_test); debug(regular_expression); } } - // Generic expression over expr. - typedef qi::rule(const MyContext*), spirit_encoding::space_type> RuleExpression; + // Generic expression over expr. + typedef qi::rule RuleExpression; // The start of the grammar. - qi::rule, spirit_encoding::space_type> start; + qi::rule, skipper> start; // A free-form text. - qi::rule text; + qi::rule text; // A free-form text, possibly empty, possibly containing macro expansions. - qi::rule text_block; + qi::rule text_block; // Statements enclosed in curely braces {} - qi::rule macro; + qi::rule block, statement, macros, if_text_block, if_macros, else_macros; // Legacy variable expansion of the original Slic3r, in the form of [scalar_variable] or [vector_variable_index]. - qi::rule legacy_variable_expansion; + qi::rule legacy_variable_expansion; // Parsed identifier name. - qi::rule(), spirit_encoding::space_type> identifier; + qi::rule identifier; // Ternary operator (?:) over logical_or_expression. - RuleExpression conditional_expression; + qi::rule, skipper> conditional_expression; // Logical or over logical_and_expressions. RuleExpression logical_or_expression; // Logical and over relational_expressions. @@ -1652,48 +2303,39 @@ namespace client // Accepting an optional parameter. RuleExpression optional_parameter; // Rule to capture a regular expression enclosed in //. - qi::rule(), spirit_encoding::space_type> regular_expression; + qi::rule regular_expression; // Evaluate boolean expression into bool. - qi::rule bool_expr_eval; + qi::rule bool_expr_eval; // Reference of a scalar variable, or reference to a field of a vector variable. - qi::rule(const MyContext*), qi::locals, int>, spirit_encoding::space_type> variable_reference; + qi::rule, skipper> variable_reference; // Rule to translate an identifier to a ConfigOption, or to fail. - qi::rule(const MyContext*), spirit_encoding::space_type> variable; + qi::rule variable; // Evaluating whether a nullable variable is nil. - qi::rule(const MyContext*), spirit_encoding::space_type> is_nil_test; + qi::rule is_nil_test; // Evaluating "one of" list of patterns. - qi::rule(const MyContext*), qi::locals>, spirit_encoding::space_type> one_of; - qi::rule(const MyContext*, const expr ¶m), spirit_encoding::space_type> one_of_list; + qi::rule, skipper> one_of; + qi::rule one_of_list; // Evaluating the "interpolate_table" expression. - qi::rule(const MyContext*), qi::locals>, spirit_encoding::space_type> interpolate_table; - qi::rule(const MyContext*, const expr ¶m), spirit_encoding::space_type> interpolate_table_list; + qi::rule, skipper> interpolate_table; + qi::rule interpolate_table_list; - qi::rule, spirit_encoding::space_type> if_else_output; - qi::rule, int>, spirit_encoding::space_type> assignment_statement; -// qi::rule, bool, std::string>, spirit_encoding::space_type> switch_output; + qi::rule, skipper> if_else_output; + qi::rule, skipper> assignment_statement; + // Allocating new local or global variables. + qi::rule, skipper> new_variable_statement; + qi::rule(const MyContext*), skipper> initializer_list; qi::symbols keywords; }; } +static const client::macro_processor g_macro_processor_instance; + static std::string process_macro(const std::string &templ, client::MyContext &context) { - typedef std::string::const_iterator iterator_type; - typedef client::macro_processor macro_processor; - - // Our whitespace skipper. - spirit_encoding::space_type space; - // Our grammar, statically allocated inside the method, meaning it will be allocated the first time - // PlaceholderParser::process() runs. - //FIXME this kind of initialization is not thread safe! - static macro_processor macro_processor_instance; - // Iterators over the source template. - std::string::const_iterator iter = templ.begin(); - std::string::const_iterator end = templ.end(); - // Accumulator for the processed template. - std::string output; - phrase_parse(iter, end, macro_processor_instance(&context), space, output); - if (!context.error_message.empty()) { + std::string output; + phrase_parse(templ.begin(), templ.end(), g_macro_processor_instance(&context), client::skipper{}, output); + if (! context.error_message.empty()) { if (context.error_message.back() != '\n' && context.error_message.back() != '\r') context.error_message += '\n'; throw Slic3r::PlaceholderParserError(context.error_message); diff --git a/src/libslic3r/Preset.cpp b/src/libslic3r/Preset.cpp index d05ea00813..dcbe87b9e9 100644 --- a/src/libslic3r/Preset.cpp +++ b/src/libslic3r/Preset.cpp @@ -784,7 +784,7 @@ static std::vector s_Preset_print_options { "support_top_z_distance", "support_on_build_plate_only","support_critical_regions_only", "bridge_no_support", "thick_bridges", "thick_internal_bridges","dont_filter_internal_bridges", "max_bridge_length", "print_sequence", "print_order", "support_remove_small_overhang", "filename_format", "wall_filament", "support_bottom_z_distance", "sparse_infill_filament", "solid_infill_filament", "support_filament", "support_interface_filament","support_interface_not_for_body", - "ooze_prevention", "standby_temperature_delta", "interface_shells", "line_width", "initial_layer_line_width", + "ooze_prevention", "standby_temperature_delta", "preheat_time","preheat_steps", "interface_shells", "line_width", "initial_layer_line_width", "inner_wall_line_width", "outer_wall_line_width", "sparse_infill_line_width", "internal_solid_infill_line_width", "top_surface_line_width", "support_line_width", "infill_wall_overlap","top_bottom_infill_wall_overlap", "bridge_flow", "internal_bridge_flow", "elefant_foot_compensation", "elefant_foot_compensation_layers", "xy_contour_compensation", "xy_hole_compensation", "resolution", "enable_prime_tower", @@ -809,7 +809,7 @@ static std::vector s_Preset_print_options { "tree_support_brim_width", "gcode_comments", "gcode_label_objects", "initial_layer_travel_speed", "exclude_object", "slow_down_layers", "infill_anchor", "infill_anchor_max","initial_layer_min_bead_width", "make_overhang_printable", "make_overhang_printable_angle", "make_overhang_printable_hole_size" ,"notes", - "wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed", "wipe_tower_extruder", "wiping_volumes_extruders","wipe_tower_bridging", "single_extruder_multi_material_priming", + "wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed", "wipe_tower_filament", "wiping_volumes_extruders","wipe_tower_bridging", "wipe_tower_extra_flow","single_extruder_multi_material_priming", "wipe_tower_rotation_angle", "tree_support_branch_distance_organic", "tree_support_branch_diameter_organic", "tree_support_branch_angle_organic", "hole_to_polyhole", "hole_to_polyhole_threshold", "hole_to_polyhole_twisted", "mmu_segmented_region_max_width", "mmu_segmented_region_interlocking_depth", "small_area_infill_flow_compensation", "small_area_infill_flow_compensation_model", @@ -842,10 +842,10 @@ static std::vector s_Preset_filament_options { //SoftFever "enable_pressure_advance", "pressure_advance","adaptive_pressure_advance","adaptive_pressure_advance_model","adaptive_pressure_advance_overhangs", "adaptive_pressure_advance_bridges","chamber_temperature", "filament_shrink", "support_material_interface_fan_speed", "filament_notes" /*,"filament_seam_gap"*/, "filament_loading_speed", "filament_loading_speed_start", "filament_load_time", - "filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", + "filament_unloading_speed", "filament_unloading_speed_start", "filament_unload_time", "filament_toolchange_delay", "filament_cooling_moves", "filament_stamping_loading_speed", "filament_stamping_distance", "filament_cooling_initial_speed", "filament_cooling_final_speed", "filament_ramming_parameters", "filament_multitool_ramming", "filament_multitool_ramming_volume", "filament_multitool_ramming_flow", "activate_chamber_temp_control", - "filament_long_retractions_when_cut","filament_retraction_distances_when_cut" + "filament_long_retractions_when_cut","filament_retraction_distances_when_cut", "idle_temperature" }; static std::vector s_Preset_machine_limits_options { diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 89ce1cbe1c..c6417e700c 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -161,6 +161,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n "use_firmware_retraction", "slow_down_layer_time", "standby_temperature_delta", + "preheat_time", + "preheat_steps", "machine_start_gcode", "filament_start_gcode", "change_filament_gcode", @@ -252,6 +254,8 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "filament_unloading_speed_start" || opt_key == "filament_toolchange_delay" || opt_key == "filament_cooling_moves" + || opt_key == "filament_stamping_loading_speed" + || opt_key == "filament_stamping_distance" || opt_key == "filament_cooling_initial_speed" || opt_key == "filament_cooling_final_speed" || opt_key == "filament_ramming_parameters" @@ -273,6 +277,7 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "other_layers_print_sequence" || opt_key == "other_layers_print_sequence_nums" || opt_key == "wipe_tower_bridging" + || opt_key == "wipe_tower_extra_flow" || opt_key == "wipe_tower_no_sparse_layers" || opt_key == "flush_volumes_matrix" || opt_key == "prime_volume" @@ -284,10 +289,11 @@ bool Print::invalidate_state_by_config_options(const ConfigOptionResolver & /* n || opt_key == "initial_layer_speed" || opt_key == "initial_layer_travel_speed" || opt_key == "slow_down_layers" + || opt_key == "idle_temperature" || opt_key == "wipe_tower_cone_angle" || opt_key == "wipe_tower_extra_spacing" || opt_key == "wipe_tower_max_purge_speed" - || opt_key == "wipe_tower_extruder" + || opt_key == "wipe_tower_filament" || opt_key == "wiping_volumes_extruders" || opt_key == "enable_filament_ramming" || opt_key == "purge_in_prime_tower" @@ -493,7 +499,10 @@ std::vector Print::print_object_ids() const bool Print::has_infinite_skirt() const { - return (m_config.draft_shield == dsEnabled && m_config.skirt_loops > 0) || (m_config.ooze_prevention && this->extruders().size() > 1); + // Orca: unclear why (m_config.ooze_prevention && this->extruders().size() > 1) logic is here, removed. + // return (m_config.draft_shield == dsEnabled && m_config.skirt_loops > 0) || (m_config.ooze_prevention && this->extruders().size() > 1); + + return (m_config.draft_shield == dsEnabled && m_config.skirt_loops > 0); } bool Print::has_skirt() const @@ -1147,17 +1156,20 @@ StringObjectException Print::validate(StringObjectException *warning, Polygons* double nozzle_diam = m_config.nozzle_diameter.get_at(extruder_idx); double filament_diam = m_config.filament_diameter.get_at(extruder_idx); if (nozzle_diam - EPSILON > first_nozzle_diam || nozzle_diam + EPSILON < first_nozzle_diam - || std::abs((filament_diam - first_filament_diam) / first_filament_diam) > 0.1) - // BBS: remove L() - return { L("Different nozzle diameters and different filament diameters is not allowed when prime tower is enabled.") }; + || std::abs((filament_diam - first_filament_diam) / first_filament_diam) > 0.1) { + // return { L("Different nozzle diameters and different filament diameters may not work well when prime tower is enabled. It's very experimental, please proceed with caucious.") }; + warning->string = L("Different nozzle diameters and different filament diameters may not work well when the prime tower is enabled. It's very experimental, so please proceed with caution."); + warning->opt_key = "nozzle_diameter"; + break; + } } if (! m_config.use_relative_e_distances) return { L("The Wipe Tower is currently only supported with the relative extruder addressing (use_relative_e_distances=1).") }; - if (m_config.ooze_prevention) - return { L("Ooze prevention is currently not supported with the prime tower enabled.") }; - // BBS: remove following logic and _L() + if (m_config.ooze_prevention && m_config.single_extruder_multi_material) + return {L("Ooze prevention is only supported with the wipe tower when 'single_extruder_multi_material' is off.")}; + #if 0 if (m_config.gcode_flavor != gcfRepRapSprinter && m_config.gcode_flavor != gcfRepRapFirmware && m_config.gcode_flavor != gcfRepetier && m_config.gcode_flavor != gcfMarlinLegacy && m_config.gcode_flavor != gcfMarlinFirmware) @@ -2032,7 +2044,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache) //BBS: get the objects' indices when GCodes are generated ToolOrdering tool_ordering; unsigned int initial_extruder_id = (unsigned int)-1; - // bool has_wipe_tower = false; + bool has_wipe_tower = false; std::vector print_object_instances_ordering; std::vector::const_iterator print_object_instance_sequential_active; std::vector>> layers_to_print = GCode::collect_layers_to_print(*this); @@ -2052,15 +2064,7 @@ void Print::process(long long *time_cost_with_cache, bool use_cache) else { tool_ordering = this->tool_ordering(); tool_ordering.assign_custom_gcodes(*this); - //BBS: have no single_extruder_multi_material_priming -#if 0 has_wipe_tower = this->has_wipe_tower() && tool_ordering.has_wipe_tower(); - initial_extruder_id = (has_wipe_tower && !this->config().single_extruder_multi_material_priming) ? - // The priming towers will be skipped. - tool_ordering.all_extruders().back() : - // Don't skip the priming towers. - tool_ordering.first_extruder(); -#endif initial_extruder_id = tool_ordering.first_extruder(); print_object_instances_ordering = chain_print_object_instances(*this); append(printExtruders, tool_ordering.tools_for_layer(layers_to_print.front().first).extruders); @@ -2573,9 +2577,20 @@ void Print::_make_wipe_tower() for (unsigned int i = 0; i(flush_matrix.begin()+i*number_of_extruders, flush_matrix.begin()+(i+1)*number_of_extruders)); + const auto bUseWipeTower2 = is_BBL_printer() ? false : true; + // Orca: itertate over wipe_volumes and change the non-zero values to the prime_volume + if (!m_config.purge_in_prime_tower && !is_BBL_printer()) { + for (unsigned int i = 0; i < number_of_extruders; ++i) { + for (unsigned int j = 0; j < number_of_extruders; ++j) { + if (wipe_volumes[i][j] > 0) { + wipe_volumes[i][j] = m_config.prime_volume; + } + } + } + } + // Let the ToolOrdering class know there will be initial priming extrusions at the start of the print. - // BBS: priming logic is removed, so don't consider it in tool ordering - m_wipe_tower_data.tool_ordering = ToolOrdering(*this, (unsigned int)-1, false); + m_wipe_tower_data.tool_ordering = ToolOrdering(*this, (unsigned int) -1, bUseWipeTower2 ? true : false); if (!m_wipe_tower_data.tool_ordering.has_wipe_tower()) // Don't generate any wipe tower. @@ -2618,7 +2633,7 @@ void Print::_make_wipe_tower() } this->throw_if_canceled(); - if (is_BBL_printer()) { + if (!bUseWipeTower2) { // in BBL machine, wipe tower is only use to prime extruder. So just use a global wipe volume. WipeTower wipe_tower(m_config, m_plate_index, m_origin, m_config.prime_volume, m_wipe_tower_data.tool_ordering.first_extruder(), m_wipe_tower_data.tool_ordering.empty() ? 0.f : m_wipe_tower_data.tool_ordering.back().print_z); @@ -2726,21 +2741,21 @@ void Print::_make_wipe_tower() for (size_t i = 0; i < number_of_extruders; ++i) wipe_tower.set_extruder(i, m_config); - // m_wipe_tower_data.priming = Slic3r::make_unique>( - // wipe_tower.prime((float)this->skirt_first_layer_height(), m_wipe_tower_data.tool_ordering.all_extruders(), false)); + m_wipe_tower_data.priming = Slic3r::make_unique>( + wipe_tower.prime((float)this->skirt_first_layer_height(), m_wipe_tower_data.tool_ordering.all_extruders(), false)); // Lets go through the wipe tower layers and determine pairs of extruder changes for each // to pass to wipe_tower (so that it can use it for planning the layout of the tower) { - unsigned int current_extruder_id = m_wipe_tower_data.tool_ordering.first_extruder(); + unsigned int current_extruder_id = m_wipe_tower_data.tool_ordering.all_extruders().back(); for (auto &layer_tools : m_wipe_tower_data.tool_ordering.layer_tools()) { // for all layers if (!layer_tools.has_wipe_tower) continue; - // bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front(); + bool first_layer = &layer_tools == &m_wipe_tower_data.tool_ordering.front(); wipe_tower.plan_toolchange((float) layer_tools.print_z, (float) layer_tools.wipe_tower_layer_height, current_extruder_id, current_extruder_id, false); for (const auto extruder_id : layer_tools.extruders) { - if (/*(first_layer && extruder_id == m_wipe_tower_data.tool_ordering.all_extruders().back()) || */ extruder_id != + if ((first_layer && extruder_id == m_wipe_tower_data.tool_ordering.all_extruders().back()) || extruder_id != current_extruder_id) { float volume_to_wipe = m_config.prime_volume; if (m_config.purge_in_prime_tower) { @@ -2816,6 +2831,7 @@ std::string Print::output_filename(const std::string &filename_base) const // These values will be just propagated into the output file name. DynamicConfig config = this->finished() ? this->print_statistics().config() : this->print_statistics().placeholders(); config.set_key_value("num_filaments", new ConfigOptionInt((int)m_config.nozzle_diameter.size())); + config.set_key_value("num_extruders", new ConfigOptionInt((int) m_config.nozzle_diameter.size())); config.set_key_value("plate_name", new ConfigOptionString(get_plate_name())); config.set_key_value("plate_number", new ConfigOptionString(get_plate_number_formatted())); config.set_key_value("model_name", new ConfigOptionString(get_model_name())); @@ -2921,6 +2937,30 @@ std::string PrintStatistics::finalize_output_path(const std::string &path_in) co return final_path; } +const std::string PrintStatistics::FilamentUsedG = "filament used [g]"; +const std::string PrintStatistics::FilamentUsedGMask = "; filament used [g] ="; + +const std::string PrintStatistics::TotalFilamentUsedG = "total filament used [g]"; +const std::string PrintStatistics::TotalFilamentUsedGMask = "; total filament used [g] ="; +const std::string PrintStatistics::TotalFilamentUsedGValueMask = "; total filament used [g] = %.2lf\n"; + +const std::string PrintStatistics::FilamentUsedCm3 = "filament used [cm3]"; +const std::string PrintStatistics::FilamentUsedCm3Mask = "; filament used [cm3] ="; + +const std::string PrintStatistics::FilamentUsedMm = "filament used [mm]"; +const std::string PrintStatistics::FilamentUsedMmMask = "; filament used [mm] ="; + +const std::string PrintStatistics::FilamentCost = "filament cost"; +const std::string PrintStatistics::FilamentCostMask = "; filament cost ="; + +const std::string PrintStatistics::TotalFilamentCost = "total filament cost"; +const std::string PrintStatistics::TotalFilamentCostMask = "; total filament cost ="; +const std::string PrintStatistics::TotalFilamentCostValueMask = "; total filament cost = %.2lf\n"; + +const std::string PrintStatistics::TotalFilamentUsedWipeTower = "total filament used for wipe tower [g]"; +const std::string PrintStatistics::TotalFilamentUsedWipeTowerValueMask = "; total filament used for wipe tower [g] = %.2lf\n"; + + /*add json export/import related functions */ #define JSON_POLYGON_CONTOUR "contour" #define JSON_POLYGON_HOLES "holes" diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp index bd7b867b99..aebb46899f 100644 --- a/src/libslic3r/Print.hpp +++ b/src/libslic3r/Print.hpp @@ -771,6 +771,23 @@ struct PrintStatistics initial_tool = 0; filament_stats.clear(); } + static const std::string FilamentUsedG; + static const std::string FilamentUsedGMask; + static const std::string TotalFilamentUsedG; + static const std::string TotalFilamentUsedGMask; + static const std::string TotalFilamentUsedGValueMask; + static const std::string FilamentUsedCm3; + static const std::string FilamentUsedCm3Mask; + static const std::string FilamentUsedMm; + static const std::string FilamentUsedMmMask; + static const std::string FilamentCost; + static const std::string FilamentCostMask; + static const std::string TotalFilamentCost; + static const std::string TotalFilamentCostMask; + static const std::string TotalFilamentCostValueMask; + static const std::string TotalFilamentUsedWipeTower; + static const std::string TotalFilamentUsedWipeTowerValueMask; + }; typedef std::vector PrintObjectPtrs; diff --git a/src/libslic3r/PrintBase.hpp b/src/libslic3r/PrintBase.hpp index aecef8a238..b680ac274e 100644 --- a/src/libslic3r/PrintBase.hpp +++ b/src/libslic3r/PrintBase.hpp @@ -583,7 +583,16 @@ public: bool is_step_done(PrintStepEnum step) const { return m_state.is_done(step, this->state_mutex()); } PrintStateBase::StateWithTimeStamp step_state_with_timestamp(PrintStepEnum step) const { return m_state.state_with_timestamp(step, this->state_mutex()); } PrintStateBase::StateWithWarnings step_state_with_warnings(PrintStepEnum step) const { return m_state.state_with_warnings(step, this->state_mutex()); } - + // Add a slicing warning to the active Print step and send a status notification. + // This method could be called multiple times between this->set_started() and this->set_done(). + void active_step_add_warning(PrintStateBase::WarningLevel warning_level, const std::string &message, + PrintStateBase::SlicingNotificationType message_id = PrintStateBase::SlicingDefaultNotification) + { + std::pair active_step = m_state.active_step_add_warning(warning_level, message, (int)message_id, this->state_mutex()); + if (active_step.second) + // Update UI. + this->status_update_warnings(static_cast(active_step.first), warning_level, message, nullptr, message_id); + } protected: bool set_started(PrintStepEnum step) { return m_state.set_started(step, this->state_mutex(), [this](){ this->throw_if_canceled(); }); } PrintStateBase::TimeStamp set_done(PrintStepEnum step) { @@ -605,16 +614,6 @@ protected: bool is_step_started_unguarded(PrintStepEnum step) const { return m_state.is_started_unguarded(step); } bool is_step_done_unguarded(PrintStepEnum step) const { return m_state.is_done_unguarded(step); } - // Add a slicing warning to the active Print step and send a status notification. - // This method could be called multiple times between this->set_started() and this->set_done(). - void active_step_add_warning(PrintStateBase::WarningLevel warning_level, const std::string &message, - PrintStateBase::SlicingNotificationType message_id = PrintStateBase::SlicingDefaultNotification) - { - std::pair active_step = m_state.active_step_add_warning(warning_level, message, (int)message_id, this->state_mutex()); - if (active_step.second) - // Update UI. - this->status_update_warnings(static_cast(active_step.first), warning_level, message, nullptr, message_id); - } private: PrintState m_state; diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index b43a91ae1f..b17746db4f 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -1936,6 +1936,21 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionInts { 4 }); + def = this->add("filament_stamping_loading_speed", coFloats); + def->label = L("Stamping loading speed"); + def->tooltip = L("Speed used for stamping."); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloats { 0. }); + + def = this->add("filament_stamping_distance", coFloats); + def->label = L("Stamping distance measured from the center of the cooling tube"); + def->tooltip = L("If set to nonzero value, filament is moved toward the nozzle between the individual cooling moves (\"stamping\"). " + "This option configures how long this movement should be before the filament is retracted again."); + def->min = 0; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloats { 0. }); + def = this->add("filament_cooling_initial_speed", coFloats); def->label = L("Speed of the first cooling move"); def->tooltip = L("Cooling moves are gradually accelerating beginning at this speed."); @@ -2768,6 +2783,7 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionBool(false)); def = this->add("sparse_infill_filament", coInt); + def->gui_type = ConfigOptionDef::GUIType::i_enum_open; def->label = L("Infill"); def->category = L("Extruders"); def->tooltip = L("Filament to print internal sparse infill."); @@ -2853,11 +2869,10 @@ void PrintConfigDef::init_fff_params() def = this->add("mmu_segmented_region_interlocking_depth", coFloat); def->label = L("Interlocking depth of a segmented region"); - //def->tooltip = L("Interlocking depth of a segmented region. It will be ignored if " - // "\"mmu_segmented_region_max_width\" is zero or if \"mmu_segmented_region_interlocking_depth\"" - // "is bigger then \"mmu_segmented_region_max_width\". Zero disables this feature."); - def->tooltip = L("Interlocking depth of a segmented region. Zero disables this feature."); - def->sidetext = L("mm"); //(zero to disable) + def->tooltip = L("Interlocking depth of a segmented region. It will be ignored if " + "\"mmu_segmented_region_max_width\" is zero or if \"mmu_segmented_region_interlocking_depth\"" + "is bigger then \"mmu_segmented_region_max_width\". Zero disables this feature."); + def->sidetext = L("mm"); def->min = 0; def->category = L("Advanced"); def->mode = comAdvanced; @@ -3393,10 +3408,8 @@ void PrintConfigDef::init_fff_params() def = this->add("ooze_prevention", coBool); def->label = L("Enable"); - //def->tooltip = L("This option will drop the temperature of the inactive extruders to prevent oozing. " - // "It will enable a tall skirt automatically and move extruders outside such " - // "skirt when changing temperatures."); - def->mode = comDevelop; + def->tooltip = L("This option will drop the temperature of the inactive extruders to prevent oozing."); + def->mode = comAdvanced; def->set_default_value(new ConfigOptionBool(false)); def = this->add("filename_format", coString); @@ -3444,14 +3457,12 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionBool(true)); def = this->add("wall_filament", coInt); - //def->label = L("Walls"); - //def->category = L("Extruders"); - //def->tooltip = L("Filament to print walls"); + def->gui_type = ConfigOptionDef::GUIType::i_enum_open; def->label = "Walls"; def->category = "Extruders"; def->tooltip = "Filament to print walls"; def->min = 1; - def->mode = comDevelop; + def->mode = comAdvanced; def->set_default_value(new ConfigOptionInt(1)); def = this->add("inner_wall_line_width", coFloatOrPercent); @@ -4037,14 +4048,12 @@ void PrintConfigDef::init_fff_params() def->set_default_value(new ConfigOptionFloat(15)); def = this->add("solid_infill_filament", coInt); - //def->label = L("Solid infill"); - //def->category = L("Extruders"); - //def->tooltip = L("Filament to print solid infill"); + def->gui_type = ConfigOptionDef::GUIType::i_enum_open; def->label = "Solid infill"; def->category = "Extruders"; def->tooltip = "Filament to print solid infill"; def->min = 1; - def->mode = comDevelop; + def->mode = comAdvanced; def->set_default_value(new ConfigOptionInt(1)); def = this->add("internal_solid_infill_line_width", coFloatOrPercent); @@ -4114,15 +4123,36 @@ void PrintConfigDef::init_fff_params() def = this->add("standby_temperature_delta", coInt); def->label = L("Temperature variation"); - //def->tooltip = L("Temperature difference to be applied when an extruder is not active. " - // "Enables a full-height \"sacrificial\" skirt on which the nozzles are periodically wiped."); + // TRN PrintSettings : "Ooze prevention" > "Temperature variation" + def->tooltip = L("Temperature difference to be applied when an extruder is not active. " + "The value is not used when 'idle_temperature' in filament settings " + "is set to non zero value."); def->sidetext = "∆°C"; def->min = -max_temp; def->max = max_temp; - //BBS - def->mode = comDevelop; + def->mode = comAdvanced; def->set_default_value(new ConfigOptionInt(-5)); + def = this->add("preheat_time", coFloat); + def->label = L("Preheat time"); + def->tooltip = L("To reduce the waiting time after tool change, Orca can preheat the next tool while the current tool is still in use. " + "This setting specifies the time in seconds to preheat the next tool. Orca will insert a M104 command to preheat the tool in advance."); + def->sidetext = "s"; + def->min = 0; + def->max = 120; + def->mode = comAdvanced; + def->set_default_value(new ConfigOptionFloat(30.0)); + + def = this->add("preheat_steps", coInt); + def->label = L("Preheat steps"); + def->tooltip = L("Insert multiple preheat commands(e.g. M104.1). Only useful for Prusa XL. For other printers, please set it to 1."); + // def->sidetext = ""; + def->min = 1; + def->max = 10; + def->mode = comDevelop; + def->set_default_value(new ConfigOptionInt(1)); + + def = this->add("machine_start_gcode", coString); def->label = L("Start G-code"); def->tooltip = L("Start G-code when start the whole printing"); @@ -4145,7 +4175,6 @@ void PrintConfigDef::init_fff_params() def->label = L("Single Extruder Multi Material"); def->tooltip = L("Use single nozzle to print multi filament"); def->mode = comAdvanced; - def->readonly = true; def->set_default_value(new ConfigOptionBool(true)); def = this->add("manual_filament_change", coBool); @@ -4181,7 +4210,7 @@ void PrintConfigDef::init_fff_params() def->label = L("Prime all printing extruders"); def->tooltip = L("If enabled, all printing extruders will be primed at the front edge of the print bed at the start of the print."); def->mode = comAdvanced; - def->set_default_value(new ConfigOptionBool(true)); + def->set_default_value(new ConfigOptionBool(false)); def = this->add("slice_closing_radius", coFloat); def->label = L("Slice gap closing radius"); @@ -4943,15 +4972,6 @@ void PrintConfigDef::init_fff_params() def->min = 0.; def->max = 90.; def->set_default_value(new ConfigOptionFloat(0.)); - - def = this->add("wipe_tower_extra_spacing", coPercent); - def->label = L("Wipe tower purge lines spacing"); - def->tooltip = L("Spacing of purge lines on the wipe tower."); - def->sidetext = L("%"); - def->mode = comAdvanced; - def->min = 100.; - def->max = 300.; - def->set_default_value(new ConfigOptionPercent(100.)); def = this->add("wipe_tower_max_purge_speed", coFloat); def->label = L("Maximum wipe tower print speed"); @@ -4966,8 +4986,9 @@ void PrintConfigDef::init_fff_params() def->min = 10; def->set_default_value(new ConfigOptionFloat(90.)); - def = this->add("wipe_tower_extruder", coInt); - def->label = L("Wipe tower extruder"); + def = this->add("wipe_tower_filament", coInt); + def->gui_type = ConfigOptionDef::GUIType::i_enum_open; + def->label = L("Wipe tower"); def->category = L("Extruders"); def->tooltip = L("The extruder to use when printing perimeter of the wipe tower. " "Set to 0 to use the one that is available (non-soluble would be preferred)."); @@ -5014,6 +5035,34 @@ void PrintConfigDef::init_fff_params() def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloat(10.)); + def = this->add("wipe_tower_extra_spacing", coPercent); + def->label = L("Wipe tower purge lines spacing"); + def->tooltip = L("Spacing of purge lines on the wipe tower."); + def->sidetext = L("%"); + def->mode = comAdvanced; + def->min = 100.; + def->max = 300.; + def->set_default_value(new ConfigOptionPercent(100.)); + + def = this->add("wipe_tower_extra_flow", coPercent); + def->label = L("Extra flow for purging"); + def->tooltip = L("Extra flow used for the purging lines on the wipe tower. This makes the purging lines thicker or narrower " + "than they normally would be. The spacing is adjusted automatically."); + def->sidetext = L("%"); + def->mode = comAdvanced; + def->min = 100.; + def->max = 300.; + def->set_default_value(new ConfigOptionPercent(100.)); + + def = this->add("idle_temperature", coInts); + def->label = L("Idle temperature"); + def->tooltip = L("Nozzle temperature when the tool is currently not used in multi-tool setups." + "This is only used when 'Ooze prevention' is active in Print Settings. Set to 0 to disable."); + def->sidetext = L("°C"); + def->min = 0; + def->max = max_temp; + def->set_default_value(new ConfigOptionInts{0}); + def = this->add("xy_hole_compensation", coFloat); def->label = L("X-Y hole compensation"); def->category = L("Quality"); @@ -5974,7 +6023,9 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va opt_key = "solid_infill_filament"; }else if (opt_key == "perimeter_extruder") { opt_key = "wall_filament"; - } else if (opt_key == "support_material_extruder") { + }else if(opt_key == "wipe_tower_extruder") { + opt_key = "wipe_tower_filament"; + }else if (opt_key == "support_material_extruder") { opt_key = "support_filament"; } else if (opt_key == "support_material_interface_extruder") { opt_key = "support_interface_filament"; @@ -6041,8 +6092,6 @@ void PrintConfigDef::handle_legacy(t_config_option_key &opt_key, std::string &va } else { opt_key = "wall_sequence"; } - } else if(opt_key == "single_extruder_multi_material") { - value = "1"; } else if(opt_key == "ensure_vertical_shell_thickness") { if(value == "1") { @@ -7296,10 +7345,9 @@ ReadWriteSlicingStatesConfigDef::ReadWriteSlicingStatesConfigDef() def->label = L("Extra deretraction"); def->tooltip = L("Currently planned extra extruder priming after deretraction."); - // Options from PS not used in Orca -// def = this->add("e_position", coFloats); -// def->label = L("Absolute E position"); -// def->tooltip = L("Current position of the extruder axis. Only used with absolute extruder addressing."); + def = this->add("e_position", coFloats); + def->label = L("Absolute E position"); + def->tooltip = L("Current position of the extruder axis. Only used with absolute extruder addressing."); } OtherSlicingStatesConfigDef::OtherSlicingStatesConfigDef() @@ -7335,9 +7383,9 @@ OtherSlicingStatesConfigDef::OtherSlicingStatesConfigDef() // def->label = L("Initial filament type"); // def->tooltip = L("String containing filament type of the first used extruder."); - // def = this->add("has_single_extruder_multi_material_priming", coBool); - // def->label = L("Has single extruder MM priming"); - // def->tooltip = L("Are the extra multi-material priming regions used in this print?"); + def = this->add("has_single_extruder_multi_material_priming", coBool); + def->label = L("Has single extruder MM priming"); + def->tooltip = L("Are the extra multi-material priming regions used in this print?"); new_def("initial_no_support_extruder", coInt, "Initial no support extruder", "Zero-based index of the first extruder used for printing without support. Same as initial_no_support_tool."); new_def("in_head_wrap_detect_zone", coBool, "In head wrap detect zone", "Indicates if the first layer overlaps with the head wrap zone."); @@ -7541,10 +7589,9 @@ OtherPresetsConfigDef::OtherPresetsConfigDef() def->label = L("Physical printer name"); def->tooltip = L("Name of the physical printer used for slicing."); - // Options from PS not used in Orca - // def = this->add("num_extruders", coInt); - // def->label = L("Number of extruders"); - // def->tooltip = L("Total number of extruders, regardless of whether they are used in the current print."); + def = this->add("num_extruders", coInt); + def->label = L("Number of extruders"); + def->tooltip = L("Total number of extruders, regardless of whether they are used in the current print."); } @@ -7704,6 +7751,22 @@ bool has_skirt(const DynamicPrintConfig& cfg) float get_real_skirt_dist(const DynamicPrintConfig& cfg) { return has_skirt(cfg) ? cfg.opt_float("skirt_distance") : 0; } +static bool is_XL_printer(const std::string& printer_notes) +{ + return boost::algorithm::contains(printer_notes, "PRINTER_VENDOR_PRUSA3D") + && boost::algorithm::contains(printer_notes, "PRINTER_MODEL_XL"); +} + +bool is_XL_printer(const DynamicPrintConfig &cfg) +{ + auto *printer_notes = cfg.opt("printer_notes"); + return printer_notes && is_XL_printer(printer_notes->value); +} + +bool is_XL_printer(const PrintConfig &cfg) +{ + return is_XL_printer(cfg.printer_notes.value); +} } // namespace Slic3r #include diff --git a/src/libslic3r/PrintConfig.hpp b/src/libslic3r/PrintConfig.hpp index 9e31eb5bfb..000559b765 100644 --- a/src/libslic3r/PrintConfig.hpp +++ b/src/libslic3r/PrintConfig.hpp @@ -1136,6 +1136,8 @@ PRINT_CONFIG_CLASS_DEFINE( ((ConfigOptionBools, filament_multitool_ramming)) ((ConfigOptionFloats, filament_multitool_ramming_volume)) ((ConfigOptionFloats, filament_multitool_ramming_flow)) + ((ConfigOptionFloats, filament_stamping_loading_speed)) + ((ConfigOptionFloats, filament_stamping_distance)) ((ConfigOptionBool, purge_in_prime_tower)) ((ConfigOptionBool, enable_filament_ramming)) ((ConfigOptionBool, support_multi_bed_types)) @@ -1229,6 +1231,8 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionBool, spiral_mode_smooth)) ((ConfigOptionFloatOrPercent, spiral_mode_max_xy_smoothing)) ((ConfigOptionInt, standby_temperature_delta)) + ((ConfigOptionFloat, preheat_time)) + ((ConfigOptionInt, preheat_steps)) ((ConfigOptionInts, nozzle_temperature)) ((ConfigOptionBools, wipe)) // BBS @@ -1244,15 +1248,18 @@ PRINT_CONFIG_CLASS_DERIVED_DEFINE( ((ConfigOptionFloat, wipe_tower_rotation_angle)) ((ConfigOptionFloat, prime_tower_brim_width)) ((ConfigOptionFloat, wipe_tower_bridging)) + ((ConfigOptionPercent, wipe_tower_extra_flow)) ((ConfigOptionFloats, flush_volumes_matrix)) ((ConfigOptionFloats, flush_volumes_vector)) // Orca: mmu support ((ConfigOptionFloat, wipe_tower_cone_angle)) ((ConfigOptionPercent, wipe_tower_extra_spacing)) - ((ConfigOptionFloat, wipe_tower_max_purge_speed)) - ((ConfigOptionInt, wipe_tower_extruder)) + ((ConfigOptionFloat, wipe_tower_max_purge_speed)) + ((ConfigOptionInt, wipe_tower_filament)) ((ConfigOptionFloats, wiping_volumes_extruders)) + ((ConfigOptionInts, idle_temperature)) + // BBS: wipe tower is only used for priming ((ConfigOptionFloat, prime_volume)) @@ -1652,6 +1659,9 @@ private: static PrintAndCLIConfigDef s_def; }; +bool is_XL_printer(const DynamicPrintConfig &cfg); +bool is_XL_printer(const PrintConfig &cfg); + Points get_bed_shape(const DynamicPrintConfig &cfg); Points get_bed_shape(const PrintConfig &cfg); Points get_bed_shape(const SLAPrinterConfig &cfg); diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp index 1487016734..72efdb02a8 100644 --- a/src/libslic3r/PrintObject.cpp +++ b/src/libslic3r/PrintObject.cpp @@ -2887,7 +2887,7 @@ static void apply_to_print_region_config(PrintRegionConfig &out, const DynamicPr // 1) Copy the "extruder key to sparse_infill_filament and wall_filament. auto *opt_extruder = in.opt(key_extruder); if (opt_extruder) - if (int extruder = opt_extruder->value; extruder != 0) { + if (int extruder = opt_extruder->value; extruder != 1) { // Not a default extruder. out.sparse_infill_filament .value = extruder; out.solid_infill_filament.value = extruder; diff --git a/src/libslic3r/libslic3r.h b/src/libslic3r/libslic3r.h index 3e71ada5ab..798ea77d76 100644 --- a/src/libslic3r/libslic3r.h +++ b/src/libslic3r/libslic3r.h @@ -61,6 +61,9 @@ static constexpr double SCALING_FACTOR_INTERNAL = 0.000001; static constexpr double SCALING_FACTOR_INTERNAL_LARGE_PRINTER = 0.00001; static constexpr double LARGE_BED_THRESHOLD = 2147; +// Orca: maximum number of extruders is 64. For SEMM printers, it defines maximum filament number. +static constexpr size_t MAXIMUM_EXTRUDER_NUMBER = 64; + extern double SCALING_FACTOR; // for creating circles (for brim_ear) #define POLY_SIDES 24 diff --git a/src/slic3r/GUI/ConfigManipulation.cpp b/src/slic3r/GUI/ConfigManipulation.cpp index cd729cae45..9893ee5efc 100644 --- a/src/slic3r/GUI/ConfigManipulation.cpp +++ b/src/slic3r/GUI/ConfigManipulation.cpp @@ -661,20 +661,35 @@ void ConfigManipulation::toggle_print_fff_options(DynamicPrintConfig *config, co // for (auto el : { "extruder_clearance_radius", "extruder_clearance_height_to_rod", "extruder_clearance_height_to_lid" }) // toggle_field(el, have_sequential_printing); toggle_field("print_order", !have_sequential_printing); + + toggle_field("single_extruder_multi_material", !is_BBL_Printer); + auto bSEMM = preset_bundle->printers.get_edited_preset().config.opt_bool("single_extruder_multi_material"); + + toggle_field("ooze_prevention", !bSEMM); bool have_ooze_prevention = config->opt_bool("ooze_prevention"); - toggle_field("standby_temperature_delta", have_ooze_prevention); - + toggle_line("standby_temperature_delta", have_ooze_prevention); + toggle_line("preheat_time", have_ooze_prevention); + int preheat_steps = config->opt_int("preheat_steps"); + toggle_line("preheat_steps", have_ooze_prevention && (preheat_steps > 0)); + bool have_prime_tower = config->opt_bool("enable_prime_tower"); for (auto el : { "prime_tower_width", "prime_tower_brim_width"}) toggle_line(el, have_prime_tower); - + + for (auto el : {"wall_filament", "sparse_infill_filament", "solid_infill_filament", "wipe_tower_filament"}) + toggle_line(el, !bSEMM); + bool purge_in_primetower = preset_bundle->printers.get_edited_preset().config.opt_bool("purge_in_prime_tower"); - - for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_max_purge_speed", "wipe_tower_bridging", "wipe_tower_no_sparse_layers"}) - toggle_line(el, have_prime_tower && purge_in_primetower); - - toggle_line("prime_volume",have_prime_tower && !purge_in_primetower); + + for (auto el : {"wipe_tower_rotation_angle", "wipe_tower_cone_angle", + "wipe_tower_extra_spacing", "wipe_tower_max_purge_speed", + "wipe_tower_bridging", "wipe_tower_extra_flow", + "wipe_tower_no_sparse_layers", + "single_extruder_multi_material_priming"}) + toggle_line(el, have_prime_tower && !is_BBL_Printer); + + toggle_line("prime_volume",have_prime_tower && (!purge_in_primetower || !bSEMM)); for (auto el : {"flush_into_infill", "flush_into_support", "flush_into_objects"}) toggle_field(el, have_prime_tower); diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 2af35b86a1..3c47ce7b10 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -9176,8 +9176,6 @@ void GLCanvas3D::_load_wipe_tower_toolpaths(const BuildVolume& build_volume, con ctxt.print = print; ctxt.tool_colors = tool_colors.empty() ? nullptr : &tool_colors; - //BBS: has no single_extruder_multi_material_priming - //if (print->wipe_tower_data().priming && print->config().single_extruder_multi_material_priming) if (print->wipe_tower_data().priming) for (int i=0; i<(int)print->wipe_tower_data().priming.get()->size(); ++i) ctxt.priming.emplace_back(print->wipe_tower_data().priming.get()->at(i)); diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp index afecaa2658..74c268c6a2 100644 --- a/src/slic3r/GUI/GUI_App.cpp +++ b/src/slic3r/GUI/GUI_App.cpp @@ -3980,16 +3980,18 @@ void GUI_App::on_http_error(wxCommandEvent &evt) wxString result; if (status >= 400 && status < 500) { try { - json j = json::parse(evt.GetString()); - if (j.contains("code")) { - if (!j["code"].is_null()) - code = j["code"].get(); + auto evt_str = evt.GetString(); + if (!evt_str.empty()) { + json j = json::parse(evt_str); + if (j.contains("code")) { + if (!j["code"].is_null()) + code = j["code"].get(); + } + if (j.contains("error")) + if (!j["error"].is_null()) + error = j["error"].get(); } - if (j.contains("error")) - if (!j["error"].is_null()) - error = j["error"].get(); - } - catch (...) {} + } catch (...) {} } // Version limit diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 9267fe9974..7de59dee2a 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -544,7 +544,7 @@ std::vector get_min_flush_volumes(const DynamicPrintConfig& full_config) // Sidebar / public -static struct DynamicFilamentList : DynamicList +struct DynamicFilamentList : DynamicList { std::vector> items; @@ -589,13 +589,69 @@ static struct DynamicFilamentList : DynamicList } DynamicList::update(); } -} dynamic_filament_list; +}; + +struct DynamicFilamentList1Based : DynamicFilamentList +{ + void apply_on(Choice *c) override + { + if (items.empty()) + update(true); + auto cb = dynamic_cast(c->window); + auto n = cb->GetSelection(); + cb->Clear(); + for (auto i : items) { + cb->Append(i.first, *i.second); + } + if (n < cb->GetCount()) + cb->SetSelection(n); + } + wxString get_value(int index) override + { + wxString str; + str << index+1; + return str; + } + int index_of(wxString value) override + { + long n = 0; + if(!value.ToLong(&n)) + return -1; + --n; + return (n >= 0 && n <= items.size()) ? int(n) : -1; + } + void update(bool force = false) + { + items.clear(); + if (!force && m_choices.empty()) + return; + auto icons = get_extruder_color_icons(true); + auto presets = wxGetApp().preset_bundle->filament_presets; + for (int i = 0; i < presets.size(); ++i) { + wxString str; + std::string type; + wxGetApp().preset_bundle->filaments.find_preset(presets[i])->get_filament_type(type); + str << type; + items.push_back({str, icons[i]}); + } + DynamicList::update(); + } + +}; + + +static DynamicFilamentList dynamic_filament_list; +static DynamicFilamentList1Based dynamic_filament_list_1_based; Sidebar::Sidebar(Plater *parent) : wxPanel(parent, wxID_ANY, wxDefaultPosition, wxSize(42 * wxGetApp().em_unit(), -1)), p(new priv(parent)) { Choice::register_dynamic_list("support_filament", &dynamic_filament_list); Choice::register_dynamic_list("support_interface_filament", &dynamic_filament_list); + Choice::register_dynamic_list("wall_filament", &dynamic_filament_list_1_based); + Choice::register_dynamic_list("sparse_infill_filament", &dynamic_filament_list_1_based); + Choice::register_dynamic_list("solid_infill_filament", &dynamic_filament_list_1_based); + Choice::register_dynamic_list("wipe_tower_filament", &dynamic_filament_list); p->scrolled = new wxPanel(this); // p->scrolled->SetScrollbars(0, 100, 1, 2); // ys_DELETE_after_testing. pixelsPerUnitY = 100 @@ -885,8 +941,8 @@ Sidebar::Sidebar(Plater *parent) ScalableButton* add_btn = new ScalableButton(p->m_panel_filament_title, wxID_ANY, "add_filament"); add_btn->SetToolTip(_L("Add one filament")); add_btn->Bind(wxEVT_BUTTON, [this, scrolled_sizer](wxCommandEvent& e){ - // Orca: limit filament choices to 64 - if (p->combos_filament.size() >= 64) + // Orca: limit filament choices to MAXIMUM_EXTRUDER_NUMBER + if (p->combos_filament.size() >= MAXIMUM_EXTRUDER_NUMBER) return; int filament_count = p->combos_filament.size() + 1; @@ -1223,6 +1279,8 @@ void Sidebar::update_all_preset_comboboxes() p->m_filament_icon->SetBitmap_("filament"); } + show_SEMM_buttons(cfg.opt_bool("single_extruder_multi_material")); + //p->m_staticText_filament_settings->Update(); @@ -1327,6 +1385,7 @@ void Sidebar::update_presets(Preset::Type preset_type) Tab* printer_tab = wxGetApp().get_tab(Preset::TYPE_PRINTER); if (printer_tab) { printer_tab->update(); + printer_tab->on_preset_loaded(); } Preset& printer_preset = wxGetApp().preset_bundle->printers.get_edited_preset(); @@ -1582,8 +1641,7 @@ void Sidebar::on_filaments_change(size_t num_filaments) } void Sidebar::add_filament() { - // BBS: limit filament choices to 16 - if (p->combos_filament.size() >= 16) return; + if (p->combos_filament.size() >= MAXIMUM_EXTRUDER_NUMBER) return; wxColour new_col = Plater::get_next_color_for_filament(); add_custom_filament(new_col); } @@ -1607,7 +1665,7 @@ void Sidebar::delete_filament() { } void Sidebar::add_custom_filament(wxColour new_col) { - if (p->combos_filament.size() >= 16) return; + if (p->combos_filament.size() >= MAXIMUM_EXTRUDER_NUMBER) return; int filament_count = p->combos_filament.size() + 1; std::string new_color = new_col.GetAsString(wxC2S_HTML_SYNTAX).ToStdString(); @@ -1785,6 +1843,17 @@ void Sidebar::sync_ams_list() Layout(); } +void Sidebar::show_SEMM_buttons(bool bshow) +{ + if(p->m_bpButton_add_filament) + p->m_bpButton_add_filament->Show(bshow); + if(p->m_bpButton_del_filament) + p->m_bpButton_del_filament->Show(bshow); + if (p->m_flushing_volume_btn) + p->m_flushing_volume_btn->Show(bshow); + Layout(); +} + ObjectList* Sidebar::obj_list() { // BBS @@ -2697,7 +2766,7 @@ Plater::priv::priv(Plater *q, MainFrame *main_frame) "brim_width", "wall_loops", "wall_filament", "sparse_infill_density", "sparse_infill_filament", "top_shell_layers", "enable_support", "support_filament", "support_interface_filament", "support_top_z_distance", "support_bottom_z_distance", "raft_layers", - "wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing","wipe_tower_max_purge_speed", "wipe_tower_extruder", + "wipe_tower_rotation_angle", "wipe_tower_cone_angle", "wipe_tower_extra_spacing", "wipe_tower_extra_flow", "wipe_tower_max_purge_speed", "wipe_tower_filament", "best_object_pos" })) , sidebar(new Sidebar(q)) @@ -3684,7 +3753,7 @@ std::vector Plater::priv::load_files(const std::vector& input_ int size = extruderIds.size() == 0 ? 0 : *(extruderIds.rbegin()); int filament_size = sidebar->combos_filament().size(); - while (filament_size < 16 && filament_size < size) { + while (filament_size < MAXIMUM_EXTRUDER_NUMBER && filament_size < size) { int filament_count = filament_size + 1; wxColour new_col = Plater::get_next_color_for_filament(); std::string new_color = new_col.GetAsString(wxC2S_HTML_SYNTAX).ToStdString(); diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index bda2ab6110..52f0706e89 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -148,6 +148,8 @@ public: void load_ams_list(std::string const & device, MachineObject* obj); std::map build_filament_ams_list(MachineObject* obj); void sync_ams_list(); + // Orca + void show_SEMM_buttons(bool bshow); ObjectList* obj_list(); ObjectSettings* obj_settings(); diff --git a/src/slic3r/GUI/Tab.cpp b/src/slic3r/GUI/Tab.cpp index 806cbad985..3bcb4eda28 100644 --- a/src/slic3r/GUI/Tab.cpp +++ b/src/slic3r/GUI/Tab.cpp @@ -27,6 +27,7 @@ #include #include #include "libslic3r/libslic3r.h" +#include "slic3r/GUI/OptionsGroup.hpp" #include "wxExtensions.hpp" #include "PresetComboBoxes.hpp" #include @@ -1431,8 +1432,15 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) } - if (opt_key == "single_extruder_multi_material" || opt_key == "extruders_count" ) - update_wiping_button_visibility(); + if (opt_key == "single_extruder_multi_material" ){ + const auto bSEMM = m_config->opt_bool("single_extruder_multi_material"); + wxGetApp().sidebar().show_SEMM_buttons(bSEMM); + wxGetApp().get_tab(Preset::TYPE_PRINT)->update(); + } + + if(opt_key == "purge_in_prime_tower") + wxGetApp().get_tab(Preset::TYPE_PRINT)->update(); + if (opt_key == "enable_prime_tower") { auto timelapse_type = m_config->option>("timelapse_type"); @@ -1632,11 +1640,14 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) } - // BBS -#if 0 - if (opt_key == "extruders_count") - wxGetApp().plater()->on_extruders_change(boost::any_cast(value)); -#endif + //Orca: sync filament num if it's a multi tool printer + if (opt_key == "extruders_count" && !m_config->opt_bool("single_extruder_multi_material")){ + auto num_extruder = boost::any_cast(value); + wxGetApp().preset_bundle->set_num_filaments(num_extruder); + wxGetApp().plater()->on_filaments_change(num_extruder); + wxGetApp().get_tab(Preset::TYPE_PRINT)->update(); + wxGetApp().preset_bundle->export_selections(*wxGetApp().app_config); + } if (m_postpone_update_ui) { // It means that not all values are rolled to the system/last saved values jet. @@ -1645,7 +1656,8 @@ void Tab::on_value_change(const std::string& opt_key, const boost::any& value) } update(); - m_active_page->update_visibility(m_mode, true); + if(m_active_page) + m_active_page->update_visibility(m_mode, true); m_page_view->GetParent()->Layout(); } @@ -1664,14 +1676,16 @@ void Tab::show_timelapse_warning_dialog() { void Tab::update_wiping_button_visibility() { if (m_preset_bundle->printers.get_selected_preset().printer_technology() == ptSLA) return; // ys_FIXME - bool wipe_tower_enabled = dynamic_cast( (m_preset_bundle->prints.get_edited_preset().config ).option("enable_prime_tower"))->value; - bool multiple_extruders = dynamic_cast((m_preset_bundle->printers.get_edited_preset().config).option("nozzle_diameter"))->values.size() > 1; + // Orca: it's not used + // + // bool wipe_tower_enabled = dynamic_cast( (m_preset_bundle->prints.get_edited_preset().config ).option("enable_prime_tower"))->value; + // bool multiple_extruders = dynamic_cast((m_preset_bundle->printers.get_edited_preset().config).option("nozzle_diameter"))->values.size() > 1; + // auto wiping_dialog_button = wxGetApp().sidebar().get_wiping_dialog_button(); + // if (wiping_dialog_button) { + // wiping_dialog_button->Show(wipe_tower_enabled && multiple_extruders); + // wiping_dialog_button->GetParent()->Layout(); + // } - auto wiping_dialog_button = wxGetApp().sidebar().get_wiping_dialog_button(); - if (wiping_dialog_button) { - wiping_dialog_button->Show(wipe_tower_enabled && multiple_extruders); - wiping_dialog_button->GetParent()->Layout(); - } } void Tab::activate_option(const std::string& opt_key, const wxString& category) @@ -2248,7 +2262,48 @@ void TabPrint::build() optgroup->append_single_option_line("tree_support_auto_brim"); optgroup->append_single_option_line("tree_support_brim_width"); - page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only visible on placeholders + page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material"); // ORCA: icon only visible on placeholders + optgroup = page->new_optgroup(L("Prime tower"), L"param_tower"); + optgroup->append_single_option_line("enable_prime_tower"); + optgroup->append_single_option_line("prime_tower_width"); + optgroup->append_single_option_line("prime_volume"); + optgroup->append_single_option_line("prime_tower_brim_width"); + optgroup->append_single_option_line("wipe_tower_rotation_angle"); + optgroup->append_single_option_line("wipe_tower_bridging"); + optgroup->append_single_option_line("wipe_tower_cone_angle"); + optgroup->append_single_option_line("wipe_tower_extra_spacing"); + optgroup->append_single_option_line("wipe_tower_extra_flow"); + optgroup->append_single_option_line("wipe_tower_max_purge_speed"); + optgroup->append_single_option_line("wipe_tower_no_sparse_layers"); + optgroup->append_single_option_line("single_extruder_multi_material_priming"); + + optgroup = page->new_optgroup(L("Filament for Features")); + optgroup->append_single_option_line("wall_filament"); + optgroup->append_single_option_line("sparse_infill_filament"); + optgroup->append_single_option_line("solid_infill_filament"); + optgroup->append_single_option_line("wipe_tower_filament"); + + optgroup = page->new_optgroup(L("Ooze prevention")); + optgroup->append_single_option_line("ooze_prevention"); + optgroup->append_single_option_line("standby_temperature_delta"); + optgroup->append_single_option_line("preheat_time"); + optgroup->append_single_option_line("preheat_steps"); + + optgroup = page->new_optgroup(L("Flush options"), L"param_flush"); + optgroup->append_single_option_line("flush_into_infill", "reduce-wasting-during-filament-change#wipe-into-infill"); + optgroup->append_single_option_line("flush_into_objects", "reduce-wasting-during-filament-change#wipe-into-object"); + optgroup->append_single_option_line("flush_into_support", "reduce-wasting-during-filament-change#wipe-into-support-enabled-by-default"); + optgroup = page->new_optgroup(L("Advanced"), L"advanced"); + optgroup->append_single_option_line("interlocking_beam"); + optgroup->append_single_option_line("mmu_segmented_region_max_width"); + optgroup->append_single_option_line("mmu_segmented_region_interlocking_depth"); + optgroup->append_single_option_line("interlocking_beam_width"); + optgroup->append_single_option_line("interlocking_orientation"); + optgroup->append_single_option_line("interlocking_beam_layer_count"); + optgroup->append_single_option_line("interlocking_depth"); + optgroup->append_single_option_line("interlocking_boundary_avoidance"); + +page = add_options_page(L("Others"), "custom-gcode_other"); // ORCA: icon only visible on placeholders optgroup = page->new_optgroup(L("Skirt"), L"param_skirt"); optgroup->append_single_option_line("skirt_loops"); optgroup->append_single_option_line("min_skirt_length"); @@ -2264,25 +2319,6 @@ void TabPrint::build() optgroup->append_single_option_line("brim_ears_max_angle"); optgroup->append_single_option_line("brim_ears_detection_length"); - optgroup = page->new_optgroup(L("Prime tower"), L"param_tower"); - optgroup->append_single_option_line("enable_prime_tower"); - optgroup->append_single_option_line("prime_tower_width"); - optgroup->append_single_option_line("prime_volume"); - optgroup->append_single_option_line("prime_tower_brim_width"); - optgroup->append_single_option_line("wipe_tower_rotation_angle"); - optgroup->append_single_option_line("wipe_tower_bridging"); - optgroup->append_single_option_line("wipe_tower_cone_angle"); - optgroup->append_single_option_line("wipe_tower_extra_spacing"); - optgroup->append_single_option_line("wipe_tower_max_purge_speed"); - optgroup->append_single_option_line("wipe_tower_no_sparse_layers"); - // optgroup->append_single_option_line("single_extruder_multi_material_priming"); - - - optgroup = page->new_optgroup(L("Flush options"), L"param_flush"); - optgroup->append_single_option_line("flush_into_infill", "reduce-wasting-during-filament-change#wipe-into-infill"); - optgroup->append_single_option_line("flush_into_objects", "reduce-wasting-during-filament-change#wipe-into-object"); - optgroup->append_single_option_line("flush_into_support", "reduce-wasting-during-filament-change#wipe-into-support-enabled-by-default"); - optgroup = page->new_optgroup(L("Special mode"), L"param_special"); optgroup->append_single_option_line("slicing_mode"); optgroup->append_single_option_line("print_sequence", "sequent-print"); @@ -2297,16 +2333,6 @@ void TabPrint::build() optgroup->append_single_option_line("fuzzy_skin_thickness"); optgroup->append_single_option_line("fuzzy_skin_first_layer"); - optgroup = page->new_optgroup(L("Advanced"), L"advanced"); - optgroup->append_single_option_line("interlocking_beam"); - // optgroup->append_single_option_line("mmu_segmented_region_max_width"); - optgroup->append_single_option_line("mmu_segmented_region_interlocking_depth"); - optgroup->append_single_option_line("interlocking_beam_width"); - optgroup->append_single_option_line("interlocking_orientation"); - optgroup->append_single_option_line("interlocking_beam_layer_count"); - optgroup->append_single_option_line("interlocking_depth"); - optgroup->append_single_option_line("interlocking_boundary_avoidance"); - optgroup = page->new_optgroup(L("G-code output"), L"param_gcode"); optgroup->append_single_option_line("reduce_infill_retraction"); optgroup->append_single_option_line("gcode_add_line_number"); @@ -2326,13 +2352,13 @@ void TabPrint::build() option.opt.is_code = true; option.opt.height = 15; optgroup->append_single_option_line(option); - page = add_options_page(L("Notes"), "custom-gcode_note"); // ORCA: icon only visible on placeholders + optgroup = page->new_optgroup(L("Notes"), "note", 0); option = optgroup->get_option("notes"); option.opt.full_width = true; option.opt.height = 25;//250; optgroup->append_single_option_line(option); - + #if 0 //page = add_options_page(L("Dependencies"), "advanced.png"); // optgroup = page->new_optgroup(L("Profile dependencies")); @@ -3213,6 +3239,7 @@ void TabFilament::build() optgroup->append_single_option_line("filament_cost"); //BBS optgroup->append_single_option_line("temperature_vitrification"); + optgroup->append_single_option_line("idle_temperature"); Line line = { L("Recommended nozzle temperature"), L("Recommended nozzle temperature range of this filament. 0 means no set") }; line.append_option(optgroup->get_option("nozzle_temperature_range_low")); line.append_option(optgroup->get_option("nozzle_temperature_range_high")); @@ -3416,7 +3443,8 @@ void TabFilament::build() optgroup->append_single_option_line("filament_cooling_moves", "semm"); optgroup->append_single_option_line("filament_cooling_initial_speed", "semm"); optgroup->append_single_option_line("filament_cooling_final_speed", "semm"); - + optgroup->append_single_option_line("filament_stamping_loading_speed"); + optgroup->append_single_option_line("filament_stamping_distance"); create_line_with_widget(optgroup.get(), "filament_ramming_parameters", "", [this](wxWindow* parent) { auto ramming_dialog_btn = new wxButton(parent, wxID_ANY, _(L("Ramming settings"))+dots, wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT); wxGetApp().UpdateDarkUI(ramming_dialog_btn); @@ -3435,13 +3463,10 @@ void TabFilament::build() return sizer; }); - // Orca: multi tool is not supported yet. -#ifdef ORCA_MULTI_TOOL optgroup = page->new_optgroup(L("Toolchange parameters with multi extruder MM printers")); optgroup->append_single_option_line("filament_multitool_ramming"); optgroup->append_single_option_line("filament_multitool_ramming_volume"); optgroup->append_single_option_line("filament_multitool_ramming_flow"); -#endif page = add_options_page(L("Notes"), "custom-gcode_note"); // ORCA: icon only visible on placeholders optgroup = page->new_optgroup(L("Notes"),"note", 0); @@ -3667,18 +3692,6 @@ void TabPrinter::build_fff() optgroup->append_single_option_line("z_offset"); optgroup->append_single_option_line("preferred_orientation"); - // ConfigOptionDef def; - // def.type = coInt, - // def.set_default_value(new ConfigOptionInt(1)); - // def.label = L("Extruders"); - // def.tooltip = L("Number of extruders of the printer."); - // def.min = 1; - // def.max = 256; - // //BBS - // def.mode = comDevelop; - // Option option(def, "extruders_count"); - // optgroup->append_single_option_line(option); - optgroup = page->new_optgroup(L("Advanced"), L"param_advanced"); optgroup->append_single_option_line("printer_structure"); optgroup->append_single_option_line("gcode_flavor"); @@ -3954,12 +3967,10 @@ void TabPrinter::extruders_count_changed(size_t extruders_count) m_preset_bundle->update_multi_material_filament_presets(); is_count_changed = true; } - // BBS -#if 0 + // Orca: support multi tool else if (m_extruders_count == 1 && m_preset_bundle->project_config.option("flush_volumes_matrix")->values.size()>1) m_preset_bundle->update_multi_material_filament_presets(); -#endif /* This function should be call in any case because of correct updating/rebuilding * of unregular pages of a Printer Settings @@ -4093,14 +4104,86 @@ if (is_marlin_flavor) auto page = add_options_page(L("Multimaterial"), "custom-gcode_multi_material", true); // ORCA: icon only visible on placeholders auto optgroup = page->new_optgroup(L("Single extruder multimaterial setup"), "param_multi_material"); optgroup->append_single_option_line("single_extruder_multi_material", "semm"); - // Orca: we only support Single Extruder Multi Material, so it's always enabled - // optgroup->m_on_change = [this](const t_config_option_key &opt_key, const boost::any &value) { - // wxTheApp->CallAfter([this, opt_key, value]() { - // if (opt_key == "single_extruder_multi_material") { - // build_unregular_pages(); - // } - // }); - // }; + ConfigOptionDef def; + def.type = coInt, def.set_default_value(new ConfigOptionInt((int) m_extruders_count)); + def.label = L("Extruders"); + def.tooltip = L("Number of extruders of the printer."); + def.min = 1; + def.max = MAXIMUM_EXTRUDER_NUMBER; + def.mode = comAdvanced; + Option option(def, "extruders_count"); + optgroup->append_single_option_line(option); + + // Orca: rebuild missed extruder pages + optgroup->m_on_change = [this, optgroup_wk = ConfigOptionsGroupWkp(optgroup)](t_config_option_key opt_key, boost::any value) { + auto optgroup_sh = optgroup_wk.lock(); + if (!optgroup_sh) + return; + + // optgroup->get_value() return int for def.type == coInt, + // Thus, there should be boost::any_cast ! + // Otherwise, boost::any_cast causes an "unhandled unknown exception" + size_t extruders_count = size_t(boost::any_cast(optgroup_sh->get_value("extruders_count"))); + wxTheApp->CallAfter([this, opt_key, value, extruders_count]() { + if (opt_key == "extruders_count" || opt_key == "single_extruder_multi_material") { + extruders_count_changed(extruders_count); + init_options_list(); // m_options_list should be updated before UI updating + update_dirty(); + if (opt_key == "single_extruder_multi_material") { // the single_extruder_multimaterial was added to force pages + on_value_change(opt_key, value); // rebuild - let's make sure the on_value_change is not skipped + + if (boost::any_cast(value) && m_extruders_count > 1) { + SuppressBackgroundProcessingUpdate sbpu; + +// Orca: we use a different logic here. If SEMM is enabled, we set extruder count to 1. +#if 1 + extruders_count_changed(1); +#else + + std::vector nozzle_diameters = + static_cast(m_config->option("nozzle_diameter"))->values; + const double frst_diam = nozzle_diameters[0]; + + for (auto cur_diam : nozzle_diameters) { + // if value is differs from first nozzle diameter value + if (fabs(cur_diam - frst_diam) > EPSILON) { + const wxString msg_text = _( + L("Single Extruder Multi Material is selected, \n" + "and all extruders must have the same diameter.\n" + "Do you want to change the diameter for all extruders to first extruder nozzle diameter value?")); + MessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO); + + DynamicPrintConfig new_conf = *m_config; + if (dialog.ShowModal() == wxID_YES) { + for (size_t i = 1; i < nozzle_diameters.size(); i++) + nozzle_diameters[i] = frst_diam; + + new_conf.set_key_value("nozzle_diameter", new ConfigOptionFloats(nozzle_diameters)); + } else + new_conf.set_key_value("single_extruder_multi_material", new ConfigOptionBool(false)); + + load_config(new_conf); + break; + } + } +#endif + } + + m_preset_bundle->update_compatible(PresetSelectCompatibleType::Never); + // Upadte related comboboxes on Sidebar and Tabs + Sidebar& sidebar = wxGetApp().plater()->sidebar(); + for (const Preset::Type& type : {Preset::TYPE_PRINT, Preset::TYPE_FILAMENT}) { + sidebar.update_presets(type); + wxGetApp().get_tab(type)->update_tab_ui(); + } + } + } + else { + update_dirty(); + on_value_change(opt_key, value); + } + }); + }; optgroup->append_single_option_line("manual_filament_change", "semm#manual-filament-change"); optgroup = page->new_optgroup(L("Wipe tower"), "param_tower"); @@ -4117,140 +4200,138 @@ if (is_marlin_flavor) m_pages.insert(m_pages.end() - n_after_single_extruder_MM, page); } - // BBS. Just create one extruder page because BBL machine has only on physical extruder. - // Build missed extruder pages - //for (auto extruder_idx = m_extruders_count_old; extruder_idx < m_extruders_count; ++extruder_idx) - auto extruder_idx = 0; - const wxString& page_name = (m_extruders_count > 1) ? wxString::Format("Extruder %d", int(extruder_idx + 1)) : wxString::Format("Extruder"); - bool page_exist = false; - for (auto page_temp : m_pages) { - if (page_temp->title() == page_name) { - page_exist = true; - break; + // Orca: build missed extruder pages + for (auto extruder_idx = m_extruders_count_old; extruder_idx < m_extruders_count; ++extruder_idx) { + // auto extruder_idx = 0; + const wxString& page_name = wxString::Format("Extruder %d", int(extruder_idx + 1)); + bool page_exist = false; + for (auto page_temp : m_pages) { + if (page_temp->title() == page_name) { + page_exist = true; + break; + } } - } - if (!page_exist) - { - //# build page - //const wxString& page_name = wxString::Format("Extruder %d", int(extruder_idx + 1)); - auto page = add_options_page(page_name, "custom-gcode_extruder", true); // ORCA: icon only visible on placeholders - m_pages.insert(m_pages.begin() + n_before_extruders + extruder_idx, page); + if (!page_exist) + { + //# build page + //const wxString& page_name = wxString::Format("Extruder %d", int(extruder_idx + 1)); + auto page = add_options_page(page_name, "custom-gcode_extruder", true); // ORCA: icon only visible on placeholders + m_pages.insert(m_pages.begin() + n_before_extruders + extruder_idx, page); - auto optgroup = page->new_optgroup(L("Size"), L"param_extruder_size", -1, true); - optgroup->append_single_option_line("nozzle_diameter", "", extruder_idx); + auto optgroup = page->new_optgroup(L("Size"), L"param_extruder_size"); + optgroup->append_single_option_line("nozzle_diameter", "", extruder_idx); - optgroup->m_on_change = [this, extruder_idx](const t_config_option_key& opt_key, boost::any value) - { - //if (m_config->opt_bool("single_extruder_multi_material") && m_extruders_count > 1 && opt_key.find_first_of("nozzle_diameter") != std::string::npos) - //{ - // SuppressBackgroundProcessingUpdate sbpu; - // const double new_nd = boost::any_cast(value); - // std::vector nozzle_diameters = static_cast(m_config->option("nozzle_diameter"))->values; + optgroup->m_on_change = [this, extruder_idx](const t_config_option_key& opt_key, boost::any value) + { + bool is_SEMM = m_config->opt_bool("single_extruder_multi_material"); + if (is_SEMM && m_extruders_count > 1 && opt_key.find_first_of("nozzle_diameter") != std::string::npos) + { + SuppressBackgroundProcessingUpdate sbpu; + const double new_nd = boost::any_cast(value); + std::vector nozzle_diameters = static_cast(m_config->option("nozzle_diameter"))->values; - // // if value was changed - // if (fabs(nozzle_diameters[extruder_idx == 0 ? 1 : 0] - new_nd) > EPSILON) + // if value was changed + if (fabs(nozzle_diameters[extruder_idx == 0 ? 1 : 0] - new_nd) > EPSILON) + { + const wxString msg_text = _(L("This is a single extruder multimaterial printer, diameters of all extruders " + "will be set to the new value. Do you want to proceed?")); + //wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO); + MessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO); + + DynamicPrintConfig new_conf = *m_config; + if (dialog.ShowModal() == wxID_YES) { + for (size_t i = 0; i < nozzle_diameters.size(); i++) { + if (i == extruder_idx) + continue; + nozzle_diameters[i] = new_nd; + } + } + else + nozzle_diameters[extruder_idx] = nozzle_diameters[extruder_idx == 0 ? 1 : 0]; + + new_conf.set_key_value("nozzle_diameter", new ConfigOptionFloats(nozzle_diameters)); + load_config(new_conf); + } + } + + update_dirty(); + update(); + }; + + optgroup = page->new_optgroup(L("Layer height limits"), L"param_layer_height"); + optgroup->append_single_option_line("min_layer_height", "", extruder_idx); + optgroup->append_single_option_line("max_layer_height", "", extruder_idx); + + optgroup = page->new_optgroup(L("Position"), L"param_position"); + optgroup->append_single_option_line("extruder_offset", "", extruder_idx); + + //BBS: don't show retract related config menu in machine page + optgroup = page->new_optgroup(L("Retraction"), L"param_retraction"); + optgroup->append_single_option_line("retraction_length", "", extruder_idx); + optgroup->append_single_option_line("retract_restart_extra", "", extruder_idx); + optgroup->append_single_option_line("z_hop", "", extruder_idx); + optgroup->append_single_option_line("z_hop_types", "", extruder_idx); + optgroup->append_single_option_line("travel_slope", "", extruder_idx); + optgroup->append_single_option_line("retraction_speed", "", extruder_idx); + optgroup->append_single_option_line("deretraction_speed", "", extruder_idx); + optgroup->append_single_option_line("retraction_minimum_travel", "", extruder_idx); + optgroup->append_single_option_line("retract_when_changing_layer", "", extruder_idx); + optgroup->append_single_option_line("wipe", "", extruder_idx); + optgroup->append_single_option_line("wipe_distance", "", extruder_idx); + optgroup->append_single_option_line("retract_before_wipe", "", extruder_idx); + + optgroup = page->new_optgroup(L("Lift Z Enforcement"), L"param_extruder_lift_enforcement"); + optgroup->append_single_option_line("retract_lift_above", "", extruder_idx); + optgroup->append_single_option_line("retract_lift_below", "", extruder_idx); + optgroup->append_single_option_line("retract_lift_enforce", "", extruder_idx); + + optgroup = page->new_optgroup(L("Retraction when switching material"), L"param_retraction_material_change"); + optgroup->append_single_option_line("retract_length_toolchange", "", extruder_idx); + optgroup->append_single_option_line("retract_restart_extra_toolchange", "", extruder_idx); + // do not display this params now + optgroup->append_single_option_line("long_retractions_when_cut", "", extruder_idx); + optgroup->append_single_option_line("retraction_distances_when_cut", "", extruder_idx); + + #if 0 + //optgroup = page->new_optgroup(L("Preview"), -1, true); + + //auto reset_to_filament_color = [this, extruder_idx](wxWindow* parent) { + // m_reset_to_filament_color = new ScalableButton(parent, wxID_ANY, "undo", _L("Reset to Filament Color"), + // wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true); + // ScalableButton* btn = m_reset_to_filament_color; + // btn->SetFont(Slic3r::GUI::wxGetApp().normal_font()); + // btn->SetSize(btn->GetBestSize()); + // auto sizer = new wxBoxSizer(wxHORIZONTAL); + // sizer->Add(btn); + + // btn->Bind(wxEVT_BUTTON, [this, extruder_idx](wxCommandEvent& e) // { - // const wxString msg_text = _(L("This is a single extruder multimaterial printer, diameters of all extruders " - // "will be set to the new value. Do you want to proceed?")); - // //wxMessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO); - // MessageDialog dialog(parent(), msg_text, _(L("Nozzle diameter")), wxICON_WARNING | wxYES_NO); + // std::vector colors = static_cast(m_config->option("extruder_colour"))->values; + // colors[extruder_idx] = ""; // DynamicPrintConfig new_conf = *m_config; - // if (dialog.ShowModal() == wxID_YES) { - // for (size_t i = 0; i < nozzle_diameters.size(); i++) { - // if (i==extruder_idx) - // continue; - // nozzle_diameters[i] = new_nd; - // } - // } - // else - // nozzle_diameters[extruder_idx] = nozzle_diameters[extruder_idx == 0 ? 1 : 0]; - - // new_conf.set_key_value("nozzle_diameter", new ConfigOptionFloats(nozzle_diameters)); + // new_conf.set_key_value("extruder_colour", new ConfigOptionStrings(colors)); // load_config(new_conf); - // } - //} - update_dirty(); - update(); - }; - - optgroup = page->new_optgroup(L("Layer height limits"), L"param_layer_height", -1, true); - optgroup->append_single_option_line("min_layer_height", "", extruder_idx); - optgroup->append_single_option_line("max_layer_height", "", extruder_idx); - - optgroup = page->new_optgroup(L("Position"), L"param_position", -1, true); - optgroup->append_single_option_line("extruder_offset", "", extruder_idx); - - //BBS: don't show retract related config menu in machine page - optgroup = page->new_optgroup(L("Retraction"), L"param_retraction"); - optgroup->append_single_option_line("retraction_length", "", extruder_idx); - optgroup->append_single_option_line("retract_restart_extra", "", extruder_idx); - optgroup->append_single_option_line("z_hop", "", extruder_idx); - optgroup->append_single_option_line("z_hop_types", "", extruder_idx); - optgroup->append_single_option_line("travel_slope", "", extruder_idx); - optgroup->append_single_option_line("retraction_speed", "", extruder_idx); - optgroup->append_single_option_line("deretraction_speed", "", extruder_idx); - optgroup->append_single_option_line("retraction_minimum_travel", "", extruder_idx); - optgroup->append_single_option_line("retract_when_changing_layer", "", extruder_idx); - optgroup->append_single_option_line("wipe", "", extruder_idx); - optgroup->append_single_option_line("wipe_distance", "", extruder_idx); - optgroup->append_single_option_line("retract_before_wipe", "", extruder_idx); - - optgroup = page->new_optgroup(L("Lift Z Enforcement"), L"param_extruder_lift_enforcement", -1, true); - optgroup->append_single_option_line("retract_lift_above", "", extruder_idx); - optgroup->append_single_option_line("retract_lift_below", "", extruder_idx); - optgroup->append_single_option_line("retract_lift_enforce", "", extruder_idx); - - optgroup = page->new_optgroup(L("Retraction when switching material"), L"param_retraction_material_change", -1, true); - optgroup->append_single_option_line("retract_length_toolchange", "", extruder_idx); - optgroup->append_single_option_line("retract_restart_extra_toolchange", "", extruder_idx); - // do not display this params now - optgroup->append_single_option_line("long_retractions_when_cut", "", extruder_idx); - optgroup->append_single_option_line("retraction_distances_when_cut", "", extruder_idx); - -#if 0 - //optgroup = page->new_optgroup(L("Preview"), -1, true); - - //auto reset_to_filament_color = [this, extruder_idx](wxWindow* parent) { - // m_reset_to_filament_color = new ScalableButton(parent, wxID_ANY, "undo", _L("Reset to Filament Color"), - // wxDefaultSize, wxDefaultPosition, wxBU_LEFT | wxBU_EXACTFIT, true); - // ScalableButton* btn = m_reset_to_filament_color; - // btn->SetFont(Slic3r::GUI::wxGetApp().normal_font()); - // btn->SetSize(btn->GetBestSize()); - // auto sizer = new wxBoxSizer(wxHORIZONTAL); - // sizer->Add(btn); - - // btn->Bind(wxEVT_BUTTON, [this, extruder_idx](wxCommandEvent& e) - // { - // std::vector colors = static_cast(m_config->option("extruder_colour"))->values; - // colors[extruder_idx] = ""; - - // DynamicPrintConfig new_conf = *m_config; - // new_conf.set_key_value("extruder_colour", new ConfigOptionStrings(colors)); - // load_config(new_conf); - - // update_dirty(); - // update(); - // }); - - // return sizer; - //}; - ////BBS - //Line line = optgroup->create_single_option_line("extruder_colour", "", extruder_idx); - //line.append_widget(reset_to_filament_color); - //optgroup->append_line(line); -#endif - } + // update_dirty(); + // update(); + // }); + // return sizer; + //}; + ////BBS + //Line line = optgroup->create_single_option_line("extruder_colour", "", extruder_idx); + //line.append_widget(reset_to_filament_color); + //optgroup->append_line(line); + #endif + } +} // BBS. No extra extruder page for single physical extruder machine // # remove extra pages -#if 0 if (m_extruders_count < m_extruders_count_old) m_pages.erase( m_pages.begin() + n_before_extruders + m_extruders_count, m_pages.begin() + n_before_extruders + m_extruders_count_old); -#endif Thaw(); @@ -4271,15 +4352,12 @@ if (is_marlin_flavor) // this gets executed after preset is loaded and before GUI fields are updated void TabPrinter::on_preset_loaded() { - // BBS -#if 0 + // Orca // update the extruders count field auto *nozzle_diameter = dynamic_cast(m_config->option("nozzle_diameter")); size_t extruders_count = nozzle_diameter->values.size(); // update the GUI field according to the number of nozzle diameters supplied extruders_count_changed(extruders_count); -#endif - build_unregular_pages(); } void TabPrinter::update_pages() @@ -4326,7 +4404,7 @@ void TabPrinter::reload_config() // "extruders_count" doesn't update from the update_config(), // so update it implicitly - if (m_active_page && m_active_page->title() == "General") + if (m_active_page && m_active_page->title() == "Multimaterial") m_active_page->set_value("extruders_count", int(m_extruders_count)); } @@ -4336,7 +4414,7 @@ void TabPrinter::activate_selected_page(std::function throw_if_canceled) // "extruders_count" doesn't update from the update_config(), // so update it implicitly - if (m_active_page && m_active_page->title() == "General") + if (m_active_page && m_active_page->title() == "Multimaterial") m_active_page->set_value("extruders_count", int(m_extruders_count)); } @@ -4375,13 +4453,26 @@ void TabPrinter::toggle_options() } if (m_active_page->title() == L("Multimaterial")) { - // toggle_option("single_extruder_multi_material", have_multiple_extruders); - // SoftFever: hide specific settings for BBL printer - for (auto el : - {"purge_in_prime_tower", "enable_filament_ramming", "cooling_tube_retraction", "cooling_tube_length", "parking_pos_retraction", "extra_loading_move", "high_current_on_filament_swap", }) - toggle_option(el, !is_BBL_printer); + for (auto el : { + "enable_filament_ramming", + "cooling_tube_retraction", + "cooling_tube_length", + "parking_pos_retraction", + "extra_loading_move", + "high_current_on_filament_swap", + }) + toggle_option(el, !is_BBL_printer); + auto bSEMM = m_config->opt_bool("single_extruder_multi_material"); + if (!bSEMM && m_config->opt_bool("manual_filament_change")) { + DynamicPrintConfig new_conf = *m_config; + new_conf.set_key_value("manual_filament_change", new ConfigOptionBool(false)); + load_config(new_conf); + } + toggle_option("extruders_count", !bSEMM); + toggle_option("manual_filament_change", bSEMM); + toggle_option("purge_in_prime_tower", bSEMM && !is_BBL_printer); } wxString extruder_number; long val = 1;