Initial attempt to update to 2.1.0 alpha1.

Signed-off-by: Jason Tibbitts <j@tib.bs>
This commit is contained in:
Jason Tibbitts 2019-08-13 14:32:51 -05:00
parent a06b99dfcd
commit beb29b6a10
7 changed files with 16 additions and 542 deletions

View File

@ -1,254 +0,0 @@
From 07282eb24d027817b4279f59ebbf0d80bac5f950 Mon Sep 17 00:00:00 2001
From: Lukas Matena <lukasmatena@seznam.cz>
Date: Wed, 22 May 2019 16:43:14 +0200
Subject: [PATCH] Fixed unit tests when run with range checks on std::vector
There was a bug in unit tests that led to generating the wipe tower with non-normalized preset.
This caused out-of-bounds access into max_layer_height vector in fill_wipe_tower_partitions.
The problem surfaced in https://github.com/prusa3d/PrusaSlicer/issues/2288.
I quickly patched additional normalization of the preset to prevent this from happening.
Also, an assert in the same function turned out to trip on one of the tests.
This one was commented out for now and will (hopefully) be looked into later.
Function Print::apply_config was renamed to apply_config_perl_tests_only so everyone
sees its current purpose and does not mistake it for the more important Print::apply.
---
lib/Slic3r/Print/Simple.pm | 2 +-
lib/Slic3r/Test.pm | 8 ++++----
src/libslic3r/GCode/ToolOrdering.cpp | 5 ++++-
src/libslic3r/Print.cpp | 28 +++++++++++++++++++++++++---
src/libslic3r/Print.hpp | 2 +-
src/libslic3r/PrintBase.hpp | 2 +-
src/libslic3r/PrintObject.cpp | 2 +-
src/libslic3r/SLAPrint.cpp | 2 +-
t/combineinfill.t | 2 +-
t/print.t | 2 +-
t/skirt_brim.t | 2 +-
xs/xsp/Print.xsp | 4 ++--
12 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/lib/Slic3r/Print/Simple.pm b/lib/Slic3r/Print/Simple.pm
index b5b749f12..2ab68f4d3 100644
--- a/lib/Slic3r/Print/Simple.pm
+++ b/lib/Slic3r/Print/Simple.pm
@@ -13,7 +13,7 @@ use Slic3r::Geometry qw(X Y);
has '_print' => (
is => 'ro',
default => sub { Slic3r::Print->new },
- handles => [qw(apply_config extruders output_filepath
+ handles => [qw(apply_config_perl_tests_only extruders output_filepath
total_used_filament total_extruded_volume
placeholder_parser process)],
);
diff --git a/lib/Slic3r/Test.pm b/lib/Slic3r/Test.pm
index b767ca593..d1b99e48c 100644
--- a/lib/Slic3r/Test.pm
+++ b/lib/Slic3r/Test.pm
@@ -176,7 +176,7 @@ sub init_print {
$config->set('gcode_comments', 1) if $ENV{SLIC3R_TESTS_GCODE};
my $print = Slic3r::Print->new;
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
$models = [$models] if ref($models) ne 'ARRAY';
$models = [ map { ref($_) ? $_ : model($_, %params) } @$models ];
@@ -192,8 +192,8 @@ sub init_print {
$print->add_model_object($model_object);
}
}
- # Call apply_config one more time, so that the layer height profiles are updated over all PrintObjects.
- $print->apply_config($config);
+ # Call apply_config_perl_tests_only one more time, so that the layer height profiles are updated over all PrintObjects.
+ $print->apply_config_perl_tests_only($config);
$print->validate;
# We return a proxy object in order to keep $models alive as required by the Print API.
@@ -250,7 +250,7 @@ sub add_facet {
package Slic3r::Test::Print;
use Moo;
-has 'print' => (is => 'ro', required => 1, handles => [qw(process apply_config)]);
+has 'print' => (is => 'ro', required => 1, handles => [qw(process apply_config_perl_tests_only)]);
has 'models' => (is => 'ro', required => 1);
1;
diff --git a/src/libslic3r/GCode/ToolOrdering.cpp b/src/libslic3r/GCode/ToolOrdering.cpp
index e800cd53f..e25ad91fe 100644
--- a/src/libslic3r/GCode/ToolOrdering.cpp
+++ b/src/libslic3r/GCode/ToolOrdering.cpp
@@ -327,7 +327,10 @@ void ToolOrdering::fill_wipe_tower_partitions(const PrintConfig &config, coordf_
LayerTools &lt_prev = m_layer_tools[j - 1];
LayerTools &lt_next = m_layer_tools[j + 1];
assert(! lt_prev.extruders.empty() && ! lt_next.extruders.empty());
- assert(lt_prev.extruders.back() == lt_next.extruders.front());
+ // FIXME: Following assert tripped when running combine_infill.t. I decided to comment it out for now.
+ // If it is a bug, it's likely not critical, because this code is unchanged for a long time. It might
+ // still be worth looking into it more and decide if it is a bug or an obsolete assert.
+ //assert(lt_prev.extruders.back() == lt_next.extruders.front());
lt_extra.has_wipe_tower = true;
lt_extra.extruders.push_back(lt_next.extruders.front());
lt_extra.wipe_tower_partitions = lt_next.wipe_tower_partitions;
diff --git a/src/libslic3r/Print.cpp b/src/libslic3r/Print.cpp
index 29bbb49fe..f9129f15a 100644
--- a/src/libslic3r/Print.cpp
+++ b/src/libslic3r/Print.cpp
@@ -51,7 +51,7 @@ void Print::reload_object(size_t /* idx */)
this->invalidate_all_steps();
/* TODO: this method should check whether the per-object config and per-material configs
have changed in such a way that regions need to be rearranged or we can just apply
- the diff and invalidate something. Same logic as apply_config()
+ the diff and invalidate something. Same logic as apply()
For now we just re-add all objects since we haven't implemented this incremental logic yet.
This should also check whether object volumes (parts) have changed. */
// collect all current model objects
@@ -83,7 +83,7 @@ PrintRegion* Print::add_region(const PrintRegionConfig &config)
return m_regions.back();
}
-// Called by Print::apply_config().
+// Called by Print::apply().
// This method only accepts PrintConfig option keys.
bool Print::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
{
@@ -422,10 +422,32 @@ void Print::add_model_object(ModelObject* model_object, int idx)
}
}
-bool Print::apply_config(DynamicPrintConfig config)
+// This function is only called through the Perl-C++ binding from the unit tests, should be
+// removed when unit tests are rewritten to C++.
+bool Print::apply_config_perl_tests_only(DynamicPrintConfig config)
{
tbb::mutex::scoped_lock lock(this->state_mutex());
+
+ // Perl unit tests were failing in case the preset was not normalized (e.g. https://github.com/prusa3d/PrusaSlicer/issues/2288 was caused
+ // by too short max_layer_height vector. Calling the necessary function Preset::normalize(...) is not currently possible because there is no
+ // access to preset. This should be solved when the unit tests are rewritten to C++. For now we just copy-pasted code from Preset.cpp
+ // to make sure the unit tests pass (functions set_num_extruders and nozzle_options()).
+ auto *nozzle_diameter = dynamic_cast<const ConfigOptionFloats*>(config.option("nozzle_diameter", true));
+ assert(nozzle_diameter != nullptr);
+ const auto &defaults = FullPrintConfig::defaults();
+ for (const std::string &key : { "nozzle_diameter", "min_layer_height", "max_layer_height", "extruder_offset",
+ "retract_length", "retract_lift", "retract_lift_above", "retract_lift_below", "retract_speed", "deretract_speed",
+ "retract_before_wipe", "retract_restart_extra", "retract_before_travel", "wipe",
+ "retract_layer_change", "retract_length_toolchange", "retract_restart_extra_toolchange", "extruder_colour" })
+ {
+ auto *opt = config.option(key, true);
+ assert(opt != nullptr);
+ assert(opt->is_vector());
+ unsigned int num_extruders = (unsigned int)nozzle_diameter->values.size();
+ static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
+ }
+
// we get a copy of the config object so we can modify it safely
config.normalize();
diff --git a/src/libslic3r/Print.hpp b/src/libslic3r/Print.hpp
index be2a9a3bd..53d6d692d 100644
--- a/src/libslic3r/Print.hpp
+++ b/src/libslic3r/Print.hpp
@@ -294,7 +294,7 @@ class Print : public PrintBaseWithState<PrintStep, psCount>
// The following three methods are used by the Perl tests only. Get rid of them!
void reload_object(size_t idx);
void add_model_object(ModelObject* model_object, int idx = -1);
- bool apply_config(DynamicPrintConfig config);
+ bool apply_config_perl_tests_only(DynamicPrintConfig config);
void process() override;
// Exports G-code into a file name based on the path_template, returns the file path of the generated G-code file.
diff --git a/src/libslic3r/PrintBase.hpp b/src/libslic3r/PrintBase.hpp
index a4ef67117..d4c39499c 100644
--- a/src/libslic3r/PrintBase.hpp
+++ b/src/libslic3r/PrintBase.hpp
@@ -84,7 +84,7 @@ class PrintState : public PrintStateBase
// Set the step as started. Block on mutex while the Print / PrintObject / PrintRegion objects are being
// modified by the UI thread.
- // This is necessary to block until the Print::apply_config() updates its state, which may
+ // This is necessary to block until the Print::apply() updates its state, which may
// influence the processing step being entered.
template<typename ThrowIfCanceled>
bool set_started(StepType step, tbb::mutex &mtx, ThrowIfCanceled throw_if_canceled) {
diff --git a/src/libslic3r/PrintObject.cpp b/src/libslic3r/PrintObject.cpp
index bcc61e0bf..660a2d939 100644
--- a/src/libslic3r/PrintObject.cpp
+++ b/src/libslic3r/PrintObject.cpp
@@ -435,7 +435,7 @@ SupportLayerPtrs::const_iterator PrintObject::insert_support_layer(SupportLayerP
return m_support_layers.insert(pos, new SupportLayer(id, this, height, print_z, slice_z));
}
-// Called by Print::apply_config().
+// Called by Print::apply().
// This method only accepts PrintObjectConfig and PrintRegionConfig option keys.
bool PrintObject::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
{
diff --git a/src/libslic3r/SLAPrint.cpp b/src/libslic3r/SLAPrint.cpp
index 457be23ba..f0dfddda0 100644
--- a/src/libslic3r/SLAPrint.cpp
+++ b/src/libslic3r/SLAPrint.cpp
@@ -1552,7 +1552,7 @@ SLAPrintObject::SLAPrintObject(SLAPrint *print, ModelObject *model_object):
SLAPrintObject::~SLAPrintObject() {}
-// Called by SLAPrint::apply_config().
+// Called by SLAPrint::apply().
// This method only accepts SLAPrintObjectConfig option keys.
bool SLAPrintObject::invalidate_state_by_config_options(const std::vector<t_config_option_key> &opt_keys)
{
diff --git a/t/combineinfill.t b/t/combineinfill.t
index 563ecb9c1..8aa0ff5e3 100644
--- a/t/combineinfill.t
+++ b/t/combineinfill.t
@@ -89,7 +89,7 @@ plan tests => 8;
# we disable combination after infill has been generated
$config->set('infill_every_layers', 1);
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
$print->process;
ok !(defined first { @{$_->get_region(0)->fill_surfaces} == 0 }
diff --git a/t/print.t b/t/print.t
index 6939d5f15..be2db3431 100644
--- a/t/print.t
+++ b/t/print.t
@@ -44,7 +44,7 @@ use Slic3r::Test;
is $print->print->regions->[0]->config->fill_density, 100, 'region config inherits model object config';
# user exports G-code, thus the default config is reapplied
- $print->print->apply_config($config);
+ $print->print->apply_config_perl_tests_only($config);
is $print->print->regions->[0]->config->fill_density, 100, 'apply_config() does not override per-object settings';
diff --git a/t/skirt_brim.t b/t/skirt_brim.t
index 225b0a92f..b05435784 100644
--- a/t/skirt_brim.t
+++ b/t/skirt_brim.t
@@ -106,7 +106,7 @@ use Slic3r::Test;
# we enable support material after skirt has been generated
$config->set('support_material', 1);
- $print->apply_config($config);
+ $print->apply_config_perl_tests_only($config);
my $skirt_length = 0;
my @extrusion_points = ();
diff --git a/xs/xsp/Print.xsp b/xs/xsp/Print.xsp
index f4c04577d..c35f967f8 100644
--- a/xs/xsp/Print.xsp
+++ b/xs/xsp/Print.xsp
@@ -142,8 +142,8 @@ _constant()
%};
void add_model_object(ModelObject* model_object, int idx = -1);
- bool apply_config(DynamicPrintConfig* config)
- %code%{ RETVAL = THIS->apply_config(*config); %};
+ bool apply_config_perl_tests_only(DynamicPrintConfig* config)
+ %code%{ RETVAL = THIS->apply_config_perl_tests_only(*config); %};
bool has_infinite_skirt();
std::vector<unsigned int> extruders() const;
int validate() %code%{

View File

@ -1,59 +0,0 @@
diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp
index 1280fa6d9..ff2295cd7 100644
--- a/src/slic3r/GUI/GLCanvas3D.cpp
+++ b/src/slic3r/GUI/GLCanvas3D.cpp
@@ -4098,8 +4098,8 @@ void GLCanvas3D::_render_gizmos_overlay() const
#if ENABLE_RETINA_GL
m_gizmos.set_overlay_scale(m_retina_helper->get_scale_factor());
#else
-// m_gizmos.set_overlay_scale(m_canvas->GetContentScaleFactor());
- m_gizmos.set_overlay_scale(wxGetApp().em_unit()*0.1f);//! #ys_FIXME_experiment
+ const float size = int(GLGizmosManager::Default_Icons_Size*wxGetApp().toolbar_icon_scale());
+ m_gizmos.set_overlay_icon_size(size);
#endif /* __WXMSW__ */
m_gizmos.render_overlay(*this, m_selection);
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 472abd6dc..6773dbd30 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -390,6 +390,27 @@ void GUI_App::set_label_clr_sys(const wxColour& clr) {
app_config->save();
}
+float GUI_App::toolbar_icon_scale(const bool is_limited/* = false*/) const
+{
+#ifdef __APPLE__
+ const float icon_sc = 1.0f; // for Retina display will be used its own scale
+#else
+ const float icon_sc = m_em_unit*0.1f;
+#endif // __APPLE__
+
+ const std::string& use_val = app_config->get("use_custom_toolbar_size");
+ const std::string& val = app_config->get("custom_toolbar_size");
+
+ if (val.empty() || use_val.empty() || use_val == "0")
+ return icon_sc;
+
+ int int_val = atoi(val.c_str());
+ if (is_limited && int_val < 50)
+ int_val = 50;
+
+ return 0.01f * int_val * icon_sc;
+}
+
void GUI_App::recreate_GUI()
{
// Weird things happen as the Paint messages are floating around the windows being destructed.
diff --git a/src/slic3r/GUI/GUI_App.hpp b/src/slic3r/GUI/GUI_App.hpp
index 1c9a462c6..b70f0dc16 100644
--- a/src/slic3r/GUI/GUI_App.hpp
+++ b/src/slic3r/GUI/GUI_App.hpp
@@ -115,6 +115,7 @@ public:
const wxFont& normal_font() { return m_normal_font; }
size_t em_unit() const { return m_em_unit; }
void set_em_unit(const size_t em_unit) { m_em_unit = em_unit; }
+ float toolbar_icon_scale(const bool is_limited = false) const;
void recreate_GUI();
void system_info();

View File

@ -1,105 +0,0 @@
diff --git a/src/slic3r/GUI/GUI_App.cpp b/src/slic3r/GUI/GUI_App.cpp
index 472abd6dc..74a574fe3 100644
--- a/src/slic3r/GUI/GUI_App.cpp
+++ b/src/slic3r/GUI/GUI_App.cpp
@@ -707,7 +707,7 @@ void GUI_App::update_mode()
void GUI_App::add_config_menu(wxMenuBar *menu)
{
auto local_menu = new wxMenu();
- wxWindowID config_id_base = wxWindow::NewControlId((int)ConfigMenuCnt);
+ wxWindowID config_id_base = wxWindow::NewControlId(int(ConfigMenuCnt));
const auto config_wizard_name = _(ConfigWizard::name(true).wx_str());
const auto config_wizard_tooltip = wxString::Format(_(L("Run %s")), config_wizard_name);
@@ -729,9 +729,9 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeSimple, _(L("Simple")), _(L("Simple View Mode")));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeAdvanced, _(L("Advanced")), _(L("Advanced View Mode")));
mode_menu->AppendRadioItem(config_id_base + ConfigMenuModeExpert, _(L("Expert")), _(L("Expert View Mode")));
- Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Check(get_mode() == comSimple); }, config_id_base + ConfigMenuModeSimple);
- Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Check(get_mode() == comAdvanced); }, config_id_base + ConfigMenuModeAdvanced);
- Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { evt.Check(get_mode() == comExpert); }, config_id_base + ConfigMenuModeExpert);
+ Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if(get_mode() == comSimple) evt.Check(true); }, config_id_base + ConfigMenuModeSimple);
+ Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if(get_mode() == comAdvanced) evt.Check(true); }, config_id_base + ConfigMenuModeAdvanced);
+ Bind(wxEVT_UPDATE_UI, [this](wxUpdateUIEvent& evt) { if(get_mode() == comExpert) evt.Check(true); }, config_id_base + ConfigMenuModeExpert);
local_menu->AppendSubMenu(mode_menu, _(L("Mode")), wxString::Format(_(L("%s View Mode")), SLIC3R_APP_NAME));
local_menu->AppendSeparator();
@@ -810,10 +810,14 @@ void GUI_App::add_config_menu(wxMenuBar *menu)
break;
}
});
- mode_menu->Bind(wxEVT_MENU, [this, config_id_base](wxEvent& event) {
- int id_mode = event.GetId() - config_id_base;
- save_mode(id_mode - ConfigMenuModeSimple);
- });
+
+ using std::placeholders::_1;
+
+ auto modfn = [this](int mode, wxCommandEvent&) { if(get_mode() != mode) save_mode(mode); };
+ mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comSimple, _1), config_id_base + ConfigMenuModeSimple);
+ mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comAdvanced, _1), config_id_base + ConfigMenuModeAdvanced);
+ mode_menu->Bind(wxEVT_MENU, std::bind(modfn, comExpert, _1), config_id_base + ConfigMenuModeExpert);
+
menu->Append(local_menu, _(L("&Configuration")));
}
diff --git a/src/slic3r/GUI/wxExtensions.cpp b/src/slic3r/GUI/wxExtensions.cpp
index 103a9ecf0..76ba853dc 100644
--- a/src/slic3r/GUI/wxExtensions.cpp
+++ b/src/slic3r/GUI/wxExtensions.cpp
@@ -2557,6 +2557,11 @@ ModeSizer::ModeSizer(wxWindow *parent, int hgap/* = 10*/) :
{_(L("Expert")), "mode_expert_sq.png"}
};
+ auto modebtnfn = [](wxCommandEvent &event, int mode_id) {
+ Slic3r::GUI::wxGetApp().save_mode(mode_id);
+ event.Skip();
+ };
+
m_mode_btns.reserve(3);
for (const auto& button : buttons) {
#ifdef __WXOSX__
@@ -2567,37 +2572,22 @@ ModeSizer::ModeSizer(wxWindow *parent, int hgap/* = 10*/) :
#else
m_mode_btns.push_back(new ModeButton(parent, wxID_ANY, button.second, button.first));;
#endif // __WXOSX__
+
+ m_mode_btns.back()->Bind(wxEVT_BUTTON, std::bind(modebtnfn, std::placeholders::_1, m_mode_btns.size() - 1));
+ Add(m_mode_btns.back());
}
-
- for (auto btn : m_mode_btns)
- {
- btn->Bind(wxEVT_BUTTON, [btn, this](wxCommandEvent &event) {
- event.Skip();
- int mode_id = 0;
- for (auto cur_btn : m_mode_btns) {
- if (cur_btn == btn)
- break;
- else
- mode_id++;
- }
- Slic3r::GUI::wxGetApp().save_mode(mode_id);
- });
-
- Add(btn);
- }
-
}
void ModeSizer::SetMode(const int mode)
{
- for (int m = 0; m < m_mode_btns.size(); m++)
- m_mode_btns[m]->SetState(m == mode);
+ for (size_t m = 0; m < m_mode_btns.size(); m++)
+ m_mode_btns[m]->SetState(int(m) == mode);
}
void ModeSizer::msw_rescale()
{
- for (int m = 0; m < m_mode_btns.size(); m++)
+ for (size_t m = 0; m < m_mode_btns.size(); m++)
m_mode_btns[m]->msw_rescale();
}

View File

@ -1,13 +0,0 @@
diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp
index ff1da37..a3f92e4 100644
--- a/src/libslic3r/Format/AMF.cpp
+++ b/src/libslic3r/Format/AMF.cpp
@@ -2,7 +2,7 @@
#include <string.h>
#include <map>
#include <string>
-#include <expat/expat.h>
+#include <expat.h>
#include <boost/nowide/cstdio.hpp>

View File

@ -1,65 +0,0 @@
diff --git a/src/libslic3r/Format/3mf.cpp b/src/libslic3r/Format/3mf.cpp
index 5a16a6e..2023259 100644
--- a/src/libslic3r/Format/3mf.cpp
+++ b/src/libslic3r/Format/3mf.cpp
@@ -16,7 +16,7 @@
#include <expat.h>
#include <Eigen/Dense>
-#include <miniz/miniz_zip.h>
+#include <miniz.h>
// VERSION NUMBERS
// 0 : .3mf, files saved by older slic3r or other applications. No version definition in them.
diff --git a/src/libslic3r/Format/AMF.cpp b/src/libslic3r/Format/AMF.cpp
index a3f92e4..f85c6d6 100644
--- a/src/libslic3r/Format/AMF.cpp
+++ b/src/libslic3r/Format/AMF.cpp
@@ -16,7 +16,7 @@
#include <boost/filesystem/operations.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/nowide/fstream.hpp>
-#include <miniz/miniz_zip.h>
+#include <miniz.h>
#if 0
// Enable debugging and assert in this file.
diff --git a/src/libslic3r/Format/PRUS.cpp b/src/libslic3r/Format/PRUS.cpp
index 80aae75..04cedc0 100644
--- a/src/libslic3r/Format/PRUS.cpp
+++ b/src/libslic3r/Format/PRUS.cpp
@@ -4,7 +4,7 @@
#include <boost/algorithm/string.hpp>
#include <boost/nowide/convert.hpp>
-#include <miniz/miniz_zip.h>
+#include <miniz.h>
#include <Eigen/Geometry>
diff --git a/src/libslic3r/Rasterizer/Rasterizer.cpp b/src/libslic3r/Rasterizer/Rasterizer.cpp
index 6384a24..e121355 100644
--- a/src/libslic3r/Rasterizer/Rasterizer.cpp
+++ b/src/libslic3r/Rasterizer/Rasterizer.cpp
@@ -15,7 +15,7 @@
#include <agg/agg_path_storage.h>
// Experimental minz image write:
-#include <miniz/miniz_tdef.h>
+#include <miniz.h>
namespace Slic3r {
diff --git a/src/libslic3r/Zipper.cpp b/src/libslic3r/Zipper.cpp
index 4466f1b..16f4f5b 100644
--- a/src/libslic3r/Zipper.cpp
+++ b/src/libslic3r/Zipper.cpp
@@ -3,7 +3,7 @@
#include <iostream>
#include "Zipper.hpp"
-#include "miniz/miniz_zip.h"
+#include <miniz.h>
#include <boost/log/trivial.hpp>
#include "I18N.hpp"

View File

@ -1,17 +0,0 @@
diff --git a/src/libslic3r/TriangleMesh.cpp b/src/libslic3r/TriangleMesh.cpp
index 20c9a9c..4d35cab 100644
--- a/src/libslic3r/TriangleMesh.cpp
+++ b/src/libslic3r/TriangleMesh.cpp
@@ -2,9 +2,9 @@
#include "ClipperUtils.hpp"
#include "Geometry.hpp"
#include "Tesselate.hpp"
-#include "qhull/src/libqhullcpp/Qhull.h"
-#include "qhull/src/libqhullcpp/QhullFacetList.h"
-#include "qhull/src/libqhullcpp/QhullVertexSet.h"
+#include <libqhullcpp/Qhull.h>
+#include <libqhullcpp/QhullFacetList.h>
+#include <libqhullcpp/QhullVertexSet.h>
#include <cmath>
#include <deque>
#include <queue>

View File

@ -2,8 +2,8 @@
%bcond_without perltests
Name: prusa-slicer
Version: 2.0.0
Release: 4%{?dist}
Version: 2.1.0~alpha1
Release: 1%{?dist}
Summary: 3D printing slicer optimized for Prusa printers
# The main PrusaSlicer code and resources are AGPLv3, with small parts as
@ -16,8 +16,7 @@ Summary: 3D printing slicer optimized for Prusa printers
# that here.
License: AGPLv3
URL: https://github.com/prusa3d/PrusaSlicer/
Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_2.0.0.tar.gz
Source0: https://github.com/prusa3d/PrusaSlicer/archive/version_2.1.0-alpha1.tar.gz
Source1: %name.desktop
Source2: %name.appdata.xml
@ -28,26 +27,18 @@ Source2: %name.appdata.xml
# https://github.com/prusa3d/PrusaSlicer/issues/2461
Source10: patch-testsuite-epsilon
# Fix an improper include of expat.h
# https://github.com/prusa3d/PrusaSlicer/pull/2315
Patch0: patch-expat-includes
# Fix a failure due to -Werror=format-security
# https://github.com/prusa3d/PrusaSlicer/pull/2757
Patch1: patch-format-security
# Fix improper qhull include locations
# https://github.com/prusa3d/PrusaSlicer/pull/2319
Patch1: patch-qhull-includes
# Fix a number of failing unit tests
# https://github.com/prusa3d/PrusaSlicer/issues/2288
Patch10: https://github.com/prusa3d/PrusaSlicer/commit/07282eb24d027817b4279f59ebbf0d80bac5f950.patch
# These patches are pulled from upstream's Debian packaging, and were cherry picked from post-release commits.
# I (JT) have not personally seen the bugs these fix but upstream asked that they be included.
Patch20: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/fix-gizmo-icon-size.patch
Patch21: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/handle-wx-assert-with-boost.patch
Patch22: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/mode-switching-fix.patch
# This patch is pulled from upstream's Debian packaging.
# I (JT) have not personally seen related bugs these fix but upstream asked
# that this be included.
Patch10: https://raw.githubusercontent.com/prusa3d/PrusaSlicer/debian/debian/patches/handle-wx-assert-with-boost.patch
BuildRequires: boost-devel
BuildRequires: cmake
BuildRequires: cereal-devel
BuildRequires: curl-devel
BuildRequires: desktop-file-utils
BuildRequires: eigen3-devel
@ -145,10 +136,6 @@ Provides: bundled(avrdude) = 6.3
# Upstream: https://github.com/artyom-beilis/nowide
Provides: bundled(boost-nowide)
# License: MPLv2.0
# Upstream: https://github.com/libigl/libigl
Provides: bundled(igl)
# Not packaged in Fedora, but could be.
# License: MIT
# Upstream: https://github.com/ocornut/imgui
@ -240,7 +227,7 @@ PrusaSlicer is based on Slic3r by Alessandro Ranelucci and the RepRap
community.
%prep
%autosetup -S git -n PrusaSlicer-version_2.0.0
%autosetup -S git -n PrusaSlicer-version_2.1.0-alpha1
commit () { git commit -q -a -m "$1" --author "%{__scm_author}"; }
@ -278,10 +265,6 @@ unbundle eigen
unbundle expat
unbundle glew
# This code doesn't seem to be used, so remove it to (potentially) simplify the
# licensing issue.
unbundle igl/copyleft
# Upstream says this is obsolete, but it's still needed for compilation.
# The Fedora version appears to work fine for that purpose so we'll use it.
unbundle poly2tri
@ -420,6 +403,10 @@ make test ARGS=-V
%changelog
* Tue Aug 13 2019 Jason L Tibbitts III <tibbs@math.uh.edu> - 2.1.0~alpha1-1
- Update to the current alpha.
- Drop several upstreamed patches.
* Fri Jul 26 2019 Fedora Release Engineering <releng@fedoraproject.org> - 2.0.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild