diff --git a/src/BambuStudio.cpp b/src/BambuStudio.cpp index 3cda5fa3e4..4dacd989cc 100644 --- a/src/BambuStudio.cpp +++ b/src/BambuStudio.cpp @@ -2875,12 +2875,14 @@ int CLI::run(int argc, char **argv) // is supplied); if any object has no instances, it will get a default one // and all instances will be rearranged (unless --dont-arrange is supplied). std::string outfile; - Print fff_print; + //Print fff_print; while(!finished) { //BBS: slice every partplate one by one PrintBase *print=NULL; + Print *print_fff = NULL; + Slic3r::GUI::GCodeResult *gcode_result = NULL; int print_index; for (int index = 0; index < partplate_list.get_plate_count(); index ++) @@ -2895,6 +2897,8 @@ int CLI::run(int argc, char **argv) //get the current partplate Slic3r::GUI::PartPlate* part_plate = partplate_list.get_plate(index); part_plate->get_print(&print, &gcode_result, &print_index); + + print_fff = dynamic_cast(print); /*if (outfile_config.empty()) { outfile = "plate_" + std::to_string(index + 1) + ".gcode"; @@ -3074,6 +3078,11 @@ int CLI::run(int argc, char **argv) BOOST_LOG_TRIVIAL(info) << boost::format("new_printer_name: %1%, current_printer_system_name %2%, is_bbl_vendor_preset %3%")%new_printer_name %current_printer_system_name %is_bbl_vendor_preset; } (dynamic_cast(print))->set_BBL_Printer(is_bbl_vendor_preset); + + //update information for brim + const PrintConfig& print_config = print_fff->config(); + Model::setExtruderParams(m_print_config, filament_count); + Model::setPrintSpeedTable(m_print_config, print_config); if (load_slicedata) { std::string plate_dir = load_slice_data_dir+"/"+std::to_string(index+1); int ret = print->load_cached_data(plate_dir); @@ -3098,12 +3107,13 @@ int CLI::run(int argc, char **argv) print->process(); } if (printer_technology == ptFFF) { - std::string conflict_result = dynamic_cast(print)->get_conflict_string(); + std::string conflict_result = print_fff->get_conflict_string(); if (!conflict_result.empty()) { BOOST_LOG_TRIVIAL(error) << "plate "<< index+1<< ": found slicing result conflict!"<< std::endl; record_exit_reson(outfile_dir, CLI_GCODE_PATH_CONFLICTS, index+1, cli_errors[CLI_GCODE_PATH_CONFLICTS]); flush_and_exit(CLI_GCODE_PATH_CONFLICTS); } + // The outfile is processed by a PlaceholderParser. //outfile = part_plate->get_tmp_gcode_path(); if (outfile_dir.empty()) { @@ -3114,7 +3124,7 @@ int CLI::run(int argc, char **argv) part_plate->set_tmp_gcode_path(outfile); } BOOST_LOG_TRIVIAL(info) << "process finished, will export gcode temporily to " << outfile << std::endl; - outfile = (dynamic_cast(print))->export_gcode(outfile, gcode_result, nullptr); + outfile = print_fff->export_gcode(outfile, gcode_result, nullptr); //outfile_final = (dynamic_cast(print))->print_statistics().finalize_output_path(outfile); //m_fff_print->export_gcode(m_temp_output_path, m_gcode_result, [this](const ThumbnailsParams& params) { return this->render_thumbnails(params); }); }/* else { diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index d9d8a1be43..e220287bb8 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -2117,7 +2117,7 @@ ModelObjectPtrs ModelObject::cut(size_t instance, std::array plane_poi // Displacement (in instance coordinates) to be applied to place the upper parts Vec3d local_displace = Vec3d::Zero(); Vec3d local_dowels_displace = Vec3d::Zero(); - + for (ModelVolume *volume : volumes) { const auto volume_matrix = volume->get_matrix(); @@ -2142,7 +2142,7 @@ ModelObjectPtrs ModelObject::cut(size_t instance, std::array plane_poi } ModelObjectPtrs res; - + if (attributes.has(ModelObjectCutAttribute::CutToParts) && !upper->volumes.empty()) { reset_instance_transformation(upper, instance, cut_matrix); res.push_back(upper); @@ -2376,7 +2376,7 @@ void ModelObject::split(ModelObjectPtrs* new_objects) { Vec3d shift = model_instance->get_transformation().get_matrix(true) * new_vol->get_offset(); model_instance->set_offset(model_instance->get_offset() + shift); - + //BBS: add assemble_view related logic Geometry::Transformation instance_transformation_copy = model_instance->get_transformation(); instance_transformation_copy.set_offset(-new_vol->get_offset()); @@ -3255,6 +3255,91 @@ void ModelInstance::transform_polygon(Polygon* polygon) const } //BBS +// BBS set print speed table and find maximum speed +void Model::setPrintSpeedTable(const DynamicPrintConfig& config, const PrintConfig& print_config) { + //Slic3r::DynamicPrintConfig config = wxGetApp().preset_bundle->full_config(); + printSpeedMap.maxSpeed = 0; + if (config.has("inner_wall_speed")) { + printSpeedMap.perimeterSpeed = config.opt_float("inner_wall_speed"); + if (printSpeedMap.perimeterSpeed > printSpeedMap.maxSpeed) + printSpeedMap.maxSpeed = printSpeedMap.perimeterSpeed; + } + if (config.has("outer_wall_speed")) { + printSpeedMap.externalPerimeterSpeed = config.opt_float("outer_wall_speed"); + printSpeedMap.maxSpeed = std::max(printSpeedMap.maxSpeed, printSpeedMap.externalPerimeterSpeed); + } + if (config.has("sparse_infill_speed")) { + printSpeedMap.infillSpeed = config.opt_float("sparse_infill_speed"); + if (printSpeedMap.infillSpeed > printSpeedMap.maxSpeed) + printSpeedMap.maxSpeed = printSpeedMap.infillSpeed; + } + if (config.has("internal_solid_infill_speed")) { + printSpeedMap.solidInfillSpeed = config.opt_float("internal_solid_infill_speed"); + if (printSpeedMap.solidInfillSpeed > printSpeedMap.maxSpeed) + printSpeedMap.maxSpeed = printSpeedMap.solidInfillSpeed; + } + if (config.has("top_surface_speed")) { + printSpeedMap.topSolidInfillSpeed = config.opt_float("top_surface_speed"); + if (printSpeedMap.topSolidInfillSpeed > printSpeedMap.maxSpeed) + printSpeedMap.maxSpeed = printSpeedMap.topSolidInfillSpeed; + } + if (config.has("support_speed")) { + printSpeedMap.supportSpeed = config.opt_float("support_speed"); + + if (printSpeedMap.supportSpeed > printSpeedMap.maxSpeed) + printSpeedMap.maxSpeed = printSpeedMap.supportSpeed; + } + + + //auto& print = wxGetApp().plater()->get_partplate_list().get_current_fff_print(); + //auto print_config = print.config(); + //printSpeedMap.bed_poly.points = get_bed_shape(*(wxGetApp().plater()->config())); + printSpeedMap.bed_poly.points = get_bed_shape(config); + Pointfs excluse_area_points = print_config.bed_exclude_area.values; + Polygons exclude_polys; + Polygon exclude_poly; + for (int i = 0; i < excluse_area_points.size(); i++) { + auto pt = excluse_area_points[i]; + exclude_poly.points.emplace_back(scale_(pt.x()), scale_(pt.y())); + if (i % 4 == 3) { // exclude areas are always rectangle + exclude_polys.push_back(exclude_poly); + exclude_poly.points.clear(); + } + } + printSpeedMap.bed_poly = diff({ printSpeedMap.bed_poly }, exclude_polys)[0]; +} + +// find temperature of heatend and bed and matierial of an given extruder +void Model::setExtruderParams(const DynamicPrintConfig& config, int extruders_count) { + extruderParamsMap.clear(); + //Slic3r::DynamicPrintConfig config = wxGetApp().preset_bundle->full_config(); + // BBS + //int numExtruders = wxGetApp().preset_bundle->filament_presets.size(); + for (unsigned int i = 0; i != extruders_count; ++i) { + std::string matName = ""; + // BBS + int bedTemp = 35; + double endTemp = 0.f; + if (config.has("filament_type")) { + matName = config.opt_string("filament_type", i); + } + if (config.has("nozzle_temperature")) { + endTemp = config.opt_int("nozzle_temperature", i); + } + + // FIXME: curr_bed_type is now a plate config rather than a global config. + // Currently bed temp is not used for brim generation, so just comment it for now. +#if 0 + if (config.has("curr_bed_type")) { + BedType curr_bed_type = config.opt_enum("curr_bed_type"); + bedTemp = config.opt_int(get_bed_temp_key(curr_bed_type), i); + } +#endif + if (i == 0) extruderParamsMap.insert({ i,{matName, bedTemp, endTemp} }); + extruderParamsMap.insert({ i + 1,{matName, bedTemp, endTemp} }); + } +} + // update the maxSpeed of an object if it is different from the global configuration double Model::findMaxSpeed(const ModelObject* object) { auto objectKeys = object->config.keys(); diff --git a/src/libslic3r/Model.hpp b/src/libslic3r/Model.hpp index ceb88148a6..2353804d94 100644 --- a/src/libslic3r/Model.hpp +++ b/src/libslic3r/Model.hpp @@ -1545,6 +1545,9 @@ public: static double getThermalLength(const ModelVolume* modelVolumePtr); static double getThermalLength(const std::vector modelVolumePtrs); static Polygon getBedPolygon() { return Model::printSpeedMap.bed_poly; } + //BBS static functions that update extruder params and speed table + static void setPrintSpeedTable(const DynamicPrintConfig& config, const PrintConfig& print_config); + static void setExtruderParams(const DynamicPrintConfig& config, int extruders_count); // BBS: backup static Model read_from_archive( diff --git a/src/slic3r/GUI/Jobs/ArrangeJob.cpp b/src/slic3r/GUI/Jobs/ArrangeJob.cpp index 320e8dc038..13c74c0bc7 100644 --- a/src/slic3r/GUI/Jobs/ArrangeJob.cpp +++ b/src/slic3r/GUI/Jobs/ArrangeJob.cpp @@ -270,7 +270,7 @@ void ArrangeJob::prepare_wipe_tower() break; } } - + // if multile extruders have same bed temp, we need wipe tower // 允许不同材料落在相同盘,且所有选定对象中使用了多种热床温度相同的材料 if (params.allow_multi_materials_on_same_plate) { @@ -395,8 +395,13 @@ void ArrangeJob::prepare() params = init_arrange_params(m_plater); //BBS update extruder params and speed table before arranging - Plater::setExtruderParams(Model::extruderParamsMap); - Plater::setPrintSpeedTable(Model::printSpeedMap); + const Slic3r::DynamicPrintConfig& config = wxGetApp().preset_bundle->full_config(); + auto& print = wxGetApp().plater()->get_partplate_list().get_current_fff_print(); + auto print_config = print.config(); + int numExtruders = wxGetApp().preset_bundle->filament_presets.size(); + + Model::setExtruderParams(config, numExtruders); + Model::setPrintSpeedTable(config, print_config); int state = m_plater->get_prepare_state(); if (state == Job::JobPrepareState::PREPARE_STATE_DEFAULT) { @@ -500,7 +505,7 @@ void ArrangeJob::process() const Slic3r::DynamicPrintConfig& global_config = wxGetApp().preset_bundle->full_config(); if (params.avoid_extrusion_cali_region && global_config.opt_bool("scan_first_layer")) partplate_list.preprocess_nonprefered_areas(m_unselected, MAX_NUM_PLATES); - + update_arrange_params(params, *m_plater, m_selected); update_selected_items_inflation(m_selected, m_plater->config(), params); update_unselected_items_inflation(m_unselected, m_plater->config(), params); diff --git a/src/slic3r/GUI/Plater.cpp b/src/slic3r/GUI/Plater.cpp index 1edf4d6d48..806f77c944 100644 --- a/src/slic3r/GUI/Plater.cpp +++ b/src/slic3r/GUI/Plater.cpp @@ -170,7 +170,7 @@ wxDEFINE_EVENT(EVT_INSTALL_PLUGIN_HINT, wxCommandEvent); wxDEFINE_EVENT(EVT_PREVIEW_ONLY_MODE_HINT, wxCommandEvent); //BBS: change light/dark mode wxDEFINE_EVENT(EVT_GLCANVAS_COLOR_MODE_CHANGED, SimpleEvent); -//BBS: print +//BBS: print wxDEFINE_EVENT(EVT_PRINT_FROM_SDCARD_VIEW, SimpleEvent); @@ -1105,7 +1105,7 @@ void Sidebar::update_all_preset_comboboxes() ; } - if(!url.empty()) + if(!url.empty()) { if(!url.Lower().starts_with("http")) url = wxString::Format("http://%s",url); @@ -1488,7 +1488,7 @@ std::map Sidebar::build_filament_ams_list(MachineObject void Sidebar::load_ams_list(std::string const &device, MachineObject* obj) { std::map filament_ams_list = build_filament_ams_list(obj); - + if (!obj) { p->ams_list_device = device; BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << " clear list"; @@ -2922,89 +2922,6 @@ void Plater::priv::select_view(const std::string& direction) assemble_view->select_view(direction); } } -// BBS set print speed table and find maximum speed -void Plater::setPrintSpeedTable(GlobalSpeedMap &printSpeedMap) { - Slic3r::DynamicPrintConfig config = wxGetApp().preset_bundle->full_config(); - printSpeedMap.maxSpeed = 0; - if (config.has("inner_wall_speed")) { - printSpeedMap.perimeterSpeed = config.opt_float("inner_wall_speed"); - if (printSpeedMap.perimeterSpeed > printSpeedMap.maxSpeed) - printSpeedMap.maxSpeed = printSpeedMap.perimeterSpeed; - } - if (config.has("outer_wall_speed")) { - printSpeedMap.externalPerimeterSpeed = config.opt_float("outer_wall_speed"); - printSpeedMap.maxSpeed = std::max(printSpeedMap.maxSpeed, printSpeedMap.externalPerimeterSpeed); - } - if (config.has("sparse_infill_speed")) { - printSpeedMap.infillSpeed = config.opt_float("sparse_infill_speed"); - if (printSpeedMap.infillSpeed > printSpeedMap.maxSpeed) - printSpeedMap.maxSpeed = printSpeedMap.infillSpeed; - } - if (config.has("internal_solid_infill_speed")) { - printSpeedMap.solidInfillSpeed = config.opt_float("internal_solid_infill_speed"); - if (printSpeedMap.solidInfillSpeed > printSpeedMap.maxSpeed) - printSpeedMap.maxSpeed = printSpeedMap.solidInfillSpeed; - } - if (config.has("top_surface_speed")) { - printSpeedMap.topSolidInfillSpeed = config.opt_float("top_surface_speed"); - if (printSpeedMap.topSolidInfillSpeed > printSpeedMap.maxSpeed) - printSpeedMap.maxSpeed = printSpeedMap.topSolidInfillSpeed; - } - if (config.has("support_speed")) { - printSpeedMap.supportSpeed = config.opt_float("support_speed"); - - if (printSpeedMap.supportSpeed > printSpeedMap.maxSpeed) - printSpeedMap.maxSpeed = printSpeedMap.supportSpeed; - } - - - auto& print = wxGetApp().plater()->get_partplate_list().get_current_fff_print(); - auto print_config = print.config(); - printSpeedMap.bed_poly.points = get_bed_shape(*(wxGetApp().plater()->config())); - Pointfs excluse_area_points = print_config.bed_exclude_area.values; - Polygons exclude_polys; - Polygon exclude_poly; - for (int i = 0; i < excluse_area_points.size(); i++) { - auto pt = excluse_area_points[i]; - exclude_poly.points.emplace_back(scale_(pt.x()), scale_(pt.y())); - if (i % 4 == 3) { // exclude areas are always rectangle - exclude_polys.push_back(exclude_poly); - exclude_poly.points.clear(); - } - } - printSpeedMap.bed_poly = diff({ printSpeedMap.bed_poly }, exclude_polys)[0]; -} - -// find temperature of heatend and bed and matierial of an given extruder -void Plater::setExtruderParams(std::map& extParas) { - extParas.clear(); - Slic3r::DynamicPrintConfig config = wxGetApp().preset_bundle->full_config(); - // BBS - int numExtruders = wxGetApp().preset_bundle->filament_presets.size(); - for (unsigned int i = 0; i != numExtruders; ++i) { - std::string matName = ""; - // BBS - int bedTemp = 35; - double endTemp = 0.f; - if (config.has("filament_type")) { - matName = config.opt_string("filament_type", i); - } - if (config.has("nozzle_temperature")) { - endTemp = config.opt_int("nozzle_temperature", i); - } - - // FIXME: curr_bed_type is now a plate config rather than a global config. - // Currently bed temp is not used for brim generation, so just comment it for now. -#if 0 - if (config.has("curr_bed_type")) { - BedType curr_bed_type = config.opt_enum("curr_bed_type"); - bedTemp = config.opt_int(get_bed_temp_key(curr_bed_type), i); - } -#endif - if (i == 0) extParas.insert({ i,{matName, bedTemp, endTemp} }); - extParas.insert({ i + 1,{matName, bedTemp, endTemp} }); - } -} wxColour Plater::get_next_color_for_filament() { @@ -3070,8 +2987,13 @@ void Plater::priv::select_view_3D(const std::string& name, bool no_slice) else if (name == "Preview") { BOOST_LOG_TRIVIAL(info) << "select preview"; //BBS update extruder params and speed table before slicing - Plater::setExtruderParams(Slic3r::Model::extruderParamsMap); - Plater::setPrintSpeedTable(Slic3r::Model::printSpeedMap); + const Slic3r::DynamicPrintConfig& config = wxGetApp().preset_bundle->full_config(); + auto& print = q->get_partplate_list().get_current_fff_print(); + auto print_config = print.config(); + int numExtruders = wxGetApp().preset_bundle->filament_presets.size(); + + Model::setExtruderParams(config, numExtruders); + Model::setPrintSpeedTable(config, print_config); set_current_panel(preview, no_slice); } else if (name == "Assemble") { @@ -4923,7 +4845,7 @@ unsigned int Plater::priv::update_restart_background_process(bool force_update_s } void Plater::priv::update_fff_scene() -{ +{ if (this->preview != nullptr) this->preview->reload_print(); // In case this was MM print, wipe tower bounding box on 3D tab might need redrawing with exact depth: @@ -6197,8 +6119,8 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt) } } else { std::vector ptrs; - for (auto oid : message.second) - { + for (auto oid : message.second) + { const PrintObject *print_object = this->background_process.m_fff_print->get_object(ObjectID(oid)); if (print_object) { ptrs.push_back(print_object->model_object()); } } @@ -6410,8 +6332,13 @@ void Plater::priv::on_action_slice_plate(SimpleEvent&) if (q != nullptr) { BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":received slice plate event\n" ; //BBS update extruder params and speed table before slicing - Plater::setExtruderParams(Slic3r::Model::extruderParamsMap); - Plater::setPrintSpeedTable(Slic3r::Model::printSpeedMap); + const Slic3r::DynamicPrintConfig& config = wxGetApp().preset_bundle->full_config(); + auto& print = q->get_partplate_list().get_current_fff_print(); + auto print_config = print.config(); + int numExtruders = wxGetApp().preset_bundle->filament_presets.size(); + + Model::setExtruderParams(config, numExtruders); + Model::setPrintSpeedTable(config, print_config); m_slice_all = false; q->reslice(); q->select_view_3D("Preview"); @@ -6424,8 +6351,13 @@ void Plater::priv::on_action_slice_all(SimpleEvent&) if (q != nullptr) { BOOST_LOG_TRIVIAL(debug) << __FUNCTION__ << ":received slice project event\n" ; //BBS update extruder params and speed table before slicing - Plater::setExtruderParams(Slic3r::Model::extruderParamsMap); - Plater::setPrintSpeedTable(Slic3r::Model::printSpeedMap); + const Slic3r::DynamicPrintConfig& config = wxGetApp().preset_bundle->full_config(); + auto& print = q->get_partplate_list().get_current_fff_print(); + auto print_config = print.config(); + int numExtruders = wxGetApp().preset_bundle->filament_presets.size(); + + Model::setExtruderParams(config, numExtruders); + Model::setPrintSpeedTable(config, print_config); m_slice_all = true; m_slice_all_only_has_gcode = true; m_cur_slice_plate = 0; @@ -6905,7 +6837,7 @@ wxString Plater::priv::get_project_filename(const wxString& extension) const } } -wxString Plater::priv::get_export_gcode_filename(const wxString& extension, bool only_filename, bool export_all) +wxString Plater::priv::get_export_gcode_filename(const wxString& extension, bool only_filename, bool export_all) { wxString curr_project_name = m_project_name; @@ -7804,10 +7736,10 @@ void Plater::priv::update_after_undo_redo(const UndoRedo::Snapshot& snapshot, bo // triangle meshes may have gotten released from the scene or the background processing, therefore now being calculated into the Undo / Redo stack size. this->undo_redo_stack().release_least_recently_used(); //YS_FIXME update obj_list from the deserialized model (maybe store ObjectIDs into the tree?) (no selections at this point of time) - get_current_canvas3D()->get_canvas_type() == GLCanvas3D::CanvasAssembleView ? + get_current_canvas3D()->get_canvas_type() == GLCanvas3D::CanvasAssembleView ? assemble_view->get_canvas3d()->get_selection().set_deserialized(GUI::Selection::EMode(this->undo_redo_stack().selection_deserialized().mode), this->undo_redo_stack().selection_deserialized().volumes_and_instances) : this->view3D->get_canvas3d()->get_selection().set_deserialized(GUI::Selection::EMode(this->undo_redo_stack().selection_deserialized().mode), this->undo_redo_stack().selection_deserialized().volumes_and_instances); - get_current_canvas3D()->get_canvas_type() == GLCanvas3D::CanvasAssembleView ? + get_current_canvas3D()->get_canvas_type() == GLCanvas3D::CanvasAssembleView ? assemble_view->get_canvas3d()->get_gizmos_manager().update_after_undo_redo(snapshot) : this->view3D->get_canvas3d()->get_gizmos_manager().update_after_undo_redo(snapshot); @@ -11097,24 +11029,24 @@ void Plater::send_gcode_legacy(int plate_idx, Export3mfProgressFn proFn) try { json j; switch (dlg.post_action()) { - case PrintHostPostUploadAction::None: - j["post_action"] = "Upload"; + case PrintHostPostUploadAction::None: + j["post_action"] = "Upload"; break; - case PrintHostPostUploadAction::StartPrint: - j["post_action"] = "StartPrint"; + case PrintHostPostUploadAction::StartPrint: + j["post_action"] = "StartPrint"; break; - case PrintHostPostUploadAction::StartSimulation: - j["post_action"] = "StartSimulation"; + case PrintHostPostUploadAction::StartSimulation: + j["post_action"] = "StartSimulation"; break; } PresetBundle *preset_bundle = wxGetApp().preset_bundle; - if (preset_bundle) { - j["gcode_printer_model"] = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle); + if (preset_bundle) { + j["gcode_printer_model"] = preset_bundle->printers.get_edited_preset().get_printer_type(preset_bundle); } - if (physical_printer_config) { - j["printer_preset"] = physical_printer_config->opt_string("inherits"); + if (physical_printer_config) { + j["printer_preset"] = physical_printer_config->opt_string("inherits"); } NetworkAgent *agent = wxGetApp().getAgent(); @@ -11209,7 +11141,7 @@ void Plater::print_job_finished(wxCommandEvent &evt) p->enter_prepare_mode(); } - + Slic3r::DeviceManager* dev = Slic3r::GUI::wxGetApp().getDeviceManager(); if (!dev) return; @@ -11344,7 +11276,7 @@ void Plater::on_filaments_change(size_t num_filaments) for (int i = 0; i < plate_list.get_plate_count(); ++i) { PartPlate* part_plate = plate_list.get_plate(i); part_plate->update_first_layer_print_sequence(num_filaments); - } + } for (ModelObject* mo : wxGetApp().model().objects) { for (ModelVolume* mv : mo->volumes) { @@ -11604,7 +11536,7 @@ void Plater::update_print_error_info(int code, std::string msg, std::string extr if (p->main_frame->m_calibration) p->main_frame->m_calibration->update_print_error_info(code, msg, extra); } - + wxString Plater::get_project_filename(const wxString& extension) const { return p->get_project_filename(extension); @@ -12419,7 +12351,7 @@ int Plater::select_plate_by_hover_id(int hover_id, bool right_click, bool isModi if (!ret) { PlateNameEditDialog dlg(this, wxID_ANY, _L("Edit Plate Name")); PartPlate * curr_plate = p->partplate_list.get_curr_plate(); - + wxString curr_plate_name = from_u8(curr_plate->get_plate_name()); dlg.set_plate_name(curr_plate_name); diff --git a/src/slic3r/GUI/Plater.hpp b/src/slic3r/GUI/Plater.hpp index ad520f61f0..f0c0c17e6f 100644 --- a/src/slic3r/GUI/Plater.hpp +++ b/src/slic3r/GUI/Plater.hpp @@ -256,9 +256,7 @@ public: void update_all_plate_thumbnails(bool force_update = false); void invalid_all_plate_thumbnails(); void force_update_all_plate_thumbnails(); - //BBS static functions that update extruder params and speed table - static void setPrintSpeedTable(Slic3r::GlobalSpeedMap& printSpeedMap); - static void setExtruderParams(std::map& extParas); + static wxColour get_next_color_for_filament(); static wxString get_slice_warning_string(GCodeProcessorResult::SliceWarning& warning); @@ -289,7 +287,7 @@ public: bool is_view3D_overhang_shown() const; void show_view3D_overhang(bool show); - + bool is_sidebar_collapsed() const; void collapse_sidebar(bool show);