Add Orca Filament Library

This commit is contained in:
SoftFever 2025-01-15 22:40:27 +08:00
parent 70579f9159
commit 727a3887c5
30 changed files with 1283 additions and 97 deletions

View file

@ -0,0 +1,84 @@
{
"name": "OrcaFilamentLibrary",
"version": "02.02.00.04",
"force_update": "0",
"description": "Orca Filament Library",
"filament_list": [
{
"name": "fdm_filament_common",
"sub_path": "filament/fdm_filament_common.json"
},
{
"name": "fdm_filament_pla",
"sub_path": "filament/fdm_filament_pla.json"
},
{
"name": "fdm_filament_tpu",
"sub_path": "filament/fdm_filament_tpu.json"
},
{
"name": "fdm_filament_pet",
"sub_path": "filament/fdm_filament_pet.json"
},
{
"name": "fdm_filament_abs",
"sub_path": "filament/fdm_filament_abs.json"
},
{
"name": "fdm_filament_pc",
"sub_path": "filament/fdm_filament_pc.json"
},
{
"name": "fdm_filament_asa",
"sub_path": "filament/fdm_filament_asa.json"
},
{
"name": "fdm_filament_pva",
"sub_path": "filament/fdm_filament_pva.json"
},
{
"name": "fdm_filament_pa",
"sub_path": "filament/fdm_filament_pa.json"
},
{
"name": "PLA",
"sub_path": "filament/PLA.json"
},
{
"name": "PLA-CF",
"sub_path": "filament/PLA-CF.json"
},
{
"name": "PETG",
"sub_path": "filament/PETG.json"
},
{
"name": "ABS",
"sub_path": "filament/ABS.json"
},
{
"name": "TPU",
"sub_path": "filament/TPU.json"
},
{
"name": "ASA",
"sub_path": "filament/ASA.json"
},
{
"name": "PC",
"sub_path": "filament/PC.json"
},
{
"name": "PVA",
"sub_path": "filament/PVA.json"
},
{
"name": "PA",
"sub_path": "filament/PA.json"
},
{
"name": "PA-CF",
"sub_path": "filament/PA-CF.json"
}
]
}

View file

@ -0,0 +1,17 @@
{
"type": "filament",
"filament_id": "GFB99",
"setting_id": "GFSA04",
"name": "ABS",
"from": "system",
"instantiation": "true",
"inherits": "fdm_filament_abs",
"filament_flow_ratio": [
"0.926"
],
"filament_max_volumetric_speed": [
"12"
],
"compatible_printers": [
]
}

View file

@ -0,0 +1,17 @@
{
"type": "filament",
"filament_id": "GFB98",
"setting_id": "GFSA04",
"name": "ASA",
"from": "system",
"instantiation": "true",
"inherits": "fdm_filament_asa",
"filament_flow_ratio": [
"0.93"
],
"filament_max_volumetric_speed": [
"12"
],
"compatible_printers": [
]
}

View file

@ -0,0 +1,23 @@
{
"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": [
]
}

View file

@ -0,0 +1,21 @@
{
"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": [
]
}

View file

@ -0,0 +1,18 @@
{
"type": "filament",
"filament_id": "GFC99",
"setting_id": "GFSA04",
"name": "PC",
"from": "system",
"instantiation": "true",
"inherits": "fdm_filament_pc",
"filament_max_volumetric_speed": [
"12"
],
"filament_flow_ratio": [
"0.94"
],
"compatible_printers": [
]
}

View file

@ -0,0 +1,48 @@
{
"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": [
]
}

View file

@ -0,0 +1,24 @@
{
"type": "filament",
"filament_id": "GFL98",
"setting_id": "GFSA04",
"name": "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": [
]
}

View file

@ -0,0 +1,20 @@
{
"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": [
]
}

View file

@ -0,0 +1,24 @@
{
"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": [
]
}

View file

@ -0,0 +1,15 @@
{
"type": "filament",
"filament_id": "GFU99",
"setting_id": "GFSA04",
"name": "TPU",
"from": "system",
"instantiation": "true",
"inherits": "fdm_filament_tpu",
"filament_max_volumetric_speed": [
"3.2"
],
"compatible_printers": [
]
}

View file

@ -0,0 +1,88 @@
{
"type": "filament",
"name": "fdm_filament_abs",
"from": "system",
"instantiation": "false",
"inherits": "fdm_filament_common",
"cool_plate_temp" : [
"105"
],
"eng_plate_temp" : [
"105"
],
"hot_plate_temp" : [
"105"
],
"textured_plate_temp" : [
"105"
],
"cool_plate_temp_initial_layer" : [
"105"
],
"eng_plate_temp_initial_layer" : [
"105"
],
"hot_plate_temp_initial_layer" : [
"105"
],
"textured_plate_temp_initial_layer" : [
"105"
],
"slow_down_for_layer_cooling": [
"1"
],
"close_fan_the_first_x_layers": [
"3"
],
"fan_cooling_layer_time": [
"30"
],
"filament_max_volumetric_speed": [
"28.6"
],
"filament_type": [
"ABS"
],
"filament_density": [
"1.04"
],
"filament_cost": [
"20"
],
"nozzle_temperature_initial_layer": [
"260"
],
"reduce_fan_stop_start_freq": [
"1"
],
"fan_max_speed": [
"80"
],
"fan_min_speed": [
"10"
],
"overhang_fan_threshold": [
"25%"
],
"overhang_fan_speed": [
"80"
],
"nozzle_temperature": [
"260"
],
"temperature_vitrification": [
"110"
],
"nozzle_temperature_range_low": [
"240"
],
"nozzle_temperature_range_high": [
"270"
],
"slow_down_min_speed": [
"10"
],
"slow_down_layer_time": [
"3"
]
}

View file

@ -0,0 +1,88 @@
{
"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"
]
}

View file

@ -0,0 +1,144 @@
{
"type": "filament",
"name": "fdm_filament_common",
"from": "system",
"instantiation": "false",
"cool_plate_temp" : [
"60"
],
"eng_plate_temp" : [
"60"
],
"hot_plate_temp" : [
"60"
],
"textured_plate_temp" : [
"60"
],
"cool_plate_temp_initial_layer" : [
"60"
],
"eng_plate_temp_initial_layer" : [
"60"
],
"hot_plate_temp_initial_layer" : [
"60"
],
"textured_plate_temp_initial_layer" : [
"60"
],
"overhang_fan_threshold": [
"95%"
],
"overhang_fan_speed": [
"100"
],
"slow_down_for_layer_cooling": [
"1"
],
"close_fan_the_first_x_layers": [
"3"
],
"filament_end_gcode": [
"; filament end gcode \n"
],
"filament_flow_ratio": [
"1"
],
"reduce_fan_stop_start_freq": [
"0"
],
"fan_cooling_layer_time": [
"60"
],
"filament_cost": [
"0"
],
"filament_density": [
"0"
],
"filament_deretraction_speed": [
"nil"
],
"filament_diameter": [
"1.75"
],
"filament_max_volumetric_speed": [
"0"
],
"filament_minimal_purge_on_wipe_tower": [
"15"
],
"filament_retraction_minimum_travel": [
"nil"
],
"filament_retract_before_wipe": [
"nil"
],
"filament_retract_when_changing_layer": [
"nil"
],
"filament_retraction_length": [
"nil"
],
"filament_z_hop": [
"nil"
],
"filament_z_hop_types": [
"nil"
],
"filament_retract_restart_extra": [
"nil"
],
"filament_retraction_speed": [
"nil"
],
"filament_settings_id": [
""
],
"filament_soluble": [
"0"
],
"filament_type": [
"PLA"
],
"filament_vendor": [
"OrcaSlicer"
],
"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"
]
}

View file

@ -0,0 +1,85 @@
{
"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"
]
}

View file

@ -0,0 +1,88 @@
{
"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"
]
}

View file

@ -0,0 +1,82 @@
{
"type": "filament",
"name": "fdm_filament_pet",
"from": "system",
"instantiation": "false",
"inherits": "fdm_filament_common",
"cool_plate_temp" : [
"60"
],
"eng_plate_temp" : [
"0"
],
"hot_plate_temp" : [
"80"
],
"textured_plate_temp" : [
"80"
],
"cool_plate_temp_initial_layer" : [
"60"
],
"eng_plate_temp_initial_layer" : [
"0"
],
"hot_plate_temp_initial_layer" : [
"80"
],
"textured_plate_temp_initial_layer" : [
"80"
],
"slow_down_for_layer_cooling": [
"1"
],
"close_fan_the_first_x_layers": [
"3"
],
"fan_cooling_layer_time": [
"20"
],
"filament_max_volumetric_speed": [
"25"
],
"filament_type": [
"PETG"
],
"filament_density": [
"1.27"
],
"filament_cost": [
"30"
],
"nozzle_temperature_initial_layer": [
"255"
],
"reduce_fan_stop_start_freq": [
"1"
],
"fan_max_speed": [
"100"
],
"fan_min_speed": [
"20"
],
"overhang_fan_speed": [
"100"
],
"nozzle_temperature": [
"255"
],
"temperature_vitrification": [
"80"
],
"nozzle_temperature_range_low": [
"220"
],
"nozzle_temperature_range_high": [
"260"
],
"filament_start_gcode": [
"; filament start gcode\n"
]
}

View file

@ -0,0 +1,94 @@
{
"type": "filament",
"name": "fdm_filament_pla",
"from": "system",
"instantiation": "false",
"inherits": "fdm_filament_common",
"fan_cooling_layer_time": [
"100"
],
"filament_max_volumetric_speed": [
"12"
],
"filament_type": [
"PLA"
],
"filament_density": [
"1.24"
],
"filament_cost": [
"20"
],
"cool_plate_temp" : [
"60"
],
"eng_plate_temp" : [
"60"
],
"hot_plate_temp" : [
"60"
],
"textured_plate_temp" : [
"60"
],
"cool_plate_temp_initial_layer" : [
"60"
],
"eng_plate_temp_initial_layer" : [
"60"
],
"hot_plate_temp_initial_layer" : [
"60"
],
"textured_plate_temp_initial_layer" : [
"60"
],
"nozzle_temperature_initial_layer": [
"220"
],
"reduce_fan_stop_start_freq": [
"1"
],
"slow_down_for_layer_cooling": [
"1"
],
"fan_max_speed": [
"100"
],
"fan_min_speed": [
"100"
],
"overhang_fan_speed": [
"100"
],
"overhang_fan_threshold": [
"50%"
],
"close_fan_the_first_x_layers": [
"1"
],
"nozzle_temperature": [
"220"
],
"temperature_vitrification": [
"60"
],
"nozzle_temperature_range_low": [
"190"
],
"nozzle_temperature_range_high": [
"230"
],
"slow_down_min_speed": [
"10"
],
"slow_down_layer_time": [
"4"
],
"additional_cooling_fan_speed": [
"70"
],
"filament_start_gcode": [
"; filament start gcode\n"
]
}

View file

@ -0,0 +1,100 @@
{
"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"
]
}

View file

@ -0,0 +1,88 @@
{
"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"
]
}

View file

@ -2,7 +2,7 @@
var m_ProfileItem; var m_ProfileItem;
var FilamentPriority=new Array( "pla","abs","pet","tpu","pc"); var FilamentPriority=new Array( "pla","abs","pet","tpu","pc");
var VendorPriority=new Array("bambu lab","bambulab","bbl","kexcelled","polymaker","esun","generic"); var VendorPriority=new Array("Orca Built-in","bambu lab","bambulab","bbl","kexcelled","polymaker","esun","Generic");
function OnInit() function OnInit()
{ {
@ -139,7 +139,7 @@ function SortUI()
if( fModel=='') if( fModel=='')
{ {
// Orca: hide // Orca: hide
bFind=false; bFind=true;
} }
else else
{ {

View file

@ -566,9 +566,10 @@ std::string Preset::label(bool no_alias) const
bool is_compatible_with_print(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_print, const PresetWithVendorProfile &active_printer) bool is_compatible_with_print(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_print, const PresetWithVendorProfile &active_printer)
{ {
if (preset.vendor != nullptr && preset.vendor != active_printer.vendor) // Orca: we allow cross vendor compatibility
// The current profile has a vendor assigned and it is different from the active print's vendor. // if (preset.vendor != nullptr && preset.vendor != active_printer.vendor)
return false; // // The current profile has a vendor assigned and it is different from the active print's vendor.
// return false;
auto &condition = preset.preset.compatible_prints_condition(); auto &condition = preset.preset.compatible_prints_condition();
auto *compatible_prints = dynamic_cast<const ConfigOptionStrings*>(preset.preset.config.option("compatible_prints")); auto *compatible_prints = dynamic_cast<const ConfigOptionStrings*>(preset.preset.config.option("compatible_prints"));
bool has_compatible_prints = compatible_prints != nullptr && ! compatible_prints->values.empty(); bool has_compatible_prints = compatible_prints != nullptr && ! compatible_prints->values.empty();
@ -603,9 +604,10 @@ bool is_compatible_with_parent_printer(const PresetWithVendorProfile& preset, co
bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_printer, const DynamicPrintConfig *extra_config) bool is_compatible_with_printer(const PresetWithVendorProfile &preset, const PresetWithVendorProfile &active_printer, const DynamicPrintConfig *extra_config)
{ {
if (preset.vendor != nullptr && preset.vendor != active_printer.vendor) // Orca: we allow cross vendor compatibility
// The current profile has a vendor assigned and it is different from the active print's vendor. // if (preset.vendor != nullptr && preset.vendor != active_printer.vendor)
return false; // // The current profile has a vendor assigned and it is different from the active print's vendor.
// return false;
auto &condition = preset.preset.compatible_printers_condition(); auto &condition = preset.preset.compatible_printers_condition();
auto *compatible_printers = dynamic_cast<const ConfigOptionStrings*>(preset.preset.config.option("compatible_printers")); auto *compatible_printers = dynamic_cast<const ConfigOptionStrings*>(preset.preset.config.option("compatible_printers"));
bool has_compatible_printers = compatible_printers != nullptr && ! compatible_printers->values.empty(); bool has_compatible_printers = compatible_printers != nullptr && ! compatible_printers->values.empty();

View file

@ -43,11 +43,12 @@ static std::vector<std::string> s_project_options {
"flush_multiplier", "flush_multiplier",
}; };
//BBS: add BBL as default //Orca: add custom as default
const char *PresetBundle::BBL_BUNDLE = "Custom"; const char *PresetBundle::ORCA_DEFAULT_BUNDLE = "Custom";
const char *PresetBundle::BBL_DEFAULT_PRINTER_MODEL = "MyKlipper 0.4 nozzle"; const char *PresetBundle::ORCA_DEFAULT_PRINTER_MODEL = "MyKlipper 0.4 nozzle";
const char *PresetBundle::BBL_DEFAULT_PRINTER_VARIANT = "0.4"; const char *PresetBundle::ORCA_DEFAULT_PRINTER_VARIANT = "0.4";
const char *PresetBundle::BBL_DEFAULT_FILAMENT = "My Generic PLA"; const char *PresetBundle::ORCA_DEFAULT_FILAMENT = "My Generic PLA";
const char *PresetBundle::ORCA_FILAMENT_LIBRARY = "OrcaFilamentLibrary";
PresetBundle::PresetBundle() PresetBundle::PresetBundle()
: prints(Preset::TYPE_PRINT, Preset::print_options(), static_cast<const PrintRegionConfig &>(FullPrintConfig::defaults())) : prints(Preset::TYPE_PRINT, Preset::print_options(), static_cast<const PrintRegionConfig &>(FullPrintConfig::defaults()))
@ -1094,7 +1095,7 @@ void PresetBundle::remove_users_preset(AppConfig &config, std::map<std::string,
} }
if (need_reset_printer_preset) { if (need_reset_printer_preset) {
std::string default_printer_model = BBL_DEFAULT_PRINTER_MODEL; std::string default_printer_model = ORCA_DEFAULT_PRINTER_MODEL;
std::string default_printer_name; std::string default_printer_name;
for (auto it = printers.begin(); it != printers.end(); it++) { for (auto it = printers.begin(); it != printers.end(); it++) {
if (it->config.has("printer_model")) { if (it->config.has("printer_model")) {
@ -1244,14 +1245,29 @@ std::pair<PresetsConfigSubstitutions, std::string> PresetBundle::load_system_pre
PresetsConfigSubstitutions substitutions; PresetsConfigSubstitutions substitutions;
std::string errors_cummulative; std::string errors_cummulative;
bool first = true; bool first = true;
for (auto &dir_entry : boost::filesystem::directory_iterator(dir)) std::vector<std::string> vendor_names;
{ // store all vendor names in vendor_names
for (auto& dir_entry : boost::filesystem::directory_iterator(dir)) {
std::string vendor_file = dir_entry.path().string(); std::string vendor_file = dir_entry.path().string();
if (Slic3r::is_json_file(vendor_file)) { if (!Slic3r::is_json_file(vendor_file))
continue;
std::string vendor_name = dir_entry.path().filename().string(); std::string vendor_name = dir_entry.path().filename().string();
// Remove the .json suffix. // Remove the .json suffix.
vendor_name.erase(vendor_name.size() - 5); vendor_name.erase(vendor_name.size() - 5);
vendor_names.push_back(vendor_name);
}
// Move ORCA_FILAMENT_LIBRARY to the beginning of the list
for (size_t i = 0; i < vendor_names.size(); ++ i) {
if (vendor_names[i] == ORCA_FILAMENT_LIBRARY) {
std::swap(vendor_names[0], vendor_names[i]);
break;
}
}
for (auto &vendor_name : vendor_names)
{
if (validation_mode && !vendor_to_validate.empty() && vendor_name != vendor_to_validate) if (validation_mode && !vendor_to_validate.empty() && vendor_name != vendor_to_validate)
continue; continue;
@ -1285,7 +1301,6 @@ std::pair<PresetsConfigSubstitutions, std::string> PresetBundle::load_system_pre
} }
} }
} }
}
if (first) { if (first) {
// No config bundle loaded, reset. // No config bundle loaded, reset.

View file

@ -261,11 +261,13 @@ public:
std::pair<PresetsConfigSubstitutions, std::string> load_system_filaments_json(ForwardCompatibilitySubstitutionRule compatibility_rule); std::pair<PresetsConfigSubstitutions, std::string> load_system_filaments_json(ForwardCompatibilitySubstitutionRule compatibility_rule);
VendorProfile get_custom_vendor_models() const; VendorProfile get_custom_vendor_models() const;
//BBS: add BBL as default //orca: add 'custom' as default
static const char *BBL_BUNDLE; static const char *ORCA_DEFAULT_BUNDLE;
static const char *BBL_DEFAULT_PRINTER_MODEL; static const char *ORCA_DEFAULT_PRINTER_MODEL;
static const char *BBL_DEFAULT_PRINTER_VARIANT; static const char *ORCA_DEFAULT_PRINTER_VARIANT;
static const char *BBL_DEFAULT_FILAMENT; static const char *ORCA_DEFAULT_FILAMENT;
static const char *ORCA_FILAMENT_LIBRARY;
static std::array<Preset::Type, 3> types_list(PrinterTechnology pt) { static std::array<Preset::Type, 3> types_list(PrinterTechnology pt) {
if (pt == ptFFF) if (pt == ptFFF)

View file

@ -123,18 +123,18 @@ BundleMap BundleMap::load()
const auto vendor_dir = (boost::filesystem::path(Slic3r::data_dir()) / PRESET_SYSTEM_DIR).make_preferred(); const auto vendor_dir = (boost::filesystem::path(Slic3r::data_dir()) / PRESET_SYSTEM_DIR).make_preferred();
const auto rsrc_vendor_dir = (boost::filesystem::path(resources_dir()) / "profiles").make_preferred(); const auto rsrc_vendor_dir = (boost::filesystem::path(resources_dir()) / "profiles").make_preferred();
//BBS: add BBL as default //Orca: add custom as default
//BBS: add json logic for vendor bundle //Orca: add json logic for vendor bundle
auto bbl_bundle_path = (vendor_dir / PresetBundle::BBL_BUNDLE).replace_extension(".json"); auto orca_bundle_path = (vendor_dir / PresetBundle::ORCA_DEFAULT_BUNDLE).replace_extension(".json");
auto bbl_bundle_rsrc = false; auto orca_bundle_rsrc = false;
if (!boost::filesystem::exists(bbl_bundle_path)) { if (!boost::filesystem::exists(orca_bundle_path)) {
bbl_bundle_path = (rsrc_vendor_dir / PresetBundle::BBL_BUNDLE).replace_extension(".json"); orca_bundle_path = (rsrc_vendor_dir / PresetBundle::ORCA_DEFAULT_BUNDLE).replace_extension(".json");
bbl_bundle_rsrc = true; orca_bundle_rsrc = true;
} }
{ {
Bundle bbl_bundle; Bundle bbl_bundle;
if (bbl_bundle.load(std::move(bbl_bundle_path), bbl_bundle_rsrc, true)) if (bbl_bundle.load(std::move(orca_bundle_path), orca_bundle_rsrc, true))
res.emplace(PresetBundle::BBL_BUNDLE, std::move(bbl_bundle)); res.emplace(PresetBundle::ORCA_DEFAULT_BUNDLE, std::move(bbl_bundle));
} }
// Load the other bundles in the datadir/vendor directory // Load the other bundles in the datadir/vendor directory
@ -163,10 +163,10 @@ BundleMap BundleMap::load()
Bundle& BundleMap::bbl_bundle() Bundle& BundleMap::bbl_bundle()
{ {
//BBS: add BBL as default //Orca: add custom as default
auto it = find(PresetBundle::BBL_BUNDLE); auto it = find(PresetBundle::ORCA_DEFAULT_BUNDLE);
if (it == end()) { if (it == end()) {
throw Slic3r::RuntimeError("ConfigWizard: Internal error in BundleMap: BBL_BUNDLE not loaded"); throw Slic3r::RuntimeError("ConfigWizard: Internal error in BundleMap: ORCA_DEFAULT_BUNDLE not loaded");
} }
return it->second; return it->second;
@ -625,12 +625,11 @@ std::set<std::string> PagePrinters::get_selected_models()
void PagePrinters::set_run_reason(ConfigWizard::RunReason run_reason) void PagePrinters::set_run_reason(ConfigWizard::RunReason run_reason)
{ {
//BBS: add BBL as default //Orca: add custom as default
if (is_primary_printer_page if (is_primary_printer_page
&& (run_reason == ConfigWizard::RR_DATA_EMPTY || run_reason == ConfigWizard::RR_DATA_LEGACY) && (run_reason == ConfigWizard::RR_DATA_EMPTY || run_reason == ConfigWizard::RR_DATA_LEGACY)
&& printer_pickers.size() > 0 && printer_pickers.size() > 0
&& printer_pickers[0]->vendor_id == PresetBundle::BBL_BUNDLE) { && printer_pickers[0]->vendor_id == PresetBundle::ORCA_DEFAULT_BUNDLE) {
//BBS: select alll bbs machine by default
//printer_pickers[0]->select_one(0, true); //printer_pickers[0]->select_one(0, true);
printer_pickers[0]->select_all(true); printer_pickers[0]->select_all(true);
} }
@ -1941,8 +1940,8 @@ void ConfigWizard::priv::create_3rdparty_pages()
{ {
for (const auto &pair : bundles) { for (const auto &pair : bundles) {
const VendorProfile *vendor = pair.second.vendor_profile; const VendorProfile *vendor = pair.second.vendor_profile;
//BBS: add BBL as default //Orca: add custom as default
if (vendor->id == PresetBundle::BBL_BUNDLE) { continue; } if (vendor->id == PresetBundle::ORCA_DEFAULT_BUNDLE) { continue; }
bool is_fff_technology = false; bool is_fff_technology = false;
bool is_sla_technology = false; bool is_sla_technology = false;

View file

@ -845,7 +845,7 @@ void GCodeViewer::init(ConfigOptionMode mode, PresetBundle* preset_bundle)
} }
if (filename.empty()) { if (filename.empty()) {
filename = preset_bundle->get_hotend_model_for_printer_model(PresetBundle::BBL_DEFAULT_PRINTER_MODEL); filename = preset_bundle->get_hotend_model_for_printer_model(PresetBundle::ORCA_DEFAULT_PRINTER_MODEL);
} }
} }
} }

View file

@ -4736,7 +4736,7 @@ void GUI_App::start_sync_user_preset(bool with_progress_dlg)
m_sync_update_thread = Slic3r::create_thread( m_sync_update_thread = Slic3r::create_thread(
[this, progressFn, cancelFn, finishFn, t = std::weak_ptr<int>(m_user_sync_token)] { [this, progressFn, cancelFn, finishFn, t = std::weak_ptr<int>(m_user_sync_token)] {
// get setting list, update setting list // get setting list, update setting list
std::string version = preset_bundle->get_vendor_profile_version(PresetBundle::BBL_BUNDLE).to_string(); std::string version = preset_bundle->get_vendor_profile_version(PresetBundle::ORCA_DEFAULT_BUNDLE).to_string();
int ret = m_agent->get_setting_list2(version, [this](auto info) { int ret = m_agent->get_setting_list2(version, [this](auto info) {
auto type = info[BBL_JSON_KEY_TYPE]; auto type = info[BBL_JSON_KEY_TYPE];
auto name = info[BBL_JSON_KEY_NAME]; auto name = info[BBL_JSON_KEY_NAME];

View file

@ -592,7 +592,7 @@ bool GuideFrame::IsFirstUse()
if (strVal == "1") if (strVal == "1")
return false; return false;
if (bbl_bundle_rsrc == true) if (orca_bundle_rsrc == true)
return true; return true;
return true; return true;
@ -881,11 +881,11 @@ bool GuideFrame::apply_config(AppConfig *app_config, PresetBundle *preset_bundle
variant.clear(); variant.clear();
return std::string(); return std::string();
}; };
// Prusa printers are considered first, then 3rd party. // Orca "custom" printers are considered first, then 3rd party.
if (preferred_model = get_preferred_printer_model(PresetBundle::BBL_BUNDLE, preferred_variant); if (preferred_model = get_preferred_printer_model(PresetBundle::ORCA_DEFAULT_BUNDLE, preferred_variant);
preferred_model.empty()) { preferred_model.empty()) {
for (const auto& bundle : enabled_vendors) { for (const auto& bundle : enabled_vendors) {
if (bundle.first == PresetBundle::BBL_BUNDLE) { continue; } if (bundle.first == PresetBundle::ORCA_DEFAULT_BUNDLE) { continue; }
if (preferred_model = get_preferred_printer_model(bundle.first, preferred_variant); if (preferred_model = get_preferred_printer_model(bundle.first, preferred_variant);
!preferred_model.empty()) !preferred_model.empty())
break; break;
@ -962,10 +962,10 @@ bool GuideFrame::run()
//we install the default here //we install the default here
bool apply_keeped_changes = false; bool apply_keeped_changes = false;
//clear filament section and use default materials //clear filament section and use default materials
app.app_config->set_variant(PresetBundle::BBL_BUNDLE, app.app_config->set_variant(PresetBundle::ORCA_DEFAULT_BUNDLE,
PresetBundle::BBL_DEFAULT_PRINTER_MODEL, PresetBundle::BBL_DEFAULT_PRINTER_VARIANT, "true"); PresetBundle::ORCA_DEFAULT_PRINTER_MODEL, PresetBundle::ORCA_DEFAULT_PRINTER_VARIANT, "true");
app.app_config->clear_section(AppConfig::SECTION_FILAMENTS); app.app_config->clear_section(AppConfig::SECTION_FILAMENTS);
app.preset_bundle->load_selections(*app.app_config, {PresetBundle::BBL_DEFAULT_PRINTER_MODEL, PresetBundle::BBL_DEFAULT_PRINTER_VARIANT, PresetBundle::BBL_DEFAULT_FILAMENT, std::string()}); app.preset_bundle->load_selections(*app.app_config, {PresetBundle::ORCA_DEFAULT_PRINTER_MODEL, PresetBundle::ORCA_DEFAULT_PRINTER_VARIANT, PresetBundle::ORCA_DEFAULT_FILAMENT, std::string()});
app.app_config->set_legacy_datadir(false); app.app_config->set_legacy_datadir(false);
app.update_mode(); app.update_mode();
@ -1099,13 +1099,13 @@ int GuideFrame::LoadProfile()
vendor_dir = (boost::filesystem::path(Slic3r::data_dir()) / PRESET_SYSTEM_DIR ).make_preferred(); vendor_dir = (boost::filesystem::path(Slic3r::data_dir()) / PRESET_SYSTEM_DIR ).make_preferred();
rsrc_vendor_dir = (boost::filesystem::path(resources_dir()) / "profiles").make_preferred(); rsrc_vendor_dir = (boost::filesystem::path(resources_dir()) / "profiles").make_preferred();
// BBS: add BBL as default // Orca: add custom as default
// BBS: add json logic for vendor bundle // Orca: add json logic for vendor bundle
auto bbl_bundle_path = vendor_dir; auto orca_custom_bundle_path = vendor_dir;
bbl_bundle_rsrc = false; orca_bundle_rsrc = false;
if (!boost::filesystem::exists((vendor_dir / PresetBundle::BBL_BUNDLE).replace_extension(".json"))) { if (!boost::filesystem::exists((vendor_dir / PresetBundle::ORCA_DEFAULT_BUNDLE).replace_extension(".json"))) {
bbl_bundle_path = rsrc_vendor_dir; orca_custom_bundle_path = rsrc_vendor_dir;
bbl_bundle_rsrc = true; orca_bundle_rsrc = true;
} }
// intptr_t handle; // intptr_t handle;
@ -1126,8 +1126,8 @@ int GuideFrame::LoadProfile()
//} while (_findnext(handle, &findData) == 0); // ??????????? //} while (_findnext(handle, &findData) == 0); // ???????????
//load BBL bundle from user data path //load custom bundle from user data path
string targetPath = bbl_bundle_path.make_preferred().string(); string targetPath = orca_custom_bundle_path.make_preferred().string();
boost::filesystem::path myPath(targetPath); boost::filesystem::path myPath(targetPath);
boost::filesystem::directory_iterator endIter; boost::filesystem::directory_iterator endIter;
for (boost::filesystem::directory_iterator iter(myPath); iter != endIter; iter++) { for (boost::filesystem::directory_iterator iter(myPath); iter != endIter; iter++) {
@ -1143,7 +1143,7 @@ int GuideFrame::LoadProfile()
strVendor = strVendor.AfterLast('/'); strVendor = strVendor.AfterLast('/');
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower(); wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
if (w2s(strVendor) == PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json") == 0) if ((w2s(strVendor) == PresetBundle::ORCA_DEFAULT_BUNDLE || w2s(strVendor) == PresetBundle::ORCA_FILAMENT_LIBRARY) && strExtension.CmpNoCase("json") == 0)
LoadProfileFamily(w2s(strVendor), iter->path().string()); LoadProfileFamily(w2s(strVendor), iter->path().string());
} }
} }
@ -1162,13 +1162,13 @@ int GuideFrame::LoadProfile()
strVendor = strVendor.AfterLast('/'); strVendor = strVendor.AfterLast('/');
wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower(); wxString strExtension = from_u8(iter->path().string()).AfterLast('.').Lower();
if (w2s(strVendor) != PresetBundle::BBL_BUNDLE && strExtension.CmpNoCase("json")==0) if (w2s(strVendor) != PresetBundle::ORCA_DEFAULT_BUNDLE && w2s(strVendor) != PresetBundle::ORCA_FILAMENT_LIBRARY && strExtension.CmpNoCase("json")==0)
LoadProfileFamily(w2s(strVendor), iter->path().string()); LoadProfileFamily(w2s(strVendor), iter->path().string());
} }
} }
//LoadProfileFamily(PresetBundle::BBL_BUNDLE, bbl_bundle_path.string()); //LoadProfileFamily(PresetBundle::ORCA_DEFAULT_BUNDLE, bbl_bundle_path.string());
const auto enabled_filaments = wxGetApp().app_config->has_section(AppConfig::SECTION_FILAMENTS) ? wxGetApp().app_config->get_section(AppConfig::SECTION_FILAMENTS) : std::map<std::string, std::string>(); const auto enabled_filaments = wxGetApp().app_config->has_section(AppConfig::SECTION_FILAMENTS) ? wxGetApp().app_config->get_section(AppConfig::SECTION_FILAMENTS) : std::map<std::string, std::string>();
m_appconfig_new.set_vendors(*wxGetApp().app_config); m_appconfig_new.set_vendors(*wxGetApp().app_config);

View file

@ -103,7 +103,7 @@ private:
wxString m_SectionName; wxString m_SectionName;
bool bbl_bundle_rsrc; bool orca_bundle_rsrc;
boost::filesystem::path vendor_dir; boost::filesystem::path vendor_dir;
boost::filesystem::path rsrc_vendor_dir; boost::filesystem::path rsrc_vendor_dir;

View file

@ -1071,8 +1071,7 @@ bool PresetUpdater::priv::install_bundles_rsrc(std::vector<std::string> bundles,
} }
//BBS: refine preset update logic // Orca: copy/update the vendor profiles from resource to system folder
// Install indicies from resources. Only installs those that are either missing or older than in resources.
void PresetUpdater::priv::check_installed_vendor_profiles() const void PresetUpdater::priv::check_installed_vendor_profiles() const
{ {
BOOST_LOG_TRIVIAL(info) << "[Orca Updater]:Checking whether the profile from resource is newer"; BOOST_LOG_TRIVIAL(info) << "[Orca Updater]:Checking whether the profile from resource is newer";
@ -1080,8 +1079,9 @@ void PresetUpdater::priv::check_installed_vendor_profiles() const
AppConfig *app_config = GUI::wxGetApp().app_config; AppConfig *app_config = GUI::wxGetApp().app_config;
const auto enabled_vendors = app_config->vendors(); const auto enabled_vendors = app_config->vendors();
//BBS: refine the init check logic
std::vector<std::string> bundles; std::vector<std::string> bundles;
// Orca: always install filament library
bundles.push_back(PresetBundle::ORCA_FILAMENT_LIBRARY);
for (auto &dir_entry : boost::filesystem::directory_iterator(rsrc_path)) { for (auto &dir_entry : boost::filesystem::directory_iterator(rsrc_path)) {
const auto &path = dir_entry.path(); const auto &path = dir_entry.path();
std::string file_path = path.string(); std::string file_path = path.string();
@ -1111,11 +1111,11 @@ void PresetUpdater::priv::check_installed_vendor_profiles() const
fs::remove_all(path_of_vendor); fs::remove_all(path_of_vendor);
} }
} }
else if ((vendor_name == PresetBundle::BBL_BUNDLE) || (enabled_vendors.find(vendor_name) != enabled_vendors.end())) {//if vendor has no file, copy it from resource for BBL else if ((vendor_name == PresetBundle::ORCA_DEFAULT_BUNDLE) || (enabled_vendors.find(vendor_name) != enabled_vendors.end())) {//if vendor has no file, copy it from resource for ORCA_DEFAULT_BUNDLE
bundles.push_back(vendor_name); bundles.push_back(vendor_name);
} }
} }
else if ((vendor_name == PresetBundle::BBL_BUNDLE) || (enabled_vendors.find(vendor_name) != enabled_vendors.end())) { //always update configs from resource to vendor for BBL else if ((vendor_name == PresetBundle::ORCA_DEFAULT_BUNDLE) || (enabled_vendors.find(vendor_name) != enabled_vendors.end())) { //always update configs from resource to vendor for ORCA_DEFAULT_BUNDLE
bundles.push_back(vendor_name); bundles.push_back(vendor_name);
} }
} }