Merge branch 'master-remote' into SoftFever

# Conflicts:
#	src/slic3r/GUI/MediaPlayCtrl.cpp
This commit is contained in:
SoftFever 2022-09-13 23:04:58 +08:00
commit de874acc99
13 changed files with 60 additions and 33 deletions

1
deps/CMakeLists.txt vendored
View file

@ -117,6 +117,7 @@ if (MSVC)
endif ()
elseif (APPLE)
message("OS X SDK Path: ${CMAKE_OSX_SYSROOT}")
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.15" CACHE STRING "Minimum OS X deployment version" FORCE)
if (CMAKE_OSX_DEPLOYMENT_TARGET)
set(DEP_OSX_TARGET "${CMAKE_OSX_DEPLOYMENT_TARGET}")
message("OS X Deployment Target: ${DEP_OSX_TARGET}")

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 135 KiB

After

Width:  |  Height:  |  Size: 126 KiB

Before After
Before After

View file

@ -2811,7 +2811,7 @@ const ImWchar* ImFontAtlas::GetGlyphRangesDefault()
{
static const ImWchar ranges[] =
{
0x0020, 0x00FF, // Basic Latin + Latin Supplement
0x0020, 0x01FF, // Basic Latin + Latin Supplement
0x2000, 0x206F, // General Punctuation
0x3000, 0x30FF, // CJK Symbols and Punctuations, Hiragana, Katakana
0x31F0, 0x31FF, // Katakana Phonetic Extensions
@ -2915,7 +2915,7 @@ const ImWchar* ImFontAtlas::GetGlyphRangesChineseSimplifiedCommon()
};
static ImWchar base_ranges[] = // not zero-terminated
{
0x0020, 0x00FF, // Basic Latin + Latin Supplement
0x0020, 0x01FF, // Basic Latin + Latin Supplement
0x2000, 0x206F, // General Punctuation
0x3000, 0x30FF, // CJK Symbols and Punctuations, Hiragana, Katakana
0x31F0, 0x31FF, // Katakana Phonetic Extensions

View file

@ -562,6 +562,15 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_
for (int i = int(m_layer_tools.size()) - 2; i >= 0; -- i)
m_layer_tools[i].wipe_tower_partitions = std::max(m_layer_tools[i + 1].wipe_tower_partitions, m_layer_tools[i].wipe_tower_partitions);
// if enable_timelapse_print(), update all layer_tools parameters: wipe_tower_partitions
if (config.timelapse_type == TimelapseType::tlSmooth) {
for (LayerTools& layer_tools : m_layer_tools) {
if (layer_tools.wipe_tower_partitions == 0) {
layer_tools.wipe_tower_partitions = 1;
}
}
}
//FIXME this is a hack to get the ball rolling.
for (LayerTools &lt : m_layer_tools)
lt.has_wipe_tower = (lt.has_object && lt.wipe_tower_partitions > 0) || lt.print_z < object_bottom_z + EPSILON;

View file

@ -1779,16 +1779,6 @@ void Print::_make_wipe_tower()
// BBS: priming logic is removed, so don't consider it in tool ordering
m_wipe_tower_data.tool_ordering = ToolOrdering(*this, (unsigned int)-1, false);
// if enable_timelapse_print(), update all layer_tools parameters: wipe_tower_partitions
if (enable_timelapse_print()) {
std::vector<LayerTools>& layer_tools_array = m_wipe_tower_data.tool_ordering.layer_tools();
for (LayerTools& layer_tools : layer_tools_array) {
if (layer_tools.wipe_tower_partitions == 0) {
layer_tools.wipe_tower_partitions = 1;
}
}
}
if (!m_wipe_tower_data.tool_ordering.has_wipe_tower())
// Don't generate any wipe tower.
return;

View file

@ -3736,8 +3736,11 @@ void DynamicPrintConfig::normalize_fdm(int used_filaments)
ConfigOptionEnum<PrintSequence>* ps_opt = this->option<ConfigOptionEnum<PrintSequence>>("print_sequence");
ConfigOptionEnum<TimelapseType>* timelapse_opt = this->option<ConfigOptionEnum<TimelapseType>>("timelapse_type");
if (timelapse_opt && timelapse_opt->value == TimelapseType::tlSmooth) {
if (used_filaments == 1 || ps_opt->value == PrintSequence::ByObject)
bool is_smooth_timelapse = timelapse_opt != nullptr && timelapse_opt->value == TimelapseType::tlSmooth;
if (is_smooth_timelapse) {
ept_opt->value = true;
}
else if (used_filaments == 1 || ps_opt->value == PrintSequence::ByObject) {
ept_opt->value = false;
}

View file

@ -1475,9 +1475,12 @@ void GCodeViewer::render_calibration_thumbnail(ThumbnailData& thumbnail_data, un
}
}
set_view_type(EViewType::FilamentId, false);
// set m_layers_z_range to 0, 0
// set m_layers_z_range to 0, 1;
// To be safe, we include both layers here although layer 1 seems enough
// layer 0: custom extrusions such as flow calibration etc.
// layer 1: the real first layer of object
std::array<unsigned int, 2> tmp_layers_z_range = m_layers_z_range;
m_layers_z_range = {0, 0};
m_layers_z_range = {0, 1};
// BBS exclude feature types
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags & ~(1 << erSkirt);
m_extrusions.role_visibility_flags = m_extrusions.role_visibility_flags & ~(1 << erCustom);

View file

@ -38,7 +38,7 @@ MediaPlayCtrl::MediaPlayCtrl(wxWindow *parent, wxMediaCtrl2 *media_ctrl, const w
});
//#if BBL_RELEASE_TO_PUBLIC
m_next_retry = wxDateTime::Now();
// m_next_retry = wxDateTime::Now();
//#endif
auto onShowHide = [this](auto &e) {

View file

@ -6871,9 +6871,25 @@ void Plater::add_model(bool imperial_units/* = false*/)
}
Plater::TakeSnapshot snapshot(this, snapshot_label);
// BBS: check file types
auto loadfiles_type = LoadFilesType::NoFile;
auto amf_files_count = get_3mf_file_count(paths);
if (paths.size() > 1 && amf_files_count < paths.size()) { loadfiles_type = LoadFilesType::Multiple3MFOther; }
if (paths.size() > 1 && amf_files_count == paths.size()) { loadfiles_type = LoadFilesType::Multiple3MF; }
if (paths.size() > 1 && amf_files_count == 0) { loadfiles_type = LoadFilesType::MultipleOther; }
if (paths.size() == 1 && amf_files_count == 1) { loadfiles_type = LoadFilesType::Single3MF; };
if (paths.size() == 1 && amf_files_count == 0) { loadfiles_type = LoadFilesType::SingleOther; };
bool ask_multi = false;
if (loadfiles_type == LoadFilesType::MultipleOther)
ask_multi = true;
auto strategy = LoadStrategy::LoadModel;
if (imperial_units) strategy = strategy | LoadStrategy::ImperialUnits;
if (!load_files(paths, strategy).empty()) {
if (!load_files(paths, strategy, ask_multi).empty()) {
wxGetApp().mainframe->update_title();
}
}

View file

@ -45,7 +45,6 @@ using Slic3r::GUI::Config::SnapshotDB;
// FIXME: Incompat bundle resolution doesn't deal with inherited user presets
namespace Slic3r {
@ -562,7 +561,8 @@ void PresetUpdater::priv::sync_resources(std::string http_url, std::map<std::str
Semver online_version = resource_update->second.version;
// Semver current_version = get_version_from_json(vendor_root_config.string());
Semver current_version = resource.version;
if (current_version < online_version) {
bool version_match = ((online_version.maj() == current_version.maj()) && (online_version.min() == current_version.min()));
if (version_match && (current_version < online_version)) {
if (cancel) { return; }
// need to download the online files
@ -734,7 +734,8 @@ void PresetUpdater::priv::sync_config(std::string http_url, const VendorMap vend
Semver online_version = vendor_update->second.first;
//Semver current_version = get_version_from_json(vendor_root_config.string());
Semver current_version = vendor_profile.config_version;
if (current_version < online_version) {
bool version_match = ((online_version.maj() == current_version.maj()) && (online_version.min() == current_version.min()));
if (version_match && (current_version < online_version)) {
auto cache_file = cache_path / (vendor_name+".json");
auto cache_print_dir = (cache_path / vendor_name / PRESET_PRINT_NAME);
auto cache_filament_dir = (cache_path / vendor_name / PRESET_FILAMENT_NAME);
@ -745,7 +746,8 @@ void PresetUpdater::priv::sync_config(std::string http_url, const VendorMap vend
&&( fs::exists(cache_filament_dir))
&&( fs::exists(cache_machine_dir))) {
Semver version = get_version_from_json(cache_file.string());
if (version >= online_version) {
bool cached_version_match = ((online_version.maj() == version.maj()) && (online_version.min() == version.min()));
if (cached_version_match && (version >= online_version)) {
//already downloaded before
BOOST_LOG_TRIVIAL(info) << "[BBL Updater]Vendor " << vendor_name << ", already cached a version "<<version.to_string();
continue;
@ -884,7 +886,9 @@ void PresetUpdater::priv::check_installed_vendor_profiles() const
Semver resource_ver = get_version_from_json(file_path);
Semver vendor_ver = get_version_from_json(path_in_vendor.string());
if (vendor_ver < resource_ver) {
bool version_match = ((resource_ver.maj() == vendor_ver.maj()) && (resource_ver.min() == vendor_ver.min()));
if (!version_match || (vendor_ver < resource_ver)) {
BOOST_LOG_TRIVIAL(info) << "[BBL Updater]:found vendor "<<vendor_name<<" newer version "<<resource_ver.to_string() <<" from resource, old version "<<vendor_ver.to_string();
bundles.push_back(vendor_name);
}
@ -955,7 +959,8 @@ Updates PresetUpdater::priv::get_config_updates(const Semver &old_slic3r_version
ifs.close();
}
if (vendor_ver < cache_ver) {
bool version_match = ((vendor_ver.maj() == cache_ver.maj()) && (vendor_ver.min() == cache_ver.min()));
if (version_match && (vendor_ver < cache_ver)) {
Semver app_ver = *Semver::parse(SLIC3R_VERSION);
if (cache_ver.maj() == app_ver.maj()){
BOOST_LOG_TRIVIAL(info) << "[BBL Updater]:need to update settings from "<<vendor_ver.to_string()<<" to newer version "<<cache_ver.to_string() <<", app version "<<SLIC3R_VERSION;

View file

@ -7,4 +7,4 @@ set(SLIC3R_APP_KEY "BambuStudio")
if(NOT DEFINED BBL_RELEASE_TO_PUBLIC)
set(BBL_RELEASE_TO_PUBLIC "0")
endif()
set(SLIC3R_VERSION "01.02.00.04")
set(SLIC3R_VERSION "01.02.00.09")