mirror of
https://git.mirrors.martin98.com/https://github.com/bambulab/BambuStudio.git
synced 2025-08-20 21:29:08 +08:00
FIX: fix build error
jira: none Change-Id: I97df69b728fc3871b7c33e1fd3ba068e741d51c7
This commit is contained in:
parent
21e6271e59
commit
326d7d28b4
@ -36,11 +36,6 @@ namespace Slic3r {
|
||||
|
||||
double get_abs_value(double ratio_over) const { return this->percent ? (ratio_over * this->value / 100) : this->value; }
|
||||
|
||||
FloatOrPercent() {}
|
||||
FloatOrPercent(double value_, bool percent_) : value(value_), percent(percent_) {}
|
||||
|
||||
double get_abs_value(double ratio_over) const { return this->percent ? (ratio_over * this->value / 100) : this->value; }
|
||||
|
||||
private:
|
||||
friend class cereal::access;
|
||||
template<class Archive> void serialize(Archive& ar) { ar(this->value); ar(this->percent); }
|
||||
|
@ -297,7 +297,7 @@ static std::vector<Vec2d> get_path_of_change_filament(const Print& print)
|
||||
//OrcaSlicer
|
||||
double cur_speed = gcodegen.writer().get_current_speed();
|
||||
double wipe_speed = gcodegen.config().role_base_wipe_speed && cur_speed > EPSILON ? cur_speed / 60 :
|
||||
gcodegen.writer().config.travel_speed.get_at(get_extruder_index(gcodegen.writer().config, gcodegen.writer().filament()->id())) * gcodegen.config().wipe_speed.value / 100;
|
||||
gcodegen.writer().config.travel_speed.get_at(get_extruder_index(gcodegen.writer().config, gcodegen.writer().extruder()->id())) * gcodegen.config().wipe_speed.value / 100;
|
||||
|
||||
|
||||
// get the retraction length
|
||||
@ -4883,7 +4883,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
int overhang_threshold = FILAMENT_CONFIG(overhang_fan_threshold) == Overhang_threshold_none ?
|
||||
Overhang_threshold_none : FILAMENT_CONFIG(overhang_fan_threshold) - 1;
|
||||
if ((FILAMENT_CONFIG(overhang_fan_threshold) == Overhang_threshold_none && path.role() == erExternalPerimeter) || (path.get_overhang_degree() > overhang_threshold ||
|
||||
is_bridge(path.role())))) {
|
||||
is_bridge(path.role()))) {
|
||||
gcode += ";_OVERHANG_FAN_START\n";
|
||||
}
|
||||
}
|
||||
@ -4995,7 +4995,7 @@ std::string GCode::_extrude(const ExtrusionPath &path, std::string description,
|
||||
int overhang_threshold = FILAMENT_CONFIG(overhang_fan_threshold) == Overhang_threshold_none ?
|
||||
Overhang_threshold_none : FILAMENT_CONFIG(overhang_fan_threshold) - 1;
|
||||
if ((FILAMENT_CONFIG(overhang_fan_threshold) == Overhang_threshold_none && path.role() == erExternalPerimeter) || (path.get_overhang_degree() > overhang_threshold ||
|
||||
is_bridge(path.role()))))
|
||||
is_bridge(path.role())))
|
||||
gcode += ";_OVERHANG_FAN_END\n";
|
||||
}
|
||||
}
|
||||
|
@ -2500,7 +2500,7 @@ void Print::_make_wipe_tower()
|
||||
unsigned int pre_filament_id = nozzle_cur_filament_ids[nozzle_id];
|
||||
|
||||
float volume_to_purge = 0;
|
||||
if (pre_filament_id != unsigned int(-1) && pre_filament_id != filament_id) {
|
||||
if (pre_filament_id != (unsigned int)(-1) && pre_filament_id != filament_id) {
|
||||
volume_to_purge = multi_extruder_flush[nozzle_id][pre_filament_id][filament_id];
|
||||
volume_to_purge *= m_config.flush_multiplier.get_at(nozzle_id);
|
||||
volume_to_purge = pre_filament_id == -1 ? 0 :
|
||||
|
@ -502,7 +502,7 @@ public:
|
||||
void update_values_to_printer_extruders_for_multiple_filaments(DynamicPrintConfig& printer_config, std::set<std::string>& key_set, std::string id_name, std::string variant_name);
|
||||
|
||||
void update_non_diff_values_to_base_config(DynamicPrintConfig& new_config, const t_config_option_keys& keys, const std::set<std::string>& different_keys, std::string extruder_id_name, std::string extruder_variant_name,
|
||||
std::set<std::string>& key_set1, std::set<std::string>& key_set2 = std::set<std::string>());
|
||||
std::set<std::string>& key_set1, std::set<std::string>& key_set2);
|
||||
void update_diff_values_to_child_config(DynamicPrintConfig& new_config, std::string extruder_id_name, std::string extruder_variant_name, std::set<std::string>& key_set1, std::set<std::string>& key_set2);
|
||||
|
||||
bool is_custom_defined();
|
||||
|
@ -225,9 +225,10 @@ void BackgroundSlicingProcess::process_fff()
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: gcode_result reseted, will start print::process")%__LINE__;
|
||||
m_print->process();
|
||||
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(" %1%: after print::process, send slicing complete event to gui...")%__LINE__;
|
||||
if (m_current_plate->get_filament_map_mode() == FilamentMapMode::fmmAuto)
|
||||
m_current_plate->set_filament_maps(m_fff_print->get_filament_maps());
|
||||
|
||||
if (m_current_plate->get_filament_map_mode() == FilamentMapMode::fmmAuto) {
|
||||
std::vector<int> f_maps = m_fff_print->get_filament_maps();
|
||||
m_current_plate->set_filament_maps(f_maps);
|
||||
}
|
||||
wxCommandEvent evt(m_event_slicing_completed_id);
|
||||
// Post the Slicing Finished message for the G-code viewer to update.
|
||||
// Passing the timestamp
|
||||
|
@ -869,7 +869,7 @@ int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std
|
||||
|
||||
// tray_index : tray_color
|
||||
std::map<int, FilamentInfo> tray_filaments;
|
||||
|
||||
|
||||
for (auto ams = amsList.begin(); ams != amsList.end(); ams++) {
|
||||
|
||||
std::string ams_id = ams->second->id;
|
||||
@ -931,7 +931,7 @@ int MachineObject::ams_filament_mapping(std::vector<FilamentInfo> filaments, std
|
||||
info.slot_id = std::to_string(0);
|
||||
tray_filaments.emplace(std::make_pair(info.tray_id, info));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (ext_second)
|
||||
{
|
||||
|
@ -1011,7 +1011,7 @@ void GCodeViewer::load(const GCodeProcessorResult& gcode_result, const Print& pr
|
||||
m_last_result_id = gcode_result.id;
|
||||
m_gcode_result = &gcode_result;
|
||||
m_only_gcode_in_preview = only_gcode;
|
||||
|
||||
|
||||
m_sequential_view.gcode_window.load_gcode(gcode_result.filename, gcode_result.lines_ends);
|
||||
|
||||
//BBS: add only gcode mode
|
||||
@ -4594,7 +4594,7 @@ void GCodeViewer::render_legend_color_arr_recommen(float window_padding)
|
||||
{
|
||||
ImGuiWrapper &imgui = *wxGetApp().imgui();
|
||||
|
||||
auto link_text = [&](std::string &label) {
|
||||
auto link_text = [&](const std::string &label) {
|
||||
ImVec2 wiki_part_size = ImGui::CalcTextSize(label.c_str());
|
||||
|
||||
ImColor HyperColor = ImColor(48, 221, 114, 255).Value;
|
||||
@ -5476,7 +5476,7 @@ void GCodeViewer::render_legend(float &legend_height, int canvas_width, int canv
|
||||
columns_offsets.push_back({ buf, color_print_offsets[_u8L("Tower")] });
|
||||
}
|
||||
if ((displayed_columns & ~ColumnData::Model) > 0) {
|
||||
::sprintf(buf, imperial_units ? "%.2f in\n%.2f oz" : "%.2f m\n%.2f g", total_model_used_filament_m + total_support_used_filament_m + total_flushed_filament_m + total_wipe_tower_used_filament_m,
|
||||
::sprintf(buf, imperial_units ? "%.2f in\n%.2f oz" : "%.2f m\n%.2f g", total_model_used_filament_m + total_support_used_filament_m + total_flushed_filament_m + total_wipe_tower_used_filament_m,
|
||||
(total_model_used_filament_g + total_support_used_filament_g + total_flushed_filament_g + total_wipe_tower_used_filament_g) / unit_conver);
|
||||
columns_offsets.push_back({ buf, color_print_offsets[_u8L("Total")] });
|
||||
}
|
||||
|
@ -2846,7 +2846,7 @@ std::vector<int> PartPlate::get_filament_maps()
|
||||
return filament_maps;
|
||||
}
|
||||
|
||||
void PartPlate::set_filament_maps(std::vector<int>& f_maps)
|
||||
void PartPlate::set_filament_maps(const std::vector<int>& f_maps)
|
||||
{
|
||||
std::vector<int>& filament_maps = m_config.option<ConfigOptionInts>("filament_map", true)->values;
|
||||
|
||||
|
@ -480,7 +480,7 @@ public:
|
||||
void set_filament_map_mode(FilamentMapMode& mode);
|
||||
|
||||
std::vector<int> get_filament_maps();
|
||||
void set_filament_maps(std::vector<int>& f_maps);
|
||||
void set_filament_maps(const std::vector<int>& f_maps);
|
||||
|
||||
void set_filament_count(int filament_count);
|
||||
void on_filament_added();
|
||||
|
@ -13232,7 +13232,7 @@ void Plater::on_filaments_delete(size_t num_filaments, size_t filament_id)
|
||||
sidebar().obj_list()->update_objects_list_filament_column_when_delete_filament(filament_id, num_filaments);
|
||||
|
||||
// update customize gcode
|
||||
for (auto& item = p->model.plates_custom_gcodes.begin(); item != p->model.plates_custom_gcodes.end(); ++item) {
|
||||
for (auto item = p->model.plates_custom_gcodes.begin(); item != p->model.plates_custom_gcodes.end(); ++item) {
|
||||
auto iter = std::remove_if(item->second.gcodes.begin(), item->second.gcodes.end(), [filament_id](const Item& gcode_item) {
|
||||
return (gcode_item.type == CustomGCode::Type::ToolChange && gcode_item.extruder == filament_id + 1);
|
||||
});
|
||||
|
@ -1007,7 +1007,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
|
||||
m_sizer_thumbnail_area->Add(m_panel_image, 0, wxALIGN_CENTER, 0);
|
||||
m_sizer_thumbnail_area->Layout();
|
||||
|
||||
|
||||
/*basic info right*/
|
||||
auto sizer_basic_right_info = new wxBoxSizer(wxVERTICAL);
|
||||
|
||||
@ -1182,7 +1182,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
m_basicl_sizer->Add(m_sizer_thumbnail_area, 0, wxLEFT, 0);
|
||||
m_basicl_sizer->Add(0, 0, 0, wxLEFT, FromDIP(8));
|
||||
m_basicl_sizer->Add(sizer_basic_right_info, 0, wxLEFT, 0);
|
||||
|
||||
|
||||
|
||||
|
||||
m_basic_panel->SetSizer(m_basicl_sizer);
|
||||
@ -1232,7 +1232,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
|
||||
//wxBoxSizer* m_sizer_ams_mapping_tips = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
||||
|
||||
|
||||
|
||||
/* ams_mapping_help_icon = new ScalableBitmap(this, "enable_ams", 16);
|
||||
img_amsmapping_tip = new wxStaticBitmap(this, wxID_ANY, ams_mapping_help_icon->bmp(), wxDefaultPosition, wxSize(FromDIP(16), FromDIP(16)), 0);
|
||||
@ -1256,7 +1256,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
m_mapping_tutorial_popup.Dismiss();
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
m_sizer_filament->Add(m_sizer_ams_mapping_tips, 0, wxALIGN_CENTER|wxLEFT, FromDIP(8));*/
|
||||
@ -1505,7 +1505,7 @@ SelectMachineDialog::SelectMachineDialog(Plater *plater)
|
||||
//m_sizer_scrollable_region->Add(m_sizer_material, 0, wxALIGN_CENTER_HORIZONTAL, 0);
|
||||
//m_basic_panel_sizer->Add(m_sizer_material_area, 0, wxLEFT, FromDIP(10));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
m_sizer_main->Add(m_line_top, 0, wxEXPAND, 0);
|
||||
@ -2106,7 +2106,7 @@ bool SelectMachineDialog::get_ams_mapping_result(std::string &mapping_array_str,
|
||||
mapping_item["filamentId"] = "";
|
||||
mapping_item["filamentType"] = "";
|
||||
|
||||
|
||||
|
||||
|
||||
for (int k = 0; k < m_ams_mapping_result.size(); k++) {
|
||||
if (m_ams_mapping_result[k].id == i) {
|
||||
@ -4263,7 +4263,6 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
iter++;
|
||||
}
|
||||
|
||||
m_sizer_material->Clear();
|
||||
m_sizer_ams_mapping->Clear();
|
||||
m_materialList.clear();
|
||||
m_filaments.clear();
|
||||
@ -4290,7 +4289,7 @@ void SelectMachineDialog::reset_and_sync_ams_list()
|
||||
MaterialItem* item = nullptr;
|
||||
if (use_double_extruder)
|
||||
{
|
||||
|
||||
|
||||
if (m_filaments_map[extruder] == 1)
|
||||
{
|
||||
item = new MaterialItem(m_filament_left_panel, colour_rgb, _L(display_materials[extruder]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user