mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-12-04 16:21:17 -07:00
Merge branch 'main' into Pressure-equalizer
This commit is contained in:
commit
d6a72fa240
44 changed files with 4722 additions and 727 deletions
127
resources/profiles/Comgrow.json
Normal file
127
resources/profiles/Comgrow.json
Normal file
|
|
@ -0,0 +1,127 @@
|
||||||
|
{
|
||||||
|
"name": "Comgrow",
|
||||||
|
"version": "01.07.00.00",
|
||||||
|
"force_update": "0",
|
||||||
|
"description": "Comgrow configurations",
|
||||||
|
"machine_model_list": [
|
||||||
|
{
|
||||||
|
"name": "Comgrow T500",
|
||||||
|
"sub_path": "machine/Comgrow T500.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"process_list": [
|
||||||
|
{
|
||||||
|
"name": "fdm_process_common",
|
||||||
|
"sub_path": "process/fdm_process_common.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fdm_process_comgrow_common",
|
||||||
|
"sub_path": "process/fdm_process_comgrow_common.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.16mm Optimal @Comgrow T500",
|
||||||
|
"sub_path": "process/0.16mm Opitmal @Comgrow T500 0.6.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.16mm Optimal @Comgrow T500",
|
||||||
|
"sub_path": "process/0.16mm Optimal @Comgrow T500 0.4.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.20mm Standard @Comgrow T500",
|
||||||
|
"sub_path": "process/0.20mm Standard @Comgrow T500 0.4.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.20mm Standard @Comgrow T500",
|
||||||
|
"sub_path": "process/0.20mm Standard @Comgrow T500 0.6.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.24mm Draft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.24mm Draft @Comgrow T500 0.4.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.24mm Draft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.24mm Draft @Comgrow T500 0.6.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.24mm Optimal @Comgrow T500",
|
||||||
|
"sub_path": "process/0.24mm Optimal @Comgrow T500 0.8.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.28mm SuperDraft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.28mm SuperDraft @Comgrow T500 0.4.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.28mm SuperDraft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.28mm SuperDraft @Comgrow T500 0.6.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.32mm Standard @Comgrow T500",
|
||||||
|
"sub_path": "process/0.32mm Standard @Comgrow T500 0.8.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.40mm Draft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.40mm Draft @Comgrow T500 0.8.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.48mm Draft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.48mm Draft @Comgrow T500 0.8.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "0.56mm SuperDraft @Comgrow T500",
|
||||||
|
"sub_path": "process/0.56mm SuperDraft @Comgrow T500 0.8.json"
|
||||||
|
}
|
||||||
|
|
||||||
|
],
|
||||||
|
"filament_list": [
|
||||||
|
{
|
||||||
|
"name": "fdm_filament_common",
|
||||||
|
"sub_path": "filament/fdm_filament_common.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fdm_filament_pla",
|
||||||
|
"sub_path": "filament/fdm_filament_pla.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fdm_filament_pet",
|
||||||
|
"sub_path": "filament/fdm_filament_pet.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fdm_filament_abs",
|
||||||
|
"sub_path": "filament/fdm_filament_abs.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comgrow Generic PLA",
|
||||||
|
"sub_path": "filament/Comgrow Generic PLA.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comgrow Generic PETG",
|
||||||
|
"sub_path": "filament/Comgrow Generic PETG.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comgrow Generic ABS",
|
||||||
|
"sub_path": "filament/Comgrow Generic ABS.json"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"machine_list": [
|
||||||
|
{
|
||||||
|
"name": "fdm_machine_common",
|
||||||
|
"sub_path": "machine/fdm_machine_common.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "fdm_comgrow_common",
|
||||||
|
"sub_path": "machine/fdm_comgrow_common.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comgrow T500 0.4 nozzle",
|
||||||
|
"sub_path": "machine/Comgrow T500 0.4 nozzle.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comgrow T500 0.6 nozzle",
|
||||||
|
"sub_path": "machine/Comgrow T500 0.6 nozzle.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Comgrow T500 0.8 nozzle",
|
||||||
|
"sub_path": "machine/Comgrow T500 0.8 nozzle.json"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
BIN
resources/profiles/Comgrow/Comgrow T500_cover.png
Normal file
BIN
resources/profiles/Comgrow/Comgrow T500_cover.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9 KiB |
2774
resources/profiles/Comgrow/comgrow_t500_buildplate_model.stl
Normal file
2774
resources/profiles/Comgrow/comgrow_t500_buildplate_model.stl
Normal file
File diff suppressed because it is too large
Load diff
BIN
resources/profiles/Comgrow/comgrow_t500_buildplate_texture.png
Normal file
BIN
resources/profiles/Comgrow/comgrow_t500_buildplate_texture.png
Normal file
Binary file not shown.
17
resources/profiles/Comgrow/filament/Comgrow Generic ABS.json
Normal file
17
resources/profiles/Comgrow/filament/Comgrow Generic ABS.json
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"filament_id": "GFB99",
|
||||||
|
"setting_id": "GFSA04",
|
||||||
|
"name": "Comgrow Generic ABS",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_filament_abs",
|
||||||
|
"filament_flow_ratio": ["0.926"],
|
||||||
|
"filament_max_volumetric_speed": ["12"],
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle",
|
||||||
|
"Comgrow T500 0.6 nozzle",
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"filament_id": "GFG99",
|
||||||
|
"setting_id": "GFSA04",
|
||||||
|
"name": "Comgrow Generic PETG",
|
||||||
|
"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"],
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle",
|
||||||
|
"Comgrow T500 0.6 nozzle",
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
18
resources/profiles/Comgrow/filament/Comgrow Generic PLA.json
Normal file
18
resources/profiles/Comgrow/filament/Comgrow Generic PLA.json
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"filament_id": "GFL99",
|
||||||
|
"setting_id": "GFSA04",
|
||||||
|
"name": "Comgrow Generic PLA",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_filament_pla",
|
||||||
|
"filament_flow_ratio": ["0.98"],
|
||||||
|
"filament_max_volumetric_speed": ["12"],
|
||||||
|
"slow_down_layer_time": ["8"],
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle",
|
||||||
|
"Comgrow T500 0.6 nozzle",
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
|
||||||
|
]
|
||||||
|
}
|
||||||
88
resources/profiles/Comgrow/filament/fdm_filament_abs.json
Normal file
88
resources/profiles/Comgrow/filament/fdm_filament_abs.json
Normal file
|
|
@ -0,0 +1,88 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"name": "fdm_filament_abs",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"inherits": "fdm_filament_common",
|
||||||
|
"cool_plate_temp" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"eng_plate_temp" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"hot_plate_temp" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"textured_plate_temp" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"cool_plate_temp_initial_layer" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"eng_plate_temp_initial_layer" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"hot_plate_temp_initial_layer" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"textured_plate_temp_initial_layer" : [
|
||||||
|
"105"
|
||||||
|
],
|
||||||
|
"slow_down_for_layer_cooling": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"close_fan_the_first_x_layers": [
|
||||||
|
"3"
|
||||||
|
],
|
||||||
|
"fan_cooling_layer_time": [
|
||||||
|
"30"
|
||||||
|
],
|
||||||
|
"filament_max_volumetric_speed": [
|
||||||
|
"28.6"
|
||||||
|
],
|
||||||
|
"filament_type": [
|
||||||
|
"ABS"
|
||||||
|
],
|
||||||
|
"filament_density": [
|
||||||
|
"1.04"
|
||||||
|
],
|
||||||
|
"filament_cost": [
|
||||||
|
"20"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_initial_layer": [
|
||||||
|
"260"
|
||||||
|
],
|
||||||
|
"reduce_fan_stop_start_freq": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"fan_max_speed": [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"fan_min_speed": [
|
||||||
|
"10"
|
||||||
|
],
|
||||||
|
"overhang_fan_threshold": [
|
||||||
|
"25%"
|
||||||
|
],
|
||||||
|
"overhang_fan_speed": [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"nozzle_temperature": [
|
||||||
|
"260"
|
||||||
|
],
|
||||||
|
"temperature_vitrification": [
|
||||||
|
"110"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_range_low": [
|
||||||
|
"240"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_range_high": [
|
||||||
|
"270"
|
||||||
|
],
|
||||||
|
"slow_down_min_speed": [
|
||||||
|
"10"
|
||||||
|
],
|
||||||
|
"slow_down_layer_time": [
|
||||||
|
"3"
|
||||||
|
]
|
||||||
|
}
|
||||||
144
resources/profiles/Comgrow/filament/fdm_filament_common.json
Normal file
144
resources/profiles/Comgrow/filament/fdm_filament_common.json
Normal file
|
|
@ -0,0 +1,144 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"name": "fdm_filament_common",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"cool_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"eng_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"hot_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"textured_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"cool_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"eng_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"hot_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"textured_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"overhang_fan_threshold": [
|
||||||
|
"95%"
|
||||||
|
],
|
||||||
|
"overhang_fan_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"slow_down_for_layer_cooling": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"close_fan_the_first_x_layers": [
|
||||||
|
"3"
|
||||||
|
],
|
||||||
|
"filament_end_gcode": [
|
||||||
|
"; filament end gcode \n"
|
||||||
|
],
|
||||||
|
"filament_flow_ratio": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"reduce_fan_stop_start_freq": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"fan_cooling_layer_time": [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"filament_cost": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"filament_density": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"filament_deretraction_speed": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_diameter": [
|
||||||
|
"1.75"
|
||||||
|
],
|
||||||
|
"filament_max_volumetric_speed": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"filament_minimal_purge_on_wipe_tower": [
|
||||||
|
"15"
|
||||||
|
],
|
||||||
|
"filament_retraction_minimum_travel": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_retract_before_wipe": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_retract_when_changing_layer": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_retraction_length": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_z_hop": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_z_hop_types": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_retract_restart_extra": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_retraction_speed": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_settings_id": [
|
||||||
|
""
|
||||||
|
],
|
||||||
|
"filament_soluble": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"filament_type": [
|
||||||
|
"PLA"
|
||||||
|
],
|
||||||
|
"filament_vendor": [
|
||||||
|
"Generic"
|
||||||
|
],
|
||||||
|
"filament_wipe": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"filament_wipe_distance": [
|
||||||
|
"nil"
|
||||||
|
],
|
||||||
|
"bed_type": [
|
||||||
|
"Cool Plate"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_initial_layer": [
|
||||||
|
"200"
|
||||||
|
],
|
||||||
|
"full_fan_speed_layer": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"fan_max_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"fan_min_speed": [
|
||||||
|
"35"
|
||||||
|
],
|
||||||
|
"slow_down_min_speed": [
|
||||||
|
"10"
|
||||||
|
],
|
||||||
|
"slow_down_layer_time": [
|
||||||
|
"8"
|
||||||
|
],
|
||||||
|
"filament_start_gcode": [
|
||||||
|
"; Filament gcode\n"
|
||||||
|
],
|
||||||
|
"nozzle_temperature": [
|
||||||
|
"200"
|
||||||
|
],
|
||||||
|
"temperature_vitrification": [
|
||||||
|
"100"
|
||||||
|
]
|
||||||
|
}
|
||||||
82
resources/profiles/Comgrow/filament/fdm_filament_pet.json
Normal file
82
resources/profiles/Comgrow/filament/fdm_filament_pet.json
Normal file
|
|
@ -0,0 +1,82 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"name": "fdm_filament_pet",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"inherits": "fdm_filament_common",
|
||||||
|
"cool_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"eng_plate_temp" : [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"hot_plate_temp" : [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"textured_plate_temp" : [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"cool_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"eng_plate_temp_initial_layer" : [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"hot_plate_temp_initial_layer" : [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"textured_plate_temp_initial_layer" : [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"slow_down_for_layer_cooling": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"close_fan_the_first_x_layers": [
|
||||||
|
"3"
|
||||||
|
],
|
||||||
|
"fan_cooling_layer_time": [
|
||||||
|
"20"
|
||||||
|
],
|
||||||
|
"filament_max_volumetric_speed": [
|
||||||
|
"25"
|
||||||
|
],
|
||||||
|
"filament_type": [
|
||||||
|
"PETG"
|
||||||
|
],
|
||||||
|
"filament_density": [
|
||||||
|
"1.27"
|
||||||
|
],
|
||||||
|
"filament_cost": [
|
||||||
|
"30"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_initial_layer": [
|
||||||
|
"255"
|
||||||
|
],
|
||||||
|
"reduce_fan_stop_start_freq": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"fan_max_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"fan_min_speed": [
|
||||||
|
"20"
|
||||||
|
],
|
||||||
|
"overhang_fan_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"nozzle_temperature": [
|
||||||
|
"255"
|
||||||
|
],
|
||||||
|
"temperature_vitrification": [
|
||||||
|
"80"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_range_low": [
|
||||||
|
"220"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_range_high": [
|
||||||
|
"260"
|
||||||
|
],
|
||||||
|
"filament_start_gcode": [
|
||||||
|
"; filament start gcode\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
94
resources/profiles/Comgrow/filament/fdm_filament_pla.json
Normal file
94
resources/profiles/Comgrow/filament/fdm_filament_pla.json
Normal file
|
|
@ -0,0 +1,94 @@
|
||||||
|
{
|
||||||
|
"type": "filament",
|
||||||
|
"name": "fdm_filament_pla",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"inherits": "fdm_filament_common",
|
||||||
|
"fan_cooling_layer_time": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"filament_max_volumetric_speed": [
|
||||||
|
"12"
|
||||||
|
],
|
||||||
|
"filament_type": [
|
||||||
|
"PLA"
|
||||||
|
],
|
||||||
|
"filament_density": [
|
||||||
|
"1.24"
|
||||||
|
],
|
||||||
|
"filament_cost": [
|
||||||
|
"20"
|
||||||
|
],
|
||||||
|
"cool_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"eng_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"hot_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"textured_plate_temp" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"cool_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"eng_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"hot_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"textured_plate_temp_initial_layer" : [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_initial_layer": [
|
||||||
|
"220"
|
||||||
|
],
|
||||||
|
"reduce_fan_stop_start_freq": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"slow_down_for_layer_cooling": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"fan_max_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"fan_min_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"overhang_fan_speed": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"overhang_fan_threshold": [
|
||||||
|
"50%"
|
||||||
|
],
|
||||||
|
"close_fan_the_first_x_layers": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"nozzle_temperature": [
|
||||||
|
"220"
|
||||||
|
],
|
||||||
|
"temperature_vitrification": [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_range_low": [
|
||||||
|
"190"
|
||||||
|
],
|
||||||
|
"nozzle_temperature_range_high": [
|
||||||
|
"230"
|
||||||
|
],
|
||||||
|
"slow_down_min_speed": [
|
||||||
|
"10"
|
||||||
|
],
|
||||||
|
"slow_down_layer_time": [
|
||||||
|
"4"
|
||||||
|
],
|
||||||
|
"additional_cooling_fan_speed": [
|
||||||
|
"70"
|
||||||
|
],
|
||||||
|
"filament_start_gcode": [
|
||||||
|
"; filament start gcode\n"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,19 @@
|
||||||
|
{
|
||||||
|
"type": "machine",
|
||||||
|
"setting_id": "GM001",
|
||||||
|
"name": "Comgrow T500 0.4 nozzle",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_comgrow_common",
|
||||||
|
"printer_model": "Comgrow T500",
|
||||||
|
"nozzle_diameter": [
|
||||||
|
"0.4"
|
||||||
|
],
|
||||||
|
"printable_area": [
|
||||||
|
"0x0",
|
||||||
|
"500x0",
|
||||||
|
"500x500",
|
||||||
|
"0x500"
|
||||||
|
],
|
||||||
|
"printable_height": "500"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"type": "machine",
|
||||||
|
"setting_id": "GM002",
|
||||||
|
"name": "Comgrow T500 0.6 nozzle",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_comgrow_common",
|
||||||
|
"printer_model": "Comgrow T500",
|
||||||
|
"printer_variant": "0.6",
|
||||||
|
"retraction_length": [
|
||||||
|
"1.0"
|
||||||
|
],
|
||||||
|
"z_hop": [
|
||||||
|
"0.3"
|
||||||
|
],
|
||||||
|
"nozzle_diameter": [
|
||||||
|
"0.6"
|
||||||
|
],
|
||||||
|
"printable_area": [
|
||||||
|
"0x0",
|
||||||
|
"500x0",
|
||||||
|
"500x500",
|
||||||
|
"0x500"
|
||||||
|
],
|
||||||
|
"printable_height": "500"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
||||||
|
{
|
||||||
|
"type": "machine",
|
||||||
|
"setting_id": "GM003",
|
||||||
|
"name": "Comgrow T500 0.8 nozzle",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_comgrow_common",
|
||||||
|
"printer_model": "Comgrow T500",
|
||||||
|
"printer_variant": "0.8",
|
||||||
|
"retraction_length": [
|
||||||
|
"1.0"
|
||||||
|
],
|
||||||
|
"z_hop": [
|
||||||
|
"0.3"
|
||||||
|
],
|
||||||
|
"nozzle_diameter": [
|
||||||
|
"0.8"
|
||||||
|
],
|
||||||
|
"printable_area": [
|
||||||
|
"0x0",
|
||||||
|
"500x0",
|
||||||
|
"500x500",
|
||||||
|
"0x500"
|
||||||
|
],
|
||||||
|
"printable_height": "500"
|
||||||
|
}
|
||||||
12
resources/profiles/Comgrow/machine/Comgrow T500.json
Normal file
12
resources/profiles/Comgrow/machine/Comgrow T500.json
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "machine_model",
|
||||||
|
"name": "Comgrow T500",
|
||||||
|
"model_id": "Comgrow_T500",
|
||||||
|
"nozzle_diameter": "0.4;0.6;0.8",
|
||||||
|
"machine_tech": "FFF",
|
||||||
|
"family": "Comgrow",
|
||||||
|
"bed_model": "comgrow_t500_buildplate_model.stl",
|
||||||
|
"bed_texture": "comgrow_t500_buildplate_texture.png",
|
||||||
|
"hotend_model": "",
|
||||||
|
"default_materials": "Comgrow Generic PLA;Comgrow Generic PETG;Comgrow Generic ABS"
|
||||||
|
}
|
||||||
141
resources/profiles/Comgrow/machine/fdm_comgrow_common.json
Normal file
141
resources/profiles/Comgrow/machine/fdm_comgrow_common.json
Normal file
|
|
@ -0,0 +1,141 @@
|
||||||
|
{
|
||||||
|
"type": "machine",
|
||||||
|
"name": "fdm_comgrow_common",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"inherits": "fdm_machine_common",
|
||||||
|
"gcode_flavor": "klipper",
|
||||||
|
"machine_max_acceleration_e": [
|
||||||
|
"5000",
|
||||||
|
"5000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_extruding": [
|
||||||
|
"20000",
|
||||||
|
"20000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_retracting": [
|
||||||
|
"5000",
|
||||||
|
"5000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_travel": [
|
||||||
|
"20000",
|
||||||
|
"20000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_x": [
|
||||||
|
"8000",
|
||||||
|
"8000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_y": [
|
||||||
|
"8000",
|
||||||
|
"8000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_z": [
|
||||||
|
"500",
|
||||||
|
"200"
|
||||||
|
],
|
||||||
|
"machine_max_speed_e": [
|
||||||
|
"25",
|
||||||
|
"25"
|
||||||
|
],
|
||||||
|
"machine_max_speed_x": [
|
||||||
|
"500",
|
||||||
|
"200"
|
||||||
|
],
|
||||||
|
"machine_max_speed_y": [
|
||||||
|
"500",
|
||||||
|
"200"
|
||||||
|
],
|
||||||
|
"machine_max_speed_z": [
|
||||||
|
"12",
|
||||||
|
"12"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_e": [
|
||||||
|
"2.5",
|
||||||
|
"2.5"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_x": [
|
||||||
|
"12",
|
||||||
|
"12"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_y": [
|
||||||
|
"12",
|
||||||
|
"12"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_z": [
|
||||||
|
"0.2",
|
||||||
|
"0.4"
|
||||||
|
],
|
||||||
|
"machine_min_extruding_rate": [
|
||||||
|
"0",
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"machine_min_travel_rate": [
|
||||||
|
"0",
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"max_layer_height": [
|
||||||
|
"0.56"
|
||||||
|
],
|
||||||
|
"min_layer_height": [
|
||||||
|
"0.08"
|
||||||
|
],
|
||||||
|
"printable_height": "250",
|
||||||
|
"extruder_clearance_radius": "65",
|
||||||
|
"extruder_clearance_height_to_rod": "36",
|
||||||
|
"extruder_clearance_height_to_lid": "140",
|
||||||
|
"printer_settings_id": "",
|
||||||
|
"printer_technology": "FFF",
|
||||||
|
"printer_variant": "0.4",
|
||||||
|
"retraction_minimum_travel": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"retract_before_wipe": [
|
||||||
|
"70%"
|
||||||
|
],
|
||||||
|
"retract_when_changing_layer": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"retraction_length": [
|
||||||
|
"0.5"
|
||||||
|
],
|
||||||
|
"retract_length_toolchange": [
|
||||||
|
"2"
|
||||||
|
],
|
||||||
|
"z_hop": [
|
||||||
|
"0.2"
|
||||||
|
],
|
||||||
|
"retract_restart_extra": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"retract_restart_extra_toolchange": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"retraction_speed": [
|
||||||
|
"30"
|
||||||
|
],
|
||||||
|
"deretraction_speed": [
|
||||||
|
"30"
|
||||||
|
],
|
||||||
|
"z_hop_types": "Normal Lift",
|
||||||
|
"silent_mode": "0",
|
||||||
|
"single_extruder_multi_material": "1",
|
||||||
|
"change_filament_gcode": "PAUSE",
|
||||||
|
"machine_pause_gcode": "PAUSE",
|
||||||
|
"wipe": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"default_filament_profile": [
|
||||||
|
"Comgrow Generic PETG"
|
||||||
|
],
|
||||||
|
"default_print_profile": "0.20mm Standard @Comgrow T500",
|
||||||
|
"bed_exclude_area": [
|
||||||
|
"0x0"
|
||||||
|
],
|
||||||
|
"machine_start_gcode": "M190 S[bed_temperature_initial_layer_single]\nM109 S[nozzle_temperature_initial_layer]\nPRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single]\n; You can use following code instead if your PRINT_START macro support Chamber and print area bedmesh\n; PRINT_START EXTRUDER=[nozzle_temperature_initial_layer] BED=[bed_temperature_initial_layer_single] Chamber=[chamber_temperature] PRINT_MIN={first_layer_print_min[0]},{first_layer_print_min[1]} PRINT_MAX={first_layer_print_max[0]},{first_layer_print_max[1]}",
|
||||||
|
"machine_end_gcode": "PRINT_END",
|
||||||
|
"layer_change_gcode": ";AFTER_LAYER_CHANGE\n;[layer_z]",
|
||||||
|
"before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n",
|
||||||
|
"scan_first_layer": "0",
|
||||||
|
"nozzle_type": "undefine",
|
||||||
|
"auxiliary_fan": "0"
|
||||||
|
}
|
||||||
117
resources/profiles/Comgrow/machine/fdm_machine_common.json
Normal file
117
resources/profiles/Comgrow/machine/fdm_machine_common.json
Normal file
|
|
@ -0,0 +1,117 @@
|
||||||
|
{
|
||||||
|
"type": "machine",
|
||||||
|
"name": "fdm_machine_common",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"printer_technology": "FFF",
|
||||||
|
"deretraction_speed": [
|
||||||
|
"40"
|
||||||
|
],
|
||||||
|
"extruder_colour": [
|
||||||
|
"#FCE94F"
|
||||||
|
],
|
||||||
|
"extruder_offset": [
|
||||||
|
"0x0"
|
||||||
|
],
|
||||||
|
"gcode_flavor": "marlin",
|
||||||
|
"silent_mode": "0",
|
||||||
|
"machine_max_acceleration_e": [
|
||||||
|
"5000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_extruding": [
|
||||||
|
"10000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_retracting": [
|
||||||
|
"1000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_x": [
|
||||||
|
"10000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_y": [
|
||||||
|
"10000"
|
||||||
|
],
|
||||||
|
"machine_max_acceleration_z": [
|
||||||
|
"100"
|
||||||
|
],
|
||||||
|
"machine_max_speed_e": [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"machine_max_speed_x": [
|
||||||
|
"500"
|
||||||
|
],
|
||||||
|
"machine_max_speed_y": [
|
||||||
|
"500"
|
||||||
|
],
|
||||||
|
"machine_max_speed_z": [
|
||||||
|
"10"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_e": [
|
||||||
|
"5"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_x": [
|
||||||
|
"8"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_y": [
|
||||||
|
"8"
|
||||||
|
],
|
||||||
|
"machine_max_jerk_z": [
|
||||||
|
"0.4"
|
||||||
|
],
|
||||||
|
"machine_min_extruding_rate": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"machine_min_travel_rate": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"max_layer_height": [
|
||||||
|
"0.32"
|
||||||
|
],
|
||||||
|
"min_layer_height": [
|
||||||
|
"0.08"
|
||||||
|
],
|
||||||
|
"printable_height": "250",
|
||||||
|
"extruder_clearance_radius": "65",
|
||||||
|
"extruder_clearance_height_to_rod": "36",
|
||||||
|
"extruder_clearance_height_to_lid": "140",
|
||||||
|
"nozzle_diameter": [
|
||||||
|
"0.4"
|
||||||
|
],
|
||||||
|
"printer_settings_id": "",
|
||||||
|
"printer_variant": "0.4",
|
||||||
|
"retraction_minimum_travel": [
|
||||||
|
"2"
|
||||||
|
],
|
||||||
|
"retract_before_wipe": [
|
||||||
|
"70%"
|
||||||
|
],
|
||||||
|
"retract_when_changing_layer": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"retraction_length": [
|
||||||
|
"5"
|
||||||
|
],
|
||||||
|
"retract_length_toolchange": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"z_hop": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"retract_restart_extra": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"retract_restart_extra_toolchange": [
|
||||||
|
"0"
|
||||||
|
],
|
||||||
|
"retraction_speed": [
|
||||||
|
"60"
|
||||||
|
],
|
||||||
|
"single_extruder_multi_material": "1",
|
||||||
|
"change_filament_gcode": "",
|
||||||
|
"wipe": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"default_print_profile": "0.16mm Optimal @Bambu Lab X1 Carbon 0.4 nozzle",
|
||||||
|
"before_layer_change_gcode": ";BEFORE_LAYER_CHANGE\n;[layer_z]\nG92 E0\n",
|
||||||
|
"machine_start_gcode": "G0 Z20 F9000\nG92 E0; G1 E-10 F1200\nG28\nM970 Q1 A10 B10 C130 K0\nM970 Q1 A10 B131 C250 K1\nM974 Q1 S1 P0\nM970 Q0 A10 B10 C130 H20 K0\nM970 Q0 A10 B131 C250 K1\nM974 Q0 S1 P0\nM220 S100 ;Reset Feedrate\nM221 S100 ;Reset Flowrate\nG29 ;Home\nG90;\nG92 E0 ;Reset Extruder \nG1 Z2.0 F3000 ;Move Z Axis up \nG1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position\nM109 S205;\nG1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line\nG1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little\nG1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line\nG92 E0 ;Reset Extruder \nG1 X110 Y110 Z2.0 F3000 ;Move Z Axis up",
|
||||||
|
"machine_end_gcode": "M400 ; wait for buffer to clear\nG92 E0 ; zero the extruder\nG1 E-4.0 F3600; retract \nG91\nG1 Z3;\nM104 S0 ; turn off hotend\nM140 S0 ; turn off bed\nM106 S0 ; turn off fan\nG90 \nG0 X110 Y200 F3600 \nprint_end"
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.16mm Opitmal @Comgrow T500 0.6",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"bottom_shell_layers": "5",
|
||||||
|
"initial_layer_line_width": "0.6",
|
||||||
|
"initial_layer_print_height": "0.3",
|
||||||
|
"inner_wall_line_width": "0.6",
|
||||||
|
"internal_solid_infill_line_width": "0.6",
|
||||||
|
"layer_height": "0.16",
|
||||||
|
"line_width": "0.6",
|
||||||
|
"outer_wall_line_width": "0.6",
|
||||||
|
"sparse_infill_line_width": "0.6",
|
||||||
|
"support_line_width": "0.6",
|
||||||
|
"top_shell_layers": "7",
|
||||||
|
"top_surface_line_width": "0.6",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.6 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,51 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.16mm Optimal @Comgrow T500 0.4",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"adaptive_layer_height": "1",
|
||||||
|
"brim_object_gap": "0",
|
||||||
|
"brim_width": "0",
|
||||||
|
"default_acceleration": "0",
|
||||||
|
"detect_thin_wall": "1",
|
||||||
|
"elefant_foot_compensation": "0.1",
|
||||||
|
"filename_format": "[input_filename_base].gcode",
|
||||||
|
"infill_wall_overlap": "25%",
|
||||||
|
"initial_layer_acceleration": "0",
|
||||||
|
"initial_layer_infill_speed": "35%",
|
||||||
|
"initial_layer_line_width": "0.42",
|
||||||
|
"initial_layer_speed": "35%",
|
||||||
|
"inner_wall_acceleration": "0",
|
||||||
|
"internal_solid_infill_line_width": "0",
|
||||||
|
"internal_solid_infill_speed": "50",
|
||||||
|
"ironing_type": "no ironing",
|
||||||
|
"layer_height": "0.16",
|
||||||
|
"line_width": "0.45",
|
||||||
|
"minimum_sparse_infill_area": "10",
|
||||||
|
"outer_wall_line_width": "0.45",
|
||||||
|
"outer_wall_speed": "40",
|
||||||
|
"prime_tower_width": "60",
|
||||||
|
"skirt_height": "2",
|
||||||
|
"skirt_loops": "2",
|
||||||
|
"sparse_infill_speed": "60",
|
||||||
|
"support_base_pattern_spacing": "0.2",
|
||||||
|
"support_interface_bottom_layers": "-1",
|
||||||
|
"support_interface_spacing": "0.2",
|
||||||
|
"support_interface_speed": "100%",
|
||||||
|
"support_interface_top_layers": "3",
|
||||||
|
"support_line_width": "0.38",
|
||||||
|
"support_object_xy_distance": "60%",
|
||||||
|
"support_speed": "40",
|
||||||
|
"support_style": "grid",
|
||||||
|
"support_threshold_angle": "45",
|
||||||
|
"support_top_z_distance": "0.15",
|
||||||
|
"top_surface_acceleration": "0",
|
||||||
|
"travel_acceleration": "0",
|
||||||
|
"tree_support_branch_angle": "40",
|
||||||
|
"wall_loops": "2",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.20mm Standard @Comgrow T500 0.4",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,20 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.20mm Standard @Comgrow T500 0.6",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.63",
|
||||||
|
"initial_layer_print_height": "0.3",
|
||||||
|
"inner_wall_line_width": "0.66",
|
||||||
|
"internal_solid_infill_line_width": "0.66",
|
||||||
|
"line_width": "0.66",
|
||||||
|
"outer_wall_line_width": "0.66",
|
||||||
|
"sparse_infill_line_width": "0.66",
|
||||||
|
"support_line_width": "0.54",
|
||||||
|
"top_surface_line_width": "0.66",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.6 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.24mm Draft @Comgrow T500 0.4",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.4",
|
||||||
|
"inner_wall_line_width": "0.4",
|
||||||
|
"internal_solid_infill_line_width": "0.5",
|
||||||
|
"layer_height": "0.24",
|
||||||
|
"line_width": "0.5",
|
||||||
|
"outer_wall_line_width": "0.5",
|
||||||
|
"sparse_infill_line_width": "0.4",
|
||||||
|
"support_line_width": "0.5",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"top_surface_line_width": "0.5",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.24mm Draft @Comgrow T500 0.6",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.6",
|
||||||
|
"initial_layer_print_height": "0.3",
|
||||||
|
"inner_wall_line_width": "0.6",
|
||||||
|
"internal_solid_infill_line_width": "0.6",
|
||||||
|
"layer_heigth": "0.24",
|
||||||
|
"line_width": "0.6",
|
||||||
|
"outer_wall_line_width": "0.6",
|
||||||
|
"sparse_infill_line_width": "0.6",
|
||||||
|
"support_line_width": "0.6",
|
||||||
|
"top_surface_line_width": "0.6",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.6 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.24mm Optimal @Comgrow T500 0.8",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.8",
|
||||||
|
"initial_layer_print_height": "0.4",
|
||||||
|
"inner_wall_line_width": "0.8",
|
||||||
|
"internal_solid_infill_line_width": "0.8",
|
||||||
|
"layer_height": "0.24",
|
||||||
|
"line_width": "0.8",
|
||||||
|
"outer_wall_line_width": "0.8",
|
||||||
|
"sparse_infill_line_width": "0.8",
|
||||||
|
"support_line_width": "0.8",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"top_surface_line_width": "0.8",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,17 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.28mm SuperDraft @Comgrow T500 0.4",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.4",
|
||||||
|
"initial_layer_print_height": "0.28",
|
||||||
|
"inner_wall_line_width": "0.4",
|
||||||
|
"layer_height": "0.28",
|
||||||
|
"sparse_infill_line_width": "0.4",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.4 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.28mm SuperDraft @Comgrow T500 0.6",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.6",
|
||||||
|
"inner_wall_line_width": "0.6",
|
||||||
|
"internal_solid_infill_line_width": "0.6",
|
||||||
|
"line_width": "0.6",
|
||||||
|
"layer_height": "0.28",
|
||||||
|
"outer_wall_line_width": "0.6",
|
||||||
|
"sparse_infill_line_width": "0.6",
|
||||||
|
"support_line_width": "0.6",
|
||||||
|
"top_surface_line_width": "0.6",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.6 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.32mm Standard @Comgrow T500 0.8",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.8",
|
||||||
|
"initial_layer_print_height": "0.32",
|
||||||
|
"inner_wall_line_width": "0.8",
|
||||||
|
"internal_solid_infill_line_width": "0.8",
|
||||||
|
"layer_height": "0.32",
|
||||||
|
"line_width": "0.8",
|
||||||
|
"outer_wall_line_width": "0.8",
|
||||||
|
"sparse_infill_line_width": "0.8",
|
||||||
|
"support_line_width": "0.8",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"top_surface_line_width": "0.8",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.40mm Draft @Comgrow T500 0.8",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.8",
|
||||||
|
"initial_layer_print_height": "0.4",
|
||||||
|
"inner_wall_line_width": "0.8",
|
||||||
|
"internal_solid_infill_line_width": "0.8",
|
||||||
|
"layer_height": "0.4",
|
||||||
|
"line_width": "0.8",
|
||||||
|
"outer_wall_line_width": "0.8",
|
||||||
|
"sparse_infill_line_width": "0.8",
|
||||||
|
"support_line_width": "0.8",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"top_surface_line_width": "0.8",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.48mm Draft @Comgrow T500 0.8",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.8",
|
||||||
|
"initial_layer_print_height": "0.48",
|
||||||
|
"inner_wall_line_width": "0.8",
|
||||||
|
"internal_solid_infill_line_width": "0.8",
|
||||||
|
"layer_height": "0.48",
|
||||||
|
"line_width": "0.8",
|
||||||
|
"outer_wall_line_width": "0.8",
|
||||||
|
"sparse_infill_line_width": "0.8",
|
||||||
|
"support_line_width": "0.8",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"top_surface_line_width": "0.8",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,22 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"setting_id": "GP004",
|
||||||
|
"name": "0.56mm SuperChunky @Comgrow T500 0.8",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "true",
|
||||||
|
"inherits": "fdm_process_comgrow_common",
|
||||||
|
"initial_layer_line_width": "0.8",
|
||||||
|
"initial_layer_print_height": "0.4",
|
||||||
|
"inner_wall_line_width": "0.8",
|
||||||
|
"internal_solid_infill_line_width": "0.8",
|
||||||
|
"layer_height": "0.56",
|
||||||
|
"line_width": "0.8",
|
||||||
|
"outer_wall_line_width": "0.8",
|
||||||
|
"sparse_infill_line_width": "0.8",
|
||||||
|
"support_line_width": "0.8",
|
||||||
|
"top_shell_layers": "4",
|
||||||
|
"top_surface_line_width": "0.8",
|
||||||
|
"compatible_printers": [
|
||||||
|
"Comgrow T500 0.8 nozzle"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,104 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"name": "fdm_process_comgrow_common",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"inherits": "fdm_process_common",
|
||||||
|
"adaptive_layer_height": "0",
|
||||||
|
"reduce_crossing_wall": "0",
|
||||||
|
"max_travel_detour_distance": "0",
|
||||||
|
"bottom_surface_pattern": "monotonic",
|
||||||
|
"bottom_shell_layers": "3",
|
||||||
|
"bottom_shell_thickness": "0",
|
||||||
|
"bridge_flow": "0.95",
|
||||||
|
"bridge_speed": "25",
|
||||||
|
"brim_width": "5",
|
||||||
|
"brim_object_gap": "0.1",
|
||||||
|
"compatible_printers_condition": "",
|
||||||
|
"print_sequence": "by layer",
|
||||||
|
"default_acceleration": "500",
|
||||||
|
"top_surface_acceleration": "500",
|
||||||
|
"bridge_no_support": "0",
|
||||||
|
"draft_shield": "disabled",
|
||||||
|
"elefant_foot_compensation": "0",
|
||||||
|
"enable_arc_fitting": "0",
|
||||||
|
"outer_wall_line_width": "0.4",
|
||||||
|
"wall_infill_order": "inner wall/outer wall/infill",
|
||||||
|
"line_width": "0.4",
|
||||||
|
"infill_direction": "45",
|
||||||
|
"sparse_infill_density": "15%",
|
||||||
|
"sparse_infill_pattern": "grid",
|
||||||
|
"initial_layer_acceleration": "500",
|
||||||
|
"travel_acceleration": "700",
|
||||||
|
"inner_wall_acceleration": "500",
|
||||||
|
"initial_layer_line_width": "0.5",
|
||||||
|
"initial_layer_print_height": "0.2",
|
||||||
|
"infill_combination": "0",
|
||||||
|
"sparse_infill_line_width": "0.45",
|
||||||
|
"infill_wall_overlap": "23%",
|
||||||
|
"interface_shells": "0",
|
||||||
|
"ironing_flow": "15%",
|
||||||
|
"ironing_spacing": "0.1",
|
||||||
|
"ironing_speed": "15",
|
||||||
|
"ironing_type": "no ironing",
|
||||||
|
"layer_height": "0.2",
|
||||||
|
"reduce_infill_retraction": "1",
|
||||||
|
"filename_format": "{input_filename_base}_{filament_type[0]}_{print_time}.gcode",
|
||||||
|
"detect_overhang_wall": "1",
|
||||||
|
"overhang_1_4_speed": "0",
|
||||||
|
"overhang_2_4_speed": "20",
|
||||||
|
"overhang_3_4_speed": "15",
|
||||||
|
"overhang_4_4_speed": "10",
|
||||||
|
"inner_wall_line_width": "0.45",
|
||||||
|
"wall_loops": "3",
|
||||||
|
"print_settings_id": "",
|
||||||
|
"raft_layers": "0",
|
||||||
|
"seam_position": "aligned",
|
||||||
|
"skirt_distance": "2",
|
||||||
|
"skirt_height": "1",
|
||||||
|
"skirt_loops": "1",
|
||||||
|
"minimum_sparse_infill_area": "15",
|
||||||
|
"internal_solid_infill_line_width": "0.4",
|
||||||
|
"spiral_mode": "0",
|
||||||
|
"standby_temperature_delta": "-5",
|
||||||
|
"enable_support": "0",
|
||||||
|
"resolution": "0.012",
|
||||||
|
"support_type": "normal(auto)",
|
||||||
|
"support_style": "default",
|
||||||
|
"support_on_build_plate_only": "0",
|
||||||
|
"support_top_z_distance": "0.2",
|
||||||
|
"support_filament": "0",
|
||||||
|
"support_line_width": "0.4",
|
||||||
|
"support_interface_loop_pattern": "0",
|
||||||
|
"support_interface_filament": "0",
|
||||||
|
"support_interface_top_layers": "2",
|
||||||
|
"support_interface_bottom_layers": "2",
|
||||||
|
"support_interface_spacing": "0.5",
|
||||||
|
"support_interface_speed": "80",
|
||||||
|
"support_base_pattern": "rectilinear",
|
||||||
|
"support_base_pattern_spacing": "2.5",
|
||||||
|
"support_speed": "150",
|
||||||
|
"support_threshold_angle": "30",
|
||||||
|
"support_object_xy_distance": "0.35",
|
||||||
|
"tree_support_branch_angle": "45",
|
||||||
|
"tree_support_wall_count": "0",
|
||||||
|
"detect_thin_wall": "0",
|
||||||
|
"top_surface_pattern": "monotonic",
|
||||||
|
"top_surface_line_width": "0.4",
|
||||||
|
"top_shell_layers": "3",
|
||||||
|
"top_shell_thickness": "0.8",
|
||||||
|
"initial_layer_speed": "15",
|
||||||
|
"initial_layer_infill_speed": "20",
|
||||||
|
"outer_wall_speed": "25",
|
||||||
|
"inner_wall_speed": "40",
|
||||||
|
"internal_solid_infill_speed": "40",
|
||||||
|
"top_surface_speed": "30",
|
||||||
|
"gap_infill_speed": "30",
|
||||||
|
"sparse_infill_speed": "50",
|
||||||
|
"travel_speed": "150",
|
||||||
|
"enable_prime_tower": "0",
|
||||||
|
"wipe_tower_no_sparse_layers": "0",
|
||||||
|
"prime_tower_width": "60",
|
||||||
|
"xy_hole_compensation": "0",
|
||||||
|
"xy_contour_compensation": "0"
|
||||||
|
}
|
||||||
70
resources/profiles/Comgrow/process/fdm_process_common.json
Normal file
70
resources/profiles/Comgrow/process/fdm_process_common.json
Normal file
|
|
@ -0,0 +1,70 @@
|
||||||
|
{
|
||||||
|
"type": "process",
|
||||||
|
"name": "fdm_process_common",
|
||||||
|
"from": "system",
|
||||||
|
"instantiation": "false",
|
||||||
|
"adaptive_layer_height": "0",
|
||||||
|
"reduce_crossing_wall": "0",
|
||||||
|
"bridge_flow": "0.95",
|
||||||
|
"bridge_speed": "25",
|
||||||
|
"brim_width": "5",
|
||||||
|
"compatible_printers": [],
|
||||||
|
"print_sequence": "by layer",
|
||||||
|
"default_acceleration": "10000",
|
||||||
|
"bridge_no_support": "0",
|
||||||
|
"elefant_foot_compensation": "0.1",
|
||||||
|
"outer_wall_line_width": "0.4",
|
||||||
|
"outer_wall_speed": "120",
|
||||||
|
"line_width": "0.45",
|
||||||
|
"infill_direction": "45",
|
||||||
|
"sparse_infill_density": "15%",
|
||||||
|
"sparse_infill_pattern": "grid",
|
||||||
|
"initial_layer_line_width": "0.42",
|
||||||
|
"initial_layer_print_height": "0.2",
|
||||||
|
"initial_layer_speed": "20",
|
||||||
|
"gap_infill_speed": "30",
|
||||||
|
"infill_combination": "0",
|
||||||
|
"sparse_infill_line_width": "0.45",
|
||||||
|
"infill_wall_overlap": "25%",
|
||||||
|
"sparse_infill_speed": "50",
|
||||||
|
"interface_shells": "0",
|
||||||
|
"detect_overhang_wall": "0",
|
||||||
|
"reduce_infill_retraction": "0",
|
||||||
|
"filename_format": "{input_filename_base}.gcode",
|
||||||
|
"wall_loops": "3",
|
||||||
|
"inner_wall_line_width": "0.45",
|
||||||
|
"inner_wall_speed": "40",
|
||||||
|
"print_settings_id": "",
|
||||||
|
"raft_layers": "0",
|
||||||
|
"seam_position": "nearest",
|
||||||
|
"skirt_distance": "2",
|
||||||
|
"skirt_height": "2",
|
||||||
|
"minimum_sparse_infill_area": "0",
|
||||||
|
"internal_solid_infill_line_width": "0.45",
|
||||||
|
"internal_solid_infill_speed": "40",
|
||||||
|
"spiral_mode": "0",
|
||||||
|
"standby_temperature_delta": "-5",
|
||||||
|
"enable_support": "0",
|
||||||
|
"support_filament": "0",
|
||||||
|
"support_line_width": "0.42",
|
||||||
|
"support_interface_filament": "0",
|
||||||
|
"support_on_build_plate_only": "0",
|
||||||
|
"support_top_z_distance": "0.15",
|
||||||
|
"support_interface_loop_pattern": "0",
|
||||||
|
"support_interface_top_layers": "2",
|
||||||
|
"support_interface_spacing": "0",
|
||||||
|
"support_interface_speed": "80",
|
||||||
|
"support_base_pattern": "rectilinear",
|
||||||
|
"support_base_pattern_spacing": "2",
|
||||||
|
"support_speed": "40",
|
||||||
|
"support_threshold_angle": "40",
|
||||||
|
"support_object_xy_distance": "0.5",
|
||||||
|
"detect_thin_wall": "0",
|
||||||
|
"top_surface_line_width": "0.4",
|
||||||
|
"top_surface_speed": "30",
|
||||||
|
"travel_speed": "400",
|
||||||
|
"enable_prime_tower": "0",
|
||||||
|
"prime_tower_width": "60",
|
||||||
|
"xy_hole_compensation": "0",
|
||||||
|
"xy_contour_compensation": "0"
|
||||||
|
}
|
||||||
|
|
@ -2254,10 +2254,7 @@ const WipeTowerData &Print::wipe_tower_data(size_t filaments_cnt) const
|
||||||
if (!is_step_done(psWipeTower) && filaments_cnt != 0) {
|
if (!is_step_done(psWipeTower) && filaments_cnt != 0) {
|
||||||
double width = m_config.prime_tower_width;
|
double width = m_config.prime_tower_width;
|
||||||
double layer_height = 0.2; // hard code layer height
|
double layer_height = 0.2; // hard code layer height
|
||||||
double wipe_volume = m_config.prime_volume;
|
if (m_config.purge_in_prime_tower) {
|
||||||
if (m_config.purge_in_prime_tower || (filaments_cnt == 1 && enable_timelapse_print())) {
|
|
||||||
const_cast<Print *>(this)->m_wipe_tower_data.depth = wipe_volume / (layer_height * width);
|
|
||||||
} else {
|
|
||||||
// Calculating depth should take into account currently set wiping volumes.
|
// Calculating depth should take into account currently set wiping volumes.
|
||||||
// For a long time, the initial preview would just use 900/width per toolchange (15mm on a 60mm wide tower)
|
// For a long time, the initial preview would just use 900/width per toolchange (15mm on a 60mm wide tower)
|
||||||
// and it worked well enough. Let's try to do slightly better by accounting for the purging volumes.
|
// and it worked well enough. Let's try to do slightly better by accounting for the purging volumes.
|
||||||
|
|
@ -2268,7 +2265,16 @@ const WipeTowerData &Print::wipe_tower_data(size_t filaments_cnt) const
|
||||||
float maximum = std::accumulate(max_wipe_volumes.begin(), max_wipe_volumes.end(), 0.f);
|
float maximum = std::accumulate(max_wipe_volumes.begin(), max_wipe_volumes.end(), 0.f);
|
||||||
maximum = maximum * filaments_cnt / max_wipe_volumes.size();
|
maximum = maximum * filaments_cnt / max_wipe_volumes.size();
|
||||||
|
|
||||||
|
// Orca: it's overshooting a bit, so let's reduce it a bit
|
||||||
|
maximum *= 0.6;
|
||||||
const_cast<Print *>(this)->m_wipe_tower_data.depth = maximum / (layer_height * width);
|
const_cast<Print *>(this)->m_wipe_tower_data.depth = maximum / (layer_height * width);
|
||||||
|
} else {
|
||||||
|
double wipe_volume = m_config.prime_volume;
|
||||||
|
if (filaments_cnt == 1 && enable_timelapse_print()) {
|
||||||
|
const_cast<Print *>(this)->m_wipe_tower_data.depth = wipe_volume / (layer_height * width);
|
||||||
|
} else {
|
||||||
|
const_cast<Print *>(this)->m_wipe_tower_data.depth = wipe_volume * (filaments_cnt - 1) / (layer_height * width);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const_cast<Print *>(this)->m_wipe_tower_data.brim_width = m_config.prime_tower_brim_width;
|
const_cast<Print *>(this)->m_wipe_tower_data.brim_width = m_config.prime_tower_brim_width;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,17 +7,18 @@
|
||||||
namespace Slic3r {
|
namespace Slic3r {
|
||||||
|
|
||||||
// Calculate the optimal Pressure Advance speed
|
// Calculate the optimal Pressure Advance speed
|
||||||
float CalibPressureAdvance::find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height,
|
float CalibPressureAdvance::find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height, int filament_idx)
|
||||||
int filament_idx) {
|
{
|
||||||
const double general_suggested_min_speed = 100.0;
|
const double general_suggested_min_speed = 100.0;
|
||||||
double filament_max_volumetric_speed = config.option<ConfigOptionFloats>("filament_max_volumetric_speed")->get_at(0);
|
double filament_max_volumetric_speed = config.option<ConfigOptionFloats>("filament_max_volumetric_speed")->get_at(0);
|
||||||
Flow pattern_line = Flow(line_width, layer_height, config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0));
|
Flow pattern_line = Flow(line_width, layer_height, config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0));
|
||||||
auto pa_speed = std::min(std::max(general_suggested_min_speed,config.option<ConfigOptionFloat>("outer_wall_speed")->value), filament_max_volumetric_speed / pattern_line.mm3_per_mm());
|
auto pa_speed = std::min(std::max(general_suggested_min_speed, config.option<ConfigOptionFloat>("outer_wall_speed")->value),
|
||||||
|
filament_max_volumetric_speed / pattern_line.mm3_per_mm());
|
||||||
|
|
||||||
return std::floor(pa_speed);
|
return std::floor(pa_speed);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CalibPressureAdvance::move_to(Vec2d pt, GCodeWriter& writer, std::string comment)
|
std::string CalibPressureAdvance::move_to(Vec2d pt, GCodeWriter &writer, std::string comment)
|
||||||
{
|
{
|
||||||
std::stringstream gcode;
|
std::stringstream gcode;
|
||||||
|
|
||||||
|
|
@ -31,12 +32,7 @@ std::string CalibPressureAdvance::move_to(Vec2d pt, GCodeWriter& writer, std::st
|
||||||
}
|
}
|
||||||
|
|
||||||
double CalibPressureAdvance::e_per_mm(
|
double CalibPressureAdvance::e_per_mm(
|
||||||
double line_width,
|
double line_width, double layer_height, float nozzle_diameter, float filament_diameter, float print_flow_ratio) const
|
||||||
double layer_height,
|
|
||||||
float nozzle_diameter,
|
|
||||||
float filament_diameter,
|
|
||||||
float print_flow_ratio
|
|
||||||
) const
|
|
||||||
{
|
{
|
||||||
const Flow line_flow = Flow(line_width, layer_height, nozzle_diameter);
|
const Flow line_flow = Flow(line_width, layer_height, nozzle_diameter);
|
||||||
const double filament_area = M_PI * std::pow(filament_diameter / 2, 2);
|
const double filament_area = M_PI * std::pow(filament_diameter / 2, 2);
|
||||||
|
|
@ -54,14 +50,7 @@ std::string CalibPressureAdvance::convert_number_to_string(double num) const
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CalibPressureAdvance::draw_digit(
|
std::string CalibPressureAdvance::draw_digit(
|
||||||
double startx,
|
double startx, double starty, char c, CalibPressureAdvance::DrawDigitMode mode, double line_width, double e_per_mm, GCodeWriter &writer)
|
||||||
double starty,
|
|
||||||
char c,
|
|
||||||
CalibPressureAdvance::DrawDigitMode mode,
|
|
||||||
double line_width,
|
|
||||||
double e_per_mm,
|
|
||||||
GCodeWriter& writer
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
const double len = m_digit_segment_len;
|
const double len = m_digit_segment_len;
|
||||||
const double gap = line_width / 2.0;
|
const double gap = line_width / 2.0;
|
||||||
|
|
@ -191,23 +180,20 @@ std::string CalibPressureAdvance::draw_digit(
|
||||||
gcode << move_to(p4_5, writer, "Glyph: .");
|
gcode << move_to(p4_5, writer, "Glyph: .");
|
||||||
gcode << writer.extrude_to_xy(p4_5 + dot_direction, dE);
|
gcode << writer.extrude_to_xy(p4_5 + dot_direction, dE);
|
||||||
break;
|
break;
|
||||||
default:
|
default: break;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return gcode.str();
|
return gcode.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CalibPressureAdvance::draw_number(
|
std::string CalibPressureAdvance::draw_number(double startx,
|
||||||
double startx,
|
|
||||||
double starty,
|
double starty,
|
||||||
double value,
|
double value,
|
||||||
CalibPressureAdvance::DrawDigitMode mode,
|
CalibPressureAdvance::DrawDigitMode mode,
|
||||||
double line_width,
|
double line_width,
|
||||||
double e_per_mm,
|
double e_per_mm,
|
||||||
double speed,
|
double speed,
|
||||||
GCodeWriter& writer
|
GCodeWriter &writer)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
auto sNumber = convert_number_to_string(value);
|
auto sNumber = convert_number_to_string(value);
|
||||||
std::stringstream gcode;
|
std::stringstream gcode;
|
||||||
|
|
@ -219,26 +205,220 @@ std::string CalibPressureAdvance::draw_number(
|
||||||
}
|
}
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case DrawDigitMode::Bottom_To_Top:
|
case DrawDigitMode::Bottom_To_Top:
|
||||||
gcode << draw_digit(
|
gcode << draw_digit(startx, starty + i * number_spacing(), sNumber[i], mode, line_width, e_per_mm, writer);
|
||||||
startx,
|
|
||||||
starty + i * number_spacing(),
|
|
||||||
sNumber[i],
|
|
||||||
mode,
|
|
||||||
line_width,
|
|
||||||
e_per_mm,
|
|
||||||
writer
|
|
||||||
);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default: gcode << draw_digit(startx + i * number_spacing(), starty, sNumber[i], mode, line_width, e_per_mm, writer);
|
||||||
gcode << draw_digit(
|
}
|
||||||
startx + i * number_spacing(),
|
}
|
||||||
starty,
|
|
||||||
sNumber[i],
|
return gcode.str();
|
||||||
mode,
|
}
|
||||||
line_width,
|
|
||||||
e_per_mm,
|
|
||||||
writer
|
double CalibPressureAdvance::get_distance(Vec2d from, Vec2d to) const
|
||||||
);
|
{
|
||||||
|
return std::hypot((to.x() - from.x()), (to.y() - from.y()));
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CalibPressureAdvance::draw_line(
|
||||||
|
GCodeWriter &writer, Vec2d to_pt, double line_width, double layer_height, double speed, const std::string &comment)
|
||||||
|
{
|
||||||
|
const double e_per_mm = CalibPressureAdvance::e_per_mm(line_width, layer_height,
|
||||||
|
m_config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0),
|
||||||
|
m_config.option<ConfigOptionFloats>("filament_diameter")->get_at(0),
|
||||||
|
m_config.option<ConfigOptionFloats>("filament_flow_ratio")->get_at(0));
|
||||||
|
|
||||||
|
const double length = get_distance(Vec2d(m_last_pos.x(), m_last_pos.y()), to_pt);
|
||||||
|
auto dE = e_per_mm * length;
|
||||||
|
|
||||||
|
std::stringstream gcode;
|
||||||
|
|
||||||
|
gcode << writer.set_speed(speed);
|
||||||
|
gcode << writer.extrude_to_xy(to_pt, dE, comment);
|
||||||
|
|
||||||
|
m_last_pos = Vec3d(to_pt.x(), to_pt.y(), 0);
|
||||||
|
|
||||||
|
return gcode.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
std::string CalibPressureAdvance::draw_box(GCodeWriter &writer, double min_x, double min_y, double size_x, double size_y, DrawBoxOptArgs opt_args)
|
||||||
|
{
|
||||||
|
std::stringstream gcode;
|
||||||
|
|
||||||
|
double x = min_x;
|
||||||
|
double y = min_y;
|
||||||
|
const double max_x = min_x + size_x;
|
||||||
|
const double max_y = min_y + size_y;
|
||||||
|
|
||||||
|
const double spacing = opt_args.line_width - opt_args.height * (1 - M_PI / 4);
|
||||||
|
|
||||||
|
// if number of perims exceeds size of box, reduce it to max
|
||||||
|
const int max_perimeters = std::min(
|
||||||
|
// this is the equivalent of number of perims for concentric fill
|
||||||
|
std::floor(size_x * std::sin(to_radians(45))) / (spacing / std::sin(to_radians(45))),
|
||||||
|
std::floor(size_y * std::sin(to_radians(45))) / (spacing / std::sin(to_radians(45))));
|
||||||
|
|
||||||
|
opt_args.num_perimeters = std::min(opt_args.num_perimeters, max_perimeters);
|
||||||
|
|
||||||
|
gcode << move_to(Vec2d(min_x, min_y), writer, "Move to box start");
|
||||||
|
|
||||||
|
// DrawLineOptArgs line_opt_args(*this);
|
||||||
|
auto line_arg_height = opt_args.height;
|
||||||
|
auto line_arg_line_width = opt_args.line_width;
|
||||||
|
auto line_arg_speed = opt_args.speed;
|
||||||
|
std::string comment = "";
|
||||||
|
|
||||||
|
for (int i = 0; i < opt_args.num_perimeters; ++i) {
|
||||||
|
if (i != 0) { // after first perimeter, step inwards to start next perimeter
|
||||||
|
x += spacing;
|
||||||
|
y += spacing;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Step inwards to print next perimeter");
|
||||||
|
}
|
||||||
|
|
||||||
|
y += size_y - i * spacing * 2;
|
||||||
|
comment = "Draw perimeter (up)";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
|
||||||
|
x += size_x - i * spacing * 2;
|
||||||
|
comment = "Draw perimeter (right)";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
|
||||||
|
y -= size_y - i * spacing * 2;
|
||||||
|
comment = "Draw perimeter (down)";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
|
||||||
|
x -= size_x - i * spacing * 2;
|
||||||
|
comment = "Draw perimeter (left)";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!opt_args.is_filled) {
|
||||||
|
return gcode.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
// create box infill
|
||||||
|
const double spacing_45 = spacing / std::sin(to_radians(45));
|
||||||
|
|
||||||
|
const double bound_modifier = (spacing * (opt_args.num_perimeters - 1)) + (opt_args.line_width * (1 - m_encroachment));
|
||||||
|
const double x_min_bound = min_x + bound_modifier;
|
||||||
|
const double x_max_bound = max_x - bound_modifier;
|
||||||
|
const double y_min_bound = min_y + bound_modifier;
|
||||||
|
const double y_max_bound = max_y - bound_modifier;
|
||||||
|
const int x_count = std::floor((x_max_bound - x_min_bound) / spacing_45);
|
||||||
|
const int y_count = std::floor((y_max_bound - y_min_bound) / spacing_45);
|
||||||
|
|
||||||
|
double x_remainder = std::fmod((x_max_bound - x_min_bound), spacing_45);
|
||||||
|
double y_remainder = std::fmod((y_max_bound - y_min_bound), spacing_45);
|
||||||
|
|
||||||
|
x = x_min_bound;
|
||||||
|
y = y_min_bound;
|
||||||
|
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Move to fill start");
|
||||||
|
|
||||||
|
for (int i = 0; i < x_count + y_count + (x_remainder + y_remainder >= spacing_45 ? 1 : 0);
|
||||||
|
++i) { // this isn't the most robust way, but less expensive than finding line intersections
|
||||||
|
if (i < std::min(x_count, y_count)) {
|
||||||
|
if (i % 2 == 0) {
|
||||||
|
x += spacing_45;
|
||||||
|
y = y_min_bound;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step right");
|
||||||
|
|
||||||
|
y += x - x_min_bound;
|
||||||
|
x = x_min_bound;
|
||||||
|
comment = "Fill: Print up/left";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
} else {
|
||||||
|
y += spacing_45;
|
||||||
|
x = x_min_bound;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step up");
|
||||||
|
|
||||||
|
x += y - y_min_bound;
|
||||||
|
y = y_min_bound;
|
||||||
|
comment = "Fill: Print down/right";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
}
|
||||||
|
} else if (i < std::max(x_count, y_count)) {
|
||||||
|
if (x_count > y_count) {
|
||||||
|
// box is wider than tall
|
||||||
|
if (i % 2 == 0) {
|
||||||
|
x += spacing_45;
|
||||||
|
y = y_min_bound;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step right");
|
||||||
|
|
||||||
|
x -= y_max_bound - y_min_bound;
|
||||||
|
y = y_max_bound;
|
||||||
|
comment = "Fill: Print up/left";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
} else {
|
||||||
|
if (i == y_count) {
|
||||||
|
x += spacing_45 - y_remainder;
|
||||||
|
y_remainder = 0;
|
||||||
|
} else {
|
||||||
|
x += spacing_45;
|
||||||
|
}
|
||||||
|
y = y_max_bound;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step right");
|
||||||
|
|
||||||
|
x += y_max_bound - y_min_bound;
|
||||||
|
y = y_min_bound;
|
||||||
|
comment = "Fill: Print down/right";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// box is taller than wide
|
||||||
|
if (i % 2 == 0) {
|
||||||
|
x = x_max_bound;
|
||||||
|
if (i == x_count) {
|
||||||
|
y += spacing_45 - x_remainder;
|
||||||
|
x_remainder = 0;
|
||||||
|
} else {
|
||||||
|
y += spacing_45;
|
||||||
|
}
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step up");
|
||||||
|
|
||||||
|
x = x_min_bound;
|
||||||
|
y += x_max_bound - x_min_bound;
|
||||||
|
comment = "Fill: Print up/left";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
} else {
|
||||||
|
x = x_min_bound;
|
||||||
|
y += spacing_45;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step up");
|
||||||
|
|
||||||
|
x = x_max_bound;
|
||||||
|
y -= x_max_bound - x_min_bound;
|
||||||
|
comment = "Fill: Print down/right";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (i % 2 == 0) {
|
||||||
|
x = x_max_bound;
|
||||||
|
if (i == x_count) {
|
||||||
|
y += spacing_45 - x_remainder;
|
||||||
|
} else {
|
||||||
|
y += spacing_45;
|
||||||
|
}
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step up");
|
||||||
|
|
||||||
|
x -= y_max_bound - y;
|
||||||
|
y = y_max_bound;
|
||||||
|
comment = "Fill: Print up/left";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
} else {
|
||||||
|
if (i == y_count) {
|
||||||
|
x += spacing_45 - y_remainder;
|
||||||
|
} else {
|
||||||
|
x += spacing_45;
|
||||||
|
}
|
||||||
|
y = y_max_bound;
|
||||||
|
gcode << move_to(Vec2d(x, y), writer, "Fill: Step right");
|
||||||
|
|
||||||
|
y -= x_max_bound - x;
|
||||||
|
x = x_max_bound;
|
||||||
|
comment = "Fill: Print down/right";
|
||||||
|
gcode << draw_line(writer, Vec2d(x, y), line_arg_line_width, line_arg_height, line_arg_speed, comment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -268,40 +448,22 @@ std::string CalibPressureAdvanceLine::generate_test(double start_pa /*= 0*/, dou
|
||||||
return print_pa_lines(startx, starty, start_pa, step_pa, count);
|
return print_pa_lines(startx, starty, start_pa, step_pa, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CalibPressureAdvanceLine::is_delta() const
|
bool CalibPressureAdvanceLine::is_delta() const { return mp_gcodegen->config().printable_area.values.size() > 4; }
|
||||||
{
|
|
||||||
return mp_gcodegen->config().printable_area.values.size() > 4;
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CalibPressureAdvanceLine::print_pa_lines(double start_x, double start_y, double start_pa, double step_pa, int num)
|
std::string CalibPressureAdvanceLine::print_pa_lines(double start_x, double start_y, double start_pa, double step_pa, int num)
|
||||||
{
|
{
|
||||||
auto& writer = mp_gcodegen->writer();
|
auto &writer = mp_gcodegen->writer();
|
||||||
const auto& config = mp_gcodegen->config();
|
const auto &config = mp_gcodegen->config();
|
||||||
|
|
||||||
const auto filament_diameter = config.filament_diameter.get_at(0);
|
const auto filament_diameter = config.filament_diameter.get_at(0);
|
||||||
const auto print_flow_ratio = config.print_flow_ratio;
|
const auto print_flow_ratio = config.print_flow_ratio;
|
||||||
|
|
||||||
const double e_per_mm = CalibPressureAdvance::e_per_mm(
|
const double e_per_mm = CalibPressureAdvance::e_per_mm(m_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
||||||
m_line_width,
|
print_flow_ratio);
|
||||||
m_height_layer,
|
const double thin_e_per_mm = CalibPressureAdvance::e_per_mm(m_thin_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
||||||
m_nozzle_diameter,
|
print_flow_ratio);
|
||||||
filament_diameter,
|
const double number_e_per_mm = CalibPressureAdvance::e_per_mm(m_number_line_width, m_height_layer, m_nozzle_diameter, filament_diameter,
|
||||||
print_flow_ratio
|
print_flow_ratio);
|
||||||
);
|
|
||||||
const double thin_e_per_mm = CalibPressureAdvance::e_per_mm(
|
|
||||||
m_thin_line_width,
|
|
||||||
m_height_layer,
|
|
||||||
m_nozzle_diameter,
|
|
||||||
filament_diameter,
|
|
||||||
print_flow_ratio
|
|
||||||
);
|
|
||||||
const double number_e_per_mm = CalibPressureAdvance::e_per_mm(
|
|
||||||
m_number_line_width,
|
|
||||||
m_height_layer,
|
|
||||||
m_nozzle_diameter,
|
|
||||||
filament_diameter,
|
|
||||||
print_flow_ratio
|
|
||||||
);
|
|
||||||
|
|
||||||
const double fast = CalibPressureAdvance::speed_adjust(m_fast_speed);
|
const double fast = CalibPressureAdvance::speed_adjust(m_fast_speed);
|
||||||
const double slow = CalibPressureAdvance::speed_adjust(m_slow_speed);
|
const double slow = CalibPressureAdvance::speed_adjust(m_slow_speed);
|
||||||
|
|
@ -310,10 +472,10 @@ std::string CalibPressureAdvanceLine::print_pa_lines(double start_x, double star
|
||||||
double y_pos = start_y;
|
double y_pos = start_y;
|
||||||
|
|
||||||
// prime line
|
// prime line
|
||||||
auto prime_x = start_x - 2;
|
auto prime_x = start_x;
|
||||||
gcode << move_to(Vec2d(prime_x, y_pos + (num - 4) * m_space_y), writer);
|
gcode << move_to(Vec2d(prime_x, y_pos + (num) * m_space_y), writer);
|
||||||
gcode << writer.set_speed(slow);
|
gcode << writer.set_speed(slow);
|
||||||
gcode << writer.extrude_to_xy(Vec2d(prime_x, y_pos + 3 * m_space_y), e_per_mm * m_space_y * num * 1.1);
|
gcode << writer.extrude_to_xy(Vec2d(prime_x, y_pos), e_per_mm * m_space_y * num * 1.2);
|
||||||
|
|
||||||
for (int i = 0; i < num; ++i) {
|
for (int i = 0; i < num; ++i) {
|
||||||
gcode << writer.set_pressure_advance(start_pa + i * step_pa);
|
gcode << writer.set_pressure_advance(start_pa + i * step_pa);
|
||||||
|
|
@ -323,60 +485,52 @@ std::string CalibPressureAdvanceLine::print_pa_lines(double start_x, double star
|
||||||
gcode << writer.set_speed(fast);
|
gcode << writer.set_speed(fast);
|
||||||
gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short + m_length_long, y_pos + i * m_space_y), e_per_mm * m_length_long);
|
gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short + m_length_long, y_pos + i * m_space_y), e_per_mm * m_length_long);
|
||||||
gcode << writer.set_speed(slow);
|
gcode << writer.set_speed(slow);
|
||||||
gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short + m_length_long + m_length_short, y_pos + i * m_space_y), e_per_mm * m_length_short);
|
gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short + m_length_long + m_length_short, y_pos + i * m_space_y),
|
||||||
|
e_per_mm * m_length_short);
|
||||||
}
|
}
|
||||||
gcode << writer.set_pressure_advance(0.0);
|
gcode << writer.set_pressure_advance(0.0);
|
||||||
|
|
||||||
if (m_draw_numbers) {
|
if (m_draw_numbers) {
|
||||||
// draw indicator lines
|
|
||||||
gcode << writer.set_speed(fast);
|
|
||||||
gcode << move_to(Vec2d(start_x + m_length_short, y_pos + (num - 1) * m_space_y + 2), writer);
|
|
||||||
gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short, y_pos + (num - 1) * m_space_y + 7), thin_e_per_mm * 7);
|
|
||||||
gcode << move_to(Vec2d(start_x + m_length_short + m_length_long, y_pos + (num - 1) * m_space_y + 7), writer);
|
|
||||||
gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short + m_length_long, y_pos + (num - 1) * m_space_y + 2), thin_e_per_mm * 7);
|
|
||||||
|
|
||||||
|
// Orca: skip drawing indicator lines
|
||||||
|
// gcode << writer.set_speed(fast);
|
||||||
|
// gcode << move_to(Vec2d(start_x + m_length_short, y_pos + (num - 1) * m_space_y + 2), writer);
|
||||||
|
// gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short, y_pos + (num - 1) * m_space_y + 7), thin_e_per_mm * 7);
|
||||||
|
// gcode << move_to(Vec2d(start_x + m_length_short + m_length_long, y_pos + (num - 1) * m_space_y + 7), writer);
|
||||||
|
// gcode << writer.extrude_to_xy(Vec2d(start_x + m_length_short + m_length_long, y_pos + (num - 1) * m_space_y + 2), thin_e_per_mm * 7);
|
||||||
|
|
||||||
|
DrawBoxOptArgs default_box_opt_args(2, m_height_layer, 0.6, fast);
|
||||||
|
default_box_opt_args.is_filled = true;
|
||||||
|
gcode << draw_box(writer, start_x + m_length_short + m_length_long + m_length_short, start_y-m_space_y, number_spacing() * 8,
|
||||||
|
num * m_space_y, default_box_opt_args);
|
||||||
|
gcode << writer.travel_to_z(m_height_layer*2);
|
||||||
for (int i = 0; i < num; i += 2) {
|
for (int i = 0; i < num; i += 2) {
|
||||||
gcode << draw_number(
|
gcode << draw_number(start_x + m_length_short + m_length_long + m_length_short + 3, y_pos + i * m_space_y + m_space_y / 2,
|
||||||
start_x + m_length_short + m_length_long + m_length_short + 3,
|
start_pa + i * step_pa, m_draw_digit_mode, m_number_line_width, number_e_per_mm, 3600, writer);
|
||||||
y_pos + i * m_space_y + m_space_y / 2,
|
|
||||||
start_pa + i * step_pa,
|
|
||||||
m_draw_digit_mode,
|
|
||||||
m_number_line_width,
|
|
||||||
number_e_per_mm,
|
|
||||||
3600,
|
|
||||||
writer
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return gcode.str();
|
return gcode.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalibPressureAdvanceLine::delta_modify_start(double& startx, double& starty, int count)
|
void CalibPressureAdvanceLine::delta_modify_start(double &startx, double &starty, int count)
|
||||||
{
|
{
|
||||||
startx = -startx;
|
startx = -startx;
|
||||||
starty = -(count * m_space_y) / 2;
|
starty = -(count * m_space_y) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
CalibPressureAdvancePattern::CalibPressureAdvancePattern(
|
CalibPressureAdvancePattern::CalibPressureAdvancePattern(
|
||||||
const Calib_Params& params,
|
const Calib_Params ¶ms, const DynamicPrintConfig &config, bool is_bbl_machine, Model &model, const Vec3d &origin)
|
||||||
const DynamicPrintConfig& config,
|
: m_params(params),CalibPressureAdvance(config)
|
||||||
bool is_bbl_machine,
|
|
||||||
Model& model,
|
|
||||||
const Vec3d& origin
|
|
||||||
) :
|
|
||||||
m_params(params)
|
|
||||||
{
|
{
|
||||||
this->m_draw_digit_mode = DrawDigitMode::Bottom_To_Top;
|
this->m_draw_digit_mode = DrawDigitMode::Bottom_To_Top;
|
||||||
|
|
||||||
refresh_setup(config, is_bbl_machine, model, origin);
|
refresh_setup(config, is_bbl_machine, model, origin);
|
||||||
};
|
};
|
||||||
|
|
||||||
void CalibPressureAdvancePattern::generate_custom_gcodes(
|
void CalibPressureAdvancePattern::generate_custom_gcodes(const DynamicPrintConfig &config,
|
||||||
const DynamicPrintConfig& config,
|
|
||||||
bool is_bbl_machine,
|
bool is_bbl_machine,
|
||||||
Model& model,
|
Model &model,
|
||||||
const Vec3d& origin
|
const Vec3d &origin)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
std::stringstream gcode;
|
std::stringstream gcode;
|
||||||
gcode << "; start pressure advance pattern for layer\n";
|
gcode << "; start pressure advance pattern for layer\n";
|
||||||
|
|
@ -387,31 +541,21 @@ void CalibPressureAdvancePattern::generate_custom_gcodes(
|
||||||
gcode << m_writer.travel_to_z(height_first_layer(), "Move to start Z position");
|
gcode << m_writer.travel_to_z(height_first_layer(), "Move to start Z position");
|
||||||
gcode << m_writer.set_pressure_advance(m_params.start);
|
gcode << m_writer.set_pressure_advance(m_params.start);
|
||||||
|
|
||||||
const DrawBoxOptArgs default_box_opt_args(*this);
|
const DrawBoxOptArgs default_box_opt_args(wall_count(), height_first_layer(), line_width_first_layer(),
|
||||||
|
speed_adjust(speed_first_layer()));
|
||||||
|
|
||||||
// create anchoring frame
|
// create anchoring frame
|
||||||
gcode << draw_box(
|
gcode << draw_box(m_writer, m_starting_point.x(), m_starting_point.y(), print_size_x(), frame_size_y(), default_box_opt_args);
|
||||||
m_starting_point.x(),
|
|
||||||
m_starting_point.y(),
|
|
||||||
print_size_x(),
|
|
||||||
frame_size_y(),
|
|
||||||
default_box_opt_args
|
|
||||||
);
|
|
||||||
|
|
||||||
// create tab for numbers
|
// create tab for numbers
|
||||||
DrawBoxOptArgs draw_box_opt_args = default_box_opt_args;
|
DrawBoxOptArgs draw_box_opt_args = default_box_opt_args;
|
||||||
draw_box_opt_args.is_filled = true;
|
draw_box_opt_args.is_filled = true;
|
||||||
draw_box_opt_args.num_perimeters = wall_count();
|
draw_box_opt_args.num_perimeters = wall_count();
|
||||||
gcode << draw_box(
|
gcode << draw_box(m_writer, m_starting_point.x(), m_starting_point.y() + frame_size_y() + line_spacing_first_layer(),
|
||||||
m_starting_point.x(),
|
|
||||||
m_starting_point.y() + frame_size_y() + line_spacing_first_layer(),
|
|
||||||
glyph_tab_max_x() - m_starting_point.x(),
|
glyph_tab_max_x() - m_starting_point.x(),
|
||||||
max_numbering_height() + line_spacing_first_layer() + m_glyph_padding_vertical * 2,
|
max_numbering_height() + line_spacing_first_layer() + m_glyph_padding_vertical * 2, draw_box_opt_args);
|
||||||
draw_box_opt_args
|
|
||||||
);
|
|
||||||
|
|
||||||
std::vector<CustomGCode::Item> gcode_items;
|
std::vector<CustomGCode::Item> gcode_items;
|
||||||
const DrawLineOptArgs default_line_opt_args(*this);
|
|
||||||
const int num_patterns = get_num_patterns(); // "cache" for use in loops
|
const int num_patterns = get_num_patterns(); // "cache" for use in loops
|
||||||
|
|
||||||
// draw pressure advance pattern
|
// draw pressure advance pattern
|
||||||
|
|
@ -435,30 +579,19 @@ void CalibPressureAdvancePattern::generate_custom_gcodes(
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
gcode << m_writer.set_pressure_advance(m_params.start);
|
gcode << m_writer.set_pressure_advance(m_params.start);
|
||||||
|
|
||||||
double number_e_per_mm = e_per_mm(
|
double number_e_per_mm = e_per_mm(line_width(), height_layer(),
|
||||||
line_width(),
|
|
||||||
height_layer(),
|
|
||||||
m_config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0),
|
m_config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0),
|
||||||
m_config.option<ConfigOptionFloats>("filament_diameter")->get_at(0),
|
m_config.option<ConfigOptionFloats>("filament_diameter")->get_at(0),
|
||||||
m_config.option<ConfigOptionFloats>("filament_flow_ratio")->get_at(0)
|
m_config.option<ConfigOptionFloats>("filament_flow_ratio")->get_at(0));
|
||||||
);
|
|
||||||
|
|
||||||
// glyph on every other line
|
// glyph on every other line
|
||||||
for (int j = 0; j < num_patterns; j += 2) {
|
for (int j = 0; j < num_patterns; j += 2) {
|
||||||
gcode << draw_number(
|
gcode << draw_number(glyph_start_x(j), m_starting_point.y() + frame_size_y() + m_glyph_padding_vertical + line_width(),
|
||||||
glyph_start_x(j),
|
m_params.start + (j * m_params.step), m_draw_digit_mode, line_width(), number_e_per_mm,
|
||||||
m_starting_point.y() + frame_size_y() + m_glyph_padding_vertical + line_width(),
|
speed_first_layer(), m_writer);
|
||||||
m_params.start + (j * m_params.step),
|
|
||||||
m_draw_digit_mode,
|
|
||||||
line_width(),
|
|
||||||
number_e_per_mm,
|
|
||||||
speed_first_layer(),
|
|
||||||
m_writer
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
DrawLineOptArgs draw_line_opt_args = default_line_opt_args;
|
|
||||||
|
|
||||||
double to_x = m_starting_point.x() + pattern_shift();
|
double to_x = m_starting_point.x() + pattern_shift();
|
||||||
double to_y = m_starting_point.y();
|
double to_y = m_starting_point.y();
|
||||||
|
|
@ -466,18 +599,11 @@ void CalibPressureAdvancePattern::generate_custom_gcodes(
|
||||||
|
|
||||||
// shrink first layer to fit inside frame
|
// shrink first layer to fit inside frame
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
double shrink =
|
double shrink = (line_spacing_first_layer() * (wall_count() - 1) + (line_width_first_layer() * (1 - m_encroachment))) /
|
||||||
(
|
std::sin(to_radians(m_corner_angle) / 2);
|
||||||
line_spacing_first_layer() * (wall_count() - 1) +
|
|
||||||
(line_width_first_layer() * (1 - m_encroachment))
|
|
||||||
) / std::sin(to_radians(m_corner_angle) / 2)
|
|
||||||
;
|
|
||||||
side_length = m_wall_side_length - shrink;
|
side_length = m_wall_side_length - shrink;
|
||||||
to_x += shrink * std::sin(to_radians(90) - to_radians(m_corner_angle) / 2);
|
to_x += shrink * std::sin(to_radians(90) - to_radians(m_corner_angle) / 2);
|
||||||
to_y +=
|
to_y += line_spacing_first_layer() * (wall_count() - 1) + (line_width_first_layer() * (1 - m_encroachment));
|
||||||
line_spacing_first_layer() * (wall_count() - 1) +
|
|
||||||
(line_width_first_layer() * (1 - m_encroachment))
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double initial_x = to_x;
|
double initial_x = to_x;
|
||||||
|
|
@ -493,17 +619,16 @@ void CalibPressureAdvancePattern::generate_custom_gcodes(
|
||||||
to_x += std::cos(to_radians(m_corner_angle) / 2) * side_length;
|
to_x += std::cos(to_radians(m_corner_angle) / 2) * side_length;
|
||||||
to_y += std::sin(to_radians(m_corner_angle) / 2) * side_length;
|
to_y += std::sin(to_radians(m_corner_angle) / 2) * side_length;
|
||||||
|
|
||||||
draw_line_opt_args = default_line_opt_args;
|
auto draw_line_arg_height = i == 0 ? height_first_layer() : height_layer();
|
||||||
draw_line_opt_args.height = i == 0 ? height_first_layer() : height_layer();
|
auto draw_line_arg_line_width = line_width(); // don't use line_width_first_layer so results are consistent across all layers
|
||||||
draw_line_opt_args.line_width = line_width(); // don't use line_width_first_layer so results are consistent across all layers
|
auto draw_line_arg_speed = i == 0 ? speed_adjust(speed_first_layer()) : speed_adjust(speed_perimeter());
|
||||||
draw_line_opt_args.speed = i == 0 ? speed_adjust(speed_first_layer()) : speed_adjust(speed_perimeter());
|
auto draw_line_arg_comment = "Print pattern wall";
|
||||||
draw_line_opt_args.comment = "Print pattern wall";
|
gcode << draw_line(m_writer, Vec2d(to_x, to_y), draw_line_arg_line_width, draw_line_arg_height, draw_line_arg_speed, draw_line_arg_comment);
|
||||||
gcode << draw_line(Vec2d(to_x, to_y), draw_line_opt_args);
|
|
||||||
|
|
||||||
to_x -= std::cos(to_radians(m_corner_angle) / 2) * side_length;
|
to_x -= std::cos(to_radians(m_corner_angle) / 2) * side_length;
|
||||||
to_y += std::sin(to_radians(m_corner_angle) / 2) * side_length;
|
to_y += std::sin(to_radians(m_corner_angle) / 2) * side_length;
|
||||||
|
|
||||||
gcode << draw_line(Vec2d(to_x, to_y), draw_line_opt_args);
|
gcode << draw_line(m_writer, Vec2d(to_x, to_y), draw_line_arg_line_width, draw_line_arg_height, draw_line_arg_speed, draw_line_arg_comment);
|
||||||
|
|
||||||
to_y = initial_y;
|
to_y = initial_y;
|
||||||
if (k != wall_count() - 1) {
|
if (k != wall_count() - 1) {
|
||||||
|
|
@ -541,12 +666,10 @@ void CalibPressureAdvancePattern::generate_custom_gcodes(
|
||||||
model.plates_custom_gcodes[model.curr_plate_index] = info;
|
model.plates_custom_gcodes[model.curr_plate_index] = info;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalibPressureAdvancePattern::refresh_setup(
|
void CalibPressureAdvancePattern::refresh_setup(const DynamicPrintConfig &config,
|
||||||
const DynamicPrintConfig& config,
|
|
||||||
bool is_bbl_machine,
|
bool is_bbl_machine,
|
||||||
const Model& model,
|
const Model &model,
|
||||||
const Vec3d& origin
|
const Vec3d &origin)
|
||||||
)
|
|
||||||
{
|
{
|
||||||
m_config = config;
|
m_config = config;
|
||||||
m_config.apply(model.objects.front()->config.get(), true);
|
m_config.apply(model.objects.front()->config.get(), true);
|
||||||
|
|
@ -558,15 +681,10 @@ void CalibPressureAdvancePattern::refresh_setup(
|
||||||
_refresh_writer(is_bbl_machine, model, origin);
|
_refresh_writer(is_bbl_machine, model, origin);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalibPressureAdvancePattern::_refresh_starting_point(const Model& model)
|
void CalibPressureAdvancePattern::_refresh_starting_point(const Model &model)
|
||||||
{
|
{
|
||||||
ModelObject* obj = model.objects.front();
|
ModelObject *obj = model.objects.front();
|
||||||
BoundingBoxf3 bbox =
|
BoundingBoxf3 bbox = obj->instance_bounding_box(*obj->instances.front(), false);
|
||||||
obj->instance_bounding_box(
|
|
||||||
*obj->instances.front(),
|
|
||||||
false
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
m_starting_point = Vec3d(bbox.min.x(), bbox.max.y(), 0);
|
m_starting_point = Vec3d(bbox.min.x(), bbox.max.y(), 0);
|
||||||
m_starting_point.y() += m_handle_spacing;
|
m_starting_point.y() += m_handle_spacing;
|
||||||
|
|
@ -577,11 +695,7 @@ void CalibPressureAdvancePattern::_refresh_starting_point(const Model& model)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalibPressureAdvancePattern::_refresh_writer(
|
void CalibPressureAdvancePattern::_refresh_writer(bool is_bbl_machine, const Model &model, const Vec3d &origin)
|
||||||
bool is_bbl_machine,
|
|
||||||
const Model& model,
|
|
||||||
const Vec3d& origin
|
|
||||||
)
|
|
||||||
{
|
{
|
||||||
PrintConfig print_config;
|
PrintConfig print_config;
|
||||||
print_config.apply(m_config, true);
|
print_config.apply(m_config, true);
|
||||||
|
|
@ -591,249 +705,20 @@ void CalibPressureAdvancePattern::_refresh_writer(
|
||||||
m_writer.set_is_bbl_machine(is_bbl_machine);
|
m_writer.set_is_bbl_machine(is_bbl_machine);
|
||||||
|
|
||||||
const unsigned int extruder_id = model.objects.front()->volumes.front()->extruder_id();
|
const unsigned int extruder_id = model.objects.front()->volumes.front()->extruder_id();
|
||||||
m_writer.set_extruders({ extruder_id });
|
m_writer.set_extruders({extruder_id});
|
||||||
m_writer.set_extruder(extruder_id);
|
m_writer.set_extruder(extruder_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string CalibPressureAdvancePattern::draw_line(
|
|
||||||
Vec2d to_pt,
|
|
||||||
DrawLineOptArgs opt_args
|
|
||||||
)
|
|
||||||
{
|
|
||||||
const double e_per_mm = CalibPressureAdvance::e_per_mm(
|
|
||||||
opt_args.line_width,
|
|
||||||
opt_args.height,
|
|
||||||
m_config.option<ConfigOptionFloats>("nozzle_diameter")->get_at(0),
|
|
||||||
m_config.option<ConfigOptionFloats>("filament_diameter")->get_at(0),
|
|
||||||
m_config.option<ConfigOptionFloats>("filament_flow_ratio")->get_at(0)
|
|
||||||
);
|
|
||||||
|
|
||||||
const double length = get_distance(Vec2d(m_last_pos.x(), m_last_pos.y()), to_pt);
|
|
||||||
auto dE = e_per_mm * length;
|
|
||||||
|
|
||||||
std::stringstream gcode;
|
|
||||||
|
|
||||||
gcode << m_writer.set_speed(opt_args.speed);
|
|
||||||
gcode << m_writer.extrude_to_xy(to_pt, dE, opt_args.comment);
|
|
||||||
|
|
||||||
m_last_pos = Vec3d(to_pt.x(), to_pt.y(), 0);
|
|
||||||
|
|
||||||
return gcode.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string CalibPressureAdvancePattern::draw_box(
|
|
||||||
double min_x,
|
|
||||||
double min_y,
|
|
||||||
double size_x,
|
|
||||||
double size_y,
|
|
||||||
DrawBoxOptArgs opt_args
|
|
||||||
)
|
|
||||||
{
|
|
||||||
std::stringstream gcode;
|
|
||||||
|
|
||||||
double x = min_x;
|
|
||||||
double y = min_y;
|
|
||||||
const double max_x = min_x + size_x;
|
|
||||||
const double max_y = min_y + size_y;
|
|
||||||
|
|
||||||
const double spacing = opt_args.line_width - opt_args.height * (1 - M_PI / 4);
|
|
||||||
|
|
||||||
// if number of perims exceeds size of box, reduce it to max
|
|
||||||
const int max_perimeters =
|
|
||||||
std::min(
|
|
||||||
// this is the equivalent of number of perims for concentric fill
|
|
||||||
std::floor(size_x * std::sin(to_radians(45))) / (spacing / std::sin(to_radians(45))),
|
|
||||||
std::floor(size_y * std::sin(to_radians(45))) / (spacing / std::sin(to_radians(45)))
|
|
||||||
)
|
|
||||||
;
|
|
||||||
|
|
||||||
opt_args.num_perimeters = std::min(opt_args.num_perimeters, max_perimeters);
|
|
||||||
|
|
||||||
gcode << move_to(Vec2d(min_x, min_y), m_writer, "Move to box start");
|
|
||||||
|
|
||||||
DrawLineOptArgs line_opt_args(*this);
|
|
||||||
line_opt_args.height = opt_args.height;
|
|
||||||
line_opt_args.line_width = opt_args.line_width;
|
|
||||||
line_opt_args.speed = opt_args.speed;
|
|
||||||
|
|
||||||
for (int i = 0; i < opt_args.num_perimeters; ++i) {
|
|
||||||
if (i != 0) { // after first perimeter, step inwards to start next perimeter
|
|
||||||
x += spacing;
|
|
||||||
y += spacing;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Step inwards to print next perimeter");
|
|
||||||
}
|
|
||||||
|
|
||||||
y += size_y - i * spacing * 2;
|
|
||||||
line_opt_args.comment = "Draw perimeter (up)";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
|
|
||||||
x += size_x - i * spacing * 2;
|
|
||||||
line_opt_args.comment = "Draw perimeter (right)";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
|
|
||||||
y -= size_y - i * spacing * 2;
|
|
||||||
line_opt_args.comment = "Draw perimeter (down)";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
|
|
||||||
x -= size_x - i * spacing * 2;
|
|
||||||
line_opt_args.comment = "Draw perimeter (left)";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!opt_args.is_filled) {
|
|
||||||
return gcode.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
// create box infill
|
|
||||||
const double spacing_45 = spacing / std::sin(to_radians(45));
|
|
||||||
|
|
||||||
const double bound_modifier =
|
|
||||||
(spacing * (opt_args.num_perimeters - 1)) +
|
|
||||||
(opt_args.line_width * (1 - m_encroachment))
|
|
||||||
;
|
|
||||||
const double x_min_bound = min_x + bound_modifier;
|
|
||||||
const double x_max_bound = max_x - bound_modifier;
|
|
||||||
const double y_min_bound = min_y + bound_modifier;
|
|
||||||
const double y_max_bound = max_y - bound_modifier;
|
|
||||||
const int x_count = std::floor((x_max_bound - x_min_bound) / spacing_45);
|
|
||||||
const int y_count = std::floor((y_max_bound - y_min_bound) / spacing_45);
|
|
||||||
|
|
||||||
double x_remainder = std::fmod((x_max_bound - x_min_bound), spacing_45);
|
|
||||||
double y_remainder = std::fmod((y_max_bound - y_min_bound), spacing_45);
|
|
||||||
|
|
||||||
x = x_min_bound;
|
|
||||||
y = y_min_bound;
|
|
||||||
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Move to fill start");
|
|
||||||
|
|
||||||
for (int i = 0; i < x_count + y_count + (x_remainder + y_remainder >= spacing_45 ? 1 : 0); ++i) { // this isn't the most robust way, but less expensive than finding line intersections
|
|
||||||
if (i < std::min(x_count, y_count)) {
|
|
||||||
if (i % 2 == 0) {
|
|
||||||
x += spacing_45;
|
|
||||||
y = y_min_bound;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step right");
|
|
||||||
|
|
||||||
y += x - x_min_bound;
|
|
||||||
x = x_min_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print up/left";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
} else {
|
|
||||||
y += spacing_45;
|
|
||||||
x = x_min_bound;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step up");
|
|
||||||
|
|
||||||
x += y - y_min_bound;
|
|
||||||
y = y_min_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print down/right";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
}
|
|
||||||
} else if (i < std::max(x_count, y_count)) {
|
|
||||||
if (x_count > y_count) {
|
|
||||||
// box is wider than tall
|
|
||||||
if (i % 2 == 0) {
|
|
||||||
x += spacing_45;
|
|
||||||
y = y_min_bound;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step right");
|
|
||||||
|
|
||||||
x -= y_max_bound - y_min_bound;
|
|
||||||
y = y_max_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print up/left";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
} else {
|
|
||||||
if (i == y_count) {
|
|
||||||
x += spacing_45 - y_remainder;
|
|
||||||
y_remainder = 0;
|
|
||||||
} else {
|
|
||||||
x += spacing_45;
|
|
||||||
}
|
|
||||||
y = y_max_bound;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step right");
|
|
||||||
|
|
||||||
x += y_max_bound - y_min_bound;
|
|
||||||
y = y_min_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print down/right";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// box is taller than wide
|
|
||||||
if (i % 2 == 0) {
|
|
||||||
x = x_max_bound;
|
|
||||||
if (i == x_count) {
|
|
||||||
y += spacing_45 - x_remainder;
|
|
||||||
x_remainder = 0;
|
|
||||||
} else {
|
|
||||||
y += spacing_45;
|
|
||||||
}
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step up");
|
|
||||||
|
|
||||||
x = x_min_bound;
|
|
||||||
y += x_max_bound - x_min_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print up/left";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
} else {
|
|
||||||
x = x_min_bound;
|
|
||||||
y += spacing_45;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step up");
|
|
||||||
|
|
||||||
x = x_max_bound;
|
|
||||||
y -= x_max_bound - x_min_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print down/right";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (i % 2 == 0) {
|
|
||||||
x = x_max_bound;
|
|
||||||
if (i == x_count) {
|
|
||||||
y += spacing_45 - x_remainder;
|
|
||||||
} else {
|
|
||||||
y += spacing_45;
|
|
||||||
}
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step up");
|
|
||||||
|
|
||||||
x -= y_max_bound - y;
|
|
||||||
y = y_max_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print up/left";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
} else {
|
|
||||||
if (i == y_count) {
|
|
||||||
x += spacing_45 - y_remainder;
|
|
||||||
} else {
|
|
||||||
x += spacing_45;
|
|
||||||
}
|
|
||||||
y = y_max_bound;
|
|
||||||
gcode << move_to(Vec2d(x, y), m_writer, "Fill: Step right");
|
|
||||||
|
|
||||||
y -= x_max_bound - x;
|
|
||||||
x = x_max_bound;
|
|
||||||
line_opt_args.comment = "Fill: Print down/right";
|
|
||||||
gcode << draw_line(Vec2d(x, y), line_opt_args);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return gcode.str();
|
|
||||||
}
|
|
||||||
|
|
||||||
double CalibPressureAdvancePattern::get_distance(Vec2d from, Vec2d to) const
|
|
||||||
{
|
|
||||||
return std::hypot((to.x() - from.x()), (to.y() - from.y()));
|
|
||||||
}
|
|
||||||
|
|
||||||
double CalibPressureAdvancePattern::object_size_x() const
|
double CalibPressureAdvancePattern::object_size_x() const
|
||||||
{
|
{
|
||||||
return get_num_patterns() * ((wall_count() - 1) * line_spacing_angle()) +
|
return get_num_patterns() * ((wall_count() - 1) * line_spacing_angle()) +
|
||||||
(get_num_patterns() - 1) * (m_pattern_spacing + line_width()) +
|
(get_num_patterns() - 1) * (m_pattern_spacing + line_width()) + std::cos(to_radians(m_corner_angle) / 2) * m_wall_side_length +
|
||||||
std::cos(to_radians(m_corner_angle) / 2) * m_wall_side_length +
|
line_spacing_first_layer() * wall_count();
|
||||||
line_spacing_first_layer() * wall_count()
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double CalibPressureAdvancePattern::object_size_y() const
|
double CalibPressureAdvancePattern::object_size_y() const
|
||||||
{
|
{
|
||||||
return 2 * (std::sin(to_radians(m_corner_angle) / 2) * m_wall_side_length) +
|
return 2 * (std::sin(to_radians(m_corner_angle) / 2) * m_wall_side_length) + max_numbering_height() + m_glyph_padding_vertical * 2 +
|
||||||
max_numbering_height() +
|
|
||||||
m_glyph_padding_vertical * 2 +
|
|
||||||
line_width_first_layer();
|
line_width_first_layer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -843,16 +728,14 @@ double CalibPressureAdvancePattern::glyph_start_x(int pattern_i) const
|
||||||
// align glyph's start with first perimeter of specified pattern
|
// align glyph's start with first perimeter of specified pattern
|
||||||
double x =
|
double x =
|
||||||
// starting offset
|
// starting offset
|
||||||
m_starting_point.x() +
|
m_starting_point.x() + pattern_shift() +
|
||||||
pattern_shift() +
|
|
||||||
|
|
||||||
// width of pattern extrusions
|
// width of pattern extrusions
|
||||||
pattern_i * (wall_count() - 1) * line_spacing_angle() + // center to center distance of extrusions
|
pattern_i * (wall_count() - 1) * line_spacing_angle() + // center to center distance of extrusions
|
||||||
pattern_i * line_width() + // endcaps. center to end on either side = 1 line width
|
pattern_i * line_width() + // endcaps. center to end on either side = 1 line width
|
||||||
|
|
||||||
// space between each pattern
|
// space between each pattern
|
||||||
pattern_i * m_pattern_spacing
|
pattern_i * m_pattern_spacing;
|
||||||
;
|
|
||||||
|
|
||||||
// align to middle of pattern walls
|
// align to middle of pattern walls
|
||||||
x += wall_count() * line_spacing_angle() / 2;
|
x += wall_count() * line_spacing_angle() / 2;
|
||||||
|
|
@ -874,20 +757,13 @@ double CalibPressureAdvancePattern::glyph_tab_max_x() const
|
||||||
{
|
{
|
||||||
// only every other glyph is shown, starting with 1
|
// only every other glyph is shown, starting with 1
|
||||||
int num = get_num_patterns();
|
int num = get_num_patterns();
|
||||||
int max_num =
|
int max_num = (num % 2 == 0) ? num - 1 : num;
|
||||||
(num % 2 == 0)
|
|
||||||
? num - 1
|
|
||||||
: num
|
|
||||||
;
|
|
||||||
|
|
||||||
// padding at end should be same as padding at start
|
// padding at end should be same as padding at start
|
||||||
double padding = glyph_start_x(0) - m_starting_point.x();
|
double padding = glyph_start_x(0) - m_starting_point.x();
|
||||||
|
|
||||||
return
|
return glyph_start_x(max_num - 1) + // glyph_start_x is zero-based
|
||||||
glyph_start_x(max_num - 1) + // glyph_start_x is zero-based
|
(glyph_length_x() - line_width() / 2) + padding;
|
||||||
(glyph_length_x() - line_width() / 2) +
|
|
||||||
padding
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
double CalibPressureAdvancePattern::max_numbering_height() const
|
double CalibPressureAdvancePattern::max_numbering_height() const
|
||||||
|
|
@ -911,10 +787,6 @@ double CalibPressureAdvancePattern::max_numbering_height() const
|
||||||
|
|
||||||
double CalibPressureAdvancePattern::pattern_shift() const
|
double CalibPressureAdvancePattern::pattern_shift() const
|
||||||
{
|
{
|
||||||
return
|
return (wall_count() - 1) * line_spacing_first_layer() + line_width_first_layer() + m_glyph_padding_horizontal;
|
||||||
(wall_count() - 1) * line_spacing_first_layer() +
|
|
||||||
line_width_first_layer() +
|
|
||||||
m_glyph_padding_horizontal
|
|
||||||
;
|
|
||||||
}
|
}
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#include <string>
|
||||||
#define calib_pressure_advance_dd
|
#define calib_pressure_advance_dd
|
||||||
|
|
||||||
#include "GCode.hpp"
|
#include "GCode.hpp"
|
||||||
|
|
@ -23,24 +24,16 @@ enum class CalibMode : int {
|
||||||
Calib_Retraction_tower
|
Calib_Retraction_tower
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class CalibState {
|
enum class CalibState { Start = 0, Preset, Calibration, CoarseSave, FineCalibration, Save, Finish };
|
||||||
Start = 0,
|
|
||||||
Preset,
|
|
||||||
Calibration,
|
|
||||||
CoarseSave,
|
|
||||||
FineCalibration,
|
|
||||||
Save,
|
|
||||||
Finish
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Calib_Params {
|
struct Calib_Params
|
||||||
Calib_Params() : mode(CalibMode::Calib_None) { };
|
{
|
||||||
|
Calib_Params() : mode(CalibMode::Calib_None){};
|
||||||
double start, end, step;
|
double start, end, step;
|
||||||
bool print_numbers;
|
bool print_numbers;
|
||||||
CalibMode mode;
|
CalibMode mode;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class X1CCalibInfos
|
class X1CCalibInfos
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
|
@ -125,133 +118,130 @@ public:
|
||||||
int confidence; // 0: success 1: uncertain 2: failed
|
int confidence; // 0: success 1: uncertain 2: failed
|
||||||
};
|
};
|
||||||
|
|
||||||
class CalibPressureAdvance {
|
struct DrawBoxOptArgs
|
||||||
public:
|
{
|
||||||
static float find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height,
|
DrawBoxOptArgs(int num_perimeters, double height, double line_width, double speed)
|
||||||
int filament_idx = 0);
|
: num_perimeters{num_perimeters}, height{height}, line_width{line_width}, speed{speed} {};
|
||||||
|
DrawBoxOptArgs() = default;
|
||||||
|
|
||||||
protected:
|
bool is_filled{false};
|
||||||
CalibPressureAdvance() =default;
|
int num_perimeters;
|
||||||
~CalibPressureAdvance() =default;
|
double height;
|
||||||
|
double line_width;
|
||||||
|
double speed;
|
||||||
|
};
|
||||||
|
class CalibPressureAdvance
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static float find_optimal_PA_speed(const DynamicPrintConfig &config, double line_width, double layer_height, int filament_idx = 0);
|
||||||
|
|
||||||
enum class DrawDigitMode {
|
protected:
|
||||||
Left_To_Right,
|
CalibPressureAdvance() = default;
|
||||||
Bottom_To_Top
|
CalibPressureAdvance(const DynamicPrintConfig& config) : m_config(config){};
|
||||||
};
|
CalibPressureAdvance(const FullPrintConfig &config) { m_config.apply(config); };
|
||||||
|
~CalibPressureAdvance() = default;
|
||||||
|
|
||||||
void delta_scale_bed_ext(BoundingBoxf& bed_ext) const { bed_ext.scale(1.0f / 1.41421f); }
|
enum class DrawDigitMode { Left_To_Right, Bottom_To_Top };
|
||||||
|
|
||||||
std::string move_to(Vec2d pt, GCodeWriter& writer, std::string comment = std::string());
|
void delta_scale_bed_ext(BoundingBoxf &bed_ext) const { bed_ext.scale(1.0f / 1.41421f); }
|
||||||
double e_per_mm(
|
|
||||||
double line_width,
|
std::string move_to(Vec2d pt, GCodeWriter &writer, std::string comment = std::string());
|
||||||
double layer_height,
|
double e_per_mm(double line_width, double layer_height, float nozzle_diameter, float filament_diameter, float print_flow_ratio) const;
|
||||||
float nozzle_diameter,
|
|
||||||
float filament_diameter,
|
|
||||||
float print_flow_ratio
|
|
||||||
) const;
|
|
||||||
double speed_adjust(int speed) const { return speed * 60; };
|
double speed_adjust(int speed) const { return speed * 60; };
|
||||||
|
|
||||||
std::string convert_number_to_string(double num) const;
|
std::string convert_number_to_string(double num) const;
|
||||||
double number_spacing() const { return m_digit_segment_len + m_digit_gap_len; };
|
double number_spacing() const { return m_digit_segment_len + m_digit_gap_len; };
|
||||||
std::string draw_digit(
|
std::string draw_digit(double startx,
|
||||||
double startx,
|
|
||||||
double starty,
|
double starty,
|
||||||
char c,
|
char c,
|
||||||
CalibPressureAdvance::DrawDigitMode mode,
|
CalibPressureAdvance::DrawDigitMode mode,
|
||||||
double line_width,
|
double line_width,
|
||||||
double e_per_mm,
|
double e_per_mm,
|
||||||
GCodeWriter& writer
|
GCodeWriter &writer);
|
||||||
);
|
std::string draw_number(double startx,
|
||||||
std::string draw_number(
|
|
||||||
double startx,
|
|
||||||
double starty,
|
double starty,
|
||||||
double value,
|
double value,
|
||||||
CalibPressureAdvance::DrawDigitMode mode,
|
CalibPressureAdvance::DrawDigitMode mode,
|
||||||
double line_width,
|
double line_width,
|
||||||
double e_per_mm,
|
double e_per_mm,
|
||||||
double speed,
|
double speed,
|
||||||
GCodeWriter& writer
|
GCodeWriter &writer);
|
||||||
);
|
|
||||||
|
std::string draw_line(
|
||||||
|
GCodeWriter &writer, Vec2d to_pt, double line_width, double layer_height, double speed, const std::string &comment = std::string());
|
||||||
|
std::string draw_box(GCodeWriter &writer, double min_x, double min_y, double size_x, double size_y, DrawBoxOptArgs opt_args);
|
||||||
|
|
||||||
|
double to_radians(double degrees) const { return degrees * M_PI / 180; };
|
||||||
|
double get_distance(Vec2d from, Vec2d to) const;
|
||||||
|
|
||||||
Vec3d m_last_pos;
|
Vec3d m_last_pos;
|
||||||
|
DynamicPrintConfig m_config;
|
||||||
|
|
||||||
DrawDigitMode m_draw_digit_mode {DrawDigitMode::Left_To_Right};
|
const double m_encroachment{1. / 3.};
|
||||||
const double m_digit_segment_len {2};
|
DrawDigitMode m_draw_digit_mode{DrawDigitMode::Left_To_Right};
|
||||||
const double m_digit_gap_len {1};
|
const double m_digit_segment_len{2};
|
||||||
const std::string::size_type m_max_number_len {5};
|
const double m_digit_gap_len{1};
|
||||||
|
const std::string::size_type m_max_number_len{5};
|
||||||
};
|
};
|
||||||
|
|
||||||
class CalibPressureAdvanceLine : public CalibPressureAdvance {
|
class CalibPressureAdvanceLine : public CalibPressureAdvance
|
||||||
|
{
|
||||||
public:
|
public:
|
||||||
CalibPressureAdvanceLine(GCode* gcodegen) :
|
CalibPressureAdvanceLine(GCode *gcodegen) : CalibPressureAdvance(gcodegen->config()), mp_gcodegen(gcodegen),m_nozzle_diameter(gcodegen->config().nozzle_diameter.get_at(0)){};
|
||||||
mp_gcodegen(gcodegen),
|
~CalibPressureAdvanceLine(){};
|
||||||
m_nozzle_diameter(gcodegen->config().nozzle_diameter.get_at(0))
|
|
||||||
{ };
|
|
||||||
~CalibPressureAdvanceLine() { };
|
|
||||||
|
|
||||||
std::string generate_test(double start_pa = 0, double step_pa = 0.002, int count = 50);
|
std::string generate_test(double start_pa = 0, double step_pa = 0.002, int count = 50);
|
||||||
|
|
||||||
void set_speed(double fast = 100.0, double slow = 20.0) {
|
void set_speed(double fast = 100.0, double slow = 20.0)
|
||||||
|
{
|
||||||
m_slow_speed = slow;
|
m_slow_speed = slow;
|
||||||
m_fast_speed = fast;
|
m_fast_speed = fast;
|
||||||
}
|
}
|
||||||
|
|
||||||
const double& line_width() { return m_line_width; };
|
const double &line_width() { return m_line_width; };
|
||||||
bool is_delta() const;
|
bool is_delta() const;
|
||||||
bool& draw_numbers() { return m_draw_numbers; }
|
bool &draw_numbers() { return m_draw_numbers; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::string print_pa_lines(double start_x, double start_y, double start_pa, double step_pa, int num);
|
std::string print_pa_lines(double start_x, double start_y, double start_pa, double step_pa, int num);
|
||||||
|
|
||||||
void delta_modify_start(double& startx, double& starty, int count);
|
void delta_modify_start(double &startx, double &starty, int count);
|
||||||
|
|
||||||
GCode* mp_gcodegen;
|
GCode *mp_gcodegen;
|
||||||
|
|
||||||
double m_nozzle_diameter;
|
double m_nozzle_diameter;
|
||||||
double m_slow_speed, m_fast_speed;
|
double m_slow_speed, m_fast_speed;
|
||||||
|
|
||||||
const double m_height_layer {0.2};
|
const double m_height_layer{0.2};
|
||||||
const double m_line_width {0.6};
|
const double m_line_width{0.6};
|
||||||
const double m_thin_line_width {0.44};
|
const double m_thin_line_width{0.44};
|
||||||
const double m_number_line_width {0.48};
|
const double m_number_line_width{0.48};
|
||||||
const double m_space_y {3.5};
|
const double m_space_y{3.5};
|
||||||
|
|
||||||
double m_length_short {20.0}, m_length_long {40.0};
|
double m_length_short{20.0}, m_length_long{40.0};
|
||||||
bool m_draw_numbers {true};
|
bool m_draw_numbers{true};
|
||||||
};
|
};
|
||||||
|
|
||||||
struct SuggestedConfigCalibPAPattern {
|
struct SuggestedConfigCalibPAPattern
|
||||||
const std::vector<std::pair<std::string, double>> float_pairs {
|
{
|
||||||
{"initial_layer_print_height", 0.25},
|
const std::vector<std::pair<std::string, double>> float_pairs{{"initial_layer_print_height", 0.25},
|
||||||
{"layer_height", 0.2},
|
{"layer_height", 0.2},
|
||||||
{"initial_layer_speed", 30}
|
{"initial_layer_speed", 30}};
|
||||||
};
|
|
||||||
|
|
||||||
const std::vector<std::pair<std::string, double>> nozzle_ratio_pairs {
|
const std::vector<std::pair<std::string, double>> nozzle_ratio_pairs{{"line_width", 112.5}, {"initial_layer_line_width", 140}};
|
||||||
{"line_width", 112.5},
|
|
||||||
{"initial_layer_line_width", 140}
|
|
||||||
};
|
|
||||||
|
|
||||||
const std::vector<std::pair<std::string, int>> int_pairs {
|
const std::vector<std::pair<std::string, int>> int_pairs{{"skirt_loops", 0}, {"wall_loops", 3}};
|
||||||
{"skirt_loops", 0},
|
|
||||||
{"wall_loops", 3}
|
|
||||||
};
|
|
||||||
|
|
||||||
const std::pair<std::string, BrimType> brim_pair {"brim_type", BrimType::btNoBrim};
|
const std::pair<std::string, BrimType> brim_pair{"brim_type", BrimType::btNoBrim};
|
||||||
};
|
};
|
||||||
|
|
||||||
class CalibPressureAdvancePattern : public CalibPressureAdvance {
|
class CalibPressureAdvancePattern : public CalibPressureAdvance
|
||||||
friend struct DrawLineOptArgs;
|
{
|
||||||
friend struct DrawBoxOptArgs;
|
friend struct DrawBoxOptArgs;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CalibPressureAdvancePattern(
|
CalibPressureAdvancePattern(
|
||||||
const Calib_Params& params,
|
const Calib_Params ¶ms, const DynamicPrintConfig &config, bool is_bbl_machine, Model &model, const Vec3d &origin);
|
||||||
const DynamicPrintConfig& config,
|
|
||||||
bool is_bbl_machine,
|
|
||||||
Model& model,
|
|
||||||
const Vec3d& origin
|
|
||||||
);
|
|
||||||
|
|
||||||
double handle_xy_size() const { return m_handle_xy_size; };
|
double handle_xy_size() const { return m_handle_xy_size; };
|
||||||
double handle_spacing() const { return m_handle_spacing; };
|
double handle_spacing() const { return m_handle_spacing; };
|
||||||
|
|
@ -259,12 +249,7 @@ public:
|
||||||
double print_size_y() const { return object_size_y(); };
|
double print_size_y() const { return object_size_y(); };
|
||||||
double max_layer_z() const { return height_first_layer() + ((m_num_layers - 1) * height_layer()); };
|
double max_layer_z() const { return height_first_layer() + ((m_num_layers - 1) * height_layer()); };
|
||||||
|
|
||||||
void generate_custom_gcodes(
|
void generate_custom_gcodes(const DynamicPrintConfig &config, bool is_bbl_machine, Model &model, const Vec3d &origin);
|
||||||
const DynamicPrintConfig& config,
|
|
||||||
bool is_bbl_machine,
|
|
||||||
Model& model,
|
|
||||||
const Vec3d& origin
|
|
||||||
);
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
double speed_first_layer() const { return m_config.option<ConfigOptionFloat>("initial_layer_speed")->value; };
|
double speed_first_layer() const { return m_config.option<ConfigOptionFloat>("initial_layer_speed")->value; };
|
||||||
|
|
@ -274,68 +259,13 @@ protected:
|
||||||
int wall_count() const { return m_config.option<ConfigOptionInt>("wall_loops")->value; };
|
int wall_count() const { return m_config.option<ConfigOptionInt>("wall_loops")->value; };
|
||||||
|
|
||||||
private:
|
private:
|
||||||
struct DrawLineOptArgs {
|
void refresh_setup(const DynamicPrintConfig &config, bool is_bbl_machine, const Model &model, const Vec3d &origin);
|
||||||
DrawLineOptArgs(const CalibPressureAdvancePattern& p) :
|
void _refresh_starting_point(const Model &model);
|
||||||
height {p.height_layer()},
|
void _refresh_writer(bool is_bbl_machine, const Model &model, const Vec3d &origin);
|
||||||
line_width {p.line_width()},
|
|
||||||
speed {p.speed_adjust(p.speed_perimeter())}
|
|
||||||
{ };
|
|
||||||
|
|
||||||
double height;
|
|
||||||
double line_width;
|
|
||||||
double speed;
|
|
||||||
std::string comment {"Print line"};
|
|
||||||
};
|
|
||||||
|
|
||||||
struct DrawBoxOptArgs {
|
|
||||||
DrawBoxOptArgs(const CalibPressureAdvancePattern& p) :
|
|
||||||
num_perimeters {p.wall_count()},
|
|
||||||
height {p.height_first_layer()},
|
|
||||||
line_width {p.line_width_first_layer()},
|
|
||||||
speed {p.speed_adjust(p.speed_first_layer())}
|
|
||||||
{ };
|
|
||||||
|
|
||||||
bool is_filled {false};
|
|
||||||
int num_perimeters;
|
|
||||||
double height;
|
|
||||||
double line_width;
|
|
||||||
double speed;
|
|
||||||
};
|
|
||||||
|
|
||||||
void refresh_setup(
|
|
||||||
const DynamicPrintConfig& config,
|
|
||||||
bool is_bbl_machine,
|
|
||||||
const Model& model,
|
|
||||||
const Vec3d& origin
|
|
||||||
);
|
|
||||||
void _refresh_starting_point(const Model& model);
|
|
||||||
void _refresh_writer(
|
|
||||||
bool is_bbl_machine,
|
|
||||||
const Model& model,
|
|
||||||
const Vec3d& origin
|
|
||||||
);
|
|
||||||
|
|
||||||
double height_first_layer() const { return m_config.option<ConfigOptionFloat>("initial_layer_print_height")->value; };
|
double height_first_layer() const { return m_config.option<ConfigOptionFloat>("initial_layer_print_height")->value; };
|
||||||
double height_layer() const { return m_config.option<ConfigOptionFloat>("layer_height")->value; };
|
double height_layer() const { return m_config.option<ConfigOptionFloat>("layer_height")->value; };
|
||||||
const int get_num_patterns() const
|
const int get_num_patterns() const { return std::ceil((m_params.end - m_params.start) / m_params.step + 1); }
|
||||||
{
|
|
||||||
return std::ceil((m_params.end - m_params.start) / m_params.step + 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string draw_line(
|
|
||||||
Vec2d to_pt,
|
|
||||||
DrawLineOptArgs opt_args
|
|
||||||
);
|
|
||||||
std::string draw_box(
|
|
||||||
double min_x,
|
|
||||||
double min_y,
|
|
||||||
double size_x,
|
|
||||||
double size_y,
|
|
||||||
DrawBoxOptArgs opt_args
|
|
||||||
);
|
|
||||||
|
|
||||||
double to_radians(double degrees) const { return degrees * M_PI / 180; };
|
|
||||||
double get_distance(Vec2d from, Vec2d to) const;
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
from slic3r documentation: spacing = extrusion_width - layer_height * (1 - PI/4)
|
from slic3r documentation: spacing = extrusion_width - layer_height * (1 - PI/4)
|
||||||
|
|
@ -358,23 +288,21 @@ private:
|
||||||
|
|
||||||
double pattern_shift() const;
|
double pattern_shift() const;
|
||||||
|
|
||||||
const Calib_Params& m_params;
|
const Calib_Params &m_params;
|
||||||
|
|
||||||
DynamicPrintConfig m_config;
|
|
||||||
GCodeWriter m_writer;
|
GCodeWriter m_writer;
|
||||||
bool m_is_delta;
|
bool m_is_delta;
|
||||||
Vec3d m_starting_point;
|
Vec3d m_starting_point;
|
||||||
|
|
||||||
const double m_handle_xy_size {5};
|
const double m_handle_xy_size{5};
|
||||||
const double m_handle_spacing {2};
|
const double m_handle_spacing{2};
|
||||||
const int m_num_layers {4};
|
const int m_num_layers{4};
|
||||||
|
|
||||||
const double m_wall_side_length {30.0};
|
const double m_wall_side_length{30.0};
|
||||||
const int m_corner_angle {90};
|
const int m_corner_angle{90};
|
||||||
const int m_pattern_spacing {2};
|
const int m_pattern_spacing{2};
|
||||||
const double m_encroachment {1. / 3.};
|
|
||||||
|
|
||||||
const double m_glyph_padding_horizontal {1};
|
const double m_glyph_padding_horizontal{1};
|
||||||
const double m_glyph_padding_vertical {1};
|
const double m_glyph_padding_vertical{1};
|
||||||
};
|
};
|
||||||
} // namespace Slic3r
|
} // namespace Slic3r
|
||||||
|
|
|
||||||
|
|
@ -349,7 +349,7 @@ void CalibrationCaliPage::update_subtask(MachineObject* obj)
|
||||||
m_printing_panel->update_subtask_name(wxString::Format("%s", GUI::from_u8(obj->subtask_name)));
|
m_printing_panel->update_subtask_name(wxString::Format("%s", GUI::from_u8(obj->subtask_name)));
|
||||||
|
|
||||||
if (obj->get_modeltask() && obj->get_modeltask()->design_id > 0) {
|
if (obj->get_modeltask() && obj->get_modeltask()->design_id > 0) {
|
||||||
m_printing_panel->show_profile_info(wxString::FromUTF8(obj->get_modeltask()->profile_name));
|
m_printing_panel->show_profile_info(true, wxString::FromUTF8(obj->get_modeltask()->profile_name));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_printing_panel->show_profile_info(false);
|
m_printing_panel->show_profile_info(false);
|
||||||
|
|
|
||||||
|
|
@ -1539,6 +1539,8 @@ void ColourPicker::set_undef_value(wxColourPickerCtrl* field)
|
||||||
field->SetColour(wxTransparentColour);
|
field->SetColour(wxTransparentColour);
|
||||||
|
|
||||||
wxButton* btn = dynamic_cast<wxButton*>(field->GetPickerCtrl());
|
wxButton* btn = dynamic_cast<wxButton*>(field->GetPickerCtrl());
|
||||||
|
if (!btn->GetBitmap().IsOk()) return;
|
||||||
|
|
||||||
wxImage image(btn->GetBitmap().GetSize());
|
wxImage image(btn->GetBitmap().GetSize());
|
||||||
image.InitAlpha();
|
image.InitAlpha();
|
||||||
memset(image.GetAlpha(), 0, image.GetWidth() * image.GetHeight());
|
memset(image.GetAlpha(), 0, image.GetWidth() * image.GetHeight());
|
||||||
|
|
|
||||||
|
|
@ -623,11 +623,15 @@ void Slic3r::GUI::ImageGrid::renderContent1(wxDC &dc, wxPoint const &pt, int ind
|
||||||
}
|
}
|
||||||
// Draw buttons on hovered item
|
// Draw buttons on hovered item
|
||||||
wxRect rect{pt.x, pt.y + m_content_rect.GetBottom() - m_buttons_background.GetHeight(), m_content_rect.GetWidth(), m_buttons_background.GetHeight()};
|
wxRect rect{pt.x, pt.y + m_content_rect.GetBottom() - m_buttons_background.GetHeight(), m_content_rect.GetWidth(), m_buttons_background.GetHeight()};
|
||||||
|
wxArrayString texts;
|
||||||
if (hit) {
|
if (hit) {
|
||||||
renderButtons(dc, {_L("Delete"), (wxChar const *) secondAction, thirdAction.IsEmpty() ? nullptr : (wxChar const *) thirdAction, nullptr}, rect,
|
texts.Add(_L("Delete"));
|
||||||
m_hit_type == HIT_ACTION ? m_hit_item & 3 : -1, states);
|
texts.Add(secondAction);
|
||||||
|
texts.Add(thirdAction);
|
||||||
|
renderButtons(dc, texts, rect, m_hit_type == HIT_ACTION ? m_hit_item & 3 : -1, states);
|
||||||
} else if (!nonHoverText.IsEmpty()) {
|
} else if (!nonHoverText.IsEmpty()) {
|
||||||
renderButtons(dc, {(wxChar const *) nonHoverText, nullptr}, rect, -1, states);
|
texts.Add(nonHoverText);
|
||||||
|
renderButtons(dc, texts, rect, -1, states);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
dc.SetTextForeground(*wxWHITE); // time text color
|
dc.SetTextForeground(*wxWHITE); // time text color
|
||||||
|
|
@ -673,7 +677,7 @@ void Slic3r::GUI::ImageGrid::renderContent2(wxDC &dc, wxPoint const &pt, int ind
|
||||||
renderIconText(dc, m_model_weight_icon, file.Metadata("Weight", "0g"), rect);
|
renderIconText(dc, m_model_weight_icon, file.Metadata("Weight", "0g"), rect);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Slic3r::GUI::ImageGrid::renderButtons(wxDC &dc, wxStringList const &texts, wxRect const &rect2, size_t hit, int states)
|
void Slic3r::GUI::ImageGrid::renderButtons(wxDC &dc, wxArrayString const &texts, wxRect const &rect2, size_t hit, int states)
|
||||||
{
|
{
|
||||||
// Draw background
|
// Draw background
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@
|
||||||
#define ImageGrid_h
|
#define ImageGrid_h
|
||||||
|
|
||||||
#include <wx/window.h>
|
#include <wx/window.h>
|
||||||
|
#include <wx/arrstr.h>
|
||||||
#include <boost/shared_ptr.hpp>
|
#include <boost/shared_ptr.hpp>
|
||||||
|
|
||||||
#include "Widgets/StateColor.hpp"
|
#include "Widgets/StateColor.hpp"
|
||||||
|
|
@ -84,7 +85,7 @@ protected:
|
||||||
|
|
||||||
void renderContent2(wxDC &dc, wxPoint const &pt, int index, bool hit);
|
void renderContent2(wxDC &dc, wxPoint const &pt, int index, bool hit);
|
||||||
|
|
||||||
void renderButtons(wxDC &dc, wxStringList const &texts, wxRect const &rect, size_t hit, int states);
|
void renderButtons(wxDC &dc, wxArrayString const &texts, wxRect const &rect, size_t hit, int states);
|
||||||
|
|
||||||
void renderText(wxDC &dc, wxString const &text, wxRect const &rect, int states);
|
void renderText(wxDC &dc, wxString const &text, wxRect const &rect, int states);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1579,7 +1579,7 @@ Vec3d PartPlate::estimate_wipe_tower_size(const double w, const double d) const
|
||||||
auto timelapse_type = dconfig.option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
auto timelapse_type = dconfig.option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
|
||||||
bool timelapse_enabled = timelapse_type ? (timelapse_type->value == TimelapseType::tlSmooth) : false;
|
bool timelapse_enabled = timelapse_type ? (timelapse_type->value == TimelapseType::tlSmooth) : false;
|
||||||
|
|
||||||
double depth = d;
|
double depth = plate_extruders.size() == 1 ? 0 : d;
|
||||||
if (timelapse_enabled || depth > EPSILON) {
|
if (timelapse_enabled || depth > EPSILON) {
|
||||||
float min_wipe_tower_depth = 0.f;
|
float min_wipe_tower_depth = 0.f;
|
||||||
auto iter = WipeTower::min_depth_per_height.begin();
|
auto iter = WipeTower::min_depth_per_height.begin();
|
||||||
|
|
|
||||||
|
|
@ -9240,49 +9240,49 @@ wxBoxSizer *ProjectDropDialog::create_item_checkbox(wxString title, wxWindow *pa
|
||||||
void ProjectDropDialog::select_radio(int index)
|
void ProjectDropDialog::select_radio(int index)
|
||||||
{
|
{
|
||||||
m_action = index;
|
m_action = index;
|
||||||
RadioSelectorList::Node *node = m_radio_group.GetFirst();
|
RadioSelectorList::compatibility_iterator it = m_radio_group.GetFirst();
|
||||||
auto groupid = 0;
|
auto groupid = 0;
|
||||||
|
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_select_id == index) groupid = rs->m_groupid;
|
if (rs->m_select_id == index) groupid = rs->m_groupid;
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = m_radio_group.GetFirst();
|
it = m_radio_group.GetFirst();
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_groupid == groupid && rs->m_select_id == index) rs->m_radiobox->SetValue(true);
|
if (rs->m_groupid == groupid && rs->m_select_id == index) rs->m_radiobox->SetValue(true);
|
||||||
if (rs->m_groupid == groupid && rs->m_select_id != index) rs->m_radiobox->SetValue(false);
|
if (rs->m_groupid == groupid && rs->m_select_id != index) rs->m_radiobox->SetValue(false);
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int ProjectDropDialog::get_select_radio(int groupid)
|
int ProjectDropDialog::get_select_radio(int groupid)
|
||||||
{
|
{
|
||||||
RadioSelectorList::Node *node = m_radio_group.GetFirst();
|
RadioSelectorList::compatibility_iterator it = m_radio_group.GetFirst();
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetValue()) { return rs->m_select_id; }
|
if (rs->m_groupid == groupid && rs->m_radiobox->GetValue()) { return rs->m_select_id; }
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
void ProjectDropDialog::on_select_radio(wxMouseEvent &event)
|
void ProjectDropDialog::on_select_radio(wxMouseEvent &event)
|
||||||
{
|
{
|
||||||
RadioSelectorList::Node *node = m_radio_group.GetFirst();
|
RadioSelectorList::compatibility_iterator it = m_radio_group.GetFirst();
|
||||||
auto groupid = 0;
|
auto groupid = 0;
|
||||||
|
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
|
if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = m_radio_group.GetFirst();
|
it = m_radio_group.GetFirst();
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) {
|
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) {
|
||||||
set_action(rs->m_select_id);
|
set_action(rs->m_select_id);
|
||||||
rs->m_radiobox->SetValue(true);
|
rs->m_radiobox->SetValue(true);
|
||||||
|
|
@ -9290,7 +9290,7 @@ void ProjectDropDialog::on_select_radio(wxMouseEvent &event)
|
||||||
|
|
||||||
|
|
||||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() != event.GetId()) rs->m_radiobox->SetValue(false);
|
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() != event.GetId()) rs->m_radiobox->SetValue(false);
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1307,31 +1307,31 @@ wxWindow* PreferencesDialog::create_debug_page()
|
||||||
|
|
||||||
void PreferencesDialog::on_select_radio(std::string param)
|
void PreferencesDialog::on_select_radio(std::string param)
|
||||||
{
|
{
|
||||||
RadioSelectorList::Node *node = m_radio_group.GetFirst();
|
RadioSelectorList::compatibility_iterator it = m_radio_group.GetFirst();
|
||||||
auto groupid = 0;
|
auto groupid = 0;
|
||||||
|
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_param_name == param) groupid = rs->m_groupid;
|
if (rs->m_param_name == param) groupid = rs->m_groupid;
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = m_radio_group.GetFirst();
|
it = m_radio_group.GetFirst();
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_groupid == groupid && rs->m_param_name == param) rs->m_radiobox->SetValue(true);
|
if (rs->m_groupid == groupid && rs->m_param_name == param) rs->m_radiobox->SetValue(true);
|
||||||
if (rs->m_groupid == groupid && rs->m_param_name != param) rs->m_radiobox->SetValue(false);
|
if (rs->m_groupid == groupid && rs->m_param_name != param) rs->m_radiobox->SetValue(false);
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString PreferencesDialog::get_select_radio(int groupid)
|
wxString PreferencesDialog::get_select_radio(int groupid)
|
||||||
{
|
{
|
||||||
RadioSelectorList::Node *node = m_radio_group.GetFirst();
|
RadioSelectorList::compatibility_iterator it = m_radio_group.GetFirst();
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetValue()) { return rs->m_param_name; }
|
if (rs->m_groupid == groupid && rs->m_radiobox->GetValue()) { return rs->m_param_name; }
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
@ -1339,21 +1339,21 @@ wxString PreferencesDialog::get_select_radio(int groupid)
|
||||||
|
|
||||||
void PreferencesDialog::OnSelectRadio(wxMouseEvent &event)
|
void PreferencesDialog::OnSelectRadio(wxMouseEvent &event)
|
||||||
{
|
{
|
||||||
RadioSelectorList::Node *node = m_radio_group.GetFirst();
|
RadioSelectorList::compatibility_iterator it = m_radio_group.GetFirst();
|
||||||
auto groupid = 0;
|
auto groupid = 0;
|
||||||
|
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
|
if (rs->m_radiobox->GetId() == event.GetId()) groupid = rs->m_groupid;
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
|
|
||||||
node = m_radio_group.GetFirst();
|
it = m_radio_group.GetFirst();
|
||||||
while (node) {
|
while (it) {
|
||||||
RadioSelector *rs = node->GetData();
|
RadioSelector *rs = it->GetData();
|
||||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) rs->m_radiobox->SetValue(true);
|
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() == event.GetId()) rs->m_radiobox->SetValue(true);
|
||||||
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() != event.GetId()) rs->m_radiobox->SetValue(false);
|
if (rs->m_groupid == groupid && rs->m_radiobox->GetId() != event.GetId()) rs->m_radiobox->SetValue(false);
|
||||||
node = node->GetNext();
|
it = it->GetNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2626,7 +2626,7 @@ void StatusPanel::update_subtask(MachineObject *obj)
|
||||||
m_project_task_panel->update_subtask_name(wxString::Format("%s", GUI::from_u8(obj->subtask_name)));
|
m_project_task_panel->update_subtask_name(wxString::Format("%s", GUI::from_u8(obj->subtask_name)));
|
||||||
|
|
||||||
if (obj->get_modeltask() && obj->get_modeltask()->design_id > 0) {
|
if (obj->get_modeltask() && obj->get_modeltask()->design_id > 0) {
|
||||||
m_project_task_panel->show_profile_info(wxString::FromUTF8(obj->get_modeltask()->profile_name));
|
m_project_task_panel->show_profile_info(true, wxString::FromUTF8(obj->get_modeltask()->profile_name));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
m_project_task_panel->show_profile_info(false);
|
m_project_task_panel->show_profile_info(false);
|
||||||
|
|
|
||||||
|
|
@ -745,8 +745,8 @@ bool PrusaLink::get_storage(wxArrayString& storage_path, wxArrayString& storage_
|
||||||
const auto available = section.second.get_optional<bool>("available");
|
const auto available = section.second.get_optional<bool>("available");
|
||||||
if (path && (!available || *available)) {
|
if (path && (!available || *available)) {
|
||||||
StorageInfo si;
|
StorageInfo si;
|
||||||
si.path = boost::nowide::widen(*path);
|
si.path = wxString(*path);
|
||||||
si.name = name ? boost::nowide::widen(*name) : wxString();
|
si.name = name ? wxString(*name) : wxString();
|
||||||
// If read_only is missing, assume it is NOT read only.
|
// If read_only is missing, assume it is NOT read only.
|
||||||
// si.read_only = read_only ? *read_only : false; // version without "ro"
|
// si.read_only = read_only ? *read_only : false; // version without "ro"
|
||||||
si.read_only = (read_only ? *read_only : (ro ? *ro : false));
|
si.read_only = (read_only ? *read_only : (ro ? *ro : false));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue