diff --git a/resources/profiles/BBL.json b/resources/profiles/BBL.json index 5888a97c2..a50d00a13 100644 --- a/resources/profiles/BBL.json +++ b/resources/profiles/BBL.json @@ -1,7 +1,7 @@ { "name": "Bambulab", "url": "http://www.bambulab.com/Parameters/vendor/BBL.json", - "version": "01.01.01.03", + "version": "01.01.01.04", "force_update": "0", "description": "the initial version of BBL configurations", "machine_model_list": [ diff --git a/resources/profiles/BBL/filament/Bambu ABS @base.json b/resources/profiles/BBL/filament/Bambu ABS @base.json index 165b1e676..f32991617 100644 --- a/resources/profiles/BBL/filament/Bambu ABS @base.json +++ b/resources/profiles/BBL/filament/Bambu ABS @base.json @@ -8,6 +8,9 @@ "filament_flow_ratio": [ "0.95" ], + "filament_cost": [ + "24.99" + ], "filament_vendor": [ "Bambu Lab" ] diff --git a/resources/profiles/BBL/filament/Bambu PA-CF @base.json b/resources/profiles/BBL/filament/Bambu PA-CF @base.json index a9b6f1687..f4be03cdc 100644 --- a/resources/profiles/BBL/filament/Bambu PA-CF @base.json +++ b/resources/profiles/BBL/filament/Bambu PA-CF @base.json @@ -20,6 +20,9 @@ "filament_type": [ "PA-CF" ], + "filament_cost": [ + "44.99" + ], "nozzle_temperature": [ "280" ] diff --git a/resources/profiles/BBL/filament/Bambu PC @base.json b/resources/profiles/BBL/filament/Bambu PC @base.json index 5a507a2b4..c8f76b80a 100644 --- a/resources/profiles/BBL/filament/Bambu PC @base.json +++ b/resources/profiles/BBL/filament/Bambu PC @base.json @@ -8,6 +8,9 @@ "filament_vendor": [ "Bambu Lab" ], + "filament_cost": [ + "34.99" + ], "filament_flow_ratio": [ "0.94" ] diff --git a/resources/profiles/BBL/filament/Bambu PLA Basic @base.json b/resources/profiles/BBL/filament/Bambu PLA Basic @base.json index d450ad432..5f936cec7 100644 --- a/resources/profiles/BBL/filament/Bambu PLA Basic @base.json +++ b/resources/profiles/BBL/filament/Bambu PLA Basic @base.json @@ -9,7 +9,7 @@ "Bambu Lab" ], "filament_cost": [ - "25.4" + "24.99" ], "filament_flow_ratio": [ "0.98" diff --git a/resources/profiles/BBL/filament/Bambu PLA Matte @base.json b/resources/profiles/BBL/filament/Bambu PLA Matte @base.json index b6001992d..af1d3e1f2 100644 --- a/resources/profiles/BBL/filament/Bambu PLA Matte @base.json +++ b/resources/profiles/BBL/filament/Bambu PLA Matte @base.json @@ -9,7 +9,7 @@ "Bambu Lab" ], "filament_cost": [ - "25.4" + "24.99" ], "filament_density": [ "1.32" diff --git a/resources/profiles/BBL/filament/Bambu Support G @base.json b/resources/profiles/BBL/filament/Bambu Support G @base.json index f9d1637e3..21d303dba 100644 --- a/resources/profiles/BBL/filament/Bambu Support G @base.json +++ b/resources/profiles/BBL/filament/Bambu Support G @base.json @@ -23,6 +23,9 @@ "fan_cooling_layer_time": [ "10" ], + "filament_cost": [ + "34.99" + ], "slow_down_layer_time":[ "6" ] diff --git a/resources/profiles/BBL/filament/Bambu Support W @base.json b/resources/profiles/BBL/filament/Bambu Support W @base.json index 62ca84914..6dce96695 100644 --- a/resources/profiles/BBL/filament/Bambu Support W @base.json +++ b/resources/profiles/BBL/filament/Bambu Support W @base.json @@ -26,6 +26,9 @@ "hot_plate_temp_initial_layer": [ "40" ], + "filament_cost": [ + "29.99" + ], "slow_down_layer_time": [ "8" ] diff --git a/resources/profiles/BBL/filament/Bambu TPU 95A @base.json b/resources/profiles/BBL/filament/Bambu TPU 95A @base.json index 8006c0adc..58e83618c 100644 --- a/resources/profiles/BBL/filament/Bambu TPU 95A @base.json +++ b/resources/profiles/BBL/filament/Bambu TPU 95A @base.json @@ -14,6 +14,9 @@ "nozzle_temperature_initial_layer": [ "230" ], + "filament_cost": [ + "36.99" + ], "nozzle_temperature": [ "230" ] diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp index d8ec391d2..f0bc8d79a 100644 --- a/src/libslic3r/PrintConfig.cpp +++ b/src/libslic3r/PrintConfig.cpp @@ -990,7 +990,7 @@ void PrintConfigDef::init_fff_params() def->tooltip = L("Filament price. For statistics only"); def->sidetext = L("money/kg"); def->min = 0; - def->mode = comDevelop; + def->mode = comAdvanced; def->set_default_value(new ConfigOptionFloats { 0. }); def = this->add("filament_settings_id", coStrings); diff --git a/src/slic3r/GUI/GCodeViewer.cpp b/src/slic3r/GUI/GCodeViewer.cpp index d9d8ef59d..800fc32b1 100644 --- a/src/slic3r/GUI/GCodeViewer.cpp +++ b/src/slic3r/GUI/GCodeViewer.cpp @@ -4998,6 +4998,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv ImGui::SameLine(); imgui.title(time_title); std::string filament_str = _u8L("Filament"); + std::string cost_str = _u8L("Cost"); std::string prepare_str = _u8L("Prepare time"); std::string print_str = _u8L("Model printing time"); std::string total_str = _u8L("Total"); @@ -5006,7 +5007,10 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv if (time_mode.layers_times.empty()) max_len += ImGui::CalcTextSize(total_str.c_str()).x; else { - max_len += std::max(ImGui::CalcTextSize(print_str.c_str()).x ,std::max(std::max(ImGui::CalcTextSize(prepare_str.c_str()).x, ImGui::CalcTextSize(total_str.c_str()).x), ImGui::CalcTextSize(filament_str.c_str()).x)); + max_len += std::max(ImGui::CalcTextSize(cost_str.c_str()).x, + std::max(ImGui::CalcTextSize(print_str.c_str()).x, + std::max(std::max(ImGui::CalcTextSize(prepare_str.c_str()).x, ImGui::CalcTextSize(total_str.c_str()).x), + ImGui::CalcTextSize(filament_str.c_str()).x))); } //BBS display filament cost @@ -5031,6 +5035,17 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv auto it = std::find_if(time_mode.roles_times.begin(), time_mode.roles_times.end(), [role](const std::pair& item) { return role == item.first; }); return (it != time_mode.roles_times.end()) ? it->second : 0.0f; }; + + //BBS: display cost of filaments + ImGui::Dummy({window_padding, window_padding}); + ImGui::SameLine(); + imgui.text(cost_str + ":"); + ImGui::SameLine(max_len); + + //char buf[64]; + ::sprintf(buf, "%.2f", ps.total_cost); + imgui.text(buf); + //BBS: start gcode is prepeare time if (role_time(erCustom) != 0.0f) { ImGui::Dummy({ window_padding, window_padding });