Commit Graph

16215 Commits

Author SHA1 Message Date
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
tamasmeszaros
a5529aff1e Implement custom integer->string conversion for hashing
Converts to hexadecimal, reversed order which is faster.
2021-06-17 15:40:22 +02:00
tamasmeszaros
976dd72b8b Catching of sigsegv and sigfpe with structured exceptions on win 2021-06-17 15:17:21 +02:00
enricoturri1966
72df789077 Fixed the following crash:
1) Start PrusaSlicer

2) Add a box to the plater

3) Open Seam Painting or Paint - on supports gizmo

4) Save project

->crash
2021-06-17 08:16:54 +02:00
rtyr
3e5fa7b591
1.3.0-alpha2 Added SL1S SPEED profiles. 2021-06-16 19:48:31 +02:00
rtyr
9bbda55bb4
SL1S resources 2021-06-16 19:33:45 +02:00
YuSanka
c5cb94d92c Follow up 0b5ea8f429
- Un-select random sequence by default
- Added a check for interval height. It have to be bigger then print layer height
2021-06-16 18:20:26 +02:00
Lukáš Hejl
2e54648b97 Fixed a multi-material painting gizmo crash when extruders colors aren't initialized, which happens when switching between SLA and FDM printer. 2021-06-16 17:05:24 +02:00
Lukáš Hejl
b32202e597 Fixed incorrectly displayed custom supports and seams in the support and seam gizmos after 7377fc34ac. 2021-06-16 13:41:35 +02:00
Vojtech Bubnik
d0411223be TriangleSelector:
1) Fixing yesterday's regression in deserialization of older painted 3MFs
   (order of triangle children is now reversed, thus the serialization
    / deserialization has to take it into account).
2) WIP extraction into facets to triangulate T-joints.
2021-06-16 10:52:00 +02:00
Lukáš Hejl
ccb53f71b6 Merge branch 'lh_multi_material_segmentation_fix' 2021-06-16 06:06:07 +02:00
Lukáš Hejl
6ddd88e596 Fixed an issue where the color of the first extruder always replaced the default color after painting in a multi-material gizmo.
multi_material_segmentation_by_painting is now returning only the painted region. Regions with default colors that aren't painted by multi-material gizmo aren't returned.
2021-06-16 06:06:37 +02:00
Lukáš Hejl
ae1a799cf4 Fixed an issue for multi-volume objects where the seed fill visualization in the multi-material gizmo didn't disappear after the mouse was moved to another volume. 2021-06-16 06:06:34 +02:00
Lukáš Hejl
c59cf5de40 Fixed layers with the wrong color after multi-material segmentation on objects with multiple objects. 2021-06-16 06:06:34 +02:00
Lukáš Hejl
21b38db488 Added using the move operator in some parts of multi-material segmentation. 2021-06-16 06:06:34 +02:00
Lukáš Hejl
a06e42d01f Moved debug prints out of parallel cycles, and more debug prints were added for multi-material segmentation. 2021-06-16 06:06:34 +02:00
Lukáš Hejl
15a1b51339 Refactoring and cleanup of painting gizmos. 2021-06-16 06:06:34 +02:00
Lukáš Hejl
8a77fa38f0 Modified MMU painting gizmo behavior so that all triangles aren't painted by default by the first extruder, which was causing several problems.
This commit also fixed the following issues:
1) After loading a 3MF with painted triangles using the MMU painting gizmo, the painted triangles might not be displayed correctly in the MMU painting gizmo.
2) The MMU segmentation was unnecessarily executed for all layers and not just for the painted layers.
3) Object's base color wasn't changed when the assigned extruder for that object was changed while the MMU paint gizmo was opened.
4) Changing the base color of an object was only possible by removing all painted triangles.
2021-06-16 06:06:34 +02:00
Lukáš Hejl
b2677f513c Fixed a possible crash when closing the MMU painting gizmo cause by a non-virtual destructor. 2021-06-16 06:06:33 +02:00
Lukáš Hejl
7377fc34ac Fixed cracks in MMU painting gizmo. All triangles, even not painted triangles, are now rendered inside MMU painting gizmo.
The cracks were caused by using glPolygonOffset to resolve Z-fighting. All triangles of the object were firstly rendered entirely with a base color. And then paint triangles were drawn over these already rendered triangles.
2021-06-16 06:06:33 +02:00
Lukáš Hejl
de9ed9ee3e Follow-up of 39fd8065a1: Apply changes also for MMU painting gizmo, so shader->start_using() is called only once. 2021-06-16 06:06:33 +02:00
Lukáš Hejl
c751f2d638 Show info about multi-material segmentation in ObjectList. 2021-06-16 06:06:33 +02:00
Vojtech Bubnik
154e552006 TriangleSelector optimizations:
1) When splitting a triangle, vertices are now properly shared with
   the neighbor triangles, if these are already split.
   Please note that the splitting may not be regular if the splitting
   thershold is changed between splitting calls. Still the new code
   shares the vertices accross shared edges properly.
2) Triangles resp. vertices are newly reused after deleted using
   linked lists of released triangles resp. vertices.
   This mechanism replaces the old mechanism of reusing already split
   triangles.
2021-06-15 14:43:46 +02:00
YuSanka
0b5ea8f429 Random extruder sequence for MMU.
Related to https://github.com/prusa3d/PrusaSlicer/issues/1866
2021-06-15 12:38:05 +02:00
enricoturri1966
a2788f3a73 GCode Viewer -> Fixed used filament for gcode files produced by other slicers 2021-06-15 09:39:33 +02:00
Vojtech Bubnik
2f8190e6d0 Workaround of boost::filesystem::copy_file() incompatibility
on some file systems (eCrypt ...)
Should fix #4716 #6588
2021-06-14 12:19:13 +02:00
Lukáš Hejl
bfd83f925d Fixed build on MacOS.
Based on information in https://stackoverflow.com/a/46115028, structured bindings in C++17 don't name variables, and because of that, it is impossible to capture these variables in lambda functions.
2021-06-13 16:22:44 +02:00
Vojtech Bubnik
e17b57d6bd Fixing previous TriangleSelector refactoring. 2021-06-11 17:59:33 +02:00
Vojtech Bubnik
403bb926c8 Fixed regression bug after PrintRegions refactoring:
Fixed crash if an object is outside the print bed, its modifier inside
the print bed and the modifier gets deleted.
2021-06-11 17:29:16 +02:00
Vojtech Bubnik
6bade1b24a TriangleSelector - some memory optimization.
Don't store traingle normal, but reference the source triangle,
which stores its normal.
2021-06-11 12:27:58 +02:00
Vojtech Bubnik
74ab3e108e TriangleSelector refactoring for readability and a bit of performance,
added some comments, improved encapsulation through private attributes,
removed recursive call through std::function etc.
2021-06-11 11:02:47 +02:00
YuSanka
87a996d0d5 Code refactoring to avoid a call of update_ui_from_settings() every time when switching between "3D-View" and "Preview" 2021-06-11 10:34:13 +02:00
rtyr
69b9beaec0
1.3.0-alpha1
Added “Prusament PC Blend CF” filament profile. Increased travel acceleration for Prusa MINI. Updated start g-code for Prusa MINI. Added multiple add:north and Extrudr filament profiles. Updated Z travel speed values.
2021-06-11 09:55:32 +02:00
enricoturri1966
841f8c6715 Added missing assignment into ModelObject::assign_copy() 2021-06-10 13:32:53 +02:00
Vojtech Bubnik
4ada2ed093 TriangleSelector::get_facets() refactoring to share vertices.
TriangleSelector::valid refactored to m_valid and valid()
and bool members moved next to each other to shrink data structure
size due to memory alignment.
2021-06-10 12:43:31 +02:00
Vojtech Bubnik
95f4690e25 Support / seam / MMU painting serialization / deserialization:
Changed the serialization structure
	std::map<int, std::vector<bool>>
to a significantly more compact
	std::pair<std::vector<std::pair<int, int>>, std::vector<bool>>
Such change shall significantly improve efficiency of Undo / Redo stack.
2021-06-10 09:26:30 +02:00
YuSanka
b59ff2c294 Fixed a bug in update of the ObjectList when switching between 3d-View and Preview
Steps to repro:
1. start PrusaSlicer
2. add a box
-> watch the object list: only one item is shown in the list
3. switch to preview
-> the item in the object list gets a child
2021-06-09 17:21:39 +02:00
enricoturri1966
5631b2cb7c Follow-up of 2d9953069a 2021-06-08 15:10:01 +02:00
tamasmeszaros
cd19756a1d Merge branch 'tm_its_refactor_3' 2021-06-08 12:22:28 +02:00
tamasmeszaros
b5771a5787 try to fix build on windows 2021-06-08 11:53:38 +02:00