Skip to content

Commit

Permalink
Merge branch 'prusa3d:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleStrike authored Sep 19, 2024
2 parents f5262eb + 5dc04b4 commit 4d18418
Show file tree
Hide file tree
Showing 18 changed files with 110 additions and 17 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Build

on:
push:
workflow_dispatch:

jobs:
build_osx:
uses: Prusa-Development/PrusaSlicer-Actions/.github/workflows/build_osx.yml@master
secrets: inherit

build_osx_asan:
uses: Prusa-Development/PrusaSlicer-Actions/.github/workflows/build_osx.yml@master
secrets: inherit
needs: build_osx
with:
with_asan: true

build_win:
uses: Prusa-Development/PrusaSlicer-Actions/.github/workflows/build_windows.yml@master
secrets: inherit

build_flatpak:
uses: Prusa-Development/PrusaSlicer-Actions/.github/workflows/build_flatpak.yml@master
secrets: inherit

build_flatpak_asan:
uses: Prusa-Development/PrusaSlicer-Actions/.github/workflows/build_flatpak.yml@master
secrets: inherit
needs: build_flatpak
with:
with_asan: true
3 changes: 2 additions & 1 deletion src/libslic3r/GCode/ExtrusionOrder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,7 +540,8 @@ std::vector<ExtruderExtrusions> get_extrusions(
if (layer_tools.has_wipe_tower && wipe_tower != nullptr) {
const bool finish_wipe_tower{extruder_id == layer_tools.extruders.back()};
if (finish_wipe_tower || is_toolchange_required(is_first_layer, layer_tools.extruders.back(), extruder_id, current_extruder_id)) {
if (const auto tool_change{wipe_tower->get_toolchange(toolchange_number)}) {
const bool ignore_sparse{print.config().wipe_tower_no_sparse_layers.value};
if (const auto tool_change{wipe_tower->get_toolchange(toolchange_number, ignore_sparse)}) {
toolchange_number++;
previous_position = Point::new_scale(wipe_tower->transform_wt_pt(tool_change->end_pos));
current_extruder_id = tool_change->new_tool;
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/GCode/ExtrusionOrder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ class ExtrusionEntityReference;
class Print;
class PrintObject;
class PrintRegion;

namespace GCode {
class WipeTowerIntegration;
} // namespace GCode
Expand Down
1 change: 0 additions & 1 deletion src/libslic3r/GCode/PressureEqualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
#include <cstring>
#include <algorithm>
#include <array>
#include <iosfwd>
#include <iterator>
#include <limits>
#include <cctype>
Expand Down
1 change: 1 addition & 0 deletions src/libslic3r/GCode/SeamPerimeters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <cstdint>
#include <iterator>
#include <tuple>
#include <limits>

#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/Layer.hpp"
Expand Down
15 changes: 14 additions & 1 deletion src/libslic3r/GCode/WipeTowerIntegration.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,23 @@ class WipeTowerIntegration {
std::string tool_change(GCodeGenerator &gcodegen, int extruder_id, bool finish_layer);
std::string finalize(GCodeGenerator &gcodegen);
std::vector<float> used_filament_length() const;
std::optional<WipeTower::ToolChangeResult> get_toolchange(std::size_t index) const {
std::optional<WipeTower::ToolChangeResult> get_toolchange(std::size_t index, bool ignore_sparse) const {
if (m_layer_idx >= m_tool_changes.size()) {
return std::nullopt;
}
if(
ignore_sparse
&& m_tool_changes.at(m_layer_idx).size() == 1
&& (
m_tool_changes.at(m_layer_idx).front().initial_tool
== m_tool_changes.at(m_layer_idx).front().new_tool
)
&& m_layer_idx != 0
) {
// Ignore sparse
return std::nullopt;
}

return m_tool_changes.at(m_layer_idx).at(index);
}

Expand Down
1 change: 0 additions & 1 deletion src/libslic3r/LayerRegion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
#include "SVG.hpp"
#include "Algorithm/RegionExpansion.hpp"
#include "libslic3r/ExtrusionEntity.hpp"
#include "libslic3r/LayerRegion.hpp"
#include "libslic3r/Line.hpp"
#include "libslic3r/MultiMaterialSegmentation.hpp"
#include "libslic3r/Point.hpp"
Expand Down
1 change: 0 additions & 1 deletion src/libslic3r/MultiMaterialSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "libslic3r/LayerRegion.hpp"
#include "libslic3r/Line.hpp"
#include "libslic3r/Model.hpp"
#include "libslic3r/MultiMaterialSegmentation.hpp"
#include "libslic3r/Point.hpp"
#include "libslic3r/Polygon.hpp"
#include "libslic3r/PrintConfig.hpp"
Expand Down
1 change: 0 additions & 1 deletion src/libslic3r/PrintObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "Flow.hpp"
#include "libslic3r/GCode/ExtrusionProcessor.hpp"
#include "Line.hpp"
#include "Point.hpp"
#include "Polygon.hpp"
#include "Polyline.hpp"
#include "Print.hpp"
Expand Down
30 changes: 30 additions & 0 deletions src/slic3r/GUI/GUI_App.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,10 @@ bool GUI_App::on_init_inner()
// Set initialization of image handlers before any UI actions - See GH issue #7469
wxInitAllImageHandlers();

// Set our own gui log as an active target
m_log_gui = new LogGui();
wxLog::SetActiveTarget(m_log_gui);

#if defined(_WIN32) && ! defined(_WIN64)
// Win32 32bit build.
if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") {
Expand Down Expand Up @@ -4146,5 +4150,31 @@ void GUI_App::show_printer_webview_tab()
mainframe->show_printer_webview_tab(preset_bundle->physical_printers.get_selected_printer_config());
}



bool LogGui::ignorred_message(const wxString& msg)
{
for(const wxString& err : std::initializer_list<wxString>{ wxString("cHRM chunk does not match sRGB"),
wxString("known incorrect sRGB profile") }) {
if (msg.Contains(err))
return true;
}
return false;
}

void LogGui::DoLogText(const wxString& msg)
{
if (ignorred_message(msg))
return;
wxLogGui::DoLogText(msg);
}

void LogGui::DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info)
{
if (ignorred_message(msg))
return;
wxLogGui::DoLogRecord(level, msg, info);
}

} // GUI
} //Slic3r
15 changes: 15 additions & 0 deletions src/slic3r/GUI/GUI_App.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ static wxString dots("…", wxConvUTF8);
#define SUPPORTS_MARKUP
#endif


// A wrapper class to allow ignoring some known warnings
// and not bothering users with redundant messages.
// see https://github.com/prusa3d/PrusaSlicer/issues/12920
class LogGui : public wxLogGui
{
protected:
void DoLogText(const wxString& msg) override;
void DoLogRecord(wxLogLevel level, const wxString& msg, const wxLogRecordInfo& info) override;

private:
bool ignorred_message(const wxString& msg);
};

class GUI_App : public wxApp
{
public:
Expand Down Expand Up @@ -181,6 +195,7 @@ class GUI_App : public wxApp
size_t m_instance_hash_int;

Search::OptionsSearcher* m_searcher{ nullptr };
LogGui* m_log_gui { nullptr };

public:
bool OnInit() override;
Expand Down
2 changes: 1 addition & 1 deletion src/slic3r/GUI/Gizmos/GLGizmoSVG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

#include <wx/display.h> // detection of change DPI
#include <boost/log/trivial.hpp>
#include <boost/nowide/fstream.hpp>

#include <GL/glew.h>
#include <chrono> // measure enumeration of fonts
#include <sstream> // save for svg
#include <array>
#include <fstream> // IWYU pragma: keep

using namespace Slic3r;
using namespace Slic3r::Emboss;
Expand Down
3 changes: 2 additions & 1 deletion src/slic3r/GUI/PresetArchiveDatabase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include <boost/log/trivial.hpp>
#include <boost/filesystem/fstream.hpp>
#include <boost/nowide/fstream.hpp> // IWYU pragma: keep
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/uuid/uuid.hpp>
Expand Down Expand Up @@ -916,4 +917,4 @@ void PresetArchiveDatabase::sync_blocking()
read_server_manifest(std::move(manifest));
}

}} // Slic3r::GUI
}} // Slic3r::GUI
8 changes: 5 additions & 3 deletions src/slic3r/GUI/UserAccountUtils.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
#include "UserAccountUtils.hpp"

#include "format.hpp"

#include <boost/regex.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/log/trivial.hpp>
#include <boost/lexical_cast.hpp>
#include <boost/lexical_cast/bad_lexical_cast.hpp>
#include <cassert>
#include <cstddef>
#include <exception>
#include <utility>

namespace pt = boost::property_tree;

Expand Down
1 change: 0 additions & 1 deletion src/slic3r/GUI/WebViewPlatformUtilsLinux.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <webkit2/webkit2.h>
#include <wx/defs.h>
#include <wx/webview.h>
#include <unordered_map>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions src/slic3r/Utils/Http.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include <boost/filesystem.hpp>
#include <boost/format.hpp>
#include <boost/log/trivial.hpp>
#include <boost/nowide/fstream.hpp>

#include <curl/curl.h>

Expand Down
9 changes: 5 additions & 4 deletions src/slic3r/Utils/Jwt.cpp
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#include "Jwt.hpp"

#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <boost/beast/core/detail/base64.hpp> // IWYU pragma: keep
#include <boost/optional/optional.hpp>
#include <ctime>
#include <sstream>
#include <tuple>

#include <boost/beast/core/detail/base64.hpp>
#include <boost/property_tree/ptree.hpp>
#include <boost/property_tree/json_parser.hpp>
#include <algorithm>

namespace Slic3r::Utils {

Expand Down
2 changes: 1 addition & 1 deletion version.inc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

set(SLIC3R_APP_NAME "PrusaSlicer")
set(SLIC3R_APP_KEY "PrusaSlicer")
set(SLIC3R_VERSION "2.8.1-rc1")
set(SLIC3R_VERSION "2.8.1")
set(SLIC3R_BUILD_ID "PrusaSlicer-${SLIC3R_VERSION}+UNKNOWN")
set(SLIC3R_RC_VERSION "2,8,1,0")
set(SLIC3R_RC_VERSION_DOTS "2.8.1.0")

0 comments on commit 4d18418

Please sign in to comment.