mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-08 07:27:41 -06:00
Allow each vendor's filament profile inherit from OrcaFilamentLibrary and many many fixes...
This commit is contained in:
parent
206c6228a5
commit
d1bc4e1e9f
67 changed files with 350 additions and 2716 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "Custom Printer",
|
||||
"version": "02.02.00.04",
|
||||
"version": "02.02.00.05",
|
||||
"force_update": "0",
|
||||
"description": "My configurations",
|
||||
"machine_model_list": [
|
||||
|
@ -173,120 +173,44 @@
|
|||
],
|
||||
"filament_list": [
|
||||
{
|
||||
"name": "fdm_filament_common",
|
||||
"sub_path": "filament/fdm_filament_common.json"
|
||||
"name": "Generic PLA @MyToolChanger",
|
||||
"sub_path": "filament/Generic PLA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_pla",
|
||||
"sub_path": "filament/fdm_filament_pla.json"
|
||||
"name": "Generic PLA-CF @MyToolChanger",
|
||||
"sub_path": "filament/Generic PLA-CF @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_tpu",
|
||||
"sub_path": "filament/fdm_filament_tpu.json"
|
||||
"name": "Generic PETG @MyToolChanger",
|
||||
"sub_path": "filament/Generic PETG @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_pet",
|
||||
"sub_path": "filament/fdm_filament_pet.json"
|
||||
"name": "Generic ABS @MyToolChanger",
|
||||
"sub_path": "filament/Generic ABS @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_abs",
|
||||
"sub_path": "filament/fdm_filament_abs.json"
|
||||
"name": "Generic TPU @MyToolChanger",
|
||||
"sub_path": "filament/Generic TPU @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_pc",
|
||||
"sub_path": "filament/fdm_filament_pc.json"
|
||||
"name": "Generic ASA @MyToolChanger",
|
||||
"sub_path": "filament/Generic ASA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_asa",
|
||||
"sub_path": "filament/fdm_filament_asa.json"
|
||||
"name": "Generic PC @MyToolChanger",
|
||||
"sub_path": "filament/Generic PC @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_pva",
|
||||
"sub_path": "filament/fdm_filament_pva.json"
|
||||
"name": "Generic PVA @MyToolChanger",
|
||||
"sub_path": "filament/Generic PVA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "fdm_filament_pa",
|
||||
"sub_path": "filament/fdm_filament_pa.json"
|
||||
"name": "Generic PA @MyToolChanger",
|
||||
"sub_path": "filament/Generic PA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PLA",
|
||||
"sub_path": "filament/My Generic PLA.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PLA-CF",
|
||||
"sub_path": "filament/My Generic PLA-CF.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PETG",
|
||||
"sub_path": "filament/My Generic PETG.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic ABS",
|
||||
"sub_path": "filament/My Generic ABS.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic TPU",
|
||||
"sub_path": "filament/My Generic TPU.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic ASA",
|
||||
"sub_path": "filament/My Generic ASA.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PC",
|
||||
"sub_path": "filament/My Generic PC.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PVA",
|
||||
"sub_path": "filament/My Generic PVA.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PA",
|
||||
"sub_path": "filament/My Generic PA.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PA-CF",
|
||||
"sub_path": "filament/My Generic PA-CF.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PLA @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PLA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PLA-CF @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PLA-CF @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PETG @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PETG @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic ABS @MyToolChanger",
|
||||
"sub_path": "filament/My Generic ABS @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic TPU @MyToolChanger",
|
||||
"sub_path": "filament/My Generic TPU @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic ASA @MyToolChanger",
|
||||
"sub_path": "filament/My Generic ASA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PC @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PC @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PVA @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PVA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PA @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PA @MyToolChanger.json"
|
||||
},
|
||||
{
|
||||
"name": "My Generic PA-CF @MyToolChanger",
|
||||
"sub_path": "filament/My Generic PA-CF @MyToolChanger.json"
|
||||
"name": "Generic PA-CF @MyToolChanger",
|
||||
"sub_path": "filament/Generic PA-CF @MyToolChanger.json"
|
||||
}
|
||||
],
|
||||
"machine_list": [
|
||||
|
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFB99",
|
||||
"setting_id": "GFB99_MTC_0",
|
||||
"name": "My Generic ABS @MyToolChanger",
|
||||
"name": "Generic ABS @MyToolChanger",
|
||||
"renamed_from": "My Generic ABS @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_abs",
|
||||
"inherits": "Generic ABS @System",
|
||||
"filament_flow_ratio": [
|
||||
"0.926"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFB98",
|
||||
"setting_id": "GFB98_MTC_0",
|
||||
"name": "My Generic ASA @MyToolChanger",
|
||||
"name": "Generic ASA @MyToolChanger",
|
||||
"renamed_from": "My Generic ASA @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_asa",
|
||||
"inherits": "Generic ASA @System",
|
||||
"filament_flow_ratio": [
|
||||
"0.93"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFN99",
|
||||
"setting_id": "GFN99_MTC_0",
|
||||
"name": "My Generic PA @MyToolChanger",
|
||||
"name": "Generic PA @MyToolChanger",
|
||||
"renamed_from": "My Generic PA @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"inherits": "Generic PA @System",
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"280"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFN98",
|
||||
"setting_id": "GFN98_MTC_0",
|
||||
"name": "My Generic PA-CF @MyToolChanger",
|
||||
"name": "Generic PA-CF @MyToolChanger",
|
||||
"renamed_from": "My Generic PA-CF @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"inherits": "Generic PA-CF @System",
|
||||
"filament_type": [
|
||||
"PA-CF"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFC99",
|
||||
"setting_id": "GFC99_MTC_0",
|
||||
"name": "My Generic PC @MyToolChanger",
|
||||
"name": "Generic PC @MyToolChanger",
|
||||
"renamed_from": "My Generic PC @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pc",
|
||||
"inherits": "Generic PC @System",
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFG99",
|
||||
"setting_id": "GFG99_MTC_0",
|
||||
"name": "My Generic PETG @MyToolChanger",
|
||||
"name": "Generic PETG @MyToolChanger",
|
||||
"renamed_from": "My Generic PETG @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pet",
|
||||
"inherits": "Generic PETG @System",
|
||||
"reduce_fan_stop_start_freq": [
|
||||
"1"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFL99",
|
||||
"setting_id": "GFL99_MTC_0",
|
||||
"name": "My Generic PLA @MyToolChanger",
|
||||
"name": "Generic PLA @MyToolChanger",
|
||||
"renamed_from": "My Generic PLA @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pla",
|
||||
"inherits": "Generic PLA @System",
|
||||
"filament_flow_ratio": [
|
||||
"0.98"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFL98",
|
||||
"setting_id": "GFL98_MTC_0",
|
||||
"name": "My Generic PLA-CF @MyToolChanger",
|
||||
"name": "Generic PLA-CF @MyToolChanger",
|
||||
"renamed_from": "My Generic PLA-CF @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pla",
|
||||
"inherits": "Generic PLA-CF @System",
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFS99",
|
||||
"setting_id": "GFS99_MTC_0",
|
||||
"name": "My Generic PVA @MyToolChanger",
|
||||
"name": "Generic PVA @MyToolChanger",
|
||||
"renamed_from": "My Generic PVA @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pva",
|
||||
"inherits": "Generic PVA @System",
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
],
|
|
@ -2,10 +2,11 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFU99",
|
||||
"setting_id": "GFU99_MTC_0",
|
||||
"name": "My Generic TPU @MyToolChanger",
|
||||
"name": "Generic TPU @MyToolChanger",
|
||||
"renamed_from": "My Generic TPU @MyToolChanger",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_tpu",
|
||||
"inherits": "Generic TPU @System",
|
||||
"filament_max_volumetric_speed": [
|
||||
"3.2"
|
||||
],
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFB99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic ABS",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_abs",
|
||||
"filament_flow_ratio": [
|
||||
"0.926"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFB98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic ASA",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_asa",
|
||||
"filament_flow_ratio": [
|
||||
"0.93"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFN98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic PA-CF",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"filament_type": [
|
||||
"PA-CF"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"280"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"280"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"8"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFN99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic PA",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"280"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"280"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFC99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic PC",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pc",
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.94"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,53 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFG99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My 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": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFL98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic PLA-CF",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pla",
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
],
|
||||
"filament_type": [
|
||||
"PLA-CF"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"7"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFL99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My 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": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,29 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFS99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic PVA",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pva",
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"7"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFU99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "My Generic TPU",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_tpu",
|
||||
"filament_max_volumetric_speed": [
|
||||
"3.2"
|
||||
],
|
||||
"compatible_printers": [
|
||||
"MyKlipper 0.4 nozzle",
|
||||
"MyKlipper 0.2 nozzle",
|
||||
"MyKlipper 0.6 nozzle",
|
||||
"MyKlipper 0.8 nozzle",
|
||||
"MyMarlin 0.4 nozzle",
|
||||
"MyRRF 0.4 nozzle"
|
||||
]
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"name": "fdm_filament_asa",
|
||||
"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": [
|
||||
"35"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"28.6"
|
||||
],
|
||||
"filament_type": [
|
||||
"ASA"
|
||||
],
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -1,144 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -1,85 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"name": "fdm_filament_pa",
|
||||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"0"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"100"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"100"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"100"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"0"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"100"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"100"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"100"
|
||||
],
|
||||
"slow_down_for_layer_cooling": [
|
||||
"1"
|
||||
],
|
||||
"close_fan_the_first_x_layers": [
|
||||
"3"
|
||||
],
|
||||
"fan_cooling_layer_time": [
|
||||
"4"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"8"
|
||||
],
|
||||
"filament_type": [
|
||||
"PA"
|
||||
],
|
||||
"filament_density": [
|
||||
"1.04"
|
||||
],
|
||||
"filament_cost": [
|
||||
"20"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"290"
|
||||
],
|
||||
"reduce_fan_stop_start_freq": [
|
||||
"0"
|
||||
],
|
||||
"fan_max_speed": [
|
||||
"60"
|
||||
],
|
||||
"fan_min_speed": [
|
||||
"0"
|
||||
],
|
||||
"overhang_fan_speed": [
|
||||
"30"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"290"
|
||||
],
|
||||
"temperature_vitrification": [
|
||||
"108"
|
||||
],
|
||||
"nozzle_temperature_range_low": [
|
||||
"270"
|
||||
],
|
||||
"nozzle_temperature_range_high": [
|
||||
"300"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"2"
|
||||
]
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"name": "fdm_filament_pc",
|
||||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"0"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"110"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"110"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"110"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"0"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"110"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"110"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"110"
|
||||
],
|
||||
"slow_down_for_layer_cooling": [
|
||||
"1"
|
||||
],
|
||||
"close_fan_the_first_x_layers": [
|
||||
"3"
|
||||
],
|
||||
"fan_cooling_layer_time": [
|
||||
"30"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"23.2"
|
||||
],
|
||||
"filament_type": [
|
||||
"PC"
|
||||
],
|
||||
"filament_density": [
|
||||
"1.04"
|
||||
],
|
||||
"filament_cost": [
|
||||
"20"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"270"
|
||||
],
|
||||
"reduce_fan_stop_start_freq": [
|
||||
"1"
|
||||
],
|
||||
"fan_max_speed": [
|
||||
"60"
|
||||
],
|
||||
"fan_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"overhang_fan_threshold": [
|
||||
"25%"
|
||||
],
|
||||
"overhang_fan_speed": [
|
||||
"60"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"280"
|
||||
],
|
||||
"temperature_vitrification": [
|
||||
"140"
|
||||
],
|
||||
"nozzle_temperature_range_low": [
|
||||
"260"
|
||||
],
|
||||
"nozzle_temperature_range_high": [
|
||||
"280"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"2"
|
||||
]
|
||||
}
|
|
@ -1,82 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -1,94 +0,0 @@
|
|||
{
|
||||
"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"
|
||||
]
|
||||
}
|
|
@ -1,100 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"name": "fdm_filament_pva",
|
||||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"35"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"0"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"45"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"45"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"35"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"0"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"45"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"45"
|
||||
],
|
||||
"fan_cooling_layer_time": [
|
||||
"100"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"15"
|
||||
],
|
||||
"filament_soluble": [
|
||||
"1"
|
||||
],
|
||||
"filament_is_support": [
|
||||
"1"
|
||||
],
|
||||
"filament_type": [
|
||||
"PVA"
|
||||
],
|
||||
"filament_density": [
|
||||
"1.24"
|
||||
],
|
||||
"filament_cost": [
|
||||
"20"
|
||||
],
|
||||
"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": [
|
||||
"50"
|
||||
],
|
||||
"nozzle_temperature_range_low": [
|
||||
"190"
|
||||
],
|
||||
"nozzle_temperature_range_high": [
|
||||
"250"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"4"
|
||||
],
|
||||
"additional_cooling_fan_speed": [
|
||||
"70"
|
||||
],
|
||||
"filament_start_gcode": [
|
||||
"; filament start gcode\n"
|
||||
]
|
||||
}
|
|
@ -1,88 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"name": "fdm_filament_tpu",
|
||||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"30"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"30"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"35"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"35"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"30"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"30"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"35"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"35"
|
||||
],
|
||||
"fan_cooling_layer_time": [
|
||||
"100"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"15"
|
||||
],
|
||||
"filament_type": [
|
||||
"TPU"
|
||||
],
|
||||
"filament_density": [
|
||||
"1.24"
|
||||
],
|
||||
"filament_cost": [
|
||||
"20"
|
||||
],
|
||||
"filament_retraction_length": [
|
||||
"0.4"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"240"
|
||||
],
|
||||
"reduce_fan_stop_start_freq": [
|
||||
"1"
|
||||
],
|
||||
"slow_down_for_layer_cooling": [
|
||||
"1"
|
||||
],
|
||||
"fan_max_speed": [
|
||||
"100"
|
||||
],
|
||||
"fan_min_speed": [
|
||||
"100"
|
||||
],
|
||||
"overhang_fan_speed": [
|
||||
"100"
|
||||
],
|
||||
"additional_cooling_fan_speed": [
|
||||
"70"
|
||||
],
|
||||
"close_fan_the_first_x_layers": [
|
||||
"1"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"240"
|
||||
],
|
||||
"temperature_vitrification": [
|
||||
"60"
|
||||
],
|
||||
"nozzle_temperature_range_low": [
|
||||
"200"
|
||||
],
|
||||
"nozzle_temperature_range_high": [
|
||||
"250"
|
||||
],
|
||||
"filament_start_gcode": [
|
||||
"; filament start gcode\n"
|
||||
]
|
||||
}
|
|
@ -8,5 +8,5 @@
|
|||
"bed_model": "",
|
||||
"bed_texture": "orcaslicer_bed_texture.svg",
|
||||
"hotend_model": "",
|
||||
"default_materials": "My Generic ABS;My Generic PLA;My Generic PLA-CF;My Generic PETG;My Generic TPU;My Generic ASA;My Generic PC;My Generic PVA;My Generic PA;My Generic PA-CF"
|
||||
"default_materials": "Generic ABS @System;Generic PLA @System;Generic PLA-CF @System;Generic PETG @System;Generic TPU @System;Generic ASA @System;Generic PC @System;Generic PVA @System;Generic PA @System;Generic PA-CF @System"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"bed_model": "",
|
||||
"bed_texture": "orcaslicer_bed_texture.svg",
|
||||
"hotend_model": "",
|
||||
"default_materials": "My Generic ABS;My Generic PLA;My Generic PLA-CF;My Generic PETG;My Generic TPU;My Generic ASA;My Generic PC;My Generic PVA;My Generic PA;My Generic PA-CF"
|
||||
"default_materials": "Generic ABS @System;Generic PLA @System;Generic PLA-CF @System;Generic PETG @System;Generic TPU @System;Generic ASA @System;Generic PC @System;Generic PVA @System;Generic PA @System;Generic PA-CF @System"
|
||||
}
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
"bed_model": "",
|
||||
"bed_texture": "orcaslicer_bed_texture.svg",
|
||||
"hotend_model": "",
|
||||
"default_materials": "My Generic ABS;My Generic PLA;My Generic PLA-CF;My Generic PETG;My Generic TPU;My Generic ASA;My Generic PC;My Generic PVA;My Generic PA;My Generic PA-CF"
|
||||
"default_materials": "Generic ABS @System;Generic PLA @System;Generic PLA-CF @System;Generic PETG @System;Generic TPU @System;Generic ASA @System;Generic PC @System;Generic PVA @System;Generic PA @System;Generic PA-CF @System"
|
||||
}
|
|
@ -8,5 +8,5 @@
|
|||
"bed_model": "Custom_350_bed.stl",
|
||||
"bed_texture": "orcaslicer_bed_texture.svg",
|
||||
"hotend_model": "",
|
||||
"default_materials": "My Generic PLA @MyToolChanger;My Generic ABS @MyToolChanger;My Generic PLA-CF @MyToolChanger;My Generic PETG @MyToolChanger;My Generic TPU @MyToolChanger;My Generic ASA @MyToolChanger;My Generic PC @MyToolChanger;My Generic PVA @MyToolChanger;My Generic PA @MyToolChanger;My Generic PA-CF @MyToolChanger"
|
||||
"default_materials": "Generic PLA @MyToolChanger;Generic ABS @MyToolChanger;Generic PLA-CF @MyToolChanger;Generic PETG @MyToolChanger;Generic TPU @MyToolChanger;Generic ASA @MyToolChanger;Generic PC @MyToolChanger;Generic PVA @MyToolChanger;Generic PA @MyToolChanger;Generic PA-CF @MyToolChanger"
|
||||
}
|
||||
|
|
|
@ -41,44 +41,44 @@
|
|||
"sub_path": "filament/fdm_filament_pa.json"
|
||||
},
|
||||
{
|
||||
"name": "PLA",
|
||||
"sub_path": "filament/PLA.json"
|
||||
"name": "Generic PLA @System",
|
||||
"sub_path": "filament/Generic PLA @System.json"
|
||||
},
|
||||
{
|
||||
"name": "PLA-CF",
|
||||
"sub_path": "filament/PLA-CF.json"
|
||||
"name": "Generic PLA-CF @System",
|
||||
"sub_path": "filament/Generic PLA-CF @System.json"
|
||||
},
|
||||
{
|
||||
"name": "PETG",
|
||||
"sub_path": "filament/PETG.json"
|
||||
"name": "Generic PETG @System",
|
||||
"sub_path": "filament/Generic PETG @System.json"
|
||||
},
|
||||
{
|
||||
"name": "ABS",
|
||||
"sub_path": "filament/ABS.json"
|
||||
"name": "Generic ABS @System",
|
||||
"sub_path": "filament/Generic ABS @System.json"
|
||||
},
|
||||
{
|
||||
"name": "TPU",
|
||||
"sub_path": "filament/TPU.json"
|
||||
"name": "Generic TPU @System",
|
||||
"sub_path": "filament/Generic TPU @System.json"
|
||||
},
|
||||
{
|
||||
"name": "ASA",
|
||||
"sub_path": "filament/ASA.json"
|
||||
"name": "Generic ASA @System",
|
||||
"sub_path": "filament/Generic ASA @System.json"
|
||||
},
|
||||
{
|
||||
"name": "PC",
|
||||
"sub_path": "filament/PC.json"
|
||||
"name": "Generic PC @System",
|
||||
"sub_path": "filament/Generic PC @System.json"
|
||||
},
|
||||
{
|
||||
"name": "PVA",
|
||||
"sub_path": "filament/PVA.json"
|
||||
"name": "Generic PVA @System",
|
||||
"sub_path": "filament/Generic PVA @System.json"
|
||||
},
|
||||
{
|
||||
"name": "PA",
|
||||
"sub_path": "filament/PA.json"
|
||||
"name": "Generic PA @System",
|
||||
"sub_path": "filament/Generic PA @System.json"
|
||||
},
|
||||
{
|
||||
"name": "PA-CF",
|
||||
"sub_path": "filament/PA-CF.json"
|
||||
"name": "Generic PA-CF @System",
|
||||
"sub_path": "filament/Generic PA-CF @System.json"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -2,16 +2,10 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFB99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "ABS",
|
||||
"name": "Generic ABS @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic ABS",
|
||||
"inherits": "fdm_filament_abs",
|
||||
"filament_flow_ratio": [
|
||||
"0.926"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"compatible_printers": [
|
||||
]
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -2,16 +2,10 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFB98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "ASA",
|
||||
"name": "Generic ASA @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic ADA",
|
||||
"inherits": "fdm_filament_asa",
|
||||
"filament_flow_ratio": [
|
||||
"0.93"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"compatible_printers": [
|
||||
]
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFN99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "Generic PA @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PA",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFN98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "Generic PA-CF @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PA-CF",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"filament_type": [
|
||||
"PA-CF"
|
||||
],
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -2,17 +2,10 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFC99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "PC",
|
||||
"name": "Generic PC @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PC",
|
||||
"inherits": "fdm_filament_pc",
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.94"
|
||||
],
|
||||
"compatible_printers": [
|
||||
|
||||
]
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFG99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "Generic PETG @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PETG",
|
||||
"inherits": "fdm_filament_pet",
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFL99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "Generic PLA @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PLA",
|
||||
"inherits": "fdm_filament_pla",
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -2,9 +2,10 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFL98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "PLA-CF",
|
||||
"name": "Generic PLA-CF @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PLA-CF",
|
||||
"inherits": "fdm_filament_pla",
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
|
@ -12,13 +13,5 @@
|
|||
"filament_type": [
|
||||
"PLA-CF"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"7"
|
||||
],
|
||||
"compatible_printers": [
|
||||
|
||||
]
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFS99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "Generic PVA @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic PVA",
|
||||
"inherits": "fdm_filament_pva",
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -2,14 +2,10 @@
|
|||
"type": "filament",
|
||||
"filament_id": "GFU99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "TPU",
|
||||
"name": "Generic TPU @System",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"renamed_from": "My Generic TPU",
|
||||
"inherits": "fdm_filament_tpu",
|
||||
"filament_max_volumetric_speed": [
|
||||
"3.2"
|
||||
],
|
||||
"compatible_printers": [
|
||||
|
||||
]
|
||||
"compatible_printers": []
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFN98",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "PA-CF",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"filament_type": [
|
||||
"PA-CF"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"280"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"280"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"8"
|
||||
],
|
||||
"compatible_printers": [
|
||||
]
|
||||
}
|
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFN99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "PA",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pa",
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"280"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"280"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"compatible_printers": [
|
||||
|
||||
]
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFG99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "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": [
|
||||
|
||||
]
|
||||
}
|
|
@ -1,20 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFL99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "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": [
|
||||
]
|
||||
}
|
|
@ -1,24 +0,0 @@
|
|||
{
|
||||
"type": "filament",
|
||||
"filament_id": "GFS99",
|
||||
"setting_id": "GFSA04",
|
||||
"name": "PVA",
|
||||
"from": "system",
|
||||
"instantiation": "true",
|
||||
"inherits": "fdm_filament_pva",
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"7"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"compatible_printers": [
|
||||
|
||||
]
|
||||
}
|
|
@ -4,28 +4,28 @@
|
|||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"cool_plate_temp": [
|
||||
"105"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"eng_plate_temp": [
|
||||
"105"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"hot_plate_temp": [
|
||||
"105"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"textured_plate_temp": [
|
||||
"105"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"cool_plate_temp_initial_layer": [
|
||||
"105"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"eng_plate_temp_initial_layer": [
|
||||
"105"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"hot_plate_temp_initial_layer": [
|
||||
"105"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"textured_plate_temp_initial_layer": [
|
||||
"105"
|
||||
],
|
||||
"slow_down_for_layer_cooling": [
|
||||
|
@ -37,9 +37,6 @@
|
|||
"fan_cooling_layer_time": [
|
||||
"30"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"28.6"
|
||||
],
|
||||
"filament_type": [
|
||||
"ABS"
|
||||
],
|
||||
|
@ -84,5 +81,11 @@
|
|||
],
|
||||
"slow_down_layer_time": [
|
||||
"3"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.926"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
]
|
||||
}
|
|
@ -37,9 +37,6 @@
|
|||
"fan_cooling_layer_time": [
|
||||
"35"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"28.6"
|
||||
],
|
||||
"filament_type": [
|
||||
"ASA"
|
||||
],
|
||||
|
@ -84,5 +81,11 @@
|
|||
],
|
||||
"slow_down_layer_time": [
|
||||
"3"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.93"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
"PLA"
|
||||
],
|
||||
"filament_vendor": [
|
||||
"OrcaSlicer"
|
||||
"Generic"
|
||||
],
|
||||
"filament_wipe": [
|
||||
"nil"
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
"fan_cooling_layer_time": [
|
||||
"4"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"8"
|
||||
],
|
||||
"filament_type": [
|
||||
"PA"
|
||||
],
|
||||
|
@ -49,9 +46,6 @@
|
|||
"filament_cost": [
|
||||
"20"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"290"
|
||||
],
|
||||
"reduce_fan_stop_start_freq": [
|
||||
"0"
|
||||
],
|
||||
|
@ -64,9 +58,6 @@
|
|||
"overhang_fan_speed": [
|
||||
"30"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"290"
|
||||
],
|
||||
"temperature_vitrification": [
|
||||
"108"
|
||||
],
|
||||
|
@ -81,5 +72,14 @@
|
|||
],
|
||||
"slow_down_layer_time": [
|
||||
"2"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
"290"
|
||||
],
|
||||
"nozzle_temperature": [
|
||||
"290"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"10"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -37,9 +37,6 @@
|
|||
"fan_cooling_layer_time": [
|
||||
"30"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"23.2"
|
||||
],
|
||||
"filament_type": [
|
||||
"PC"
|
||||
],
|
||||
|
@ -84,5 +81,11 @@
|
|||
],
|
||||
"slow_down_layer_time": [
|
||||
"2"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.94"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -28,18 +28,9 @@
|
|||
"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"
|
||||
],
|
||||
|
@ -52,18 +43,6 @@
|
|||
"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"
|
||||
],
|
||||
|
@ -78,5 +57,38 @@
|
|||
],
|
||||
"filament_start_gcode": [
|
||||
"; filament start gcode\n"
|
||||
],
|
||||
"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"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -7,9 +7,6 @@
|
|||
"fan_cooling_layer_time": [
|
||||
"100"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"filament_type": [
|
||||
"PLA"
|
||||
],
|
||||
|
@ -19,28 +16,28 @@
|
|||
"filament_cost": [
|
||||
"20"
|
||||
],
|
||||
"cool_plate_temp" : [
|
||||
"cool_plate_temp": [
|
||||
"60"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"eng_plate_temp": [
|
||||
"60"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"hot_plate_temp": [
|
||||
"60"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"textured_plate_temp": [
|
||||
"60"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"cool_plate_temp_initial_layer": [
|
||||
"60"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"eng_plate_temp_initial_layer": [
|
||||
"60"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"hot_plate_temp_initial_layer": [
|
||||
"60"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"textured_plate_temp_initial_layer": [
|
||||
"60"
|
||||
],
|
||||
"nozzle_temperature_initial_layer": [
|
||||
|
@ -82,13 +79,19 @@
|
|||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"4"
|
||||
],
|
||||
"additional_cooling_fan_speed": [
|
||||
"70"
|
||||
],
|
||||
"filament_start_gcode": [
|
||||
"; filament start gcode\n"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.98"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"6"
|
||||
]
|
||||
}
|
|
@ -4,36 +4,33 @@
|
|||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"cool_plate_temp": [
|
||||
"35"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"eng_plate_temp": [
|
||||
"0"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"hot_plate_temp": [
|
||||
"45"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"textured_plate_temp": [
|
||||
"45"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"cool_plate_temp_initial_layer": [
|
||||
"35"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"eng_plate_temp_initial_layer": [
|
||||
"0"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"hot_plate_temp_initial_layer": [
|
||||
"45"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"textured_plate_temp_initial_layer": [
|
||||
"45"
|
||||
],
|
||||
"fan_cooling_layer_time": [
|
||||
"100"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"15"
|
||||
],
|
||||
"filament_soluble": [
|
||||
"1"
|
||||
],
|
||||
|
@ -85,16 +82,22 @@
|
|||
"nozzle_temperature_range_high": [
|
||||
"250"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"4"
|
||||
],
|
||||
"additional_cooling_fan_speed": [
|
||||
"70"
|
||||
],
|
||||
"filament_start_gcode": [
|
||||
"; filament start gcode\n"
|
||||
],
|
||||
"filament_flow_ratio": [
|
||||
"0.95"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"12"
|
||||
],
|
||||
"slow_down_layer_time": [
|
||||
"7"
|
||||
],
|
||||
"slow_down_min_speed": [
|
||||
"10"
|
||||
]
|
||||
}
|
|
@ -4,36 +4,33 @@
|
|||
"from": "system",
|
||||
"instantiation": "false",
|
||||
"inherits": "fdm_filament_common",
|
||||
"cool_plate_temp" : [
|
||||
"cool_plate_temp": [
|
||||
"30"
|
||||
],
|
||||
"eng_plate_temp" : [
|
||||
"eng_plate_temp": [
|
||||
"30"
|
||||
],
|
||||
"hot_plate_temp" : [
|
||||
"hot_plate_temp": [
|
||||
"35"
|
||||
],
|
||||
"textured_plate_temp" : [
|
||||
"textured_plate_temp": [
|
||||
"35"
|
||||
],
|
||||
"cool_plate_temp_initial_layer" : [
|
||||
"cool_plate_temp_initial_layer": [
|
||||
"30"
|
||||
],
|
||||
"eng_plate_temp_initial_layer" : [
|
||||
"eng_plate_temp_initial_layer": [
|
||||
"30"
|
||||
],
|
||||
"hot_plate_temp_initial_layer" : [
|
||||
"hot_plate_temp_initial_layer": [
|
||||
"35"
|
||||
],
|
||||
"textured_plate_temp_initial_layer" : [
|
||||
"textured_plate_temp_initial_layer": [
|
||||
"35"
|
||||
],
|
||||
"fan_cooling_layer_time": [
|
||||
"100"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"15"
|
||||
],
|
||||
"filament_type": [
|
||||
"TPU"
|
||||
],
|
||||
|
@ -84,5 +81,8 @@
|
|||
],
|
||||
"filament_start_gcode": [
|
||||
"; filament start gcode\n"
|
||||
],
|
||||
"filament_max_volumetric_speed": [
|
||||
"3.2"
|
||||
]
|
||||
}
|
|
@ -3,7 +3,6 @@
|
|||
"print_settings_id": "0.20mm Speed @MK3S 0.4",
|
||||
"name": "0.20mm Speed @MK3S 0.4",
|
||||
"from": "system",
|
||||
"renamed_from":"0.20mm Standard @MK3S",
|
||||
"instantiation": "true",
|
||||
"inherits": "process_common_mk3",
|
||||
"bottom_shell_layers": "4",
|
||||
|
|
|
@ -199,7 +199,11 @@ function SortUI()
|
|||
let strModel=pFila.attr("model");
|
||||
let strFilalist=pFila.attr("filalist");
|
||||
|
||||
if(strModel == '' || fModel == '')
|
||||
pFila.attr("model", '');
|
||||
else
|
||||
pFila.attr("model", strModel+fModel);
|
||||
|
||||
pFila.attr("filalist", strFilalist+fWholeName+';');
|
||||
}
|
||||
|
||||
|
|
|
@ -71,29 +71,6 @@ function SortUI()
|
|||
ModelList.push(OneMode);
|
||||
}
|
||||
|
||||
//machine
|
||||
// let HtmlMachine='';
|
||||
//
|
||||
// let nMachine=m_ProfileItem['machine'].length;
|
||||
// for(let n=0;n<nMachine;n++)
|
||||
// {
|
||||
// let OneMachine=m_ProfileItem['machine'][n];
|
||||
//
|
||||
// let sName=OneMachine['name'];
|
||||
// let sModel=OneMachine['model'];
|
||||
//
|
||||
// if( ModelList.in_array(sModel) )
|
||||
// {
|
||||
// HtmlMachine+='<div><input type="checkbox" mode="'+sModel+'" onChange="MachineClick()" />'+sName+'</div>';
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// $('#MachineList .CValues').append(HtmlMachine);
|
||||
// $('#MachineList .CValues input').prop("checked",true);
|
||||
// if(nMachine<=1)
|
||||
// {
|
||||
// $('#MachineList').hide();
|
||||
// }
|
||||
|
||||
//model
|
||||
let HtmlMode='';
|
||||
|
@ -131,15 +108,6 @@ function SortUI()
|
|||
let fSelect=OneFila['selected'];
|
||||
let fModel=OneFila['models']
|
||||
|
||||
//alert( fWholeName+' - '+fShortName+' - '+fVendor+' - '+fType+' - '+fSelect+' - '+fModel );
|
||||
|
||||
// if(OneFila['name'].indexOf("Bambu PA-CF")>=0)
|
||||
// {
|
||||
// alert( fShortName+' - '+fVendor+' - '+fType+' - '+fSelect+' - '+fModel )
|
||||
//
|
||||
// let b=1+2;
|
||||
// }
|
||||
|
||||
let bFind=false;
|
||||
//let bCheck=$("#MachineList input:first").prop("checked");
|
||||
if( fModel=='')
|
||||
|
@ -204,6 +172,9 @@ function SortUI()
|
|||
let strModel=pFila.attr("model");
|
||||
let strFilalist=pFila.attr("filalist");
|
||||
|
||||
if(strModel == '' || fModel == '')
|
||||
pFila.attr("model", '');
|
||||
else
|
||||
pFila.attr("model", strModel+fModel);
|
||||
pFila.attr("filalist", strFilalist+fWholeName+';');
|
||||
}
|
||||
|
|
|
@ -608,6 +608,15 @@ bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const Pre
|
|||
// if (preset.vendor != nullptr && preset.vendor != active_printer.vendor)
|
||||
// // The current profile has a vendor assigned and it is different from the active print's vendor.
|
||||
// return false;
|
||||
|
||||
// Orca: check excluded printers
|
||||
if (preset.vendor != nullptr && preset.preset.type == Preset::TYPE_FILAMENT) {
|
||||
const auto& excluded_printers = preset.preset.m_excluded_from;
|
||||
const auto excluded = preset.vendor->name == PresetBundle::ORCA_FILAMENT_LIBRARY &&
|
||||
excluded_printers.find(active_printer.preset.name) != excluded_printers.end();
|
||||
if (excluded)
|
||||
return false;
|
||||
}
|
||||
auto &condition = preset.preset.compatible_printers_condition();
|
||||
auto *compatible_printers = dynamic_cast<const ConfigOptionStrings*>(preset.preset.config.option("compatible_printers"));
|
||||
bool has_compatible_printers = compatible_printers != nullptr && ! compatible_printers->values.empty();
|
||||
|
@ -622,9 +631,8 @@ bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const Pre
|
|||
}
|
||||
return preset.preset.is_default || active_printer.preset.name.empty() || !has_compatible_printers ||
|
||||
std::find(compatible_printers->values.begin(), compatible_printers->values.end(), active_printer.preset.name) !=
|
||||
compatible_printers->values.end()
|
||||
//BBS
|
||||
|| (!active_printer.preset.is_system && is_compatible_with_parent_printer(preset, active_printer));
|
||||
compatible_printers->values.end() ||
|
||||
(!active_printer.preset.is_system && is_compatible_with_parent_printer(preset, active_printer));
|
||||
}
|
||||
|
||||
bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_printer)
|
||||
|
@ -2121,6 +2129,7 @@ bool PresetCollection::clone_presets(std::vector<Preset const *> const &presets,
|
|||
auto &preset = new_presets.back();
|
||||
preset.vendor = nullptr;
|
||||
preset.renamed_from.clear();
|
||||
preset.m_excluded_from.clear();
|
||||
preset.setting_id.clear();
|
||||
preset.inherits().clear();
|
||||
preset.is_default = false;
|
||||
|
@ -2249,6 +2258,7 @@ void PresetCollection::save_current_preset(const std::string &new_name, bool det
|
|||
preset.inherits().clear();
|
||||
preset.alias.clear();
|
||||
preset.renamed_from.clear();
|
||||
preset.m_excluded_from.clear();
|
||||
BOOST_LOG_TRIVIAL(warning) << __FUNCTION__ << boost::format(": save preset %1% , with detach")%new_name;
|
||||
}
|
||||
//BBS: add lock logic for sync preset in background
|
||||
|
@ -2276,6 +2286,7 @@ void PresetCollection::save_current_preset(const std::string &new_name, bool det
|
|||
preset.vendor = nullptr;
|
||||
preset.alias.clear();
|
||||
preset.renamed_from.clear();
|
||||
preset.m_excluded_from.clear();
|
||||
preset.setting_id.clear();
|
||||
if (detach) {
|
||||
// Clear the link to the parent profile.
|
||||
|
@ -2868,6 +2879,38 @@ void PresetCollection::update_map_alias_to_profile_name()
|
|||
//std::sort(m_map_alias_to_profile_name.begin(), m_map_alias_to_profile_name.end(), [](auto &l, auto &r) { return l.first < r.first; });
|
||||
}
|
||||
|
||||
void PresetCollection::update_library_profile_excluded_from()
|
||||
{
|
||||
// Orca: Collect all filament presets that has empty compatible_printers and belongs to the Orca Filament Library.
|
||||
std::map<std::string, std::set<std::string>*> excluded_froms;
|
||||
for (Preset& preset : m_presets) {
|
||||
if (preset.vendor != nullptr && preset.vendor->name == PresetBundle::ORCA_FILAMENT_LIBRARY) {
|
||||
// check if the preset has empty compatible_printers
|
||||
const auto* compatible_printers = dynamic_cast<const ConfigOptionStrings*>(preset.config.option("compatible_printers"));
|
||||
if (compatible_printers == nullptr || compatible_printers->values.empty())
|
||||
excluded_froms[preset.alias] = &preset.m_excluded_from;
|
||||
}
|
||||
}
|
||||
|
||||
// Check all presets that has the same alias as the filament presets with empty compatible_printers in Orca Filament Library.
|
||||
for (const Preset& preset : m_presets) {
|
||||
if (preset.vendor == nullptr || preset.vendor->name == PresetBundle::ORCA_FILAMENT_LIBRARY)
|
||||
continue;
|
||||
|
||||
const auto* compatible_printers = dynamic_cast<const ConfigOptionStrings*>(preset.config.option("compatible_printers"));
|
||||
// All profiles in concrete vendor profile shouldn't have empty compatible_printers, but here we check it for safety.
|
||||
if (compatible_printers == nullptr || compatible_printers->values.empty())
|
||||
continue;
|
||||
auto itr = excluded_froms.find(preset.alias);
|
||||
if (itr != excluded_froms.end()) {
|
||||
// Add the printer models to the excluded_from list.
|
||||
for (const std::string& printer_name : compatible_printers->values) {
|
||||
itr->second->insert(printer_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void PresetCollection::update_map_system_profile_renamed()
|
||||
{
|
||||
m_map_system_profile_renamed.clear();
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <deque>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <unordered_set>
|
||||
#include <functional>
|
||||
|
@ -233,6 +234,11 @@ public:
|
|||
// and to match the "inherits" field of user profiles with updated system profiles.
|
||||
std::vector<std::string> renamed_from;
|
||||
|
||||
// Orca: maintain a list of printer models that are excluded from this preset, designed for filaments without compatible_printer defined
|
||||
// (hence they are visible to all printer models by default) in Orca Filament Library. However, we might have speciliazed filament for
|
||||
// certain printer models defined in the vendor profile as well, in this case we want to hide this generic preset for these printer models.
|
||||
std::set<std::string> m_excluded_from;
|
||||
|
||||
//BBS
|
||||
Semver version; // version of preset
|
||||
std::string ini_str; // ini string of preset
|
||||
|
@ -721,6 +727,10 @@ protected:
|
|||
// Update m_map_system_profile_renamed from loaded system profiles.
|
||||
void update_map_system_profile_renamed();
|
||||
|
||||
// Orca: update m_excluded_from loaded system profiles.
|
||||
void update_library_profile_excluded_from();
|
||||
|
||||
|
||||
void set_custom_preset_alias(Preset &preset);
|
||||
|
||||
private:
|
||||
|
|
|
@ -1164,66 +1164,6 @@ void PresetBundle::remove_users_preset(AppConfig &config, std::map<std::string,
|
|||
}
|
||||
}
|
||||
|
||||
// Load system presets into this PresetBundle.
|
||||
// For each vendor, there will be a single PresetBundle loaded.
|
||||
/*std::pair<PresetsConfigSubstitutions, std::string> PresetBundle::load_system_presets(ForwardCompatibilitySubstitutionRule compatibility_rule)
|
||||
{
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" enter, compatibility_rule %1%")%compatibility_rule;
|
||||
if (compatibility_rule == ForwardCompatibilitySubstitutionRule::EnableSystemSilent)
|
||||
// Loading system presets, don't log substitutions.
|
||||
compatibility_rule = ForwardCompatibilitySubstitutionRule::EnableSilent;
|
||||
else if (compatibility_rule == ForwardCompatibilitySubstitutionRule::EnableSilentDisableSystem)
|
||||
// Loading system presets, throw on unknown option value.
|
||||
compatibility_rule = ForwardCompatibilitySubstitutionRule::Disable;
|
||||
|
||||
// Here the vendor specific read only Config Bundles are stored.
|
||||
//BBS: change directory by design
|
||||
boost::filesystem::path dir = (boost::filesystem::path(data_dir()) / PRESET_SYSTEM_DIR).make_preferred();
|
||||
PresetsConfigSubstitutions substitutions;
|
||||
std::string errors_cummulative;
|
||||
bool first = true;
|
||||
for (auto &dir_entry : boost::filesystem::directory_iterator(dir))
|
||||
if (Slic3r::is_ini_file(dir_entry)) {
|
||||
std::string name = dir_entry.path().filename().string();
|
||||
// Remove the .ini suffix.
|
||||
name.erase(name.size() - 4);
|
||||
try {
|
||||
// Load the config bundle, flatten it.
|
||||
if (first) {
|
||||
// Reset this PresetBundle and load the first vendor config.
|
||||
append(substitutions, this->load_configbundle(dir_entry.path().string(), PresetBundle::LoadSystem, compatibility_rule).first);
|
||||
first = false;
|
||||
} else {
|
||||
// Load the other vendor configs, merge them with this PresetBundle.
|
||||
// Report duplicate profiles.
|
||||
PresetBundle other;
|
||||
append(substitutions, other.load_configbundle(dir_entry.path().string(), PresetBundle::LoadSystem, compatibility_rule).first);
|
||||
std::vector<std::string> duplicates = this->merge_presets(std::move(other));
|
||||
if (! duplicates.empty()) {
|
||||
errors_cummulative += "Vendor configuration file " + name + " contains the following presets with names used by other vendors: ";
|
||||
for (size_t i = 0; i < duplicates.size(); ++ i) {
|
||||
if (i > 0)
|
||||
errors_cummulative += ", ";
|
||||
errors_cummulative += duplicates[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (const std::runtime_error &err) {
|
||||
errors_cummulative += err.what();
|
||||
errors_cummulative += "\n";
|
||||
}
|
||||
}
|
||||
if (first) {
|
||||
// No config bundle loaded, reset.
|
||||
this->reset(false);
|
||||
}
|
||||
|
||||
this->update_system_maps();
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" finished, errors_cummulative %1%")%errors_cummulative;
|
||||
return std::make_pair(std::move(substitutions), errors_cummulative);
|
||||
}*/
|
||||
|
||||
//BBS: add json related logic, load system presets from json
|
||||
std::pair<PresetsConfigSubstitutions, std::string> PresetBundle::load_system_presets_from_json(ForwardCompatibilitySubstitutionRule compatibility_rule)
|
||||
|
@ -1284,12 +1224,14 @@ std::pair<PresetsConfigSubstitutions, std::string> PresetBundle::load_system_pre
|
|||
PresetBundle other;
|
||||
append(substitutions, other.load_vendor_configs_from_json(dir.string(), vendor_name, PresetBundle::LoadSystem, compatibility_rule, this).first);
|
||||
std::vector<std::string> duplicates = this->merge_presets(std::move(other));
|
||||
if (! duplicates.empty()) {
|
||||
if (!duplicates.empty()) {
|
||||
errors_cummulative += "Found duplicated settings in vendor " + vendor_name + "'s json file lists: ";
|
||||
for (size_t i = 0; i < duplicates.size(); ++ i) {
|
||||
for (size_t i = 0; i < duplicates.size(); ++i) {
|
||||
if (i > 0)
|
||||
errors_cummulative += ", ";
|
||||
errors_cummulative += duplicates[i];
|
||||
++m_errors;
|
||||
BOOST_LOG_TRIVIAL(error) << "Found duplicated preset: " + duplicates[i] + " in vendor: " + vendor_name + ": ";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1459,6 +1401,8 @@ void PresetBundle::update_system_maps()
|
|||
this->sla_prints .update_map_alias_to_profile_name();
|
||||
this->filaments .update_map_alias_to_profile_name();
|
||||
this->sla_materials.update_map_alias_to_profile_name();
|
||||
|
||||
this->filaments.update_library_profile_excluded_from();
|
||||
}
|
||||
|
||||
static inline std::string remove_ini_suffix(const std::string &name)
|
||||
|
@ -2427,54 +2371,7 @@ ConfigSubstitutions PresetBundle::load_config_file(const std::string &path, Forw
|
|||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" can not load config file %1% not from gcode")%path ;
|
||||
throw Slic3r::RuntimeError(std::string("Unknown configuration file: ") + path);
|
||||
// 1) Try to load the config file into a boost property tree.
|
||||
/*boost::property_tree::ptree tree;
|
||||
try {
|
||||
boost::nowide::ifstream ifs(path);
|
||||
boost::property_tree::read_ini(ifs, tree);
|
||||
} catch (const std::ifstream::failure &err) {
|
||||
throw Slic3r::RuntimeError(std::string("The Config Bundle cannot be loaded: ") + path + "\n\tReason: " + err.what());
|
||||
} catch (const boost::property_tree::file_parser_error &err) {
|
||||
throw Slic3r::RuntimeError(format("Failed loading the Config Bundle \"%1%\": %2% at line %3%",
|
||||
err.filename(), err.message(), err.line()));
|
||||
} catch (const std::runtime_error &err) {
|
||||
throw Slic3r::RuntimeError(std::string("Failed loading the preset file: ") + path + "\n\tReason: " + err.what());
|
||||
}
|
||||
|
||||
// 2) Continue based on the type of the configuration file.
|
||||
ConfigFileType config_file_type = guess_config_file_type(tree);
|
||||
ConfigSubstitutions config_substitutions;
|
||||
try {
|
||||
switch (config_file_type) {
|
||||
case CONFIG_FILE_TYPE_UNKNOWN:
|
||||
throw Slic3r::RuntimeError(std::string("Unknown configuration file type: ") + path);
|
||||
case CONFIG_FILE_TYPE_APP_CONFIG:
|
||||
throw Slic3r::RuntimeError(std::string("Invalid configuration file: ") + path + ". This is an application config file.");
|
||||
case CONFIG_FILE_TYPE_CONFIG:
|
||||
{
|
||||
// Initialize a config from full defaults.
|
||||
DynamicPrintConfig config;
|
||||
config.apply(FullPrintConfig::defaults());
|
||||
config_substitutions = config.load(tree, compatibility_rule);
|
||||
Preset::normalize(config);
|
||||
load_config_file_config(path, true, std::move(config));
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": normal config, finished, got %1% substitutions")%config_substitutions.size();
|
||||
return config_substitutions;
|
||||
}
|
||||
case CONFIG_FILE_TYPE_CONFIG_BUNDLE:
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": found config bundle");
|
||||
return load_config_file_config_bundle(path, tree, compatibility_rule);
|
||||
}
|
||||
} catch (const ConfigurationError &e) {
|
||||
throw Slic3r::RuntimeError(format("Invalid configuration file %1%: %2%", path, e.what()));
|
||||
}
|
||||
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << boost::format(" finished, should not be here");
|
||||
// This shall never happen. Suppres compiler warnings.
|
||||
assert(false);*/
|
||||
return ConfigSubstitutions{};
|
||||
}
|
||||
|
||||
|
@ -2736,569 +2633,6 @@ void PresetBundle::load_config_file_config(const std::string &name_or_path, bool
|
|||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": finished");
|
||||
}
|
||||
|
||||
// Load the active configuration of a config bundle from a boost property_tree. This is a private method called from load_config_file.
|
||||
/*ConfigSubstitutions PresetBundle::load_config_file_config_bundle(
|
||||
const std::string &path, const boost::property_tree::ptree &tree, ForwardCompatibilitySubstitutionRule compatibility_rule)
|
||||
{
|
||||
// 1) Load the config bundle into a temp data.
|
||||
PresetBundle tmp_bundle;
|
||||
// Load the config bundle, but don't save the loaded presets to user profile directory, as only the presets marked as active in the loaded preset bundle
|
||||
// will be loaded into the master PresetBundle and activated.
|
||||
auto [presets_substitutions, presets_imported] = tmp_bundle.load_configbundle(path, {}, compatibility_rule);
|
||||
UNUSED(presets_imported);
|
||||
|
||||
std::string bundle_name = std::string(" - ") + boost::filesystem::path(path).filename().string();
|
||||
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": enter, bundle_name %1%")%bundle_name;
|
||||
// 2) Extract active configs from the config bundle, copy them and activate them in this bundle.
|
||||
ConfigSubstitutions config_substitutions;
|
||||
auto load_one = [&path, &bundle_name, &presets_substitutions = presets_substitutions, &config_substitutions](
|
||||
PresetCollection &collection_dst, PresetCollection &collection_src, const std::string &preset_name_src, bool activate) -> std::string {
|
||||
// If there are substitutions reported for this preset, move them to config_substitutions.
|
||||
if (auto it = std::find_if(presets_substitutions.begin(), presets_substitutions.end(), [&preset_name_src](const PresetConfigSubstitutions& subs){ return subs.preset_name == preset_name_src; });
|
||||
it != presets_substitutions.end() && ! it->substitutions.empty())
|
||||
append(config_substitutions, std::move(it->substitutions));
|
||||
Preset *preset_src = collection_src.find_preset(preset_name_src, false);
|
||||
Preset *preset_dst = collection_dst.find_preset(preset_name_src, false);
|
||||
assert(preset_src != nullptr);
|
||||
std::string preset_name_dst;
|
||||
if (preset_dst != nullptr && preset_dst->is_default) {
|
||||
// No need to copy a default preset, it always exists in collection_dst.
|
||||
if (activate)
|
||||
collection_dst.select_preset(0);
|
||||
return preset_name_src;
|
||||
} else if (preset_dst != nullptr && preset_src->config == preset_dst->config) {
|
||||
// Don't save as the config exists in the current bundle and its content is the same.
|
||||
return preset_name_src;
|
||||
} else {
|
||||
// Generate a new unique name.
|
||||
preset_name_dst = preset_name_src + bundle_name;
|
||||
Preset *preset_dup = nullptr;
|
||||
for (size_t i = 1; (preset_dup = collection_dst.find_preset(preset_name_dst, false)) != nullptr; ++ i) {
|
||||
if (preset_src->config == preset_dup->config)
|
||||
// The preset has been already copied into collection_dst.
|
||||
return preset_name_dst;
|
||||
// Try to generate another name.
|
||||
char buf[64];
|
||||
sprintf(buf, " (%d)", (int)i);
|
||||
preset_name_dst = preset_name_src + buf + bundle_name;
|
||||
}
|
||||
}
|
||||
assert(! preset_name_dst.empty());
|
||||
// Save preset_src->config into collection_dst under preset_name_dst.
|
||||
// The "compatible_printers" field should not have been exported into a config.ini or a G-code anyway,
|
||||
// but some of the alpha versions of Slic3r did.
|
||||
ConfigOption *opt_compatible = preset_src->config.optptr("compatible_printers");
|
||||
if (opt_compatible != nullptr) {
|
||||
assert(opt_compatible->type() == coStrings);
|
||||
if (opt_compatible->type() == coStrings)
|
||||
static_cast<ConfigOptionStrings*>(opt_compatible)->values.clear();
|
||||
}
|
||||
(collection_dst.type() == Preset::TYPE_FILAMENT ?
|
||||
collection_dst.load_preset(path, preset_name_dst, preset_src->config, activate) :
|
||||
// Only move the source config for non filament profiles, as single filament profile may be referenced multiple times.
|
||||
collection_dst.load_preset(path, preset_name_dst, std::move(preset_src->config), activate))
|
||||
.is_external = true;
|
||||
return preset_name_dst;
|
||||
};
|
||||
load_one(this->prints, tmp_bundle.prints, tmp_bundle.prints .get_selected_preset_name(), true);
|
||||
load_one(this->sla_prints, tmp_bundle.sla_prints, tmp_bundle.sla_prints .get_selected_preset_name(), true);
|
||||
load_one(this->filaments, tmp_bundle.filaments, tmp_bundle.filaments .get_selected_preset_name(), true);
|
||||
load_one(this->sla_materials, tmp_bundle.sla_materials, tmp_bundle.sla_materials.get_selected_preset_name(), true);
|
||||
load_one(this->printers, tmp_bundle.printers, tmp_bundle.printers .get_selected_preset_name(), true);
|
||||
this->update_multi_material_filament_presets();
|
||||
for (size_t i = 1; i < std::min(tmp_bundle.filament_presets.size(), this->filament_presets.size()); ++ i)
|
||||
this->filament_presets[i] = load_one(this->filaments, tmp_bundle.filaments, tmp_bundle.filament_presets[i], false);
|
||||
|
||||
this->update_compatible(PresetSelectCompatibleType::Never);
|
||||
|
||||
sort_remove_duplicates(config_substitutions);
|
||||
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(": finished, got %1% substitutions")%config_substitutions.size();
|
||||
return config_substitutions;
|
||||
}*/
|
||||
|
||||
// Process the Config Bundle loaded as a Boost property tree.
|
||||
// For each print, filament and printer preset (group defined by group_name), apply the inherited presets.
|
||||
// The presets starting with '*' are considered non-terminal and they are
|
||||
// removed through the flattening process by this function.
|
||||
// This function will never fail, but it will produce error messages through boost::log.
|
||||
// system_profiles will not be flattened, and they will be kept inside the "inherits" field
|
||||
/*static void flatten_configbundle_hierarchy(boost::property_tree::ptree &tree, const std::string &group_name, const std::vector<std::string> &system_profiles)
|
||||
{
|
||||
namespace pt = boost::property_tree;
|
||||
|
||||
// 1) For the group given by group_name, initialize the presets.
|
||||
struct Prst {
|
||||
Prst(const std::string &name, pt::ptree *node) : name(name), node(node) {}
|
||||
// Name of this preset. If the name starts with '*', it is an intermediate preset,
|
||||
// which will not make it into the result.
|
||||
const std::string name;
|
||||
// Link to the source boost property tree node, owned by tree.
|
||||
pt::ptree *node;
|
||||
// Link to the presets, from which this preset inherits.
|
||||
std::vector<Prst*> inherits;
|
||||
// Link to the presets, for which this preset is a direct parent.
|
||||
std::vector<Prst*> parent_of;
|
||||
// When running the Kahn's Topological sorting algorithm, this counter is decreased from inherits.size() to zero.
|
||||
// A cycle is indicated, if the number does not drop to zero after the Kahn's algorithm finishes.
|
||||
size_t num_incoming_edges_left = 0;
|
||||
// Sorting by the name, to be used when inserted into std::set.
|
||||
bool operator==(const Prst &rhs) const { return this->name == rhs.name; }
|
||||
bool operator< (const Prst &rhs) const { return this->name < rhs.name; }
|
||||
};
|
||||
// Find the presets, store them into a std::map, addressed by their names.
|
||||
std::set<Prst> presets;
|
||||
std::string group_name_preset = group_name + ":";
|
||||
for (auto §ion : tree)
|
||||
if (boost::starts_with(section.first, group_name_preset) && section.first.size() > group_name_preset.size())
|
||||
presets.emplace(section.first.substr(group_name_preset.size()), §ion.second);
|
||||
// Fill in the "inherits" and "parent_of" members, report invalid inheritance fields.
|
||||
for (const Prst &prst : presets) {
|
||||
// Parse the list of comma separated values, possibly enclosed in quotes.
|
||||
std::vector<std::string> inherits_names;
|
||||
std::vector<std::string> inherits_system;
|
||||
if (Slic3r::unescape_strings_cstyle(prst.node->get<std::string>("inherits", ""), inherits_names)) {
|
||||
// Resolve the inheritance by name.
|
||||
std::vector<Prst*> &inherits_nodes = const_cast<Prst&>(prst).inherits;
|
||||
for (const std::string &node_name : inherits_names) {
|
||||
auto it_system = std::lower_bound(system_profiles.begin(), system_profiles.end(), node_name);
|
||||
if (it_system != system_profiles.end() && *it_system == node_name) {
|
||||
// Loading a user config budnle, this preset is derived from a system profile.
|
||||
inherits_system.emplace_back(node_name);
|
||||
} else {
|
||||
auto it = presets.find(Prst(node_name, nullptr));
|
||||
if (it == presets.end())
|
||||
BOOST_LOG_TRIVIAL(error) << "flatten_configbundle_hierarchy: The preset " << prst.name << " inherits an unknown preset \"" << node_name << "\"";
|
||||
else {
|
||||
inherits_nodes.emplace_back(const_cast<Prst*>(&(*it)));
|
||||
inherits_nodes.back()->parent_of.emplace_back(const_cast<Prst*>(&prst));
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(error) << "flatten_configbundle_hierarchy: The preset " << prst.name << " has an invalid \"inherits\" field";
|
||||
}
|
||||
// Remove the "inherits" key, it has no meaning outside of the config bundle.
|
||||
const_cast<pt::ptree*>(prst.node)->erase("inherits");
|
||||
if (! inherits_system.empty()) {
|
||||
// Loaded a user config bundle, where a profile inherits a system profile.
|
||||
// User profile should be derived from a single system profile only.
|
||||
assert(inherits_system.size() == 1);
|
||||
if (inherits_system.size() > 1)
|
||||
BOOST_LOG_TRIVIAL(error) << "flatten_configbundle_hierarchy: The preset " << prst.name << " inherits from more than single system preset";
|
||||
prst.node->put("inherits", Slic3r::escape_string_cstyle(inherits_system.front()));
|
||||
}
|
||||
}
|
||||
|
||||
// 2) Create a linear ordering for the directed acyclic graph of preset inheritance.
|
||||
// https://en.wikipedia.org/wiki/Topological_sorting
|
||||
// Kahn's algorithm.
|
||||
std::vector<Prst*> sorted;
|
||||
{
|
||||
// Initialize S with the set of all nodes with no incoming edge.
|
||||
std::deque<Prst*> S;
|
||||
for (const Prst &prst : presets)
|
||||
if (prst.inherits.empty())
|
||||
S.emplace_back(const_cast<Prst*>(&prst));
|
||||
else
|
||||
const_cast<Prst*>(&prst)->num_incoming_edges_left = prst.inherits.size();
|
||||
while (! S.empty()) {
|
||||
Prst *n = S.front();
|
||||
S.pop_front();
|
||||
sorted.emplace_back(n);
|
||||
for (Prst *m : n->parent_of) {
|
||||
assert(m->num_incoming_edges_left > 0);
|
||||
if (-- m->num_incoming_edges_left == 0) {
|
||||
// We have visited all parents of m.
|
||||
S.emplace_back(m);
|
||||
}
|
||||
}
|
||||
}
|
||||
if (sorted.size() < presets.size()) {
|
||||
for (const Prst &prst : presets)
|
||||
if (prst.num_incoming_edges_left)
|
||||
BOOST_LOG_TRIVIAL(error) << "flatten_configbundle_hierarchy: The preset " << prst.name << " has cyclic dependencies";
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the dependencies in their topological ordering.
|
||||
for (Prst *prst : sorted) {
|
||||
// Merge the preset nodes in their order of application.
|
||||
// Iterate in a reverse order, so the last change will be placed first in merged.
|
||||
for (auto it_inherits = prst->inherits.rbegin(); it_inherits != prst->inherits.rend(); ++ it_inherits)
|
||||
for (auto it = (*it_inherits)->node->begin(); it != (*it_inherits)->node->end(); ++ it)
|
||||
if (it->first == "renamed_from") {
|
||||
// Don't inherit "renamed_from" flag, it does not make sense. The "renamed_from" flag only makes sense for a concrete preset.
|
||||
if (boost::starts_with((*it_inherits)->name, "*"))
|
||||
BOOST_LOG_TRIVIAL(error) << boost::format("Nonpublic intermediate preset %1% contains a \"renamed_from\" field, which is ignored") % (*it_inherits)->name;
|
||||
} else if (prst->node->find(it->first) == prst->node->not_found())
|
||||
prst->node->add_child(it->first, it->second);
|
||||
}
|
||||
|
||||
// Remove the "internal" presets from the ptree. These presets are marked with '*'.
|
||||
group_name_preset += '*';
|
||||
for (auto it_section = tree.begin(); it_section != tree.end(); ) {
|
||||
if (boost::starts_with(it_section->first, group_name_preset) && it_section->first.size() > group_name_preset.size())
|
||||
// Remove the "internal" preset from the ptree.
|
||||
it_section = tree.erase(it_section);
|
||||
else
|
||||
// Keep the preset.
|
||||
++ it_section;
|
||||
}
|
||||
}*/
|
||||
|
||||
// preset_bundle is set when loading user config bundles, which must not overwrite the system profiles.
|
||||
/*static void flatten_configbundle_hierarchy(boost::property_tree::ptree &tree, const PresetBundle *preset_bundle)
|
||||
{
|
||||
flatten_configbundle_hierarchy(tree, "print", preset_bundle ? preset_bundle->prints.system_preset_names() : std::vector<std::string>());
|
||||
flatten_configbundle_hierarchy(tree, "filament", preset_bundle ? preset_bundle->filaments.system_preset_names() : std::vector<std::string>());
|
||||
flatten_configbundle_hierarchy(tree, "sla_print", preset_bundle ? preset_bundle->sla_prints.system_preset_names() : std::vector<std::string>());
|
||||
flatten_configbundle_hierarchy(tree, "sla_material", preset_bundle ? preset_bundle->sla_materials.system_preset_names() : std::vector<std::string>());
|
||||
flatten_configbundle_hierarchy(tree, "printer", preset_bundle ? preset_bundle->printers.system_preset_names() : std::vector<std::string>());
|
||||
}*/
|
||||
|
||||
// Load a config bundle file, into presets and store the loaded presets into separate files
|
||||
// of the local configuration directory.
|
||||
/*std::pair<PresetsConfigSubstitutions, size_t> PresetBundle::load_configbundle(
|
||||
const std::string &path, LoadConfigBundleAttributes flags, ForwardCompatibilitySubstitutionRule compatibility_rule)
|
||||
{
|
||||
// Enable substitutions for user config bundle, throw an exception when loading a system profile.
|
||||
ConfigSubstitutionContext substitution_context { compatibility_rule };
|
||||
PresetsConfigSubstitutions substitutions;
|
||||
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(" enter, path %1%, compatibility_rule %2%")%path.c_str()%compatibility_rule;
|
||||
if (flags.has(LoadConfigBundleAttribute::ResetUserProfile) || flags.has(LoadConfigBundleAttribute::LoadSystem))
|
||||
// Reset this bundle, delete user profile files if SaveImported.
|
||||
this->reset(flags.has(LoadConfigBundleAttribute::SaveImported));
|
||||
|
||||
// 1) Read the complete config file into a boost::property_tree.
|
||||
namespace pt = boost::property_tree;
|
||||
pt::ptree tree;
|
||||
boost::nowide::ifstream ifs(path);
|
||||
try {
|
||||
pt::read_ini(ifs, tree);
|
||||
} catch (const boost::property_tree::ini_parser::ini_parser_error &err) {
|
||||
throw Slic3r::RuntimeError(format("Failed loading config bundle \"%1%\"\nError: \"%2%\" at line %3%", path, err.message(), err.line()).c_str());
|
||||
}
|
||||
|
||||
const VendorProfile *vendor_profile = nullptr;
|
||||
if (flags.has(LoadConfigBundleAttribute::LoadSystem) || flags.has(LoadConfigBundleAttribute::LoadVendorOnly)) {
|
||||
auto vp = VendorProfile::from_ini(tree, path);
|
||||
if (vp.models.size() == 0) {
|
||||
BOOST_LOG_TRIVIAL(error) << boost::format("Vendor bundle: `%1%`: No printer model defined.") % path;
|
||||
return std::make_pair(PresetsConfigSubstitutions{}, 0);
|
||||
} else if (vp.num_variants() == 0) {
|
||||
BOOST_LOG_TRIVIAL(error) << boost::format("Vendor bundle: `%1%`: No printer variant defined") % path;
|
||||
return std::make_pair(PresetsConfigSubstitutions{}, 0);
|
||||
}
|
||||
vendor_profile = &this->vendors.insert({vp.id, vp}).first->second;
|
||||
}
|
||||
|
||||
//BBS: add config related logs
|
||||
if (vendor_profile)
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(", loaded vendor profile, name %1%, id %2%, version %3%")%vendor_profile->name%vendor_profile->id%vendor_profile->config_version.to_string();
|
||||
|
||||
if (flags.has(LoadConfigBundleAttribute::LoadVendorOnly))
|
||||
return std::make_pair(PresetsConfigSubstitutions{}, 0);
|
||||
|
||||
// 1.5) Flatten the config bundle by applying the inheritance rules. Internal profiles (with names starting with '*') are removed.
|
||||
// If loading a user config bundle, do not flatten with the system profiles, but keep the "inherits" flag intact.
|
||||
flatten_configbundle_hierarchy(tree, flags.has(LoadConfigBundleAttribute::LoadSystem) ? nullptr : this);
|
||||
|
||||
// 2) Parse the property_tree, extract the active preset names and the profiles, save them into local config files.
|
||||
// Parse the obsolete preset names, to be deleted when upgrading from the old configuration structure.
|
||||
std::vector<std::string> loaded_prints;
|
||||
std::vector<std::string> loaded_filaments;
|
||||
std::vector<std::string> loaded_sla_prints;
|
||||
std::vector<std::string> loaded_sla_materials;
|
||||
std::vector<std::string> loaded_printers;
|
||||
std::vector<std::string> loaded_physical_printers;
|
||||
std::string active_print;
|
||||
std::vector<std::string> active_filaments;
|
||||
std::string active_sla_print;
|
||||
std::string active_sla_material;
|
||||
std::string active_printer;
|
||||
std::string active_physical_printer;
|
||||
size_t presets_loaded = 0;
|
||||
size_t ph_printers_loaded = 0;
|
||||
|
||||
for (const auto §ion : tree) {
|
||||
PresetCollection *presets = nullptr;
|
||||
std::string preset_name;
|
||||
PhysicalPrinterCollection *ph_printers = nullptr;
|
||||
std::string ph_printer_name;
|
||||
if (boost::starts_with(section.first, "print:")) {
|
||||
presets = &this->prints;
|
||||
preset_name = section.first.substr(6);
|
||||
} else if (boost::starts_with(section.first, "filament:")) {
|
||||
presets = &this->filaments;
|
||||
preset_name = section.first.substr(9);
|
||||
} else if (boost::starts_with(section.first, "sla_print:")) {
|
||||
presets = &this->sla_prints;
|
||||
preset_name = section.first.substr(10);
|
||||
} else if (boost::starts_with(section.first, "sla_material:")) {
|
||||
presets = &this->sla_materials;
|
||||
preset_name = section.first.substr(13);
|
||||
} else if (boost::starts_with(section.first, "printer:")) {
|
||||
presets = &this->printers;
|
||||
preset_name = section.first.substr(8);
|
||||
} else if (boost::starts_with(section.first, "physical_printer:")) {
|
||||
ph_printers = &this->physical_printers;
|
||||
ph_printer_name = section.first.substr(17);
|
||||
} else if (section.first == "presets") {
|
||||
// Load the names of the active presets.
|
||||
for (auto &kvp : section.second) {
|
||||
if (kvp.first == "print") {
|
||||
active_print = kvp.second.data();
|
||||
} else if (boost::starts_with(kvp.first, "filament")) {
|
||||
int idx = 0;
|
||||
if (kvp.first == "filament" || sscanf(kvp.first.c_str(), "filament_%d", &idx) == 1) {
|
||||
if (int(active_filaments.size()) <= idx)
|
||||
active_filaments.resize(idx + 1, std::string());
|
||||
active_filaments[idx] = kvp.second.data();
|
||||
}
|
||||
} else if (kvp.first == "sla_print") {
|
||||
active_sla_print = kvp.second.data();
|
||||
} else if (kvp.first == "sla_material") {
|
||||
active_sla_material = kvp.second.data();
|
||||
} else if (kvp.first == "printer") {
|
||||
active_printer = kvp.second.data();
|
||||
} else if (kvp.first == "physical_printer") {
|
||||
active_physical_printer = kvp.second.data();
|
||||
}
|
||||
}
|
||||
} else if (section.first == "obsolete_presets") {
|
||||
// Parse the names of obsolete presets. These presets will be deleted from user's
|
||||
// profile directory on installation of this vendor preset.
|
||||
for (auto &kvp : section.second) {
|
||||
std::vector<std::string> *dst = nullptr;
|
||||
if (kvp.first == "print")
|
||||
dst = &this->obsolete_presets.prints;
|
||||
else if (kvp.first == "filament")
|
||||
dst = &this->obsolete_presets.filaments;
|
||||
else if (kvp.first == "sla_print")
|
||||
dst = &this->obsolete_presets.sla_prints;
|
||||
else if (kvp.first == "sla_material")
|
||||
dst = &this->obsolete_presets.sla_materials;
|
||||
else if (kvp.first == "printer")
|
||||
dst = &this->obsolete_presets.printers;
|
||||
if (dst)
|
||||
unescape_strings_cstyle(kvp.second.data(), *dst);
|
||||
}
|
||||
} else if (section.first == "settings") {
|
||||
#ifdef SUPPORT_AUTO_CENTER
|
||||
// Load the settings.
|
||||
for (auto &kvp : section.second) {
|
||||
if (kvp.first == "autocenter") {
|
||||
}
|
||||
}
|
||||
#endif
|
||||
} else
|
||||
// Ignore an unknown section.
|
||||
continue;
|
||||
if (presets != nullptr) {
|
||||
// Load the print, filament or printer preset.
|
||||
const DynamicPrintConfig *default_config = nullptr;
|
||||
DynamicPrintConfig config;
|
||||
std::string alias_name;
|
||||
std::vector<std::string> renamed_from;
|
||||
try {
|
||||
auto parse_config_section = [§ion, &alias_name, &renamed_from, &substitution_context, &path](DynamicPrintConfig &config) {
|
||||
substitution_context.substitutions.clear();
|
||||
for (auto &kvp : section.second) {
|
||||
if (kvp.first == "alias")
|
||||
alias_name = kvp.second.data();
|
||||
else if (kvp.first == "renamed_from") {
|
||||
if (! unescape_strings_cstyle(kvp.second.data(), renamed_from)) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The preset \"" <<
|
||||
section.first << "\" contains invalid \"renamed_from\" key, which is being ignored.";
|
||||
}
|
||||
}
|
||||
// Throws on parsing error. For system presets, no substituion is being done, but an exception is thrown.
|
||||
config.set_deserialize(kvp.first, kvp.second.data(), substitution_context);
|
||||
}
|
||||
};
|
||||
if (presets == &this->printers) {
|
||||
// Select the default config based on the printer_technology field extracted from kvp.
|
||||
DynamicPrintConfig config_src;
|
||||
parse_config_section(config_src);
|
||||
default_config = &presets->default_preset_for(config_src).config;
|
||||
config = *default_config;
|
||||
config.apply(config_src);
|
||||
} else {
|
||||
default_config = &presets->default_preset().config;
|
||||
config = *default_config;
|
||||
parse_config_section(config);
|
||||
}
|
||||
} catch (const ConfigurationError &e) {
|
||||
throw ConfigurationError(format("Invalid configuration bundle \"%1%\", section [%2%]: ", path, section.first) + e.what());
|
||||
}
|
||||
Preset::normalize(config);
|
||||
// Report configuration fields, which are misplaced into a wrong group.
|
||||
std::string incorrect_keys = Preset::remove_invalid_keys(config, *default_config);
|
||||
if (! incorrect_keys.empty())
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The printer preset \"" <<
|
||||
section.first << "\" contains the following incorrect keys: " << incorrect_keys << ", which were removed";
|
||||
if (flags.has(LoadConfigBundleAttribute::LoadSystem) && presets == &printers) {
|
||||
// Filter out printer presets, which are not mentioned in the vendor profile.
|
||||
// These presets are considered not installed.
|
||||
auto printer_model = config.opt_string("printer_model");
|
||||
if (printer_model.empty()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The printer preset \"" <<
|
||||
section.first << "\" defines no printer model, it will be ignored.";
|
||||
continue;
|
||||
}
|
||||
auto printer_variant = config.opt_string("printer_variant");
|
||||
if (printer_variant.empty()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The printer preset \"" <<
|
||||
section.first << "\" defines no printer variant, it will be ignored.";
|
||||
continue;
|
||||
}
|
||||
auto it_model = std::find_if(vendor_profile->models.cbegin(), vendor_profile->models.cend(),
|
||||
[&](const VendorProfile::PrinterModel &m) { return m.id == printer_model; }
|
||||
);
|
||||
if (it_model == vendor_profile->models.end()) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The printer preset \"" <<
|
||||
section.first << "\" defines invalid printer model \"" << printer_model << "\", it will be ignored.";
|
||||
continue;
|
||||
}
|
||||
auto it_variant = it_model->variant(printer_variant);
|
||||
if (it_variant == nullptr) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The printer preset \"" <<
|
||||
section.first << "\" defines invalid printer variant \"" << printer_variant << "\", it will be ignored.";
|
||||
continue;
|
||||
}
|
||||
const Preset *preset_existing = presets->find_preset(section.first, false);
|
||||
if (preset_existing != nullptr) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The printer preset \"" <<
|
||||
section.first << "\" has already been loaded from another Config Bundle.";
|
||||
continue;
|
||||
}
|
||||
} else if (! flags.has(LoadConfigBundleAttribute::LoadSystem)) {
|
||||
// This is a user config bundle.
|
||||
const Preset *existing = presets->find_preset(preset_name, false);
|
||||
if (existing != nullptr) {
|
||||
if (existing->is_system) {
|
||||
assert(existing->vendor != nullptr);
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a user provided Config Bundle \"" << path << "\": The " << presets->name() << " preset \"" <<
|
||||
existing->name << "\" is a system preset of vendor " << existing->vendor->name << " and it will be ignored.";
|
||||
continue;
|
||||
} else {
|
||||
assert(existing->vendor == nullptr);
|
||||
BOOST_LOG_TRIVIAL(trace) << "A " << presets->name() << " preset \"" << existing->name << "\" was overwritten with a preset from user Config Bundle \"" << path << "\"";
|
||||
}
|
||||
} else {
|
||||
BOOST_LOG_TRIVIAL(trace) << "A new " << presets->name() << " preset \"" << preset_name << "\" was imported from user Config Bundle \"" << path << "\"";
|
||||
}
|
||||
}
|
||||
// Decide a full path to this .ini file.
|
||||
auto file_name = boost::algorithm::iends_with(preset_name, ".json") ? preset_name : preset_name + ".json";
|
||||
//BBS: change directoties by design
|
||||
auto file_path = (boost::filesystem::path(data_dir()) /PRESET_SYSTEM_DIR/ presets->section_name() / file_name).make_preferred();
|
||||
// Load the preset into the list of presets, save it to disk.
|
||||
Preset &loaded = presets->load_preset(file_path.string(), preset_name, std::move(config), false);
|
||||
if (flags.has(LoadConfigBundleAttribute::SaveImported))
|
||||
loaded.save(nullptr);
|
||||
if (flags.has(LoadConfigBundleAttribute::LoadSystem)) {
|
||||
loaded.is_system = true;
|
||||
loaded.vendor = vendor_profile;
|
||||
}
|
||||
|
||||
// Derive the profile logical name aka alias from the preset name if the alias was not stated explicitely.
|
||||
if (alias_name.empty()) {
|
||||
size_t end_pos = preset_name.find_first_of("@");
|
||||
if (end_pos != std::string::npos) {
|
||||
alias_name = preset_name.substr(0, end_pos);
|
||||
if (renamed_from.empty())
|
||||
// Add the preset name with the '@' character removed into the "renamed_from" list.
|
||||
renamed_from.emplace_back(alias_name + preset_name.substr(end_pos + 1));
|
||||
boost::trim_right(alias_name);
|
||||
}
|
||||
}
|
||||
if (alias_name.empty())
|
||||
loaded.alias = preset_name;
|
||||
else
|
||||
loaded.alias = std::move(alias_name);
|
||||
loaded.renamed_from = std::move(renamed_from);
|
||||
if (! substitution_context.empty())
|
||||
substitutions.push_back({
|
||||
preset_name, presets->type(), PresetConfigSubstitutions::Source::ConfigBundle,
|
||||
std::string(), std::move(substitution_context.substitutions) });
|
||||
++ presets_loaded;
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(", got preset %1%, from %2%")%loaded.name %path;
|
||||
}
|
||||
|
||||
if (ph_printers != nullptr) {
|
||||
// Load the physical printer
|
||||
const DynamicPrintConfig& default_config = ph_printers->default_config();
|
||||
DynamicPrintConfig config = default_config;
|
||||
|
||||
substitution_context.substitutions.clear();
|
||||
try {
|
||||
for (auto& kvp : section.second)
|
||||
config.set_deserialize(kvp.first, kvp.second.data(), substitution_context);
|
||||
} catch (const ConfigurationError &e) {
|
||||
throw ConfigurationError(format("Invalid configuration bundle \"%1%\", section [%2%]: ", path, section.first) + e.what());
|
||||
}
|
||||
|
||||
// Report configuration fields, which are misplaced into a wrong group.
|
||||
std::string incorrect_keys = Preset::remove_invalid_keys(config, default_config);
|
||||
if (!incorrect_keys.empty())
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The physical printer \"" <<
|
||||
section.first << "\" contains the following incorrect keys: " << incorrect_keys << ", which were removed";
|
||||
|
||||
const PhysicalPrinter* ph_printer_existing = ph_printers->find_printer(ph_printer_name, false);
|
||||
if (ph_printer_existing != nullptr) {
|
||||
BOOST_LOG_TRIVIAL(error) << "Error in a Vendor Config Bundle \"" << path << "\": The physical printer \"" <<
|
||||
section.first << "\" has already been loaded from another Config Bundle.";
|
||||
continue;
|
||||
}
|
||||
|
||||
// Decide a full path to this .ini file.
|
||||
//BBS: change directoties by design
|
||||
auto file_name = boost::algorithm::iends_with(ph_printer_name, ".json") ? ph_printer_name : ph_printer_name + ".json";
|
||||
auto file_path = (boost::filesystem::path(data_dir())/PRESET_SYSTEM_DIR/"physical_printer" / file_name).make_preferred();
|
||||
// Load the preset into the list of presets, save it to disk.
|
||||
ph_printers->load_printer(file_path.string(), ph_printer_name, std::move(config), false, flags.has(LoadConfigBundleAttribute::SaveImported));
|
||||
if (! substitution_context.empty())
|
||||
substitutions.push_back({
|
||||
ph_printer_name, Preset::TYPE_PHYSICAL_PRINTER, PresetConfigSubstitutions::Source::ConfigBundle,
|
||||
std::string(), std::move(substitution_context.substitutions) });
|
||||
++ ph_printers_loaded;
|
||||
}
|
||||
}
|
||||
|
||||
// 3) Activate the presets and physical printer if any exists.
|
||||
if (! flags.has(LoadConfigBundleAttribute::LoadSystem)) {
|
||||
if (! active_print.empty())
|
||||
prints.select_preset_by_name(active_print, true);
|
||||
if (! active_sla_print.empty())
|
||||
sla_prints.select_preset_by_name(active_sla_print, true);
|
||||
if (! active_sla_material.empty())
|
||||
sla_materials.select_preset_by_name(active_sla_material, true);
|
||||
if (! active_printer.empty())
|
||||
printers.select_preset_by_name(active_printer, true);
|
||||
if (! active_physical_printer.empty())
|
||||
physical_printers.select_printer(active_physical_printer, active_printer);
|
||||
// Activate the first filament preset.
|
||||
if (! active_filaments.empty() && ! active_filaments.front().empty())
|
||||
filaments.select_preset_by_name(active_filaments.front(), true);
|
||||
this->update_multi_material_filament_presets();
|
||||
for (size_t i = 0; i < std::min(this->filament_presets.size(), active_filaments.size()); ++ i)
|
||||
this->filament_presets[i] = filaments.find_preset(active_filaments[i], true)->name;
|
||||
this->update_compatible(PresetSelectCompatibleType::Never);
|
||||
}
|
||||
|
||||
//BBS: add config related logs
|
||||
BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << boost::format(", finished, presets_loaded %1%, ph_printers_loaded %2%")%presets_loaded %ph_printers_loaded;
|
||||
return std::make_pair(std::move(substitutions), presets_loaded + ph_printers_loaded);
|
||||
}*/
|
||||
|
||||
//BBS: Load a config bundle file from json
|
||||
std::pair<PresetsConfigSubstitutions, size_t> PresetBundle::load_vendor_configs_from_json(
|
||||
const std::string &path, const std::string &vendor_name, LoadConfigBundleAttributes flags, ForwardCompatibilitySubstitutionRule compatibility_rule, const PresetBundle* base_bundle)
|
||||
|
@ -4002,179 +3336,6 @@ void PresetBundle::update_compatible(PresetSelectCompatibleType select_other_pri
|
|||
BOOST_LOG_TRIVIAL(info) << boost::format("update_compatibility for all presets exit");
|
||||
}
|
||||
|
||||
//BBS: add a API to dump current configbundle as default configbundle
|
||||
/*void PresetBundle::export_current_configbundle(const std::string &path)
|
||||
{
|
||||
boost::nowide::ofstream c;
|
||||
c.open(path, std::ios::out | std::ios::trunc);
|
||||
|
||||
c << "# generate the configbundle for BBL" << std::endl;
|
||||
|
||||
const Preset& print_selected_preset = this->prints.get_selected_preset();
|
||||
const Preset* system_print = NULL;
|
||||
const Preset& filament_selected_preset = this->filaments.get_selected_preset();
|
||||
const Preset* system_filament = NULL;
|
||||
const Preset& printer_selected_preset = this->printers.get_selected_preset();
|
||||
const Preset* system_printer = NULL;
|
||||
|
||||
// Export the print
|
||||
std::string print_bbl = "@BBL-3DP";
|
||||
size_t pos = print_selected_preset.name.find(print_bbl);
|
||||
if (std::string::npos != pos)
|
||||
{
|
||||
std::string system_print_name = print_selected_preset.name.substr(0, pos + print_bbl.size());
|
||||
system_print = this->prints.find_preset(system_print_name);
|
||||
if (system_print)
|
||||
{
|
||||
c << std::endl << "[" << this->prints.section_name() << ":" << system_print->name << "]" << std::endl;
|
||||
for (const std::string &opt_key : print_selected_preset.config.keys())
|
||||
{
|
||||
if (!opt_key.compare("inherits"))
|
||||
continue;
|
||||
const ConfigOption *option1 = system_print->config.option(opt_key);
|
||||
const ConfigOption *option2 = print_selected_preset.config.option(opt_key);
|
||||
if (option1 && option2 && (*option1 != *option2))
|
||||
c << opt_key << " = " << print_selected_preset.config.opt_serialize(opt_key) << std::endl;
|
||||
}
|
||||
c << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Export the filament
|
||||
std::string filament_bbl = "@BBL-3DP";
|
||||
pos = filament_selected_preset.name.find(filament_bbl);
|
||||
if (std::string::npos != pos)
|
||||
{
|
||||
std::string system_filamant_name = filament_selected_preset.name.substr(0, pos + filament_bbl.size());
|
||||
system_filament = this->filaments.find_preset(system_filamant_name);
|
||||
if (system_filament)
|
||||
{
|
||||
c << std::endl << "[" << this->filaments.section_name() << ":" << system_filament->name << "]" << std::endl;
|
||||
for (const std::string &opt_key : filament_selected_preset.config.keys())
|
||||
{
|
||||
if (!opt_key.compare("inherits"))
|
||||
continue;
|
||||
const ConfigOption *option1 = system_filament->config.option(opt_key);
|
||||
const ConfigOption *option2 = filament_selected_preset.config.option(opt_key);
|
||||
if (option1 && option2 && (*option1 != *option2))
|
||||
c << opt_key << " = " << filament_selected_preset.config.opt_serialize(opt_key) << std::endl;
|
||||
}
|
||||
c << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
// Export the printer
|
||||
std::string printer_bbl = "BBL-3DP-001";
|
||||
pos = printer_selected_preset.name.find(printer_bbl);
|
||||
if (std::string::npos != pos)
|
||||
{
|
||||
std::string system_printer_name = printer_selected_preset.name.substr(0, pos + printer_bbl.size());
|
||||
system_printer = this->printers.find_preset(system_printer_name);
|
||||
if (system_printer)
|
||||
{
|
||||
c << std::endl << "[" << this->printers.section_name() << ":" << system_printer->name << "]" << std::endl;
|
||||
for (const std::string &opt_key : printer_selected_preset.config.keys())
|
||||
{
|
||||
c << opt_key << " = " << printer_selected_preset.config.opt_serialize(opt_key) << std::endl;
|
||||
}
|
||||
c << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
c.close();
|
||||
}*/
|
||||
|
||||
|
||||
//void PresetBundle::export_configbundle(const std::string &path, bool export_system_settings, bool export_physical_printers/* = false*/)
|
||||
//{
|
||||
// boost::nowide::ofstream c;
|
||||
// c.open(path, std::ios::out | std::ios::trunc);
|
||||
//
|
||||
// // Put a comment at the first line including the time stamp and Slic3r version.
|
||||
// c << "# " << Slic3r::header_slic3r_generated() << std::endl;
|
||||
//
|
||||
// // Export the print, filament and printer profiles.
|
||||
//
|
||||
// for (const PresetCollection *presets : {
|
||||
// (const PresetCollection*)&this->prints, (const PresetCollection*)&this->filaments,
|
||||
// (const PresetCollection*)&this->sla_prints, (const PresetCollection*)&this->sla_materials,
|
||||
// (const PresetCollection*)&this->printers }) {
|
||||
// for (const Preset &preset : (*presets)()) {
|
||||
// //BBS: add project embedded preset logic and refine is_external
|
||||
// if (preset.is_default || preset.is_project_embedded || (preset.is_system && ! export_system_settings))
|
||||
// //if (preset.is_default || preset.is_external || (preset.is_system && ! export_system_settings))
|
||||
// // Only export the common presets, not external files or the default preset.
|
||||
// continue;
|
||||
// c << std::endl << "[" << presets->section_name() << ":" << preset.name << "]" << std::endl;
|
||||
// for (const std::string &opt_key : preset.config.keys())
|
||||
// c << opt_key << " = " << preset.config.opt_serialize(opt_key) << std::endl;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// if (export_physical_printers) {
|
||||
// for (const PhysicalPrinter& ph_printer : this->physical_printers) {
|
||||
// c << std::endl << "[physical_printer:" << ph_printer.name << "]" << std::endl;
|
||||
// for (const std::string& opt_key : ph_printer.config.keys())
|
||||
// c << opt_key << " = " << ph_printer.config.opt_serialize(opt_key) << std::endl;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // Export the names of the active presets.
|
||||
// c << std::endl << "[presets]" << std::endl;
|
||||
// c << "print = " << this->prints.get_selected_preset_name() << std::endl;
|
||||
// c << "sla_print = " << this->sla_prints.get_selected_preset_name() << std::endl;
|
||||
// c << "sla_material = " << this->sla_materials.get_selected_preset_name() << std::endl;
|
||||
// c << "printer = " << this->printers.get_selected_preset_name() << std::endl;
|
||||
// for (size_t i = 0; i < this->filament_presets.size(); ++ i) {
|
||||
// char suffix[64];
|
||||
// if (i > 0)
|
||||
// sprintf(suffix, "_%d", (int)i);
|
||||
// else
|
||||
// suffix[0] = 0;
|
||||
// c << "filament" << suffix << " = " << this->filament_presets[i] << std::endl;
|
||||
// }
|
||||
//
|
||||
// if (export_physical_printers && this->physical_printers.get_selected_idx() >= 0)
|
||||
// c << "physical_printer = " << this->physical_printers.get_selected_printer_name() << std::endl;
|
||||
//#if 0
|
||||
// // Export the following setting values from the provided setting repository.
|
||||
// static const char *settings_keys[] = { "autocenter" };
|
||||
// c << "[settings]" << std::endl;
|
||||
// for (size_t i = 0; i < sizeof(settings_keys) / sizeof(settings_keys[0]); ++ i)
|
||||
// c << settings_keys[i] << " = " << settings.serialize(settings_keys[i]) << std::endl;
|
||||
//#endif
|
||||
//
|
||||
// c.close();
|
||||
//}
|
||||
|
||||
//BBS: add export system preset functions
|
||||
/*void PresetBundle::export_system_configs(const std::string &path)
|
||||
{
|
||||
// Export the print, filament and printer profiles.
|
||||
for (const PresetCollection *presets : {
|
||||
(const PresetCollection*)&this->prints, (const PresetCollection*)&this->filaments,
|
||||
(const PresetCollection*)&this->sla_prints, (const PresetCollection*)&this->sla_materials,
|
||||
(const PresetCollection*)&this->printers }) {
|
||||
for (const Preset &preset : (*presets)()) {
|
||||
if (preset.is_system)
|
||||
{
|
||||
// Only export the system presets
|
||||
boost::nowide::ofstream c;
|
||||
std::string file_path = path + std::string("\\") + preset.name;
|
||||
|
||||
c.open(file_path, std::ios::out | std::ios::trunc);
|
||||
|
||||
// Put a comment at the first line including the time stamp and Slic3r version.
|
||||
c << "# " << Slic3r::header_slic3r_generated() << std::endl;
|
||||
//c << std::endl << "[" << presets->section_name() << ":" << preset.name << "]" << std::endl;
|
||||
for (const std::string &opt_key : preset.config.keys())
|
||||
c << opt_key << " = " << preset.config.opt_serialize(opt_key) << std::endl;
|
||||
|
||||
c.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
std::vector<std::string> PresetBundle::export_current_configs(const std::string & path,
|
||||
std::function<int(std::string const &)> override_confirm,
|
||||
|
|
|
@ -580,13 +580,6 @@ void GuideFrame::OnError(wxWebViewEvent &evt)
|
|||
|
||||
void GuideFrame::OnScriptResponseMessage(wxCommandEvent &WXUNUSED(evt))
|
||||
{
|
||||
// if (!m_response_js.empty())
|
||||
//{
|
||||
// RunScript(m_response_js);
|
||||
//}
|
||||
|
||||
// RunScript("This is a message to Web!");
|
||||
// RunScript("postMessage(\"AABBCCDD\");");
|
||||
}
|
||||
|
||||
bool GuideFrame::IsFirstUse()
|
||||
|
@ -602,24 +595,6 @@ bool GuideFrame::IsFirstUse()
|
|||
return true;
|
||||
}
|
||||
|
||||
/*int GuideFrame::CopyDir(const boost::filesystem::path &from_dir, const boost::filesystem::path &to_dir)
|
||||
{
|
||||
if (!boost::filesystem::is_directory(from_dir)) return -1;
|
||||
// i assume to_dir.parent surely exists
|
||||
if (!boost::filesystem::is_directory(to_dir)) boost::filesystem::create_directory(to_dir);
|
||||
for (auto &dir_entry : boost::filesystem::directory_iterator(from_dir)) {
|
||||
if (!boost::filesystem::is_directory(dir_entry.path())) {
|
||||
std::string em;
|
||||
CopyFileResult cfr = copy_file(dir_entry.path().string(), (to_dir / dir_entry.path().filename()).string(), em, false);
|
||||
if (cfr != SUCCESS) { BOOST_LOG_TRIVIAL(error) << "Error when copying files from " << from_dir << " to " << to_dir << ": " << em; }
|
||||
} else {
|
||||
CopyDir(dir_entry.path(), to_dir / dir_entry.path().filename());
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}*/
|
||||
|
||||
int GuideFrame::SaveProfile()
|
||||
{
|
||||
// SoftFever: don't collect info
|
||||
|
@ -637,77 +612,6 @@ int GuideFrame::SaveProfile()
|
|||
|
||||
m_MainPtr->app_config->save();
|
||||
|
||||
//Load BBS Conf
|
||||
/*wxString strConfPath = wxGetApp().app_config->config_path();
|
||||
json jCfg;
|
||||
std::ifstream(w2s(strConfPath)) >> jCfg;
|
||||
|
||||
//model
|
||||
jCfg["models"] = json::array();
|
||||
int nM = m_ProfileJson["model"].size();
|
||||
int nModelChoose = 0;
|
||||
for (int m = 0; m < nM; m++)
|
||||
{
|
||||
json amodel = m_ProfileJson["model"][m];
|
||||
|
||||
amodel["nozzle_diameter"] = amodel["nozzle_selected"];
|
||||
amodel.erase("nozzle_selected");
|
||||
amodel.erase("preview");
|
||||
amodel.erase("sub_path");
|
||||
amodel.erase("cover");
|
||||
amodel.erase("materials");
|
||||
|
||||
std::string ss = amodel["nozzle_diameter"];
|
||||
if (ss.compare("") != 0) {
|
||||
nModelChoose++;
|
||||
jCfg["models"].push_back(amodel);
|
||||
}
|
||||
}
|
||||
if (nModelChoose == 0)
|
||||
jCfg.erase("models");
|
||||
|
||||
if (nModelChoose > 0) {
|
||||
// filament
|
||||
jCfg["filaments"] = json::array();
|
||||
for (auto it = m_ProfileJson["filament"].begin(); it != m_ProfileJson["filament"].end(); ++it) {
|
||||
if (it.value()["selected"] == 1) { jCfg["filaments"].push_back(it.key()); }
|
||||
}
|
||||
|
||||
// Preset
|
||||
jCfg["presets"]["filaments"] = json::array();
|
||||
jCfg["presets"]["filaments"].push_back(jCfg["filaments"][0]);
|
||||
|
||||
std::string PresetMachine = m_ProfileJson["machine"][0]["name"];
|
||||
jCfg["presets"]["machine"] = PresetMachine;
|
||||
|
||||
int nTotal = m_ProfileJson["process"].size();
|
||||
int nSet = nTotal / 2;
|
||||
if (nSet > 0) nSet--;
|
||||
|
||||
std::string sMode = m_ProfileJson["process"][nSet]["name"];
|
||||
jCfg["presets"]["process"] = sMode;
|
||||
|
||||
} else {
|
||||
jCfg["presets"]["filaments"] = json::array();
|
||||
jCfg["presets"]["filaments"].push_back("Default Filament");
|
||||
|
||||
jCfg["presets"]["machine"] = "Default Printer";
|
||||
|
||||
jCfg["presets"]["process"] = "Default Setting";
|
||||
}
|
||||
|
||||
std::string sOut = jCfg.dump(4, ' ', false);
|
||||
|
||||
std::ofstream output_file(w2s(strConfPath));
|
||||
output_file << sOut;
|
||||
output_file.close();
|
||||
|
||||
//Copy Profiles
|
||||
if (bbl_bundle_rsrc)
|
||||
{
|
||||
CopyDir(rsrc_vendor_dir,vendor_dir);
|
||||
}*/
|
||||
|
||||
std::string strAll = m_ProfileJson.dump(-1, ' ', false, json::error_handler_t::ignore);
|
||||
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << "before save to app_config: "<< std::endl<<strAll;
|
||||
|
@ -1029,6 +933,8 @@ int GuideFrame::GetFilamentInfo( std::string VendorDirectory, json & pFilaList,
|
|||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " Before Format Inherits Path: VendorDirectory - " << VendorDirectory << ", sub_path - " << FPath;
|
||||
wxString strNewFile = wxString::Format("%s%c%s", wxString(VendorDirectory.c_str(), wxConvUTF8), boost::filesystem::path::preferred_separator, FPath);
|
||||
boost::filesystem::path inherits_path(w2s(strNewFile));
|
||||
if (!boost::filesystem::exists(inherits_path))
|
||||
inherits_path = (boost::filesystem::path(m_OrcaFilaLibPath) / boost::filesystem::path(FPath)).make_preferred();
|
||||
|
||||
//boost::filesystem::path nf(strNewFile.c_str());
|
||||
if (boost::filesystem::exists(inherits_path))
|
||||
|
@ -1096,8 +1002,10 @@ int GuideFrame::LoadProfile()
|
|||
auto filament_library_name = boost::filesystem::path(PresetBundle::ORCA_FILAMENT_LIBRARY).replace_extension(".json");
|
||||
if (boost::filesystem::exists(vendor_dir / filament_library_name)) {
|
||||
LoadProfileFamily(PresetBundle::ORCA_FILAMENT_LIBRARY, (vendor_dir / filament_library_name).string());
|
||||
m_OrcaFilaLibPath = (vendor_dir / PresetBundle::ORCA_FILAMENT_LIBRARY).string();
|
||||
} else {
|
||||
LoadProfileFamily(PresetBundle::ORCA_FILAMENT_LIBRARY, (rsrc_vendor_dir / filament_library_name).string());
|
||||
m_OrcaFilaLibPath = (rsrc_vendor_dir / PresetBundle::ORCA_FILAMENT_LIBRARY).string();
|
||||
}
|
||||
loaded_vendors.insert(PresetBundle::ORCA_FILAMENT_LIBRARY);
|
||||
|
||||
|
@ -1129,6 +1037,7 @@ int GuideFrame::LoadProfile()
|
|||
continue;
|
||||
|
||||
LoadProfileFamily(w2s(strVendor), iter->path().string());
|
||||
loaded_vendors.insert(w2s(strVendor));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1228,185 +1137,6 @@ void StringReplace(string &strBase, string strSrc, string strDes)
|
|||
}
|
||||
|
||||
|
||||
//int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath)
|
||||
//{
|
||||
// //wxString strFolder = strFilePath.BeforeLast(boost::filesystem::path::preferred_separator);
|
||||
// boost::filesystem::path file_path(strFilePath);
|
||||
// boost::filesystem::path vendor_dir = boost::filesystem::absolute(file_path.parent_path()/ strVendor).make_preferred();
|
||||
// BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", vendor path %1%.")% vendor_dir.string();
|
||||
// try {
|
||||
//
|
||||
// //wxLogMessage("GUIDE: json_path1 %s", w2s(strFilePath));
|
||||
//
|
||||
// std::string contents;
|
||||
// LoadFile(strFilePath, contents);
|
||||
// //wxLogMessage("GUIDE: json_path1 content: %s", contents);
|
||||
// json jLocal=json::parse(contents);
|
||||
// //wxLogMessage("GUIDE: json_path1 Loaded");
|
||||
//
|
||||
// // BBS:models
|
||||
// json pmodels = jLocal["machine_model_list"];
|
||||
// int nsize = pmodels.size();
|
||||
//
|
||||
// BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", got %1% machine models")%nsize;
|
||||
//
|
||||
// for (int n = 0; n < nsize; n++) {
|
||||
// json OneModel = pmodels.at(n);
|
||||
//
|
||||
// OneModel["model"] = OneModel["name"];
|
||||
// OneModel.erase("name");
|
||||
//
|
||||
// std::string s1 = OneModel["model"];
|
||||
// std::string s2 = OneModel["sub_path"];
|
||||
//
|
||||
// boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||
// std::string sub_file = sub_path.string();
|
||||
//
|
||||
// //wxLogMessage("GUIDE: json_path2 %s", w2s(ModelFilePath));
|
||||
// LoadFile(sub_file, contents);
|
||||
// //wxLogMessage("GUIDE: json_path2 content: %s", contents);
|
||||
// json pm=json::parse(contents);
|
||||
// //wxLogMessage("GUIDE: json_path2 loaded");
|
||||
//
|
||||
// OneModel["vendor"] = strVendor;
|
||||
// std::string NozzleOpt = pm["nozzle_diameter"];
|
||||
// StringReplace(NozzleOpt, " ", "");
|
||||
// OneModel["nozzle_diameter"] = NozzleOpt;
|
||||
// OneModel["materials"] = pm["default_materials"];
|
||||
//
|
||||
// //wxString strCoverPath = wxString::Format("%s\\%s\\%s_cover.png", strFolder, strVendor, std::string(s1.mb_str()));
|
||||
// std::string cover_file = s1+"_cover.png";
|
||||
// boost::filesystem::path cover_path = boost::filesystem::absolute(vendor_dir / cover_file).make_preferred();
|
||||
// OneModel["cover"] = cover_path.string();
|
||||
//
|
||||
// OneModel["nozzle_selected"] = "";
|
||||
//
|
||||
// m_ProfileJson["model"].push_back(OneModel);
|
||||
// }
|
||||
//
|
||||
// // BBS:Machine
|
||||
// json pmachine = jLocal["machine_list"];
|
||||
// nsize = pmachine.size();
|
||||
// BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", got %1% machines")%nsize;
|
||||
// for (int n = 0; n < nsize; n++) {
|
||||
// json OneMachine = pmachine.at(n);
|
||||
//
|
||||
// std::string s1 = OneMachine["name"];
|
||||
// std::string s2 = OneMachine["sub_path"];
|
||||
//
|
||||
// //wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
||||
// boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||
// std::string sub_file = sub_path.string();
|
||||
// LoadFile(sub_file, contents);
|
||||
// json pm = json::parse(contents);
|
||||
//
|
||||
// std::string strInstant = pm["instantiation"];
|
||||
// if (strInstant.compare("true") == 0) {
|
||||
// OneMachine["model"] = pm["printer_model"];
|
||||
//
|
||||
// m_ProfileJson["machine"].push_back(OneMachine);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// // BBS:Filament
|
||||
// json pFilament = jLocal["filament_list"];
|
||||
// nsize = pFilament.size();
|
||||
//
|
||||
// int nFalse = 0;
|
||||
// int nModel = 0;
|
||||
// int nFinish = 0;
|
||||
// BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", got %1% filaments")%nsize;
|
||||
// for (int n = 0; n < nsize; n++) {
|
||||
// json OneFF = pFilament.at(n);
|
||||
//
|
||||
// std::string s1 = OneFF["name"];
|
||||
// std::string s2 = OneFF["sub_path"];
|
||||
//
|
||||
// if (!m_ProfileJson["filament"].contains(s1))
|
||||
// {
|
||||
// //wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
||||
// boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||
// std::string sub_file = sub_path.string();
|
||||
// LoadFile(sub_file, contents);
|
||||
// json pm = json::parse(contents);
|
||||
//
|
||||
// std::string strInstant = pm["instantiation"];
|
||||
// if (strInstant == "true") {
|
||||
// std::string sV;
|
||||
// std::string sT;
|
||||
//
|
||||
// int nRet = GetFilamentInfo(sub_file, sV, sT);
|
||||
// if (nRet != 0) continue;
|
||||
//
|
||||
// OneFF["vendor"] = sV;
|
||||
// OneFF["type"] = sT;
|
||||
//
|
||||
// OneFF["models"] = "";
|
||||
// OneFF["selected"] = 0;
|
||||
// }
|
||||
// else
|
||||
// continue;
|
||||
//
|
||||
// } else {
|
||||
// OneFF = m_ProfileJson["filament"][s1];
|
||||
// }
|
||||
//
|
||||
// std::string vModel = "";
|
||||
// int nm = m_ProfileJson["model"].size();
|
||||
// int bFind = 0;
|
||||
// for (int m = 0; m < nm; m++) {
|
||||
// std::string strFF = m_ProfileJson["model"][m]["materials"];
|
||||
// strFF = (boost::format(";%1%;")%strFF).str();
|
||||
// std::string strTT = (boost::format(";%1%;")%s1).str();
|
||||
// if (strFF.find(strTT) != std::string::npos) {
|
||||
// std::string sModel = m_ProfileJson["model"][m]["model"];
|
||||
//
|
||||
// vModel = (boost::format("%1%[%2%]")%vModel %sModel).str();
|
||||
// bFind = 1;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// OneFF["models"] = vModel;
|
||||
//
|
||||
// m_ProfileJson["filament"][s1] = OneFF;
|
||||
// }
|
||||
//
|
||||
// //process
|
||||
// json pProcess = jLocal["process_list"];
|
||||
// nsize = pProcess.size();
|
||||
// BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(", got %1% processes")%nsize;
|
||||
// for (int n = 0; n < nsize; n++) {
|
||||
// json OneProcess = pProcess.at(n);
|
||||
//
|
||||
// std::string s2 = OneProcess["sub_path"];
|
||||
// //wxString ModelFilePath = wxString::Format("%s\\%s\\%s", strFolder, strVendor, s2);
|
||||
// boost::filesystem::path sub_path = boost::filesystem::absolute(vendor_dir / s2).make_preferred();
|
||||
// std::string sub_file = sub_path.string();
|
||||
// LoadFile(sub_file, contents);
|
||||
// json pm = json::parse(contents);
|
||||
//
|
||||
// std::string bInstall = pm["instantiation"];
|
||||
// if (bInstall == "true")
|
||||
// {
|
||||
// m_ProfileJson["process"].push_back(OneProcess);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
// catch(nlohmann::detail::parse_error &err) {
|
||||
// BOOST_LOG_TRIVIAL(error) << __FUNCTION__<< ": parse "<<strFilePath <<" got a nlohmann::detail::parse_error, reason = " << err.what();
|
||||
// return -1;
|
||||
// }
|
||||
// catch (std::exception &e) {
|
||||
// // wxMessageBox(e.what(), "", MB_OK);
|
||||
// //wxLogMessage("GUIDE: LoadFamily Error: %s", e.what());
|
||||
// BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": parse " << strFilePath << " got exception: " << e.what();
|
||||
// return -1;
|
||||
// }
|
||||
//
|
||||
// return 0;
|
||||
//}
|
||||
|
||||
int GuideFrame::LoadProfileFamily(std::string strVendor, std::string strFilePath)
|
||||
{
|
||||
// wxString strFolder = strFilePath.BeforeLast(boost::filesystem::path::preferred_separator);
|
||||
|
|
|
@ -116,6 +116,7 @@ private:
|
|||
bool network_plugin_ready {false};
|
||||
|
||||
json m_OrcaFilaList;
|
||||
std::string m_OrcaFilaLibPath;
|
||||
|
||||
#if wxUSE_WEBVIEW_IE
|
||||
wxMenuItem *m_script_object_el;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue