pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

prusaslicer: Update to 2.8.0alpha5



Module Name:	pkgsrc-wip
Committed By:	Paul Ripke <stix%stix.id.au@localhost>
Pushed By:	stix
Date:		Sun Jun 16 17:40:18 2024 +1000
Changeset:	f7e52d0b8672edccf708865646643b24e5bd0984

Modified Files:
	prusaslicer/Makefile
	prusaslicer/PLIST
	prusaslicer/distinfo
	prusaslicer/patches/patch-src_CMakeLists_txt
	prusaslicer/patches/patch-src_slic3r_CMakeLists.txt
	prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.hpp
	prusaslicer/patches/patch-src_slic3r_GUI_GUI__App.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_OpenGLManager.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_Preferences.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_Tab.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.hpp
	prusaslicer/patches/patch-tests_arrange_test__arrange.cpp
	prusaslicer/patches/patch-tests_libslic3r_test__voronoi.cpp
Added Files:
	prusaslicer/patches/patch-src_libslic3r_Utils_DirectoriesUtils.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_TopBar.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_UserAccountCommunication.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_WipeTowerDialog.cpp
	prusaslicer/patches/patch-tests_fff__print_benchmark__seams.cpp
	prusaslicer/patches/patch-tests_fff__print_test__seam__aligned.cpp
	prusaslicer/patches/patch-tests_fff__print_test__seam__geometry.cpp
	prusaslicer/patches/patch-tests_fff__print_test__seam__perimeters.cpp
	prusaslicer/patches/patch-tests_fff__print_test__seam__random.cpp
	prusaslicer/patches/patch-tests_fff__print_test__seam__rear.cpp
	prusaslicer/patches/patch-tests_fff__print_test__seam__shells.cpp
	prusaslicer/patches/patch-tests_sla__print_sla__zcorrection__tests.cpp
	prusaslicer/patches/patch-tests_slic3rutils_secretstore__tests.cpp
Removed Files:
	prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.cpp
	prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.hpp

Log Message:
prusaslicer: Update to 2.8.0alpha5

Summary

This is the first public alpha release of PrusaSlicer 2.8.0 (previous alphas
were internal). This release introduces Prusa Connect integration and many more
improvements and bugfixes.

To let you enjoy the alpha without worries, the alpha builds save their
profiles into PrusaSlicer-alpha directory, so you may use the alpha side by
side with the current release without ruining your production configuration.
The alpha will ask whether it should import a configuration from previously run
PrusaSlicer versions on the first start.

An important note for Linux users: The binaries will not run on newest Ubuntu
24.04 (and possibly other latest distributions). This problem will be solved
shortly in the next alpha/beta.

Prusa Connect integration

Prusa Connect is our online system to control printers from the browser and
distribute print jobs among them. Starting with this release, Prusa Connect is
accessible directly from PrusaSlicer to streamline the workflow. A login box
was added to the right of the top bar, which will open a browser window and
let you log in with your Prusa Account credentials. When the login is
successful, one more tab (Prusa Connect) will appear in the top bar. This tab
will present your Prusa Connect dashboard and all features that you are used
to.

When logged in, PrusaSlicer keeps track of the status of your printers and it
also knows with which of your printer profiles they are compatible (printer
model, MMU capabilities and nozzle diameter are checked). When a printer
compatible with a given printer profile is in Prusa Connect, a little colored
dots will appear in the printer profile dropdown in the right panel, displaying
current status of that printer. The summary of the state of connected printers
is shown just below the dropdown.

When ready to export G-code, a 'Send to Connect' button appears in the right
panel. Clicking this button will open a dialog window presenting all your
Connect printers compatible with the current project and allowing you to send
the generated G-code to one of them:

To streamline the workflow in the other direction, there is an extra button in
Connect labeled "Set as current", which is shown for every printer. Clicking it
will switch back to Plater tab and select first compatible printer profile
automatically. The language settings and light/dark mode in the Prusa Connect
tab is automatically switched so they match what is currently selected in
PrusaSlicer.

Previous way of sending G-codes to Prusa Connect using a physical printer
profile is deprecated. Users should stop using physical printers for Prusa
Connect, although the support will be maintained for some time. Nothing
changes with regard to PrusaLink or the other print hosts.

Note that logging in or using Prusa Connect is completely optional. PrusaSlicer
will work fine without the login, as it has worked before. We are considering
to add a Preferences checkbox to hide the login box completely to not bother
people who intend to never use it anyway. Your feedback is welcome.

Improved UI

We have decided to do several tweaks to the user interface. It is by no means a
complete redesign, so the controls are mostly where you are used to find them.
The most visible change is the top bar. The system menu was removed (on Windows
and Linux only) and it is now accessible through a separate button at the very
left of the top bar. The settings tabs are now larger and styled. The larger
top bar allowed us to integrate the Search field into it, so it is readily
accessible and it looks the same regardless of which tab is active (unlike in
previous versions). The right part of the top bar features the
Simple/Advanced/Expert switch (which is newly a dropdown) and the PrusaAccount
login box.

Next, both sliders in the Preview have been completely reworked and are now
part of the 3D scene, instead of being placed in a neighboring panels. Apart
from looking nicer and more modern, removing the side panels means that the
canvas size is larger. It also comes with a nice benefit that switching back
and forth between the 3D view and Preview no longer shifts the view, so the
transition is more comfortable.

Credits go to BambuStudio, whose sliders were used a starting point for the
implementation (although we later ended up rewriting most of it to fit
current PrusaSlicer architecture).

Topping the list of the UI improvements, the spacing and icon size in the
toolbars in the scene was slightly changed. The toolbars are now nicer and look
less cramped.

Improved G-code Viewer

The integrated G-code Viewer has been significantly reworked to improve its
performance. Less data are now transmitted between the CPU and GPU and more of
the work is now performed on the GPU side.

Furthermore, G-code Viewer is now able to visualize actual speed. The printer
accelerates and decelerates when direction changes, so even though the required
speed is set to a given value, it takes some time to reach it (if it is reached
at all). The acceleration limits are (as they always were) configurable in
Printer Settings -> Machine limits and PrusaSlicer always calculated with the
acceleration and deceleration phases to get precise time estimate, but it did
not allow to visualize them.

Note that the same disclaimers as for precise time estimates hold. If the
machine limits are set incorrectly (in the sense that the printer uses
different values), both the time estimate and the real speed visualization will
not align with reality. Also, the actual speed visualization is not available
for firmware flavors for which slicer does not allow setting the machine limits.

In addition, when moving the horizontal slider, there is a new popup dialog
showing the data that G-code Viewer has about current segment, including the
actual speed profile:

Single Perimeter for top and bottom layers

We have ported an option to use single perimeter for (top) solid infill layer.
The feature can be configured in Print Settings -> Only one perimeter and
based on the configuration, it results in single perimeter on all solid infill
layers, on top solid infill layers or on topmost solid infill layers. This
generally leads to improved visual look of the printed object, without
sacrificing structural rigidity.

This is a frequently requested feature, which was first implemented in
SuperSlicer, ported over to OrcaSlicer and then reimplemented in BambuStudio.
We have ported the code from BambuStudio with only small changes. Even though
we ended up not using the original SuperSlicer implementation, we would like
to thank to everyone who implemented the feature there and who worked on a PR
with the port (#10648), namely @supermerill, @vovodroid, @mjonuschar. Thanks
also go to @bambulab for rewriting the feature later.

Related to #7986, #9854, #10346, #10868, #11654, #11965, #12263.

New system profile updating system

Since Slic3rPE 1.40 (released six years ago), PrusaSlicer has a built-in
profile updater. Its task is to deliver read-only "system" profiles, which are
fine tuned for the given printer and filament, sparing the user from having to
tweak the individual parameters. The database of profiles has been growing ever
since, and it contains many profiles, both for Prusa products and products from
other vendors.

We have now split the profile database into several profile "repositories".
Profiles are updated only from repositories that PrusaSlicer is subscribed to.
The repositories are selected at the beginning of the Configuration Wizard. The
transition of your previous configuration requires no action on the user's
side, the repositories are automatically selected based on your currently
installed profiles.

This change is motivated by several internal reasons, but it also brings the
following benefits:

- Configuration Wizard loads faster, because it generally processes less data.
- Notifications informing about an existing update are only shown for your
  active repositories. E.g. if you only use SL1 printer, you are not disturbed
  by notifications about updated filament profiles, which are not relevant to
  you.

Offline updates

We have also covered the problem of updating system profiles on computers
without internet connection. Not connecting a computer to the internet is an
obvious security measure in environments where data leaks would pose a problem
(which is in most contexts, maybe apart from casual hobby printing). However,
the profile updater in PrusaSlicer relied on internet connection and there was
no way of updating the profiles on such off-the-grid stations. They had to rely
on undocumented and very user-unfriendly copying of configuration folders,
transferring settings as config bundles, etc.

It is now possible to download a file containing the configuration update for a
given repository from our website (note that the URL and the website are also
in an alpha stage). This file can then be loaded as an "Offline repository",
and the configuration process treats is the same way as it would use an online
update. This gives the user a possibility to update profiles by transferring
this file to the off-the-grid computer on a removable drive, distribute it
using a local network storage, etc.

These files can be loaded (and removed) also in the Configuration Wizard.
PrusaSlicer remembers path to the loaded files and it tries to use them anytime
when configuration update is triggered.

Seam improvements

Placement of seams is not a very well defined task, and it has many solutions.
After the last big batch of changes in the seam placing algorithm (in
2.5.0-alpha2), the placing of seams was detrimental on various models.

In this release, the seam-placing algorithm was significantly changed to
improve the results. We also did some other changes which allow the seam
placing algorithm to do a better job. To name the most visible improvements:

- The ordering of perimeters was optimized to avoid unnecessary long travels
  between individual loops.
- To further reduce long travels, in some special cases where there are two
  external perimeters the seams are placed in roughly the same spot.
- The previous algorithm for aligned seams produced the seams from
  discontinuous "seam chains" picked heuristically on the object's surface.
  Consequently, the old algorithm needed to fit a curve through the resulting
  seam points to achieve an aesthetically pleasing result. This worked for some
  models but produced worse results on others, where a strange "wiggling"
  appeared in places where a straight line was expected. This was particularly
  noticeable on very simple cylindrical models. The new seam aligning algorithm
  avoids this issue by employing a simpler strategy, more similar to the one
  used before 2.5.0-alpha2. It plans the seam from the bottom up, snapping to
  sharp corners. This approach generates several possible seams and selects the
  best one based on visibility criteria.
- One of the improvements in 2.5.0-alpha2 was the use of a seam visibility
  metric for seam placement. This worked well for seam hiding and the new
  algorithm still uses the visibility metric as the main criterion to pick the
  best seam possible.
- Previously, a single algorithm with different optimization criteria was used
  for both the aligned seam and the rear seam. This meant that the rear seam
  placement suffered from the same issues as the aligned seam algorithm
  (notably the artifacts produced by curve fitting). Another reported issue
  with the rear seam algorithm was that it had no notion of object center. In
  many use cases it is desirable that the seam is not only in the rear part of
  the object but also centered. Now there is a completely new separate
  algorithm for rear seam placement that tries to satisfy both criteria (rear
  and center).
- The nearest seam algorithm is now fully separated. It now simply first
  searches for the nearest corner to the previous position. If there is none it
  picks the nearest point on the perimeter.

The changes are related to issues #12759, #11433, #11190, #9649, #8867, #8512,

Other improvements with respect to 2.7.4

- When multi-material painting is applied on an object, it is now shown in the
  3D scene even when the multi-material painting tool is not opened.
- When using a Physical Printer profile, a new "Physical printer" tab will be
  shown in the top bar. Clicking it will show the website accessible at the
  physical printer URL (such as OctoPrint dashboard). This is supressed when
  the print host is Prusa Connect, which now does not need the physical printer
  profile at all (as described above).
- PrusaSlicer is now able to control heated chamber temperature (using
  M141/M191 G-codes). There are two new parameters in Filament Settings:
  minimal and nominal chamber temperature. The nominal temperature is the
  temperature of the heated chamber, minimal temperature is the temperature
  which has to be reached before the print starts. Setting minimal temperature
  to a lower value than nominal allows to start the print while the chamber is
  still heating up. In case of multi-extruder printer, the setting for the
  first filament is applied.
- Shrinkage compensation option was added in Filament Settings. There are two
  new configuration options in Filament Settings -> Advanced -> Shrinkage
  compensation, one for compensation in XY plane, the other for Z. The values
  define relative compensation values (percents). When using multiple filaments
  with different compensation values in one print, the compensation is not
  applied and the user is notified about it. The feature is independent on the
  already existing XY compensation in Print Settings, which is absolute and
  does a geometric offset instead of relative scaling of the geometry.
- Template filaments are now in a separate section in the Compare presets
  dialog.
- When switching from a printer preset with modified value of a custom G-code,
  the custom G-code configuration option is not selected to be transferred to
  the new preset by default. Transferring custom G-codes between different
  profiles is almost always undesirable and doing it by mistake usually leads
  to bad or failed print.
- There is a new option Prefer clockwise movements in Printer Settings.
  Enabling this option reverses direction of perimeters, tree supports
  structures etc.
- Until now, the command line interface allowed to load config from INI or 3MF
  file or modify the individual values, but it was not possible to use CLI to
  select a profile from the list of installed profiles, which was only possible
  through the GUI. New command line options were now added to query currently
  available profiles and to use config from an installed profile for slicing.
  The new parameters are:

--query-printer-models                                    # prints a JSON containing list of currently installed printer profiles
--query-printer-models --printer-technology SLA           # The same, but filters SLA printers (FFF is also possible)
--query-print-filament-profiles --printer-profile "name"  # prints JSON with a list of filament profiles compatible with a given printer profile

--print-profile --material-profile --printer-profile      # Used when slicing. Loads configuration from the given profile.

With multi-material prints, you can provide multiple filament profiles to the
--material-profile parameter by separating them with a semicolon. All of the
parameters are compatible with the --datadir parameter which can be used to set
custom configuration folder.

Bug fixes with respect to 2.7.4

- Warning triangle informing about broken model was not refresh after 'Reload
  from disk' (#4682).
- Fixed a crash during G-code generation when using binary G-code (#12390).
- Category "Undef" does not show in Unsaved Changes dialog anymore.
- When a printer profile is installed using the Configuration Wizard, it no
  longer overwrites user printer profiles with the same name if such profile
  exists (#3888).
- When saving a modified preset under a name matching an existing preset, they
  changes were not saved (#10716).
- Prevented saving of a new preset with a name that differs from an existing
  preset only in case (related to #6798).
- Fixed incorrect loading of filament override values when loading config from
  specific G-code files.
- Compare preset dialog did not respect compatibility conditions correctly.
- Fixed occasional error during slicing (related to Voronoi diagram generation)
  (#12385).
- Colorchanges are no longer loaded from 3MF when loading 'Geometry only'.
- Fixed a crash when adding a colorchange after a specific sequence of actions.
- Fixed a crash when importing certain SVGs (#12627).
- When using Cut function to cut an object which already had dowels from a
  previous cut, a dowel would sometimes move to an incorrect position (#12206).
- Fixed issues with negative volumes when cutting an object (#10850).
- Fixed incorrect direction of travel at the end of the external perimeter when
  Arc fitting was enabled and wipes disabled (#12427).
- When slicing objects painted by the painting tool, the slicing backend
  previously generated warnings about differing bed temperatures even for
  filaments which were not actually used.
- Fixed incorrect calculation of skirt separation (#12621, thanks to
  @djdelorie).
- Fix a crash when repeatedly cutting an object with dowel connectors.
- Slowdown on overhangs was incorrectly applied to non-overhanging parts of the
  extrusion.
- It was not possible to select an embossed text or SVG in the scene after a
  very specific sequence of actions.
- Unicode characters in the 3D scene dialogs and notifications were rendered as
  question marks when PrusaSlicer was run in a language which does not use them
  (e.g. Czech characters would not show when PrusaSlicer was set to English)
  (#11331).
- Fixed incorrect label in the preview slider when spiral vase mode was used
  (#12420).

Architecture, infrastructure

Starting with this release, only GTK3 Linux builds are provided. We no longer
support GTK2. It is outdated and not shipped with Linux distros for a long
time, so dropping the support should not prevent anyone from using the
software. Supporting two different versions of the toolkit is tedious and it is
time to move on.

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=f7e52d0b8672edccf708865646643b24e5bd0984

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 prusaslicer/Makefile                               |  6 +--
 prusaslicer/PLIST                                  | 50 +++++++++++++++---
 prusaslicer/distinfo                               | 45 ++++++++++------
 prusaslicer/patches/patch-src_CMakeLists_txt       | 10 ++--
 .../patch-src_libslic3r_Utils_DirectoriesUtils.cpp | 15 ++++++
 .../patches/patch-src_slic3r_CMakeLists.txt        |  8 +--
 .../patches/patch-src_slic3r_GUI_ConfigWizard.cpp  | 14 ++---
 .../patches/patch-src_slic3r_GUI_ConfigWizard.hpp  | 17 ++----
 .../patches/patch-src_slic3r_GUI_GUI__App.cpp      | 46 ++++++++---------
 .../patches/patch-src_slic3r_GUI_GUI__Preview.cpp  | 32 ------------
 .../patches/patch-src_slic3r_GUI_GUI__Preview.hpp  | 15 ------
 .../patches/patch-src_slic3r_GUI_OpenGLManager.cpp | 22 ++++----
 .../patches/patch-src_slic3r_GUI_Preferences.cpp   | 12 ++---
 prusaslicer/patches/patch-src_slic3r_GUI_Tab.cpp   | 19 ++-----
 .../patches/patch-src_slic3r_GUI_TopBar.cpp        | 60 ++++++++++++++++++++++
 ...tch-src_slic3r_GUI_UserAccountCommunication.cpp | 22 ++++++++
 .../patch-src_slic3r_GUI_WipeTowerDialog.cpp       | 22 ++++++++
 .../patches/patch-src_slic3r_GUI_wxExtensions.cpp  | 29 +++++------
 .../patches/patch-src_slic3r_GUI_wxExtensions.hpp  |  6 +--
 .../patches/patch-tests_arrange_test__arrange.cpp  |  5 +-
 .../patch-tests_fff__print_benchmark__seams.cpp    | 15 ++++++
 .../patch-tests_fff__print_test__seam__aligned.cpp | 59 +++++++++++++++++++++
 ...patch-tests_fff__print_test__seam__geometry.cpp | 43 ++++++++++++++++
 ...tch-tests_fff__print_test__seam__perimeters.cpp | 36 +++++++++++++
 .../patch-tests_fff__print_test__seam__random.cpp  | 13 +++++
 .../patch-tests_fff__print_test__seam__rear.cpp    | 13 +++++
 .../patch-tests_fff__print_test__seam__shells.cpp  | 22 ++++++++
 .../patch-tests_libslic3r_test__voronoi.cpp        | 16 ++++--
 ...ch-tests_sla__print_sla__zcorrection__tests.cpp | 34 ++++++++++++
 .../patch-tests_slic3rutils_secretstore__tests.cpp | 12 +++++
 30 files changed, 536 insertions(+), 182 deletions(-)

diffs:
diff --git a/prusaslicer/Makefile b/prusaslicer/Makefile
index d7894f5abf..34e54484bf 100644
--- a/prusaslicer/Makefile
+++ b/prusaslicer/Makefile
@@ -1,12 +1,12 @@
 # $NetBSD$
 
-PKGVERSION=	2.7.5rc1
+PKGVERSION=	2.8.0alpha5
 PKGNAME=	prusaslicer-${PKGVERSION}
-DISTNAME=	PrusaSlicer-${PKGVERSION:C/(beta|rc)/-\1/}
+DISTNAME=	PrusaSlicer-${PKGVERSION:C/(alpha|beta|rc)/-\1/}
 CATEGORIES=	cad
 MASTER_SITES=	${MASTER_SITE_GITHUB:=prusa3d/}
 GITHUB_PROJECT=	PrusaSlicer
-GITHUB_TAG=	version_${PKGVERSION:C/(beta|rc)/-\1/}
+GITHUB_TAG=	version_${PKGVERSION:C/(alpha|beta|rc)/-\1/}
 # Needed, else we strip the 'v' and look for "ersion".
 WRKSRC=		${WRKDIR}/${GITHUB_PROJECT}-${GITHUB_TAG}
 
diff --git a/prusaslicer/PLIST b/prusaslicer/PLIST
index e79ac9b04d..69f7763a00 100644
--- a/prusaslicer/PLIST
+++ b/prusaslicer/PLIST
@@ -59,6 +59,7 @@ share/PrusaSlicer/icons/check_on_focused.svg
 share/PrusaSlicer/icons/checked.svg
 share/PrusaSlicer/icons/cog.svg
 share/PrusaSlicer/icons/cog_.svg
+share/PrusaSlicer/icons/cog_f.svg
 share/PrusaSlicer/icons/cog_go.png
 share/PrusaSlicer/icons/collapse.svg
 share/PrusaSlicer/icons/collapse_btn.svg
@@ -68,6 +69,8 @@ share/PrusaSlicer/icons/colorchange_add_m.svg
 share/PrusaSlicer/icons/colorchange_del.svg
 share/PrusaSlicer/icons/colorchange_del_f.svg
 share/PrusaSlicer/icons/compare.svg
+share/PrusaSlicer/icons/connect_gcode.svg
+share/PrusaSlicer/icons/connect_status.svg
 share/PrusaSlicer/icons/convert_file.svg
 share/PrusaSlicer/icons/cooling.svg
 share/PrusaSlicer/icons/copy.svg
@@ -131,6 +134,8 @@ share/PrusaSlicer/icons/fuzzy_skin.svg
 share/PrusaSlicer/icons/gcode.icns
 share/PrusaSlicer/icons/hollow.svg
 share/PrusaSlicer/icons/hollowing.svg
+share/PrusaSlicer/icons/horizontal_hide.svg
+share/PrusaSlicer/icons/horizontal_show.svg
 share/PrusaSlicer/icons/import_config.svg
 share/PrusaSlicer/icons/import_config_bundle.svg
 share/PrusaSlicer/icons/import_plater.svg
@@ -160,6 +165,8 @@ share/PrusaSlicer/icons/lock_closed_white.svg
 share/PrusaSlicer/icons/lock_open.svg
 share/PrusaSlicer/icons/lock_open_f.svg
 share/PrusaSlicer/icons/lock_open_sys.svg
+share/PrusaSlicer/icons/login.svg
+share/PrusaSlicer/icons/logout.svg
 share/PrusaSlicer/icons/make_bold.svg
 share/PrusaSlicer/icons/make_italic.svg
 share/PrusaSlicer/icons/make_unbold.svg
@@ -220,6 +227,9 @@ share/PrusaSlicer/icons/plug.svg
 share/PrusaSlicer/icons/preview.svg
 share/PrusaSlicer/icons/preview_menu.svg
 share/PrusaSlicer/icons/printer.svg
+share/PrusaSlicer/icons/printer_available.svg
+share/PrusaSlicer/icons/printer_busy.svg
+share/PrusaSlicer/icons/printer_offline.svg
 share/PrusaSlicer/icons/printer_placeholder.png
 share/PrusaSlicer/icons/printer_white.svg
 share/PrusaSlicer/icons/question.svg
@@ -251,6 +261,9 @@ share/PrusaSlicer/icons/shape_gallery.svg
 share/PrusaSlicer/icons/sinking.svg
 share/PrusaSlicer/icons/skirt+brim.svg
 share/PrusaSlicer/icons/sla_printer.svg
+share/PrusaSlicer/icons/sla_printer_available.svg
+share/PrusaSlicer/icons/sla_printer_busy.svg
+share/PrusaSlicer/icons/sla_printer_offline.svg
 share/PrusaSlicer/icons/sla_supports.svg
 share/PrusaSlicer/icons/sla_view_original.svg
 share/PrusaSlicer/icons/sla_view_processed.svg
@@ -289,9 +302,12 @@ share/PrusaSlicer/icons/toolbar_arrow.svg
 share/PrusaSlicer/icons/toolbar_arrow_2.svg
 share/PrusaSlicer/icons/toolbar_background.png
 share/PrusaSlicer/icons/undo.svg
+share/PrusaSlicer/icons/undo_f.svg
 share/PrusaSlicer/icons/undo_menu.svg
 share/PrusaSlicer/icons/undo_toolbar.svg
 share/PrusaSlicer/icons/upload_queue.svg
+share/PrusaSlicer/icons/user.svg
+share/PrusaSlicer/icons/user_mask.svg
 share/PrusaSlicer/icons/vector_filament_param.svg
 share/PrusaSlicer/icons/vector_param.svg
 share/PrusaSlicer/icons/wrench.svg
@@ -426,6 +442,13 @@ share/PrusaSlicer/profiles/Anycubic/i3megas.svg
 share/PrusaSlicer/profiles/Anycubic/i3megas_bed.stl
 share/PrusaSlicer/profiles/Anycubic/mega0.svg
 share/PrusaSlicer/profiles/Anycubic/mega0_bed.stl
+share/PrusaSlicer/profiles/AnycubicSLA.idx
+share/PrusaSlicer/profiles/AnycubicSLA.ini
+share/PrusaSlicer/profiles/AnycubicSLA/PHOTON MONO SE_thumbnail.png
+share/PrusaSlicer/profiles/AnycubicSLA/PHOTON MONO X 6K_thumbnail.png
+share/PrusaSlicer/profiles/AnycubicSLA/PHOTON MONO X_thumbnail.png
+share/PrusaSlicer/profiles/AnycubicSLA/PHOTON MONO_thumbnail.png
+share/PrusaSlicer/profiles/ArchiveRepositoryManifest.json
 share/PrusaSlicer/profiles/Artillery.idx
 share/PrusaSlicer/profiles/Artillery.ini
 share/PrusaSlicer/profiles/Artillery/Genius_thumbnail.png
@@ -613,6 +636,14 @@ share/PrusaSlicer/profiles/Geeetech/MizarS_thumbnail.png
 share/PrusaSlicer/profiles/Geeetech/Mizar_thumbnail.png
 share/PrusaSlicer/profiles/Geeetech/ThunderPro_thumbnail.png
 share/PrusaSlicer/profiles/Geeetech/Thunder_thumbnail.png
+share/PrusaSlicer/profiles/HartSmartProducts.idx
+share/PrusaSlicer/profiles/HartSmartProducts.ini
+share/PrusaSlicer/profiles/HartSmartProducts/HSP1-I Duplicator Mode_thumbnail.png
+share/PrusaSlicer/profiles/HartSmartProducts/HSP1-I_thumbnail.png
+share/PrusaSlicer/profiles/HartSmartProducts/hsp1_i.svg
+share/PrusaSlicer/profiles/HartSmartProducts/hsp1_i_bed.stl
+share/PrusaSlicer/profiles/HartSmartProducts/hsp1_i_duplicator.svg
+share/PrusaSlicer/profiles/HartSmartProducts/hsp1_i_duplicator_bed.stl
 share/PrusaSlicer/profiles/INAT.idx
 share/PrusaSlicer/profiles/INAT.ini
 share/PrusaSlicer/profiles/INAT/PROTON_XE750_thumbnail.png
@@ -701,8 +732,6 @@ share/PrusaSlicer/profiles/PrusaResearch/MK4ISMMU3_thumbnail.png
 share/PrusaSlicer/profiles/PrusaResearch/MK4IS_thumbnail.png
 share/PrusaSlicer/profiles/PrusaResearch/MK4IS_thumbnail_v2.png
 share/PrusaSlicer/profiles/PrusaResearch/MK4_thumbnail.png
-share/PrusaSlicer/profiles/PrusaResearch/SL1S_thumbnail.png
-share/PrusaSlicer/profiles/PrusaResearch/SL1_thumbnail.png
 share/PrusaSlicer/profiles/PrusaResearch/XL2IS_alpha_thumbnail.png
 share/PrusaSlicer/profiles/PrusaResearch/XL2IS_beta_thumbnail.png
 share/PrusaSlicer/profiles/PrusaResearch/XL2IS_thumbnail.png
@@ -728,14 +757,18 @@ share/PrusaSlicer/profiles/PrusaResearch/mk3_bed.stl
 share/PrusaSlicer/profiles/PrusaResearch/mk4.svg
 share/PrusaSlicer/profiles/PrusaResearch/mk4_bed.stl
 share/PrusaSlicer/profiles/PrusaResearch/mk4is.svg
-share/PrusaSlicer/profiles/PrusaResearch/sl1.svg
-share/PrusaSlicer/profiles/PrusaResearch/sl1_bed.stl
-share/PrusaSlicer/profiles/PrusaResearch/sl1s.svg
-share/PrusaSlicer/profiles/PrusaResearch/sl1s_bed.stl
 share/PrusaSlicer/profiles/PrusaResearch/xl.svg
 share/PrusaSlicer/profiles/PrusaResearch/xl_bed.stl
 share/PrusaSlicer/profiles/PrusaResearch/xlis_alpha.svg
 share/PrusaSlicer/profiles/PrusaResearch/xlis_beta.svg
+share/PrusaSlicer/profiles/PrusaResearchSLA.idx
+share/PrusaSlicer/profiles/PrusaResearchSLA.ini
+share/PrusaSlicer/profiles/PrusaResearchSLA/SL1S_thumbnail.png
+share/PrusaSlicer/profiles/PrusaResearchSLA/SL1_thumbnail.png
+share/PrusaSlicer/profiles/PrusaResearchSLA/sl1.svg
+share/PrusaSlicer/profiles/PrusaResearchSLA/sl1_bed.stl
+share/PrusaSlicer/profiles/PrusaResearchSLA/sl1s.svg
+share/PrusaSlicer/profiles/PrusaResearchSLA/sl1s_bed.stl
 share/PrusaSlicer/profiles/RatRig.idx
 share/PrusaSlicer/profiles/RatRig.ini
 share/PrusaSlicer/profiles/RatRig/VC3_300_thumbnail.png
@@ -750,6 +783,8 @@ share/PrusaSlicer/profiles/RatRig/rr-vc-500.stl
 share/PrusaSlicer/profiles/RatRig/rr-vc-500.svg
 share/PrusaSlicer/profiles/RatRig/rr-vminion.stl
 share/PrusaSlicer/profiles/RatRig/rr-vminion.svg
+share/PrusaSlicer/profiles/RatRig/vc4-corexy.png
+share/PrusaSlicer/profiles/RatRig/vc4-hybrid.png
 share/PrusaSlicer/profiles/Rigid3D.idx
 share/PrusaSlicer/profiles/Rigid3D.ini
 share/PrusaSlicer/profiles/Rigid3D/Mucit2_thumbnail.png
@@ -1022,6 +1057,9 @@ share/PrusaSlicer/shapes/torus.png
 share/PrusaSlicer/shapes/torus.stl
 share/PrusaSlicer/shapes/universal wall mount hole.png
 share/PrusaSlicer/shapes/universal wall mount hole.stl
+share/PrusaSlicer/web/connect_loading.html
+share/PrusaSlicer/web/connection_failed.html
+share/PrusaSlicer/web/loading.html
 share/applications/PrusaGcodeviewer.desktop
 share/applications/PrusaSlicer.desktop
 share/icons/hicolor/128x128/apps/PrusaSlicer-gcodeviewer.png
diff --git a/prusaslicer/distinfo b/prusaslicer/distinfo
index 0b2a198a4e..94e9381d54 100644
--- a/prusaslicer/distinfo
+++ b/prusaslicer/distinfo
@@ -1,11 +1,11 @@
 $NetBSD$
 
-BLAKE2s (PrusaSlicer-2.7.5-rc1.tar.gz) = f8c9b9ecdb9bc2c93a193506c4872e7fb18830bde610e504166cde567a98b282
-SHA512 (PrusaSlicer-2.7.5-rc1.tar.gz) = da1b96ac6e990dcd45ae9c3faf735b86fc384d40a17e5b32021cb99e98f1be52de800a55ca3e53f89d6f2068905ec882771d3f94494fb7b3c6d6638a40c1eb8b
-Size (PrusaSlicer-2.7.5-rc1.tar.gz) = 66044444 bytes
+BLAKE2s (PrusaSlicer-2.8.0-alpha5.tar.gz) = dc9a5bb49396b753d45d48c02f66eef5c647a2afafb1433247fda8a5dc3a148f
+SHA512 (PrusaSlicer-2.8.0-alpha5.tar.gz) = 1fb9749646f08dac750f7ef08194bd7e7e55c81cdfb2c1b5352f1846305c894c05d780f5a4ff164a40f0d46388472431e4ac5c35426eb18e6275c5762329d5e6
+Size (PrusaSlicer-2.8.0-alpha5.tar.gz) = 68915023 bytes
 SHA1 (patch-CMakeLists.txt) = 33eb39d85ba7b33226f2cc022250872c3ffa28d8
 SHA1 (patch-cmake_modules_FindOpenVDB.cmake) = 4f2afc423a70fe60617b33ff7f26859b39775faa
-SHA1 (patch-src_CMakeLists_txt) = 24e0b8e6512b2a3f84204b03d8161aca903748a1
+SHA1 (patch-src_CMakeLists_txt) = 1e2d07daef1ed2160f0a5e429efe4d1b01989484
 SHA1 (patch-src_avrdude_arduino.c) = ff02a4cab1c2d8c82ec7b22c7447ed5ec360ac57
 SHA1 (patch-src_avrdude_libavrdude.h) = 62d48054b147985249664f257dbd8bbd670df233
 SHA1 (patch-src_imgui_imgui__demo.cpp) = 2de572e8ce6a53b9ce3755945985c3a8133ffa41
@@ -16,11 +16,12 @@ SHA1 (patch-src_libslic3r_Platform.cpp) = 3066585efc98ba4963e41bda5952df38a7b095
 SHA1 (patch-src_libslic3r_Platform.hpp) = 5626058616d04396bff6c8550951d04fe03249e4
 SHA1 (patch-src_libslic3r_SupportSpotsGenerator.cpp) = b1080470f18e873ad7b39a5e56b4aabd8be87011
 SHA1 (patch-src_libslic3r_Thread.cpp) = 8aa488b933baa97132058f88a82eef8db73ab2f5
+SHA1 (patch-src_libslic3r_Utils_DirectoriesUtils.cpp) = 02c874c348016d572ddf8fed3171aabe2d4550c0
 SHA1 (patch-src_occt__wrapper_CMakeLists.txt) = 2e11271757bcc76f3832c8fd27943f3ef97136f1
-SHA1 (patch-src_slic3r_CMakeLists.txt) = 443efdac84f6b60f6016abaf034d40b80f5c1560
+SHA1 (patch-src_slic3r_CMakeLists.txt) = 119ef869965a2cdcfd82208486ffbd603497d425
 SHA1 (patch-src_slic3r_GUI_BitmapCache.cpp) = 9a464bcb09589e12de70ce57cda17f526df33b9b
-SHA1 (patch-src_slic3r_GUI_ConfigWizard.cpp) = 12501ccf61c18520a543b6e8fc3d0a41a29122f1
-SHA1 (patch-src_slic3r_GUI_ConfigWizard.hpp) = 6eed54e08497ec1dc6fea33263ab65d2d7e0dc0d
+SHA1 (patch-src_slic3r_GUI_ConfigWizard.cpp) = a8bd1d621f73ae6464b1ba4a5cb1db965e8e551b
+SHA1 (patch-src_slic3r_GUI_ConfigWizard.hpp) = b0f75d593c4b1d2787fc450be5afc2ce21e42608
 SHA1 (patch-src_slic3r_GUI_DesktopIntegrationDialog.cpp) = 35ccd8882313eb3270e88c47d496d62db96f4d36
 SHA1 (patch-src_slic3r_GUI_DesktopIntegrationDialog.hpp) = c8760f69fac22d1a4cf8c7843fb96b12fdb69def
 SHA1 (patch-src_slic3r_GUI_EditGCodeDialog.cpp) = 4a66003e5eb8f78961560cdf5f4805e7f6b10e0f
@@ -29,40 +30,42 @@ SHA1 (patch-src_slic3r_GUI_Field.cpp) = a0901064c68aa5e6c2396ccec36018e45f92fbcb
 SHA1 (patch-src_slic3r_GUI_GLCanvas3D.cpp) = 11e42a87d7124ac92027af9e385533f0455d788b
 SHA1 (patch-src_slic3r_GUI_GUI.cpp) = ab8bb26e14f17eed20587693ac1ef568b8cd8cd5
 SHA1 (patch-src_slic3r_GUI_GUI.hpp) = 52442f3881564cfe7c31ff51d63c96129f162aed
-SHA1 (patch-src_slic3r_GUI_GUI__App.cpp) = ce117af6ec747b768fd9b4e519a2636fa73e0139
+SHA1 (patch-src_slic3r_GUI_GUI__App.cpp) = 43d46cf899bd42f81720e7254d30bedfe426f637
 SHA1 (patch-src_slic3r_GUI_GUI__Factories.cpp) = a3db8dc6e41c4df3cba7282fdd0cdadd1bc7d956
 SHA1 (patch-src_slic3r_GUI_GUI__ObjectLayers.cpp) = da99be89d62efffceaccc81ade8e55e1fadb7919
-SHA1 (patch-src_slic3r_GUI_GUI__Preview.cpp) = 8555c73aa6aa3d65b4d34fc93ccb1fbb2957a76f
-SHA1 (patch-src_slic3r_GUI_GUI__Preview.hpp) = 904556d0f85f28a8174845089647bb3691783f37
 SHA1 (patch-src_slic3r_GUI_GUI__Utils.cpp) = bcbc83109ba7806e6371d0ef10f3c05cc480d730
 SHA1 (patch-src_slic3r_GUI_InstanceCheck.cpp) = c9ae1ec2db2b493578cc128383fa4cf0b3e2ae6a
 SHA1 (patch-src_slic3r_GUI_InstanceCheck.hpp) = 2af0741f480c41d5cc5bd9d3e55480c8e6ab029c
 SHA1 (patch-src_slic3r_GUI_KBShortcutsDialog.cpp) = 82a395a10e9d0a1b049863d8d30bce2ed99cb5f2
 SHA1 (patch-src_slic3r_GUI_Mouse3DController.cpp) = bf8bf60e17e304a2022b9a80852d7ab38fc2451d
 SHA1 (patch-src_slic3r_GUI_Mouse3DController.hpp) = 6a008114e932b08951428b6fa882b41acaa85c0b
-SHA1 (patch-src_slic3r_GUI_OpenGLManager.cpp) = 01bb904ac3390ce098bf9a528e2d93b09e67615f
+SHA1 (patch-src_slic3r_GUI_OpenGLManager.cpp) = 9e268c262df27de127d077585c142b941fae8cc1
 SHA1 (patch-src_slic3r_GUI_OptionsGroup.cpp) = c413f24a9a50069b93bdd611b95fa85ccab45567
 SHA1 (patch-src_slic3r_GUI_PhysicalPrinterDialog.cpp) = 5dbe3c5c19ce5d03b5dd310af484b712b091efda
 SHA1 (patch-src_slic3r_GUI_Plater.cpp) = 840abde0ab6e033787c301f8157a291699f31158
-SHA1 (patch-src_slic3r_GUI_Preferences.cpp) = 8db6adef007c656d7eadccda7fbddb53e4c91ed3
+SHA1 (patch-src_slic3r_GUI_Preferences.cpp) = 37459f9fa37751e0b72ba8538eb44c286a5174d4
 SHA1 (patch-src_slic3r_GUI_PresetComboBoxes.cpp) = ae083491bb2b1228c0f666fdc36b1b3ca4008c3c
 SHA1 (patch-src_slic3r_GUI_PresetComboBoxes.hpp) = 0c84c1b706a1f4e00f60c1677c7edf53845d4467
 SHA1 (patch-src_slic3r_GUI_PrintHostDialogs.cpp) = fb83c21579d675c8459431e429e2e2d0c41fc623
 SHA1 (patch-src_slic3r_GUI_RemovableDriveManager.cpp) = 413499908128be48106d5fd6aea5d413bb959b35
-SHA1 (patch-src_slic3r_GUI_Tab.cpp) = 3b5a75e6feddd9434b7d17dc7c6b35e4debd7d92
+SHA1 (patch-src_slic3r_GUI_Tab.cpp) = 148ba19a624036acc0c7aa3d0d121998e5246569
+SHA1 (patch-src_slic3r_GUI_TopBar.cpp) = cf899a96bbf324ee2f2e8e15dccaa32a798d094b
 SHA1 (patch-src_slic3r_GUI_UnsavedChangesDialog.cpp) = 1594eb7521f23c42700b0fbed7c039b62e9d4029
 SHA1 (patch-src_slic3r_GUI_UnsavedChangesDialog.hpp) = 0bd01147f0b654d190534959708fbf346cbb364e
 SHA1 (patch-src_slic3r_GUI_UpdateDialogs.cpp) = 7fdcc609e66c619c110db2da18b24ddfd0ffe2a2
-SHA1 (patch-src_slic3r_GUI_wxExtensions.cpp) = f36725675ad69d0f3a68183a8719ca4babeb3aed
-SHA1 (patch-src_slic3r_GUI_wxExtensions.hpp) = aa5bd2f325452cb2d9c2cef1dd50f37a149d7b6a
+SHA1 (patch-src_slic3r_GUI_UserAccountCommunication.cpp) = 42f065373028e91563e6f49339e0e36307e20568
+SHA1 (patch-src_slic3r_GUI_WipeTowerDialog.cpp) = fc6fd1bfee7001c268bf50209bcfd1cb96f6a9ad
+SHA1 (patch-src_slic3r_GUI_wxExtensions.cpp) = d6e807f3dd1f18fa9c703798067fa1e808112891
+SHA1 (patch-src_slic3r_GUI_wxExtensions.hpp) = 356da6dbd7ca7f60fa8a73c51533a1c1ad1530c1
 SHA1 (patch-src_slic3r_Utils_FontConfigHelp.hpp) = 8027a1bc90a7f0ad1b53787a25f1e8a28c343ba2
 SHA1 (patch-src_slic3r_Utils_Serial.cpp) = 77dbb4e3526e932c04b8020b6f808278d1319bdb
 SHA1 (patch-src_slic3r_Utils_WifiScanner.cpp) = a7c8d6dfb43ddaca651df13b487b43dd51b32719
 SHA1 (patch-src_slic3r_Utils_WxFontUtils.cpp) = cc033a04f3219b0f4229344e14d44be63192db60
 SHA1 (patch-tests_CMakeLists.txt) = 89670b4a0a74f9cf985b4b3f0e7aa3f83d8b8a36
-SHA1 (patch-tests_arrange_test__arrange.cpp) = e51371c9c4a41a54ebf7d8a220e61053e967d2aa
+SHA1 (patch-tests_arrange_test__arrange.cpp) = 4861d58845a0285b59d2d75869e35121f1293d8d
 SHA1 (patch-tests_arrange_test__arrange__integration.cpp) = 94f9a1e67647baf5563f13d2ead6d666a2a04e22
 SHA1 (patch-tests_catch__main.hpp) = cbcf811b2ac9d95c4a16e34068fa64a771f6527d
+SHA1 (patch-tests_fff__print_benchmark__seams.cpp) = 946182bb449f35142decaa23bf470d553550da05
 SHA1 (patch-tests_fff__print_test__avoid__crossing__perimeters.cpp) = 7ecee4420340190017bea14e51f9f20e9a9d40ec
 SHA1 (patch-tests_fff__print_test__bridges.cpp) = 9ed9cfdb94800fdef8b70aeae90ed43f3378cd1a
 SHA1 (patch-tests_fff__print_test__cancel__object.cpp) = 257e072468b7f12806d669f41aa617605d202d5e
@@ -86,6 +89,12 @@ SHA1 (patch-tests_fff__print_test__print.cpp) = 70d12a80f17506eb302ae690316fb495
 SHA1 (patch-tests_fff__print_test__printgcode.cpp) = 26f51fc96dfa04ba9db7a7cf22a84b71e48e359f
 SHA1 (patch-tests_fff__print_test__printobject.cpp) = c66c3cf170de6a83c9c51d6648b662f3a256c694
 SHA1 (patch-tests_fff__print_test__retraction.cpp) = 9d680474692d291bd9aaff7ed6a96aae2dc663df
+SHA1 (patch-tests_fff__print_test__seam__aligned.cpp) = d299dc2f493ce57a51aa00395321828d91241cd8
+SHA1 (patch-tests_fff__print_test__seam__geometry.cpp) = 396c183e0f2d711baf4ccb8a2652368df21fc58f
+SHA1 (patch-tests_fff__print_test__seam__perimeters.cpp) = d87f71a5a62be5832bbdf4ff436326530be7df39
+SHA1 (patch-tests_fff__print_test__seam__random.cpp) = 2b73d3ed62bc5a60d18e7e60f7e9e05cc38e9f86
+SHA1 (patch-tests_fff__print_test__seam__rear.cpp) = 88ffce562371d823ea45e68486ed822f24d13fa7
+SHA1 (patch-tests_fff__print_test__seam__shells.cpp) = 32aa8dafd0e8512e314e093592d7f8c91bdb4202
 SHA1 (patch-tests_fff__print_test__shells.cpp) = c96072233c9f35a798971b9fd220ccbb423d82c3
 SHA1 (patch-tests_fff__print_test__skirt__brim.cpp) = 5bdddb6929c85a5c53da5b9a1f96fdb975955eee
 SHA1 (patch-tests_fff__print_test__support__material.cpp) = 2c0b98b3f885b058fc15f11699c48dea0632bb3a
@@ -132,7 +141,7 @@ SHA1 (patch-tests_libslic3r_test__surface__mesh.cpp) = 25112b64fbab6a6cf4654af79
 SHA1 (patch-tests_libslic3r_test__timeutils.cpp) = c75d00e97b5413e531a2b509ef4d43682f0ce5fc
 SHA1 (patch-tests_libslic3r_test__triangulation.cpp) = 84a81713f93dfe5f4401a8fe89d9ac6daa53b4e4
 SHA1 (patch-tests_libslic3r_test__utils.cpp) = 48c0600c0c903aa04080a6653d1831bdef54d26a
-SHA1 (patch-tests_libslic3r_test__voronoi.cpp) = beab4970dc32237334e46b422309852e280e26cd
+SHA1 (patch-tests_libslic3r_test__voronoi.cpp) = b39178892b71d39ea4a48d61da493fb0e7010f62
 SHA1 (patch-tests_sla__print_sla__archive__readwrite__tests.cpp) = 064eefb0d093af63c8a91eb92fe12a0264ae8c46
 SHA1 (patch-tests_sla__print_sla__print__tests.cpp) = fe5a6a602901069088af73da7b5f63d40329f522
 SHA1 (patch-tests_sla__print_sla__raycast__tests.cpp) = 2a78f94de919695e72df0636ea937e89fec2a5d4
@@ -140,6 +149,8 @@ SHA1 (patch-tests_sla__print_sla__supptgen__tests.cpp) = 4128d2edba4b7683b1976d4
 SHA1 (patch-tests_sla__print_sla__supptreeutils__tests.cpp) = 683f98679a50d5146fe7173c10291a76bca81c32
 SHA1 (patch-tests_sla__print_sla__test__utils.cpp) = 16b7c0ba877a7f8be2171b7b99b18bdf3f847d12
 SHA1 (patch-tests_sla__print_sla__test__utils.hpp) = f04aeb14ad5966cf9d091512cfbb7caf9448092b
+SHA1 (patch-tests_sla__print_sla__zcorrection__tests.cpp) = 609b2198fbaa76d86ac8e07effd99cbe78862170
+SHA1 (patch-tests_slic3rutils_secretstore__tests.cpp) = ec391b317dc0514ec32b9a68f3bffd886ffcfcdf
 SHA1 (patch-tests_slic3rutils_slic3r__arrangejob__tests.cpp) = 3cd6288e6ceeafde1885600d475f63b041b4ed45
 SHA1 (patch-tests_slic3rutils_slic3r__jobs__tests.cpp) = bba4e4256b6bfdbb011d51bb542acc60c8f705e3
 SHA1 (patch-tests_slic3rutils_slic3r__version__tests.cpp) = 4ac34b33f56f3cd56c4905b05eff0198c3bb0b72
diff --git a/prusaslicer/patches/patch-src_CMakeLists_txt b/prusaslicer/patches/patch-src_CMakeLists_txt
index db0075a27b..dba0a2523f 100644
--- a/prusaslicer/patches/patch-src_CMakeLists_txt
+++ b/prusaslicer/patches/patch-src_CMakeLists_txt
@@ -3,18 +3,18 @@ $NetBSD$
 Use libhidapi from pkgsrc.
 Treat the BSDs like Linux for wxWidgets.
 
---- src/CMakeLists.txt.orig	2023-09-06 06:42:26.000000000 +0000
+--- src/CMakeLists.txt.orig	2024-06-15 05:46:24.368814750 +0000
 +++ src/CMakeLists.txt
-@@ -33,8 +33,6 @@ endif ()
- 
+@@ -32,8 +32,6 @@ endif ()
  if (SLIC3R_GUI)
      add_subdirectory(imgui)
+     add_subdirectory(libvgcode)
 -    add_subdirectory(hidapi)
 -    include_directories(hidapi/include)
  
      if(WIN32)
          message(STATUS "WXWIN environment set to: $ENV{WXWIN}")
-@@ -47,7 +45,7 @@ if (SLIC3R_GUI)
+@@ -46,7 +44,7 @@ if (SLIC3R_GUI)
          endif()
      endif()
  
@@ -22,4 +22,4 @@ Treat the BSDs like Linux for wxWidgets.
 +    if (CMAKE_HOST_LINUX OR CMAKE_HOST_BSD)
          set (wxWidgets_CONFIG_OPTIONS "--toolkit=gtk${SLIC3R_GTK}")
      endif ()
-     find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl)
+     find_package(wxWidgets 3.2 MODULE REQUIRED COMPONENTS base core adv html gl webview)
diff --git a/prusaslicer/patches/patch-src_libslic3r_Utils_DirectoriesUtils.cpp b/prusaslicer/patches/patch-src_libslic3r_Utils_DirectoriesUtils.cpp
new file mode 100644
index 0000000000..53f5d6ff04
--- /dev/null
+++ b/prusaslicer/patches/patch-src_libslic3r_Utils_DirectoriesUtils.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Treat NetBSD like linux.
+
+--- src/libslic3r/Utils/DirectoriesUtils.cpp.orig	2024-06-15 08:21:25.981869460 +0000
++++ src/libslic3r/Utils/DirectoriesUtils.cpp
+@@ -46,7 +46,7 @@ static std::string GetDataDir()
+     return  boost::nowide::narrow(buffer);
+ }
+ 
+-#elif defined(__linux__)
++#elif defined(__linux__) || defined(__NetBSD__)
+ 
+ #include <stdlib.h>
+ #include <pwd.h>
diff --git a/prusaslicer/patches/patch-src_slic3r_CMakeLists.txt b/prusaslicer/patches/patch-src_slic3r_CMakeLists.txt
index e986de7261..85fe8dbc1d 100644
--- a/prusaslicer/patches/patch-src_slic3r_CMakeLists.txt
+++ b/prusaslicer/patches/patch-src_slic3r_CMakeLists.txt
@@ -2,14 +2,14 @@ $NetBSD$
 
 Recent libhidapi renamed the library to include -libusb suffix.
 
---- src/slic3r/CMakeLists.txt.orig	2023-06-19 12:07:14.000000000 +0000
+--- src/slic3r/CMakeLists.txt.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/CMakeLists.txt
-@@ -319,7 +319,7 @@ endforeach()
+@@ -400,7 +400,7 @@ endforeach()
  
  encoding_check(libslic3r_gui)
  
--target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
-+target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui GLEW::GLEW OpenGL::GL hidapi-libusb libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
+-target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui libvgcode GLEW::GLEW OpenGL::GL hidapi libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
++target_link_libraries(libslic3r_gui libslic3r avrdude libcereal imgui libvgcode GLEW::GLEW OpenGL::GL hidapi-libusb libcurl ${wxWidgets_LIBRARIES} NanoSVG::nanosvg NanoSVG::nanosvgrast)
  
  if (MSVC)
      target_link_libraries(libslic3r_gui Setupapi.lib)
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.cpp
index b7d6bb3840..f591726b1a 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.cpp
@@ -2,18 +2,18 @@ $NetBSD$
 
 Treat NetBSD like Linux.
 
---- src/slic3r/GUI/ConfigWizard.cpp.orig	2024-04-05 09:25:31.000000000 +0000
+--- src/slic3r/GUI/ConfigWizard.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/ConfigWizard.cpp
-@@ -69,7 +69,7 @@
- #include "slic3r/GUI/I18N.hpp"
- #include "slic3r/Config/Version.hpp"
+@@ -75,7 +75,7 @@
  
+ /* ysFIXME - delete after testing and release
+ // it looks like this workaround is no need any more after update of the wxWidgets to 3.2.0
 -#if defined(__linux__) && defined(__WXGTK3__)
 +#if (defined(__linux__) || defined(__NetBSD__)) && defined(__WXGTK3__)
  #define wxLinux_gtk3 true
  #else
  #define wxLinux_gtk3 false
-@@ -596,7 +596,7 @@ void PageWelcome::set_run_reason(ConfigW
+@@ -637,7 +637,7 @@ void PageWelcome::set_run_reason(ConfigW
      const bool data_empty = run_reason == ConfigWizard::RR_DATA_EMPTY;
      welcome_text->Show(data_empty);
      cbox_reset->Show(!data_empty);
@@ -22,7 +22,7 @@ Treat NetBSD like Linux.
      if (!DesktopIntegrationDialog::is_integrated())
          cbox_integrate->Show(true);
      else
-@@ -1518,7 +1518,7 @@ PageDownloader::PageDownloader(ConfigWiz
+@@ -1695,7 +1695,7 @@ PageDownloader::PageDownloader(ConfigWiz
          ));
      }
  
@@ -31,7 +31,7 @@ Treat NetBSD like Linux.
      append_text(wxString::Format(_L(
          "On Linux systems the process of registration also creates desktop integration files for this version of application."
      )));
-@@ -1582,7 +1582,7 @@ bool DownloaderUtils::Worker::perform_re
+@@ -1761,7 +1761,7 @@ bool DownloaderUtils::Worker::perform_re
  #elif __APPLE__
      // Apple registers for custom url in info.plist thus it has to be already registered since build.
      // The url will always trigger opening of prusaslicer and we have to check that user has allowed it. (GUI_App::MacOpenURL is the triggered method)
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.hpp b/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.hpp
index 073f580e77..51a23e24ef 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.hpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_ConfigWizard.hpp
@@ -2,23 +2,14 @@ $NetBSD$
 
 Treat NetBSD like Linux.
 
---- src/slic3r/GUI/ConfigWizard.hpp.orig	2023-06-02 13:41:15.000000000 +0000
+--- src/slic3r/GUI/ConfigWizard.hpp.orig	2024-06-15 06:02:13.578363380 +0000
 +++ src/slic3r/GUI/ConfigWizard.hpp
-@@ -22,7 +22,7 @@ namespace DownloaderUtils {
-         wxWindow*   m_parent{ nullptr };
-         wxTextCtrl* m_input_path{ nullptr };
-         bool        downloader_checked{ false };
--#ifdef __linux__
-+#if defined(__linux__) || defined(__NetBSD__)
-         bool        perform_registration_linux{ false };
- #endif // __linux__
- 
-@@ -41,7 +41,7 @@ namespace DownloaderUtils {
+@@ -53,7 +53,7 @@ namespace DownloaderUtils {
  
          bool on_finish();
-         bool perform_register(const std::string& path_override = {});
+         static bool perform_register(const std::string& path);
 -#ifdef __linux__
 +#if defined(__linux__) || defined(__NetBSD__)
-         bool get_perform_registration_linux() { return perform_registration_linux; }
+         static bool perform_registration_linux;
  #endif // __linux__
      };
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_GUI__App.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_GUI__App.cpp
index 658e26ec01..fe54281100 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_GUI__App.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_GUI__App.cpp
@@ -4,9 +4,9 @@ Treat NetBSD like Linux.
 
 Silence wxSizer warnings introduced with 2.6.0rc1.
 
---- src/slic3r/GUI/GUI_App.cpp.orig	2024-04-05 09:25:31.000000000 +0000
+--- src/slic3r/GUI/GUI_App.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/GUI_App.cpp
-@@ -403,7 +403,7 @@ private:
+@@ -411,7 +411,7 @@ private:
  };
  
  
@@ -15,16 +15,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
  bool static check_old_linux_datadir(const wxString& app_name) {
      // If we are on Linux and the datadir does not exist yet, look into the old
      // location where the datadir was before version 2.3. If we find it there,
-@@ -937,7 +937,7 @@ void GUI_App::init_app_config()
- 	// Mac : "~/Library/Application Support/Slic3r"
- 
-     if (data_dir().empty()) {
--        #ifndef __linux__
-+        #if !defined(__linux__) && !defined(__NetBSD__)
-             set_data_dir(wxStandardPaths::Get().GetUserDataDir().ToUTF8().data());
-         #else
-             // Since version 2.3, config dir on Linux is in ${XDG_CONFIG_HOME}.
-@@ -1108,6 +1108,9 @@ bool GUI_App::on_init_inner()
+@@ -1255,6 +1255,9 @@ bool GUI_App::on_init_inner()
      // Set initialization of image handlers before any UI actions - See GH issue #7469
      wxInitAllImageHandlers();
  
@@ -34,7 +25,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
  #if defined(_WIN32) && ! defined(_WIN64)
      // Win32 32bit build.
      if (wxPlatformInfo::Get().GetArchName().substr(0, 2) == "64") {
-@@ -1135,7 +1138,7 @@ bool GUI_App::on_init_inner()
+@@ -1282,7 +1285,7 @@ bool GUI_App::on_init_inner()
      wxCHECK_MSG(wxDirExists(resources_dir), false,
          wxString::Format("Resources path does not exist or is not a directory: %s", resources_dir));
  
@@ -43,7 +34,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
      if (! check_old_linux_datadir(GetAppName())) {
          std::cerr << "Quitting, user chose to move their data to new location." << std::endl;
          return false;
-@@ -1240,7 +1243,7 @@ bool GUI_App::on_init_inner()
+@@ -1387,7 +1390,7 @@ bool GUI_App::on_init_inner()
          if (!default_splashscreen_pos)
              // revert "restore_win_position" value if application wasn't crashed
              get_app_config()->set("restore_win_position", "1");
@@ -52,7 +43,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
          wxYield();
  #endif
          scrn->SetText(_L("Loading configuration")+ dots);
-@@ -1393,7 +1396,7 @@ bool GUI_App::on_init_inner()
+@@ -1546,7 +1549,7 @@ bool GUI_App::on_init_inner()
          // and wxEVT_SET_FOCUS before GUI_App::post_init is called) wasn't called before GUI_App::post_init and OpenGL wasn't initialized.
          // Since issue #9774 Where same problem occured on MacOS Ventura, we decided to have this check on MacOS as well.
  
@@ -61,7 +52,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
          if (!m_post_initialized && m_opengl_initialized) {
  #else
          if (!m_post_initialized) {
-@@ -2096,7 +2099,7 @@ bool GUI_App::switch_language()
+@@ -2237,7 +2240,7 @@ bool GUI_App::switch_language()
      }
  }
  
@@ -70,7 +61,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
  static const wxLanguageInfo* linux_get_existing_locale_language(const wxLanguageInfo* language,
                                                                  const wxLanguageInfo* system_language)
  {
-@@ -2298,7 +2301,7 @@ bool GUI_App::load_language(wxString lan
+@@ -2439,7 +2442,7 @@ bool GUI_App::load_language(wxString lan
  				m_language_info_best = wxLocale::FindLanguageInfo(best_language);
  	        	BOOST_LOG_TRIVIAL(trace) << boost::format("Best translation language detected (may be different from user locales): %1%") % m_language_info_best->CanonicalName.ToUTF8().data();
  			}
@@ -79,7 +70,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
              wxString lc_all;
              if (wxGetEnv("LC_ALL", &lc_all) && ! lc_all.IsEmpty()) {
                  // Best language returned by wxWidgets on Linux apparently does not respect LC_ALL.
-@@ -2351,7 +2354,7 @@ bool GUI_App::load_language(wxString lan
+@@ -2492,7 +2495,7 @@ bool GUI_App::load_language(wxString lan
      } else if (m_language_info_system != nullptr && language_info->CanonicalName.BeforeFirst('_') == m_language_info_system->CanonicalName.BeforeFirst('_'))
          language_info = m_language_info_system;
  
@@ -88,7 +79,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
      // If we can't find this locale , try to use different one for the language
      // instead of just reporting that it is impossible to switch.
      if (! wxLocale::IsAvailable(language_info->Language)) {
-@@ -2471,7 +2474,7 @@ void GUI_App::add_config_menu(wxMenuBar 
+@@ -2613,7 +2616,7 @@ wxMenu* GUI_App::get_config_menu()
          local_menu->Append(config_id_base + ConfigMenuTakeSnapshot, _L("Take Configuration &Snapshot"), _L("Capture a configuration snapshot"));
          local_menu->Append(config_id_base + ConfigMenuUpdateConf, _L("Check for Configuration Updates"), _L("Check for configuration updates"));
          local_menu->Append(config_id_base + ConfigMenuUpdateApp, _L("Check for Application Updates"), _L("Check for new version of application"));
@@ -97,7 +88,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
          //if (DesktopIntegrationDialog::integration_possible())
          local_menu->Append(config_id_base + ConfigMenuDesktopIntegration, _L("Desktop Integration"), _L("Desktop Integration"));    
  #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)        
-@@ -2519,7 +2522,7 @@ void GUI_App::add_config_menu(wxMenuBar 
+@@ -2648,7 +2651,7 @@ wxMenu* GUI_App::get_config_menu()
          case ConfigMenuUpdateApp:
              app_version_check(true);
              break;
@@ -106,7 +97,7 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
          case ConfigMenuDesktopIntegration:
              show_desktop_integration_dialog();
              break;
-@@ -3149,7 +3152,7 @@ bool GUI_App::run_wizard(ConfigWizard::R
+@@ -3320,7 +3323,7 @@ void GUI_App::update_login_dialog()
  
  void GUI_App::show_desktop_integration_dialog()
  {
@@ -115,12 +106,21 @@ Silence wxSizer warnings introduced with 2.6.0rc1.
      //wxCHECK_MSG(mainframe != nullptr, false, "Internal error: Main frame not created / null");
      DesktopIntegrationDialog dialog(mainframe);
      dialog.ShowModal();
-@@ -3169,7 +3172,7 @@ void GUI_App::show_downloader_registrati
+@@ -3340,7 +3343,7 @@ void GUI_App::show_downloader_registrati
      if (msg.ShowModal() == wxID_YES) {
          auto downloader_worker = new DownloaderUtils::Worker(nullptr);
          downloader_worker->perform_register(app_config->get("url_downloader_dest"));
 -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) 
 +#if (defined(__linux__) || defined(__NetBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) 
-         if (downloader_worker->get_perform_registration_linux())
+         if (DownloaderUtils::Worker::perform_registration_linux)
              DesktopIntegrationDialog::perform_downloader_desktop_integration();
  #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
+@@ -3751,7 +3754,7 @@ void GUI_App::start_download(std::string
+         return; 
+     }
+ 
+-    #if defined(__APPLE__) || (defined(__linux__) && !defined(SLIC3R_DESKTOP_INTEGRATION))
++    #if defined(__APPLE__) || (defined(__linux__) && !defined(SLIC3R_DESKTOP_INTEGRATION)) || defined(__NetBSD__)
+     if (app_config && !app_config->get_bool("downloader_url_registered"))
+     {
+         notification_manager()->push_notification(NotificationType::URLNotRegistered);
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.cpp
deleted file mode 100644
index 7fab708879..0000000000
--- a/prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.cpp
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD$
-
-Treat NetBSD like Linux.
-
---- src/slic3r/GUI/GUI_Preview.cpp.orig	2021-12-17 14:00:02.000000000 +0000
-+++ src/slic3r/GUI/GUI_Preview.cpp
-@@ -359,7 +359,7 @@ void Preview::load_print(bool keep_z_ran
- 
- void Preview::reload_print(bool keep_volumes)
- {
--#ifdef __linux__
-+#if defined(__linux__) || defined(__NetBSD__)
-     // We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955.
-     // So we are applying a workaround here: a delayed release of OpenGL vertex buffers.
-     if (!IsShown())
-@@ -369,14 +369,14 @@ void Preview::reload_print(bool keep_vol
-     }
- #endif /* __linux__ */
-     if (
--#ifdef __linux__
-+#if defined(__linux__) || defined(__NetBSD__)
-         m_volumes_cleanup_required || 
- #endif /* __linux__ */
-         !keep_volumes)
-     {
-         m_canvas->reset_volumes();
-         m_loaded = false;
--#ifdef __linux__
-+#if defined(__linux__) || defined(__NetBSD__)
-         m_volumes_cleanup_required = false;
- #endif /* __linux__ */
-     }
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.hpp b/prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.hpp
deleted file mode 100644
index fbb2bab068..0000000000
--- a/prusaslicer/patches/patch-src_slic3r_GUI_GUI__Preview.hpp
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD$
-
-Treat NetBSD like Linux.
-
---- src/slic3r/GUI/GUI_Preview.hpp.orig	2021-12-17 14:00:02.000000000 +0000
-+++ src/slic3r/GUI/GUI_Preview.hpp
-@@ -95,7 +95,7 @@ class Preview : public wxPanel
-     BackgroundSlicingProcess* m_process;
-     GCodeProcessorResult* m_gcode_result;
- 
--#ifdef __linux__
-+#if defined(__linux__) || defined(__NetBSD__)
-     // We are getting mysterious crashes on Linux in gtk due to OpenGL context activation GH #1874 #1955.
-     // So we are applying a workaround here.
-     bool m_volumes_cleanup_required { false };
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_OpenGLManager.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_OpenGLManager.cpp
index 9f2dbfd6db..7eca9a7e21 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_OpenGLManager.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_OpenGLManager.cpp
@@ -8,23 +8,23 @@ Allow running on machines with OpenGL 3.0 & 3.1.
 Discussion in:
 https://github.com/prusa3d/PrusaSlicer/issues/12334
 
---- src/slic3r/GUI/OpenGLManager.cpp.orig	2024-02-23 10:58:40.000000000 +0000
+--- src/slic3r/GUI/OpenGLManager.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/OpenGLManager.cpp
-@@ -344,7 +344,7 @@ bool OpenGLManager::init_gl()
-         glewExperimental = true;
- #endif // ENABLE_GL_CORE_PROFILE || ENABLE_OPENGL_ES
-         GLenum err = glewInit();
+@@ -346,7 +346,7 @@ bool OpenGLManager::init_gl()
+     if (!m_gl_initialized) {
+       glewExperimental = true;
+       GLenum err = glewInit();
 -        if (err != GLEW_OK) {
 +        if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) {
              BOOST_LOG_TRIVIAL(error) << "Unable to init glew library: " << glewGetErrorString(err);
              return false;
          }
 @@ -373,7 +373,7 @@ bool OpenGLManager::init_gl()
- #if ENABLE_OPENGL_ES
-         bool valid_version = s_gl_info.is_version_greater_or_equal_to(2, 0);
- #elif ENABLE_GL_CORE_PROFILE
+ #if SLIC3R_OPENGL_ES
+         bool valid_version = s_gl_info.is_version_greater_or_equal_to(3, 0);
+ #else
 -        const bool valid_version = s_gl_info.is_version_greater_or_equal_to(3, 2);
 +        const bool valid_version = s_gl_info.is_version_greater_or_equal_to(3, 0);
- #else
-         bool valid_version = s_gl_info.is_version_greater_or_equal_to(2, 0);
- #endif // ENABLE_OPENGL_ES
+ #endif // SLIC3R_OPENGL_ES
+ 
+         if (!valid_version) {
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_Preferences.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_Preferences.cpp
index 802c988a3e..fe0733c270 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_Preferences.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_Preferences.cpp
@@ -2,9 +2,9 @@ $NetBSD$
 
 Treat NetBSD like Linux.
 
---- src/slic3r/GUI/Preferences.cpp.orig	2024-04-05 09:25:31.000000000 +0000
+--- src/slic3r/GUI/Preferences.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/Preferences.cpp
-@@ -28,7 +28,7 @@
+@@ -29,7 +29,7 @@
  #ifdef WIN32
  #include <wx/msw/registry.h>
  #endif // WIN32
@@ -13,7 +13,7 @@ Treat NetBSD like Linux.
  #include "DesktopIntegrationDialog.hpp"
  #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
  
-@@ -262,7 +262,7 @@ void PreferencesDialog::build()
+@@ -264,7 +264,7 @@ void PreferencesDialog::build()
  	tabs = new Notebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL | wxNB_NOPAGETHEME | wxNB_DEFAULT);
  #else
      tabs = new wxNotebook(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_TOP | wxTAB_TRAVERSAL  |wxNB_NOPAGETHEME | wxNB_DEFAULT );
@@ -22,16 +22,16 @@ Treat NetBSD like Linux.
  	tabs->Bind(wxEVT_NOTEBOOK_PAGE_CHANGED, [this](wxBookCtrlEvent& e) {
  		e.Skip();
  		CallAfter([this]() { tabs->GetCurrentPage()->Layout(); });
-@@ -758,7 +758,7 @@ void PreferencesDialog::accept(wxEvent&)
+@@ -744,7 +744,7 @@ void PreferencesDialog::accept(wxEvent&)
  			downloader->allow(it->second == "1");
  		if (!downloader->on_finish())
  			return;
 -#if defined(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION) 
 +#if (defined(__linux__) || defined(__NetBSD__)) && defined(SLIC3R_DESKTOP_INTEGRATION) 
- 		if( downloader->get_perform_registration_linux()) 
+ 		if(DownloaderUtils::Worker::perform_registration_linux) 
  			DesktopIntegrationDialog::perform_downloader_desktop_integration();
  #endif //(__linux__) && defined(SLIC3R_DESKTOP_INTEGRATION)
-@@ -1141,7 +1141,7 @@ void PreferencesDialog::create_settings_
+@@ -1103,7 +1103,7 @@ void PreferencesDialog::create_settings_
  		font_example->SetFont(font);
  		m_values[opt_key] = format("%1%", val);
  		stb_sizer->Layout();
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_Tab.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_Tab.cpp
index 29396b1c9d..10529ed3e2 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_Tab.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_Tab.cpp
@@ -2,9 +2,9 @@ $NetBSD$
 
 Treat NetBSD like Linux.
 
---- src/slic3r/GUI/Tab.cpp.orig	2023-11-23 14:51:47.000000000 +0000
+--- src/slic3r/GUI/Tab.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/Tab.cpp
-@@ -296,7 +296,7 @@ void Tab::create_preset_tab()
+@@ -278,7 +278,7 @@ void Tab::create_preset_tab()
      m_treectrl = new wxTreeCtrl(panel, wxID_ANY, wxDefaultPosition, wxSize(20 * m_em_unit, -1),
          wxTR_NO_BUTTONS | wxTR_HIDE_ROOT | wxTR_SINGLE | wxTR_NO_LINES | wxBORDER_SUNKEN | wxWANTS_CHARS);
      m_treectrl->SetFont(wxGetApp().normal_font());
@@ -13,7 +13,7 @@ Treat NetBSD like Linux.
      m_treectrl->SetBackgroundColour(m_parent->GetBackgroundColour());
  #endif
      m_left_sizer->Add(m_treectrl, 1, wxEXPAND);
-@@ -310,7 +310,7 @@ void Tab::create_preset_tab()
+@@ -292,7 +292,7 @@ void Tab::create_preset_tab()
      // This helps to process all the cursor key events on Windows in the tree control,
      // so that the cursor jumps to the last item.
      m_treectrl->Bind(wxEVT_TREE_SEL_CHANGED, [this](wxTreeEvent&) {
@@ -22,16 +22,7 @@ Treat NetBSD like Linux.
          // Events queue is opposite On Linux. wxEVT_SET_FOCUS invokes after wxEVT_TREE_SEL_CHANGED,
          // and a result wxEVT_KILL_FOCUS doesn't invoke for the TextCtrls.
          // see https://github.com/prusa3d/PrusaSlicer/issues/5720
-@@ -3716,7 +3716,7 @@ void Tab::load_current_preset()
-                         else
- #endif
-                             wxGetApp().tab_panel()->InsertPage(wxGetApp().tab_panel()->FindPage(this), tab, tab->title());
--                        #ifdef __linux__ // the tabs apparently need to be explicitly shown on Linux (pull request #1563)
-+                        #if defined(__linux__) || defined(__NetBSD__) // the tabs apparently need to be explicitly shown on Linux (pull request #1563)
-                             int page_id = wxGetApp().tab_panel()->FindPage(tab);
-                             wxGetApp().tab_panel()->GetPage(page_id)->Show(true);
-                         #endif // __linux__
-@@ -4137,7 +4137,7 @@ bool Tab::tree_sel_change_delayed()
+@@ -4100,7 +4100,7 @@ bool Tab::tree_sel_change_delayed()
      // There is a bug related to Ubuntu overlay scrollbars, see https://github.com/prusa3d/PrusaSlicer/issues/898 and https://github.com/prusa3d/PrusaSlicer/issues/952.
      // The issue apparently manifests when Show()ing a window with overlay scrollbars while the UI is frozen. For this reason,
      // we will Thaw the UI prematurely on Linux. This means destroing the no_updates object prematurely.
@@ -40,7 +31,7 @@ Treat NetBSD like Linux.
      std::unique_ptr<wxWindowUpdateLocker> no_updates(new wxWindowUpdateLocker(this));
  #else
      /* On Windows we use DoubleBuffering during rendering,
-@@ -4183,7 +4183,7 @@ bool Tab::tree_sel_change_delayed()
+@@ -4146,7 +4146,7 @@ bool Tab::tree_sel_change_delayed()
          if (wxGetApp().mainframe!=nullptr && wxGetApp().mainframe->is_active_and_shown_tab(this))
              activate_selected_page(throw_if_canceled);
  
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_TopBar.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_TopBar.cpp
new file mode 100644
index 0000000000..0a73c6a07b
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_TopBar.cpp
@@ -0,0 +1,60 @@
+$NetBSD$
+
+Treat NetBSD like linux.
+
+--- src/slic3r/GUI/TopBar.cpp.orig	2024-06-15 08:28:06.304213704 +0000
++++ src/slic3r/GUI/TopBar.cpp
+@@ -68,7 +68,7 @@ void TopBarItemsCtrl::Button::set_select
+                                          wxTransparentColor;
+ #endif
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+     this->SetBackgroundColour(m_background_color);
+     this->SetForegroundColour(m_foreground_color);
+ 
+@@ -94,7 +94,7 @@ void TopBarItemsCtrl::Button::set_hovere
+                                             wxTransparentColor;
+ #endif
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+     this->SetBackgroundColour(m_background_color);
+ #endif // __linux__
+ 
+@@ -163,7 +163,7 @@ void TopBarItemsCtrl::Button::sys_color_
+     m_foreground_color = wxGetApp().get_label_clr_default();
+ }
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+ const int icon_sz = 20;
+ #else
+ const int icon_sz = 24;
+@@ -213,7 +213,7 @@ void TopBarItemsCtrl::ButtonWithPopup::S
+ #endif
+ 
+     wxString full_label = "  " + text + "  ";
+-#ifndef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+     full_label += down_arrow;
+ #endif
+     ScalableButton::SetLabel(full_label);
+@@ -228,7 +228,7 @@ void TopBarItemsCtrl::UpdateAccountButto
+     TopBarMenus::UserAccountInfo  user_account = m_menus->get_user_account_info();
+     const wxString user_name = user_account.is_logged ? from_u8(user_account.user_name) : _L("Log in");
+     m_account_btn->SetToolTip(user_name);
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+     if (avatar) {
+         if (user_account.is_logged) {
+             ScalableBitmap new_logo(this, user_account.avatar_path, wxSize(icon_sz, icon_sz));
+@@ -504,7 +504,7 @@ TopBarItemsCtrl::TopBarItemsCtrl(wxWindo
+ void TopBarItemsCtrl::UpdateMode()
+ {
+     wxBitmapBundle bmp = *m_menus->get_workspace_bitmap();
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+     m_workspace_btn->SetBitmap(bmp);
+     m_workspace_btn->SetBitmapCurrent(bmp);
+     m_workspace_btn->SetBitmapPressed(bmp);
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_UserAccountCommunication.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_UserAccountCommunication.cpp
new file mode 100644
index 0000000000..93914a27e7
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_UserAccountCommunication.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Treat NetBSD like linux.
+
+--- src/slic3r/GUI/UserAccountCommunication.cpp.orig	2024-06-15 08:30:31.450057675 +0000
++++ src/slic3r/GUI/UserAccountCommunication.cpp
+@@ -31,7 +31,7 @@
+ #include <CommonCrypto/CommonDigest.h>
+ #endif
+ 
+-#ifdef __linux__
++#if defined(__linux__) || defined(__NetBSD__)
+ #include <openssl/evp.h>
+ #include <openssl/bio.h>
+ #include <openssl/buffer.h>
+@@ -567,4 +567,4 @@ std::string CodeChalengeGenerator::sha25
+     return std::string(reinterpret_cast<char*>(digest), digestLen);
+ }
+ #endif // __linux__
+-}} // Slic3r::GUI
+\ No newline at end of file
++}} // Slic3r::GUI
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_WipeTowerDialog.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_WipeTowerDialog.cpp
new file mode 100644
index 0000000000..8f52b2bd3f
--- /dev/null
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_WipeTowerDialog.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Treat NetBSD like linux.
+
+--- src/slic3r/GUI/WipeTowerDialog.cpp.orig	2024-06-15 08:31:43.070223802 +0000
++++ src/slic3r/GUI/WipeTowerDialog.cpp
+@@ -379,7 +379,7 @@ WipingPanel::WipingPanel(wxWindow* paren
+                                               int xpos = m_gridsizer_advanced->GetPosition().x;
+                                               if (!m_page_advanced->IsEnabled()) {
+                                                   dc.SetTextForeground(wxSystemSettings::GetColour(
+-#if defined (__linux__) && defined (__WXGTK2__)
++#if (defined(__linux__) || defined(__NetBSD__)) && defined(__WXGTK2__)
+                                                       wxSYS_COLOUR_BTNTEXT
+ #else 
+                                                       wxSYS_COLOUR_GRAYTEXT
+@@ -420,4 +420,4 @@ void WipingDialog::enable_or_disable_pan
+     m_widget_button->Enable(enable);
+     m_panel_wiping->Enable(enable);
+     m_panel_wiping->Refresh();
+-}
+\ No newline at end of file
++}
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.cpp b/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.cpp
index 421e002061..01980cf590 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.cpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.cpp
@@ -2,9 +2,9 @@ $NetBSD$
 
 Treat NetBSD like Linux.
 
---- src/slic3r/GUI/wxExtensions.cpp.orig	2023-06-02 13:41:15.000000000 +0000
+--- src/slic3r/GUI/wxExtensions.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/wxExtensions.cpp
-@@ -22,7 +22,7 @@
+@@ -28,7 +28,7 @@
  
  #include "libslic3r/Color.hpp"
  
@@ -13,7 +13,7 @@ Treat NetBSD like Linux.
  // msw_menuitem_bitmaps is used for MSW and OSX
  static std::map<int, std::string> msw_menuitem_bitmaps;
  void sys_color_changed_menu(wxMenu* menu)
-@@ -92,7 +92,7 @@ wxMenuItem* append_menu_item(wxMenu* men
+@@ -137,7 +137,7 @@ wxMenuItem* append_menu_item(wxMenu* men
  
      wxBitmapBundle* bmp = icon.empty() ? nullptr : get_bmp_bundle(icon);
  
@@ -22,7 +22,7 @@ Treat NetBSD like Linux.
      if (bmp && bmp->IsOk())
          msw_menuitem_bitmaps[id] = icon;
  #endif /* no __linux__ */
-@@ -110,7 +110,7 @@ wxMenuItem* append_submenu(wxMenu* menu,
+@@ -155,7 +155,7 @@ wxMenuItem* append_submenu(wxMenu* menu,
      if (!icon.empty()) {
          item->SetBitmap(*get_bmp_bundle(icon));
  
@@ -31,15 +31,12 @@ Treat NetBSD like Linux.
          msw_menuitem_bitmaps[id] = icon;
  #endif // no __linux__
      }
-@@ -671,9 +671,9 @@ void ModeButton::focus_button(const bool
-     GetParent()->Refresh(); // force redraw a background of the selected mode button
- #else
-     SetForegroundColour(wxSystemSettings::GetColour(focus ? wxSYS_COLOUR_BTNTEXT : 
--#if defined (__linux__) && defined (__WXGTK3__)
-+#if (defined(__linux__) || defined(__NetBSD__)) && defined (__WXGTK3__)
-         wxSYS_COLOUR_GRAYTEXT
--#elif defined (__linux__) && defined (__WXGTK2__)
-+#elif (defined (__linux__) || defined(__NetBSD__)) && defined (__WXGTK2__)
-         wxSYS_COLOUR_BTNTEXT
- #else 
-         wxSYS_COLOUR_BTNSHADOW
+@@ -218,7 +218,7 @@ wxMenuItem* append_menu_check_item(wxMen
+ void set_menu_item_bitmap(wxMenuItem* item, const std::string& icon_name)
+ {
+     item->SetBitmap(*get_bmp_bundle(icon_name));
+-#ifndef __linux__
++#if !defined(__linux__) && !defined(__NetBSD__)
+     const auto it = msw_menuitem_bitmaps.find(item->GetId());
+     if (it != msw_menuitem_bitmaps.end() && it->second != icon_name)
+         it->second = icon_name;
diff --git a/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.hpp b/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.hpp
index 3d52f8d0ef..36e3be6275 100644
--- a/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.hpp
+++ b/prusaslicer/patches/patch-src_slic3r_GUI_wxExtensions.hpp
@@ -2,10 +2,10 @@ $NetBSD$
 
 Treat NetBSD like Linux.
 
---- src/slic3r/GUI/wxExtensions.hpp.orig	2023-06-02 13:41:15.000000000 +0000
+--- src/slic3r/GUI/wxExtensions.hpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ src/slic3r/GUI/wxExtensions.hpp
-@@ -16,7 +16,7 @@
- #include <functional>
+@@ -21,7 +21,7 @@
+ #include <boost/filesystem.hpp>
  
  
 -#ifndef __linux__
diff --git a/prusaslicer/patches/patch-tests_arrange_test__arrange.cpp b/prusaslicer/patches/patch-tests_arrange_test__arrange.cpp
index aa9b038ab2..bf529a3389 100644
--- a/prusaslicer/patches/patch-tests_arrange_test__arrange.cpp
+++ b/prusaslicer/patches/patch-tests_arrange_test__arrange.cpp
@@ -3,7 +3,7 @@ $NetBSD$
 Support Catch2 v3.
 Based on https://github.com/prusa3d/PrusaSlicer/issues/11567
 
---- tests/arrange/test_arrange.cpp.orig	2024-02-29 13:03:32.000000000 +0000
+--- tests/arrange/test_arrange.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ tests/arrange/test_arrange.cpp
 @@ -1,4 +1,7 @@
 -#include <catch2/catch.hpp>
@@ -33,7 +33,7 @@ Based on https://github.com/prusa3d/PrusaSlicer/issues/11567
              }
          }
      }
-@@ -1063,7 +1069,7 @@ TEMPLATE_TEST_CASE("Test if allowed item
+@@ -1063,6 +1069,6 @@ TEMPLATE_TEST_CASE("Test if allowed item
      bool packed = pack(strategy, bed, itm);
  
      REQUIRE(packed);
@@ -41,4 +41,3 @@ Based on https://github.com/prusa3d/PrusaSlicer/issues/11567
 +    REQUIRE_THAT(get_rotation(itm), WithinRel(PI));
  }
  
- //TEST_CASE("NFP optimizing test", "[arrange2]") {
diff --git a/prusaslicer/patches/patch-tests_fff__print_benchmark__seams.cpp b/prusaslicer/patches/patch-tests_fff__print_benchmark__seams.cpp
new file mode 100644
index 0000000000..36734464e8
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_benchmark__seams.cpp
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/benchmark_seams.cpp.orig	2024-06-16 00:31:48.747974361 +0000
++++ tests/fff_print/benchmark_seams.cpp
+@@ -1,4 +1,7 @@
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
++#include <catch2/benchmark/catch_benchmark.hpp>
++#include <catch2/benchmark/catch_chronometer.hpp>
++#include <catch2/benchmark/catch_constructor.hpp>
+ #include "test_data.hpp"
+ 
+ #include "libslic3r/GCode/SeamGeometry.hpp"
diff --git a/prusaslicer/patches/patch-tests_fff__print_test__seam__aligned.cpp b/prusaslicer/patches/patch-tests_fff__print_test__seam__aligned.cpp
new file mode 100644
index 0000000000..991d2fe28e
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_test__seam__aligned.cpp
@@ -0,0 +1,59 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/test_seam_aligned.cpp.orig	2024-06-16 00:22:05.214495978 +0000
++++ tests/fff_print/test_seam_aligned.cpp
+@@ -1,5 +1,6 @@
+ #include <libslic3r/Point.hpp>
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
++#include <catch2/catch_approx.hpp>
+ #include <libslic3r/GCode/SeamAligned.hpp>
+ #include "test_data.hpp"
+ #include <fstream>
+@@ -59,7 +60,7 @@ TEST_CASE("Get seam options", "[Seams][S
+ 
+     CHECK(options.closest == 4);
+     CHECK(options.adjacent == 0);
+-    CHECK((options.on_edge - Vec2d{0.0, 0.3}).norm() == Approx(0.0));
++    CHECK((options.on_edge - Vec2d{0.0, 0.3}).norm() == Catch::Approx(0.0));
+     REQUIRE(options.snapped);
+     CHECK(options.snapped == 0);
+ }
+@@ -80,7 +81,7 @@ struct PickSeamOptionFixture
+ TEST_CASE_METHOD(PickSeamOptionFixture, "Pick seam option", "[Seams][SeamAligned]") {
+     auto [previous_index, next_index, position]{pick_seam_option(perimeter, options)};
+     CHECK(previous_index == next_index);
+-    CHECK((position - Vec2d{0.0, 0.0}).norm() == Approx(0.0));
++    CHECK((position - Vec2d{0.0, 0.0}).norm() == Catch::Approx(0.0));
+ }
+ 
+ TEST_CASE_METHOD(PickSeamOptionFixture, "Pick seam option picks enforcer", "[Seams][SeamAligned]") {
+@@ -88,7 +89,7 @@ TEST_CASE_METHOD(PickSeamOptionFixture, 
+ 
+     auto [previous_index, next_index, position]{pick_seam_option(perimeter, options)};
+     CHECK(previous_index == next_index);
+-    CHECK((position - Vec2d{0.0, 0.5}).norm() == Approx(0.0));
++    CHECK((position - Vec2d{0.0, 0.5}).norm() == Catch::Approx(0.0));
+ }
+ 
+ TEST_CASE_METHOD(PickSeamOptionFixture, "Nearest point", "[Seams][SeamAligned]") {
+@@ -97,7 +98,7 @@ TEST_CASE_METHOD(PickSeamOptionFixture, 
+     )};
+     CHECK(result->previous_index == 0);
+     CHECK(result->next_index == 1);
+-    CHECK((result->position - Vec2d{0.4, 0.0}).norm() == Approx(0.0));
++    CHECK((result->position - Vec2d{0.4, 0.0}).norm() == Catch::Approx(0.0));
+ }
+ 
+ TEST_CASE_METHOD(PickSeamOptionFixture, "Least visible point", "[Seams][SeamAligned]") {
+@@ -111,7 +112,7 @@ TEST_CASE_METHOD(PickSeamOptionFixture, 
+     )};
+     CHECK(result->previous_index == 4);
+     CHECK(result->next_index == 4);
+-    CHECK((result->position - Vec2d{0.0, 0.5}).norm() == Approx(0.0));
++    CHECK((result->position - Vec2d{0.0, 0.5}).norm() == Catch::Approx(0.0));
+ }
+ 
+ TEST_CASE_METHOD(Test::SeamsFixture, "Generate aligned seam", "[Seams][SeamAligned][Integration]") {
diff --git a/prusaslicer/patches/patch-tests_fff__print_test__seam__geometry.cpp b/prusaslicer/patches/patch-tests_fff__print_test__seam__geometry.cpp
new file mode 100644
index 0000000000..0b7b47f7d4
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_test__seam__geometry.cpp
@@ -0,0 +1,43 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/test_seam_geometry.cpp.orig	2024-06-16 00:13:41.674445563 +0000
++++ tests/fff_print/test_seam_geometry.cpp
+@@ -1,5 +1,8 @@
+ #include <libslic3r/Point.hpp>
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
++#include <catch2/catch_approx.hpp>
++#include <catch2/matchers/catch_matchers.hpp>
++#include <catch2/matchers/catch_matchers_vector.hpp>
+ #include <libslic3r/GCode/SeamGeometry.hpp>
+ #include <libslic3r/Geometry.hpp>
+ 
+@@ -69,7 +72,7 @@ TEST_CASE("Vertex angle calculation coun
+ 
+     CHECK(angles.size() == 4);
+     for (const double angle : angles) {
+-        CHECK(angle == Approx(-M_PI / 2));
++        CHECK(angle == Catch::Approx(-M_PI / 2));
+     }
+ }
+ 
+@@ -79,7 +82,7 @@ TEST_CASE("Vertex angle calculation cloc
+ 
+     CHECK(angles.size() == 4);
+     for (const double angle : angles) {
+-        CHECK(angle == Approx(M_PI / 2));
++        CHECK(angle == Catch::Approx(M_PI / 2));
+     }
+ }
+ 
+@@ -121,7 +124,7 @@ TEST_CASE("Vertex angle is rotation agno
+     );
+ 
+     std::vector<double> rotated_angles = Seams::Geometry::get_vertex_angles(points, 0.1);
+-    CHECK(rotated_angles[1] == Approx(angles[1]));
++    CHECK(rotated_angles[1] == Catch::Approx(angles[1]));
+ }
+ 
+ TEST_CASE("Calculate overhangs", "[Seams][SeamGeometry]") {
diff --git a/prusaslicer/patches/patch-tests_fff__print_test__seam__perimeters.cpp b/prusaslicer/patches/patch-tests_fff__print_test__seam__perimeters.cpp
new file mode 100644
index 0000000000..997701c95c
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_test__seam__perimeters.cpp
@@ -0,0 +1,36 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/test_seam_perimeters.cpp.orig	2024-06-16 00:15:07.448492235 +0000
++++ tests/fff_print/test_seam_perimeters.cpp
+@@ -2,7 +2,8 @@
+ #include "libslic3r/GCode/SeamPerimeters.hpp"
+ #include "libslic3r/Layer.hpp"
+ #include "libslic3r/Point.hpp"
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
++#include <catch2/catch_approx.hpp>
+ #include <libslic3r/GCode/SeamGeometry.hpp>
+ #include <libslic3r/Geometry.hpp>
+ #include <fstream>
+@@ -27,7 +28,7 @@ TEST_CASE("Oversample painted", "[Seams]
+     )};
+ 
+     REQUIRE(points.size() == 8);
+-    CHECK((points[1] - Vec2d{0.2, 0.0}).norm() == Approx(0.0));
++    CHECK((points[1] - Vec2d{0.2, 0.0}).norm() == Catch::Approx(0.0));
+ 
+     points = Perimeters::Impl::oversample_painted(
+         Seams::Geometry::unscaled(square.contour.points), is_painted, 1.0, 0.199
+@@ -53,8 +54,8 @@ TEST_CASE("Remove redundant points", "[S
+ 
+     REQUIRE(resulting_points.size() == 6);
+     REQUIRE(resulting_point_types.size() == 6);
+-    CHECK((resulting_points[3] - Vec2d{3.0, 0.0}).norm() == Approx(0.0));
+-    CHECK((resulting_points[4] - Vec2d{3.0, 2.0}).norm() == Approx(0.0));
++    CHECK((resulting_points[3] - Vec2d{3.0, 0.0}).norm() == Catch::Approx(0.0));
++    CHECK((resulting_points[4] - Vec2d{3.0, 2.0}).norm() == Catch::Approx(0.0));
+     CHECK(resulting_point_types[3] == PointType::blocker);
+     CHECK(resulting_point_types[4] == PointType::blocker);
+ }
diff --git a/prusaslicer/patches/patch-tests_fff__print_test__seam__random.cpp b/prusaslicer/patches/patch-tests_fff__print_test__seam__random.cpp
new file mode 100644
index 0000000000..784ff55ae1
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_test__seam__random.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/test_seam_random.cpp.orig	2024-06-16 00:27:17.913045037 +0000
++++ tests/fff_print/test_seam_random.cpp
+@@ -1,5 +1,5 @@
+ #include <libslic3r/Point.hpp>
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
+ #include <libslic3r/GCode/SeamRandom.hpp>
+ #include "test_data.hpp"
+ #include <fstream>
diff --git a/prusaslicer/patches/patch-tests_fff__print_test__seam__rear.cpp b/prusaslicer/patches/patch-tests_fff__print_test__seam__rear.cpp
new file mode 100644
index 0000000000..11881f30be
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_test__seam__rear.cpp
@@ -0,0 +1,13 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/test_seam_rear.cpp.orig	2024-06-16 00:25:58.442182846 +0000
++++ tests/fff_print/test_seam_rear.cpp
+@@ -1,5 +1,5 @@
+ #include <libslic3r/Point.hpp>
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
+ #include <libslic3r/GCode/SeamRear.hpp>
+ #include "test_data.hpp"
+ #include <fstream>
diff --git a/prusaslicer/patches/patch-tests_fff__print_test__seam__shells.cpp b/prusaslicer/patches/patch-tests_fff__print_test__seam__shells.cpp
new file mode 100644
index 0000000000..e1c5530ed7
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_fff__print_test__seam__shells.cpp
@@ -0,0 +1,22 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/fff_print/test_seam_shells.cpp.orig	2024-06-16 00:12:02.757306546 +0000
++++ tests/fff_print/test_seam_shells.cpp
+@@ -1,4 +1,5 @@
+-#include <catch2/catch.hpp>
++#include <catch2/catch_test_macros.hpp>
++#include <catch2/catch_approx.hpp>
+ #include <filesystem>
+ #include <fstream>
+ #include "libslic3r/ClipperUtils.hpp"
+@@ -37,7 +38,7 @@ TEST_CASE_METHOD(ProjectionFixture, "Pro
+     REQUIRE(result.size() == 1);
+     REQUIRE(result[0].polygon.size() == 4);
+     // Boundary polygon is picked.
+-    CHECK(result[0].polygon[0].x() == Approx(scaled(-(1.0 + extrusion_width / 2.0 + 0.1))));
++    CHECK(result[0].polygon[0].x() == Catch::Approx(scaled(-(1.0 + extrusion_width / 2.0 + 0.1))));
+ }
+ 
+ TEST_CASE_METHOD(ProjectionFixture, "Project to geometry does not match", "[Seams][SeamShells]") {
diff --git a/prusaslicer/patches/patch-tests_libslic3r_test__voronoi.cpp b/prusaslicer/patches/patch-tests_libslic3r_test__voronoi.cpp
index 8b6d1aa433..33a1dc0eae 100644
--- a/prusaslicer/patches/patch-tests_libslic3r_test__voronoi.cpp
+++ b/prusaslicer/patches/patch-tests_libslic3r_test__voronoi.cpp
@@ -3,17 +3,25 @@ $NetBSD$
 Support Catch2 v3.
 Based on https://github.com/prusa3d/PrusaSlicer/issues/11567
 
---- tests/libslic3r/test_voronoi.cpp.orig	2024-02-29 13:03:32.000000000 +0000
+--- tests/libslic3r/test_voronoi.cpp.orig	2024-06-14 21:54:48.000000000 +0000
 +++ tests/libslic3r/test_voronoi.cpp
 @@ -1,4 +1,6 @@
 -#include <catch2/catch.hpp>
 +#include <catch2/catch_test_macros.hpp>
 +#include <catch2/matchers/catch_matchers.hpp>
 +#include <catch2/matchers/catch_matchers_floating_point.hpp>
- #include <test_utils.hpp>
  
  #include <libslic3r/Polygon.hpp>
-@@ -25,6 +27,8 @@ using namespace Slic3r;
+ #include <libslic3r/Polyline.hpp>
+@@ -7,6 +9,7 @@
+ #include <libslic3r/Geometry/VoronoiVisualUtils.hpp>
+ 
+ #include <numeric>
++#include <random>
+ 
+ // #define VORONOI_DEBUG_OUT
+ 
+@@ -22,6 +25,8 @@ using namespace Slic3r;
  
  using VD = Geometry::VoronoiDiagram;
  
@@ -22,7 +30,7 @@ Based on https://github.com/prusa3d/PrusaSlicer/issues/11567
  // https://svn.boost.org/trac10/ticket/12067
  // This bug seems to be confirmed.
  // Vojtech supposes that there may be no Voronoi edges produced for
-@@ -69,7 +73,7 @@ TEST_CASE("Voronoi missing edges - point
+@@ -66,7 +71,7 @@ TEST_CASE("Voronoi missing edges - point
          vd, pts, Lines());
  #endif
  
diff --git a/prusaslicer/patches/patch-tests_sla__print_sla__zcorrection__tests.cpp b/prusaslicer/patches/patch-tests_sla__print_sla__zcorrection__tests.cpp
new file mode 100644
index 0000000000..6665365269
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_sla__print_sla__zcorrection__tests.cpp
@@ -0,0 +1,34 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/sla_print/sla_zcorrection_tests.cpp.orig	2024-06-15 23:48:02.608865326 +0000
++++ tests/sla_print/sla_zcorrection_tests.cpp
+@@ -1,4 +1,8 @@
+-#include <catch2/catch.hpp>
++#include <catch2/catch_approx.hpp>
++#include <catch2/catch_template_test_macros.hpp>
++#include <catch2/catch_test_macros.hpp>
++#include <catch2/generators/catch_generators.hpp>
++#include <catch2/matchers/catch_matchers.hpp>
+ #include <test_utils.hpp>
+ 
+ #include <algorithm>
+@@ -64,7 +68,7 @@ TEST_CASE("Testing DepthMap for a cube",
+         REQUIRE(dlayer.begin()->first == i);
+         double ad = area(dlayer.begin()->second);
+         double as = area(slayer);
+-        REQUIRE(ad == Approx(as).margin(EPSILON));
++        REQUIRE(ad == Catch::Approx(as).margin(EPSILON));
+     }
+ }
+ 
+@@ -101,7 +105,7 @@ TEST_CASE("Testing DepthMap for arbitrar
+         const ExPolygons &slayer = corrslices_fast[i];
+         double ad = area(dlayer);
+         double as = area(slayer);
+-        REQUIRE(ad == Approx(as).margin(EPSILON));
++        REQUIRE(ad == Catch::Approx(as).margin(EPSILON));
+     }
+ }
+ 
diff --git a/prusaslicer/patches/patch-tests_slic3rutils_secretstore__tests.cpp b/prusaslicer/patches/patch-tests_slic3rutils_secretstore__tests.cpp
new file mode 100644
index 0000000000..3751351ce4
--- /dev/null
+++ b/prusaslicer/patches/patch-tests_slic3rutils_secretstore__tests.cpp
@@ -0,0 +1,12 @@
+$NetBSD$
+
+Support Catch2 v3.
+
+--- tests/slic3rutils/secretstore_tests.cpp.orig	2024-06-16 00:22:38.655124085 +0000
++++ tests/slic3rutils/secretstore_tests.cpp
+@@ -1,4 +1,4 @@
+-#include "catch2/catch.hpp"
++#include "catch2/catch_test_macros.hpp"
+ 
+ #include "slic3r/Utils/Secrets.hpp"
+ 


Home | Main Index | Thread Index | Old Index