Merge branch 'main' into feat/plugin-feature

This commit is contained in:
SoftFever
2026-07-17 11:30:34 +08:00
committed by GitHub
127 changed files with 3663 additions and 283 deletions

View File

@@ -290,6 +290,21 @@ void Plater::show_illegal_characters_warning(wxWindow* parent)
show_error(parent, _L("Invalid name, the following characters are not allowed:") + " <>:/\\|?*\"");
}
void Plater::mark_plate_toolbar_image_dirty()
{
m_b_plate_toolbar_image_dirty = true;
}
bool Plater::is_plate_toolbar_image_dirty() const
{
return m_b_plate_toolbar_image_dirty;
}
void Plater::clear_plate_toolbar_image_dirty()
{
m_b_plate_toolbar_image_dirty = false;
}
static std::map<BedType, std::string> bed_type_thumbnails = {
{BedType::btPC, "bed_cool" },
{BedType::btEP, "bed_engineering" },
@@ -6348,10 +6363,8 @@ void Plater::priv::update(unsigned int flags)
//BBS assemble view
this->assemble_view->reload_scene(false, flags);
if (current_panel && is_preview_shown()) {
q->force_update_all_plate_thumbnails();
//update_fff_scene_only_shells(true);
}
// todo: better to mark thumbnail dirty here
q->mark_plate_toolbar_image_dirty();
if (force_background_processing_restart)
this->restart_background_process(update_status);
@@ -7906,6 +7919,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
}
}
q->schedule_background_process(true);
q->mark_plate_toolbar_image_dirty();
return obj_idxs;
}
@@ -8285,6 +8299,8 @@ void Plater::priv::object_list_changed()
main_frame->update_slice_print_status(MainFrame::eEventObjectUpdate, can_slice);
wxGetApp().params_panel()->notify_object_config_changed();
q->mark_plate_toolbar_image_dirty();
}
void Plater::priv::select_curr_plate_all()
@@ -9188,6 +9204,8 @@ void Plater::priv::update_fff_scene()
view3D->reload_scene(true);
//BBS: add assemble view related logic
assemble_view->reload_scene(true);
q->mark_plate_toolbar_image_dirty();
}
//BBS: add print project related logic
@@ -10096,9 +10114,6 @@ void Plater::priv::set_current_panel(wxPanel* panel, bool no_slice)
preview->get_canvas3d()->enable_select_plate_toolbar(true);
}
}
else {
preview->get_canvas3d()->enable_select_plate_toolbar(false);
}
if (current_panel == panel)
{
@@ -10957,6 +10972,7 @@ void Plater::priv::on_process_completed(SlicingProcessCompletedEvent &evt)
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(":finished, reload print soon");
m_is_slicing = false;
this->preview->reload_print(false);
q->mark_plate_toolbar_image_dirty();
/* BBS if in publishing progress */
if (m_is_publishing) {
if (m_publish_dlg && !m_publish_dlg->was_cancelled()) {
@@ -13940,8 +13956,13 @@ void adjust_settings_for_flowrate_calib(ModelObjectPtrs& objects, bool linear, i
_obj->config.set_key_value("seam_slope_type", new ConfigOptionEnum<SeamScarfType>(SeamScarfType::None));
_obj->config.set_key_value("gap_fill_target", new ConfigOptionEnum<GapFillTarget>(GapFillTarget::gftNowhere));
print_config->set_key_value("max_volumetric_extrusion_rate_slope", new ConfigOptionFloat(0));
// ORCA: print the top surface spiral from the center outwards, so the tiles are comparable.
_obj->config.set_key_value("top_surface_fill_order", new ConfigOptionEnum<SurfaceFillOrder>(SurfaceFillOrder::Outward));
// ORCA: request the calibration's special toolpath order (chords first, center spiral
// last and inside-out) so opposing directions collide into the tactile lip the test
// reads. The special order only applies while the fill order is Default, so reset the
// profile's fill order on the calibration objects; changing the setting on the object
// afterwards deliberately overrides the special order.
_obj->config.set_key_value("calib_flowrate_topinfill_special_order", new ConfigOptionBool(true));
_obj->config.set_key_value("top_surface_fill_order", new ConfigOptionEnum<SurfaceFillOrder>(SurfaceFillOrder::Default));
// extract flowrate from name, filename format: flowrate_xxx
std::string obj_name = _obj->name;
@@ -14678,6 +14699,7 @@ void Plater::invalid_all_plate_thumbnails()
plate->thumbnail_data.reset();
plate->no_light_thumbnail_data.reset();
}
mark_plate_toolbar_image_dirty();
}
void Plater::force_update_all_plate_thumbnails()
@@ -14688,7 +14710,6 @@ void Plater::force_update_all_plate_thumbnails()
invalid_all_plate_thumbnails();
update_all_plate_thumbnails(true);
}
get_preview_canvas3D()->update_plate_thumbnails();
}
// BBS: backup