From fa7a11fa7fba2386b595ef5eadc6828b47de3fd8 Mon Sep 17 00:00:00 2001 From: Duan Gauche Date: Sun, 11 Aug 2024 17:03:02 +0200 Subject: [PATCH] Styrene Butadiene Styrene (SBS) - Template and profiles for Bambu (#6278) * Added SBS to filament_info.json * Added SBS to Print.cpp * added SBS to PrintConfig.cpp * Added SBS to BBL * Added SBS Template and also specified SBS as type in fdm_filament_sbs.json * Updated settings for SBS in filament_sbs_template.json * Applied SBS settings to fdm_filament_sbs.json * added settings to Generic SBS @base.json --------- Co-authored-by: Duan Gauche Co-authored-by: SoftFever --- resources/info/filament_info.json | 3 +- resources/profiles/BBL.json | 12 ++ .../BBL/filament/Generic SBS @base.json | 17 ++ .../profiles/BBL/filament/Generic SBS.json | 25 +++ .../BBL/filament/fdm_filament_sbs.json | 85 +++++++++ .../filament/filament_sbs_template.json | 168 ++++++++++++++++++ src/libslic3r/Print.cpp | 2 +- src/libslic3r/PrintConfig.cpp | 1 + 8 files changed, 311 insertions(+), 2 deletions(-) create mode 100644 resources/profiles/BBL/filament/Generic SBS @base.json create mode 100644 resources/profiles/BBL/filament/Generic SBS.json create mode 100644 resources/profiles/BBL/filament/fdm_filament_sbs.json create mode 100644 resources/profiles_template/Template/filament/filament_sbs_template.json diff --git a/resources/info/filament_info.json b/resources/info/filament_info.json index 8472e6646..158d78654 100644 --- a/resources/info/filament_info.json +++ b/resources/info/filament_info.json @@ -22,7 +22,8 @@ "PLA-CF", "PLA-AERO", "PVA", - "BVOH" + "BVOH", + "SBS" ], "high_low_compatible_filament":[ "HIPS", diff --git a/resources/profiles/BBL.json b/resources/profiles/BBL.json index 3cd51ed34..e37da6dc4 100644 --- a/resources/profiles/BBL.json +++ b/resources/profiles/BBL.json @@ -673,6 +673,10 @@ "name": "fdm_filament_bvoh", "sub_path": "filament/fdm_filament_bvoh.json" }, + { + "name": "fdm_filament_sbs", + "sub_path": "filament/fdm_filament_sbs.json" + }, { "name": "Bambu PLA Matte @base", "sub_path": "filament/Bambu PLA Matte @base.json" @@ -733,6 +737,10 @@ "name": "Generic PLA-CF @base", "sub_path": "filament/Generic PLA-CF @base.json" }, + { + "name": "Generic SBS @base", + "sub_path": "filament/Generic SBS @base.json" + }, { "name": "Bambu PLA-CF @base", "sub_path": "filament/Bambu PLA-CF @base.json" @@ -1389,6 +1397,10 @@ "name": "Generic PLA-CF @BBL A1", "sub_path": "filament/Generic PLA-CF @BBL A1.json" }, + { + "name": "Generic SBS", + "sub_path": "filament/Generic SBS.json" + }, { "name": "Bambu PLA-CF @BBL X1C 0.8 nozzle", "sub_path": "filament/Bambu PLA-CF @BBL X1C 0.8 nozzle.json" diff --git a/resources/profiles/BBL/filament/Generic SBS @base.json b/resources/profiles/BBL/filament/Generic SBS @base.json new file mode 100644 index 000000000..dffe34881 --- /dev/null +++ b/resources/profiles/BBL/filament/Generic SBS @base.json @@ -0,0 +1,17 @@ +{ + "type": "filament", + "name": "Generic SBS @base", + "inherits": "fdm_filament_sbs", + "from": "system", + "filament_id": "GFL99", + "instantiation": "false", + "filament_flow_ratio": [ + "0.98" + ], + "slow_down_layer_time": [ + "4" + ], + "filament_start_gcode": [ + "; filament start gcode\n{if (bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S255\n{elsif(bed_temperature[current_extruder] >35)||(bed_temperature_initial_layer[current_extruder] >35)}M106 P3 S180\n{endif};Prevent PLA from jamming\n\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" + ] +} \ No newline at end of file diff --git a/resources/profiles/BBL/filament/Generic SBS.json b/resources/profiles/BBL/filament/Generic SBS.json new file mode 100644 index 000000000..4309d0407 --- /dev/null +++ b/resources/profiles/BBL/filament/Generic SBS.json @@ -0,0 +1,25 @@ +{ + "type": "filament", + "name": "Generic SBS", + "inherits": "Generic SBS @base", + "from": "system", + "setting_id": "GFSL99", + "instantiation": "true", + "compatible_printers": [ + "Bambu Lab X1 Carbon 0.4 nozzle", + "Bambu Lab X1 0.4 nozzle", + "Bambu Lab X1 Carbon 0.6 nozzle", + "Bambu Lab X1 Carbon 0.8 nozzle", + "Bambu Lab X1 0.6 nozzle", + "Bambu Lab X1 0.8 nozzle", + "Bambu Lab P1S 0.4 nozzle", + "Bambu Lab P1S 0.6 nozzle", + "Bambu Lab P1S 0.8 nozzle", + "Bambu Lab X1E 0.4 nozzle", + "Bambu Lab X1E 0.6 nozzle", + "Bambu Lab X1E 0.8 nozzle" + ], + "filament_start_gcode": [ + "; filament start gcode\n{if (bed_temperature[current_extruder] >55)||(bed_temperature_initial_layer[current_extruder] >55)}M106 P3 S200\n{elsif(bed_temperature[current_extruder] >50)||(bed_temperature_initial_layer[current_extruder] >50)}M106 P3 S150\n{elsif(bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S50\n{endif}\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" + ] +} \ No newline at end of file diff --git a/resources/profiles/BBL/filament/fdm_filament_sbs.json b/resources/profiles/BBL/filament/fdm_filament_sbs.json new file mode 100644 index 000000000..c73ab5bb9 --- /dev/null +++ b/resources/profiles/BBL/filament/fdm_filament_sbs.json @@ -0,0 +1,85 @@ +{ + "type": "filament", + "name": "fdm_filament_sbs", + "inherits": "fdm_filament_common", + "from": "system", + "instantiation": "false", + "fan_cooling_layer_time": [ + "100" + ], + "filament_max_volumetric_speed": [ + "23" + ], + "filament_type": [ + "SBS" + ], + "filament_density": [ + "1.02" + ], + "filament_cost": [ + "15" + ], + "cool_plate_temp": [ + "70" + ], + "eng_plate_temp": [ + "70" + ], + "hot_plate_temp": [ + "70" + ], + "textured_plate_temp": [ + "70" + ], + "cool_plate_temp_initial_layer": [ + "70" + ], + "eng_plate_temp_initial_layer": [ + "70" + ], + "hot_plate_temp_initial_layer": [ + "70" + ], + "textured_plate_temp_initial_layer": [ + "70" + ], + "nozzle_temperature_initial_layer": [ + "235" + ], + "reduce_fan_stop_start_freq": [ + "0" + ], + "fan_min_speed": [ + "0" + ], + "overhang_fan_threshold": [ + "50%" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "nozzle_temperature": [ + "235" + ], + "temperature_vitrification": [ + "70" + ], + "nozzle_temperature_range_low": [ + "215" + ], + "nozzle_temperature_range_high": [ + "250" + ], + "slow_down_min_speed": [ + "20" + ], + "slow_down_layer_time": [ + "4" + ], + "additional_cooling_fan_speed": [ + "40" + ], + "filament_start_gcode": [ + "; filament start gcode\n{if (bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S255\n{elsif(bed_temperature[current_extruder] >35)||(bed_temperature_initial_layer[current_extruder] >35)}M106 P3 S180\n{endif}\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" + ] +} \ No newline at end of file diff --git a/resources/profiles_template/Template/filament/filament_sbs_template.json b/resources/profiles_template/Template/filament/filament_sbs_template.json new file mode 100644 index 000000000..2cc7bd22c --- /dev/null +++ b/resources/profiles_template/Template/filament/filament_sbs_template.json @@ -0,0 +1,168 @@ +{ + "type": "filament", + "name": "Generic SBS template", + "instantiation": "false", + "activate_air_filtration": [ + "0" + ], + "additional_cooling_fan_speed": [ + "40" + ], + "chamber_temperatures": [ + "0" + ], + "close_fan_the_first_x_layers": [ + "3" + ], + "complete_print_exhaust_fan_speed": [ + "70" + ], + "cool_plate_temp": [ + "70" + ], + "cool_plate_temp_initial_layer": [ + "70" + ], + "during_print_exhaust_fan_speed": [ + "70" + ], + "eng_plate_temp": [ + "70" + ], + "eng_plate_temp_initial_layer": [ + "70" + ], + "fan_cooling_layer_time": [ + "100" + ], + "fan_max_speed": [ + "40" + ], + "fan_min_speed": [ + "0" + ], + "filament_cost": [ + "15" + ], + "filament_density": [ + "1.02" + ], + "filament_deretraction_speed": [ + "nil" + ], + "filament_diameter": [ + "1.75" + ], + "filament_flow_ratio": [ + "0.98" + ], + "filament_is_support": [ + "0" + ], + "filament_max_volumetric_speed": [ + "23" + ], + "filament_minimal_purge_on_wipe_tower": [ + "15" + ], + "filament_retract_before_wipe": [ + "nil" + ], + "filament_retract_restart_extra": [ + "nil" + ], + "filament_retract_when_changing_layer": [ + "nil" + ], + "filament_retraction_length": [ + "nil" + ], + "filament_retraction_minimum_travel": [ + "nil" + ], + "filament_retraction_speed": [ + "nil" + ], + "filament_settings_id": [ + "" + ], + "filament_soluble": [ + "0" + ], + "filament_type": [ + "SBS" + ], + "filament_vendor": [ + "Generic" + ], + "filament_wipe": [ + "nil" + ], + "filament_wipe_distance": [ + "nil" + ], + "filament_z_hop": [ + "nil" + ], + "filament_z_hop_types": [ + "nil" + ], + "full_fan_speed_layer": [ + "0" + ], + "hot_plate_temp": [ + "5705" + ], + "hot_plate_temp_initial_layer": [ + "70" + ], + "nozzle_temperature": [ + "235" + ], + "nozzle_temperature_initial_layer": [ + "235" + ], + "nozzle_temperature_range_low": [ + "215" + ], + "nozzle_temperature_range_high": [ + "250" + ], + "overhang_fan_speed": [ + "100" + ], + "overhang_fan_threshold": [ + "50%" + ], + "reduce_fan_stop_start_freq": [ + "0" + ], + "required_nozzle_HRC": [ + "3" + ], + "slow_down_for_layer_cooling": [ + "1" + ], + "slow_down_layer_time": [ + "4" + ], + "slow_down_min_speed": [ + "20" + ], + "temperature_vitrification": [ + "70" + ], + "textured_plate_temp": [ + "70" + ], + "textured_plate_temp_initial_layer": [ + "70" + ], + "compatible_printers": [], + "filament_start_gcode": [ + "; filament start gcode\n{if (bed_temperature[current_extruder] >45)||(bed_temperature_initial_layer[current_extruder] >45)}M106 P3 S255\n{elsif(bed_temperature[current_extruder] >35)||(bed_temperature_initial_layer[current_extruder] >35)}M106 P3 S180\n{endif}\n\n{if activate_air_filtration[current_extruder] && support_air_filtration}\nM106 P3 S{during_print_exhaust_fan_speed_num[current_extruder]} \n{endif}" + ], + "filament_end_gcode": [ + "; filament end gcode \nM106 P3 S0\n" + ] +} \ No newline at end of file diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp index 702214eca..df7f01dbd 100644 --- a/src/libslic3r/Print.cpp +++ b/src/libslic3r/Print.cpp @@ -2463,7 +2463,7 @@ FilamentTempType Print::get_filament_temp_type(const std::string& filament_type) in.close(); BOOST_LOG_TRIVIAL(error) << __FUNCTION__ << ": parse " << file_path.string() << " got a nlohmann::detail::parse_error, reason = " << err.what(); filament_temp_type_map[HighTempFilamentStr] = {"ABS","ASA","PC","PA","PA-CF","PA-GF","PA6-CF","PET-CF","PPS","PPS-CF","PPA-GF","PPA-CF","ABS-Aero","ABS-GF"}; - filament_temp_type_map[LowTempFilamentStr] = {"PLA","TPU","PLA-CF","PLA-AERO","PVA","BVOH"}; + filament_temp_type_map[LowTempFilamentStr] = {"PLA","TPU","PLA-CF","PLA-AERO","PVA","BVOH","SBS"}; filament_temp_type_map[HighLowCompatibleFilamentStr] = { "HIPS","PETG","PCTG","PE","PP","EVA","PE-CF","PP-CF","PP-GF","PHA"}; } } diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index 773966804..0d2ba9569 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -2070,6 +2070,7 @@ void PrintConfigDef::init_fff_params() def->enum_values.push_back("PPS-CF"); def->enum_values.push_back("PVA"); def->enum_values.push_back("PVB"); + def->enum_values.push_back("SBS"); def->enum_values.push_back("TPU"); def->mode = comSimple; def->set_default_value(new ConfigOptionStrings { "PLA" });