Commit Graph

16454 Commits

Author SHA1 Message Date
Lukáš Hejl
f10ec4d21c Merge branch 'lh_multi_material_segmentation_fix' 2021-06-28 08:11:17 +02:00
Lukáš Hejl
cb93c8ce99 Used function smooth_outward in multi-material segmentation to get rid of artifacts arisen after merging multi-volume objects. 2021-06-28 08:09:06 +02:00
Lukáš Hejl
a426093f12 Replaced boost::rtree in multi-material segmentation with much faster ClosestPointInRadiusLookup. 2021-06-28 08:09:06 +02:00
Lukáš Hejl
ce738102c6 Optimized the projection of painted triangles in multi-material segmentation. Added heuristics to skip most of the expensive calculations in cases where it is certain that performing these calculations would be useless. 2021-06-28 08:09:06 +02:00
Lukáš Hejl
48789e5ae1 Added a limitation on the number of usable extruders in the multi-material gizmo. If a printer has more extruders than this limit, a notification about it is shown. 2021-06-28 08:09:06 +02:00
Lukáš Hejl
23b26cb3f3 Fixed the issue where the object wasn't displayed after pressing the ESC key in the multi-material painting gizmo.
key in the multi-material painting gizmo.
Fixed also a similar issue in support and seam gizmos where an object was displayed with the wrong color after pressing the ESC key.
2021-06-28 08:09:06 +02:00
Vojtech Bubnik
e6295bbfe8 Fix of wxWidgets3.0 again wxGetApp not declared in this scope #6655 2021-06-28 07:45:13 +02:00
rtyr
5743eb9c17
Ender 7 thumbnail
For https://github.com/prusa3d/PrusaSlicer/pull/6659
2021-06-27 20:26:42 +02:00
Pascal de Bruijn
43346a871c creality.ini: beta support for Sermoon D1 2021-06-27 19:20:25 +02:00
Pascal de Bruijn
3cf1f568d0 creality.ini: beta support for Ender-7 2021-06-27 19:07:17 +02:00
Pascal de Bruijn
95c879cf00 creality.ini: beta support for CR-10 SMART 2021-06-27 18:51:41 +02:00
Vojtech Bubnik
211110ce53 Fixing some compiler warnings. 2021-06-27 17:45:41 +02:00
Vojtech Bubnik
e4e8c5df12 As an example of using the enum_bitmask infrastructure for type safe
sets of optional boolean parameters, the cut function "keep upper",
"keep lower" and "flip lower" boolean parameters were converted into
a single type safe enum_bitmask. Such a coding style is certainly
wordier than the original code, but much safer and more readable
than the error prone "boolean, boolean, boolean" function call
parameter list.
2021-06-27 17:36:25 +02:00
Vojtech Bubnik
0f3cabb5d9 Support for forward compatibility of configurations, user and system
config bundles, project files (3MFs, AMFs). When loading these files,
the caller may decide whether to substitute some of the configuration
values the current PrusaSlicer version does not understand with
some reasonable default value, and whether to report it. If substitution
is disabled, an exception is being thrown as before this commit.
If substitution is enabled, list of substitutions is returned by the
API to be presented to the user. This allows us to introduce for example
new firmware flavor key in PrusaSlicer 2.4 while letting PrusaSlicer
2.3.2 to fall back to some default and to report it to the user.

When slicing from command line, substutions are performed by default
and reported into the console, however substitutions may be either
disabled or made silent with the new "config-compatibility" command
line option.

Substitute enums and bools only.  Allow booleans to be parsed as
    true: "1", "enabled", "on" case insensitive
    false: "0", "disabled", "off" case insensitive
This will allow us in the future for example to switch the draft_shield
boolean to an enum with the following values: "disabled" / "enabled" / "limited".

Added "enum_bitmask.hpp" - support for type safe sets of options.
See for example PresetBundle::load_configbundle(...
LoadConfigBundleAttributes flags) for an example of intended usage.

WIP: GUI for reporting the list of config substitutions needs to be
implemented by @YuSanka.
2021-06-27 16:57:05 +02:00
Vojtech Bubnik
ad336e2cc0 Because of a crash in PrusaSlicer 2.3.0/2.3.1 when showing an update
notification with some locales, we don't want PrusaSlicer 2.3.0/2.3.1
to show this notification. On the other hand, we would like PrusaSlicer
2.3.2 to show an update notification of the upcoming PrusaSlicer 2.4.0.
Thus we will let PrusaSlicer 2.3.2 and couple of follow-up versions
to download the version number from an alternate file until
the PrusaSlicer 2.3.0/2.3.1 are phased out, then we will revert to
the original name.
2021-06-25 17:54:43 +02:00
Vojtech Bubnik
9b70efc46a Windows specific: Transactional saving of PrusaSlicer.ini to ensure
that configuration could be recovered in the case PrusaSlicer.ini
is corrupted during saving. The config is first written into a temp file
marked with a MD5 checksum. Once the file is saved, it is
copied to a backup file first, then moved to PrusaSlicer.ini.

When loading PrusaSlicer.ini fails, the backup file will be loaded
instead, however only if its MD5 checksum is valid.

The following "Fixes" comments are for github triggers. We implemented
a workaround, not a fix, we don't actually know how the data corruption
happens and why. Most likely the "Move file" Windows API is not atomic
and if PrusaSlicer crashes on another thread while moving the file,
PrusaSlicer.ini will only be partially saved, with the rest of the file
filled with nulls. We did not "fix" the issue, we just hope that our
workaround will help in majority of cases.

Fixes prusaslicer wont open 2.3 windows 10 #5812
Fixes Won't Open - Windows 10 #4915
Fixes PrusaSlicer Crashes upon opening with "'=' character not found in
line error" #2438
Fixes Fails to open on blank slic3r.ini %user%\AppData\Roaming\Slic3rPE
2021-06-25 16:44:06 +02:00
YuSanka
1378d2084a Fix of #6650 - show estimated print time on ruler is not working
+ Parent center of the MessageDialogs
2021-06-24 13:59:48 +02:00
rtyr
83285e3c4e
Updated SL1S tilt times. 2021-06-23 17:58:11 +02:00
rtyr
33efb94ebd
Updated SL1S bed model. 2021-06-23 17:23:21 +02:00
Vojtech Bubnik
204ae62449 Slight improvement in cost of background slicing cancellation. 2021-06-23 16:37:18 +02:00
Vojtech Bubnik
3a5a0575ef Fixed after removing TBB deprecated APIs 2021-06-23 15:24:05 +02:00
Filip Sykala
38c83844a2 Merge branch 'master' into fs_QuadricEdgeCollapse 2021-06-23 13:59:03 +02:00
Filip Sykala
f8d759ad64 Assert check of new vertex can't be used general on All models(depends on scale)
Fix variable name in compare function
Remove second triangle from  MPQ
2021-06-23 12:16:22 +02:00
Roman Beránek
e13535f822
drop deprecated TBB components (#6590)
Quite some time ago, many of the TBB components were deprecated in favor
of their near-equivalents in the STL or, in the case of task_scheduler_init,
were broken up and reconstituted under a less ad-hoc logic. Every time a header
file marked deprecated gets included, a rather loud warning is emitted, which
leads to a complete TBB's domination over the stderr stream during build time,
making it harder to notice _legitimate_ warnings.

Instead of merely muting the output with TBB_SUPPRESS_DEPRECATED_MESSAGES,
perform a genuine migration away from the deprecated components with the added
benefit of achieving a source compatibility with oneTBB, the successor to TBB
which has dropped the deprecated API for good.

What got replaced for what?

| Deprecated				| Replacement					|
| ------------------------------------- | --------------------------------------------- |
| `tbb::atomic`				| `std::atomic`					|
| `tbb::mutex`				| `std::mutex`					|
| `tbb::mutex::scoped_lock`		| `std::scoped_lock<std::mutex>`		|
| `tbb::mutex::scoped_lock` (empty)	| `std::unique_lock<std::mutex>` (deferred)	|
| `tbb::task_scheduler_init`		| `tbb::global_control`				|
| `tbb::this_thread`			| `std::this_thread`				|

Signed-off-by: Roman Beranek <roman.beranek@prusa3d.com>
2021-06-23 11:48:48 +02:00
enricoturri1966
7a7108b2ad Fixed warning 2021-06-23 10:30:15 +02:00
Filip Sykala
1196fac551 Parallel QEC initialization 2021-06-23 09:50:27 +02:00
tamasmeszaros
d15055e547 Merge branch 'tm_seh_err_report_fix' 2021-06-22 18:14:08 +02:00
tamasmeszaros
2096a6dbbf Fix error reporting when cgal mesh boolean crashes.
Change error report when catching SEH on cgal mesh boolean.
2021-06-22 18:13:35 +02:00
rtyr
48cd3b21b6
Updated Prusa MINI machine limits. 2021-06-22 12:19:21 +02:00
tamasmeszaros
15c0183647 Merge branch 'tm_arrange_rot'
fixes #6606
2021-06-22 11:52:32 +02:00
rtyr
77c4aebebe
1.4.0-alpha1 Added new SL1S resin profiles. 2021-06-22 11:23:39 +02:00
tamasmeszaros
49c6ce76d0 Search for suitable rotation when arranging items larger than the bed 2021-06-22 11:23:32 +02:00
Vojtech Bubnik
d3233d66fb Fixing previous commit 2021-06-22 10:05:03 +02:00
Filip Sykala
892c246700 Fix Linux warnings
../src/libslic3r/QuadricEdgeCollapse.cpp:110:39: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
../src/libslic3r/QuadricEdgeCollapse.cpp:394:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/libslic3r/QuadricEdgeCollapse.cpp:395:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/libslic3r/QuadricEdgeCollapse.cpp:514:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/libslic3r/QuadricEdgeCollapse.cpp:514:42: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
2021-06-22 10:01:14 +02:00
Vojtech Bubnik
c0715866ff Win32 specific: SEH handler on background thread. Catches Windows
structured exceptions (hard crashes, segmentation faults...),
converts them to Slic3r::HardCrash exceptions and displays the exception
using the usual PrusaSlicer way.
The SEH handler is installed on the main background slicing thread
as of now, therefore hard crashes in TBB worker threads are not handled.
2021-06-22 09:54:08 +02:00
Filip Sykala
7c13cfa1d9 Add test checking diference in volume before/after simplification
FIX warnings
..\src\libslic3r\QuadricEdgeCollapse.cpp(173): warning C4056: overflow in floating-point constant arithmetic
..\src\libslic3r\QuadricEdgeCollapse.cpp(232): warning C4056: overflow in floating-point constant arithmetic
2021-06-22 09:41:38 +02:00
Filip Sykala
e3cdeda673 Add quadric edge collapse 2021-06-22 09:21:16 +02:00
rtyr
c64ce8777f
Added new AzteQ Industrial printer, added DeltiQ 2 profiles for 0.6mm nozzle, added material ASA 275 (Spectrum), some minor setting improvements 2021-06-21 17:12:04 +02:00
rtyr
b7643850ee
Bumped up config version to 1.4.0-alpha0. 2021-06-21 16:57:48 +02:00
YuSanka
4e59fd504e DoubleSlider: Fixed out of range assert 2021-06-21 14:30:28 +02:00
Vojtech Bubnik
d291bb397b Fixed compiler warnings 2021-06-20 16:39:10 +02:00
Vojtech Bubnik
0d70a2be69 Renamed create_face_neighbors_index() to its_face_edge_ids().
Renamed its_create_neighbors_index() / its_create_neighbors_index_par() to its_face_neighbors() / its_face_neighbors_par().
New variant of its_face_edge_ids() to create edge IDs from face neighbors.
Fixed some incorrect use of _NDEBUG, it should be NDEBUG.
PrintObject::slice_support_volumes() returns newly Polygons, which are cheaper than ExPolygons.
Updated SeamPlacer and SupportMaterial to use regions defined as Polygons, not ExPolygons.
TriangleSelector::get_facets_strict() returning a patch with T-joints retriangulated.
New slice_mesh_slabs() - slicing projections of a triangle patch into top / bottom layers of slices, for MMU top / bottom segmentation.
TriangleMeshSlicer - use 64 mutexes instead of one when scattering sliced triangles into layers. This makes a big difference on modern many core desktop computers.
When applying MM segmented regions to input regions, the split regions are now re-merged with 10x higher positive offset epsilon to avoid creating gaps.
When testing for existence of paint-on supports or seam, use a more efficient has_facets() test, which does not deserialize into the expensive TriangleSelector tree structure.
GLIndexedVertexArray newly uses Eigen::AlignedBox<float, 3> for efficiency instead of our double based BoundingBoxf3.
Improved MMU painting refresh speed by optimizing generation of the vertex buffers.
Refactored MMU segmentation - projection of painted surfaces from top / bottom.
	1) Parallelized.
	2) Using the new slice_mesh_slabs() instead of projecting one triangle by the other and merging them with Clipper.
2021-06-20 15:21:12 +02:00
combolek
d08a70478e
Fixes Linux (and probably MacOS) build: wx/msw/registry.h is only available on Windows. (#6634) 2021-06-19 11:45:48 +02:00
YuSanka
5434a8980f Some code beautification for the last commit
+ Fix of the TabPresetComboBox layout for "light mode" + "tabs as a menu items" preferences
2021-06-18 21:54:20 +02:00
Oleksandra Yushchenko
fd071421cb
DarkMode for MSW (#6632)
* MSW specific: Dark Mode: First implementation

* Use menu instead of NoteBook

* Implemented MessageDialog
+ Fixed DarkMode for all dialogs and ColorPicker

* MSW DarkMode: Added missed updates for the switching between modes

* MSW DarkMode: Updated all existed context menus after switching of the mode
+ Added markers for the menu item witch is related to the selected tab

* Used wxFrame instead of wxDialog for SettingsDialog
(this change allow us to use menu bar in SettingsDialog)

+ fix for #6548 - Prusa Slicer 2.3.1 not activating non-modal settings window if settings window is minimized

* Implemented "Always use Dark mode colors" preference option

* Fixes for non_MSW build

* Next fixes for non-MSW builds

* Preferences: Fixed selection of the Settings Layout for non-MSW platforms
+ Updated DarkMode for colorpickers

* Windows DarkMode next fixes

* MSWDarkMode: Suppress to use system color to the PrusaSlicer
Select "Preferences -> Use Dark color mode (experimental)" to allow dark mode for the application

* Fixed MSW build

* MSWDarkMode: Upadteed color mode for ExtruderSequenceDialog and for dialogs related to the DoubleSlider

* Implemented Auto recreation of the PrusaSlicer when color mode is changed.

* Preferences: Added option "Set settings tabs as menu items (experimental)"
2021-06-18 19:46:04 +02:00
YuSanka
65f440c2ba Follow-up e3000c5305 - Fixed OSX build 2021-06-18 12:22:59 +02:00
tamasmeszaros
d3de14170a Fix build for unixes 2021-06-17 22:21:34 +02:00
YuSanka
e3000c5305 Implementation of the FR #3856 - Add option to replace stl in object list (right panel) 2021-06-17 21:29:18 +02:00
Lukáš Hejl
684b66125e Fixed an issue where multi-material segmentation ignored the last extruder. 2021-06-17 19:26:40 +02:00
tamasmeszaros
1126241767 Merge branch 'tm_sigsegv_recover_SEH' 2021-06-17 15:17:40 +02:00