Commit Graph

8648 Commits

Author SHA1 Message Date
Vojtech Bubnik
c8e2824a99 Fixing thread-safe StaticConfig creations #6477
fix un-threadsafe code for creating config enum hashtable. #6475
2021-05-04 11:03:26 +02:00
Lukáš Hejl
a935389c1b Added default object color in MMU segmentation according to the default extruder color for printing the object. 2021-05-04 08:13:04 +02:00
Lukáš Hejl
0d7eada5dc Fixed updating of extruders list in MMU segmentation gizmo after adding extruders and reloading 3MF with different extruder count and colors. 2021-05-04 07:59:16 +02:00
Lukáš Hejl
94364508d1 Follow-up of 168b4afbc2: Replaced forgotten lslices in the top and bottom layer propagation in MMU segmentation. 2021-05-03 22:11:04 +02:00
Lukáš Hejl
53f6d451ff Fixed compiler warnings 2021-05-03 21:50:40 +02:00
Lukáš Hejl
60a1eecd6e Fixed possible warnings 2021-05-03 21:13:13 +02:00
Lukáš Hejl
00b369c54c Fixed MMU segmentation for cases when a contour was whole colored by one color and a hole was whole colored by a different color. 2021-05-03 21:06:46 +02:00
Lukáš Hejl
0f7bbd626e Parallelization of regions merging for MMU segmentation. 2021-05-03 21:01:52 +02:00
Lukáš Hejl
ea73c79293 Fixed a few cases of missing colored segments in MMU segmentation.
Occasionally, some input polygons contained self-intersections that caused problems with Voronoi diagrams and consequently with the extraction of colored segments by function extract_colored_segments.
Also, occasionally input polygons contained several points very close together (distance between points is 1 or so). Such close points sometimes caused that the Voronoi diagram has self-intersecting edges around these vertices. This consequently leads to issues with the extraction of colored segments by function extract_colored_segments.
2021-05-03 20:56:39 +02:00
Lukáš Hejl
ff250f5d36 Fixed MMU segmentation for multi-volume objects.
MMU segmentation no longer works directly on lslices, instead of it works on custom merged regions. So lslices in PrintObject are no longer overwritten because of MMU segmentation.
All regions are scaled by SCALED_EPSILON before merging and shrunk back by SCALED_EPSILON after merging. That fixed issues with multi-volume objects when very close regions weren't merged.
Also, small expolygons and holes are filtered out that fixed missing segmentation at the boundary of two volumes in the case of multi-volume objects.
2021-05-03 20:37:14 +02:00
enricoturri1966
a138446ed2 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_project_dirty_state 2021-05-03 16:05:22 +02:00
enricoturri1966
cfe4c11d89 Tech ENABLE_ALLOW_NEGATIVE_Z -> Keep sinking objects as sinking after reload from disk 2021-05-03 16:02:06 +02:00
enricoturri1966
eafaa7accf Tech ENABLE_ALLOW_NEGATIVE_Z-> Fixed build on non-Windows OS 2021-05-03 15:47:16 +02:00
Vojtech Bubnik
ac4c3080e4 One more fix after merge. 2021-05-03 15:30:10 +02:00
Vojtech Bubnik
7d9cca600c Fixing after merge. 2021-05-03 15:28:03 +02:00
Vojtech Bubnik
c1ab2bcbd9 Merge branch 'vb_clipper_optimization' 2021-05-03 15:24:04 +02:00
Vojtech Bubnik
187adc6dfa Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2021-05-03 15:23:57 +02:00
Vojtech Bubnik
bd85c499ac Fixing compiler warnings 2021-05-03 15:00:23 +02:00
enricoturri1966
a6d2fc1331 Tech ENABLE_ALLOW_NEGATIVE_Z-> Layers height editing related fixes 2021-05-03 14:28:55 +02:00
Vojtech Bubnik
65ceff0883 Another fix for C++ conformant compilers 2021-05-03 11:55:23 +02:00
Vojtech Bubnik
7954641779 Fixing compilation on C++ conforming compilers 2021-05-03 11:50:05 +02:00
Vojtech Bubnik
f191b4611d Further rework of ClipperUtils: Replaced many to_polygons() /
to_expolygons() calls with templated ClipperUtils variants to avoid
memory allocation and copying.
2021-05-03 11:39:53 +02:00
Lukáš Hejl
8e4b0ac6fd Added missing include (GCC 11.1) 2021-05-01 22:33:59 +02:00
YuSanka
ac7b40d695 Fixed a bug with selection from the 3D-scene when ObjectSettings item is selected in ObjectList
Steps to repro:
1. Add 2 objects, add Settings for some of object -> Object Settings item is selected
2. In the 3D-scene select another object -> BUG: no changes in the ObjectList
2021-04-30 16:56:18 +02:00
YuSanka
a9009b3218 OSX specific: Fixed scale of the frequently settings, when extra display is connected 2021-04-30 16:49:13 +02:00
Lukáš Hejl
547fef9c58 Fixed build on Windows. 2021-04-30 15:40:27 +02:00
Lukáš Hejl
cf78d2a9dc Rework of MMU segmentation gizmo to support more than three colors. 2021-04-30 15:58:25 +02:00
enricoturri1966
868c1ecd41 Fixed conflicts after merge with master 2021-04-30 14:54:58 +02:00
Lukas Matena
2e4b7c2c07 Improved MM priming lines placement on circular beds (#6459) 2021-04-30 13:11:33 +02:00
Vojtech Bubnik
96a7a52715 Clipper optimization:
1) Removed the already commented-out scaling / unscaling when doing
   "safe offsetting"
2) Removed some of the "safe offsetting" at calls where it never was used.
3) Reworked Clipper & ClipperUtils to pass Polygons / ExPolygons / Surfaces
   as input parameters without conversion to ClipperLib::Paths. This
   should save a lot of memory allocation and copying.
4) Reworked conversions from ClipperLib::Paths & PolyTree to Polygons /
   ExPolygons to use the move operator to avoid many unnecessary allocations.
5) Reworked some "union with safe ofsetting" to "offset_ex", which should
   be cheaper.
2021-04-30 11:49:57 +02:00
enricoturri1966
849d7f2460 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-29 11:07:47 +02:00
Vojtech Bubnik
c901b60aa4 Layer::make_perimeters() - when merging regions, use OffsetEx instead
of safety offset of UnionEx, which may not be robust.
2021-04-29 11:05:11 +02:00
enricoturri1966
0f36a792a7 Fixed missing ending cap for toolpaths having a single segment 2021-04-29 09:09:49 +02:00
enricoturri1966
681737a3d6 Follow-up of 2c6472ebc3 -> Ensure backward compatibility 2021-04-28 16:06:49 +02:00
enricoturri1966
0ffa875093 Tech ENABLE_ALLOW_NEGATIVE_Z->Keep as sinking objects saved in project files 2021-04-28 16:02:51 +02:00
enricoturri1966
bd70aebfee Changed order of rendering of sidebar hints to avoid artifacts due to depth buffer cleanup made by gizmo renderers 2021-04-28 13:58:16 +02:00
enricoturri1966
0916f23e3f Tech ENABLE_ALLOW_NEGATIVE_Z->Fixed object popping up after editing layer range fields 2021-04-28 11:07:15 +02:00
enricoturri1966
470ea9cd9a Small refactoring in GLCanvas3D::LayersEditing 2021-04-28 08:49:32 +02:00
enricoturri1966
3fe61c2887 Tech ENABLE_SEAMS_VISUALIZATION -> Added threshold to place seams 2021-04-27 15:12:45 +02:00
enricoturri1966
9516470b2f Tech ENABLE_SEAMS_VISUALIZATION -> Fixed build on Mac 2021-04-27 11:11:21 +02:00
enricoturri1966
d078aedfbe Replace label Skirt with Skirt/Brim in preview legend 2021-04-27 10:46:42 +02:00
enricoturri1966
343eb6006b Tech ENABLE_SEAMS_VISUALIZATION -> 1st installment of seams visualization in preview 2021-04-27 09:45:15 +02:00
Lukáš Hejl
7d7c2efec1 Added seed fill for MMU segmentation 2021-04-27 06:48:09 +02:00
Lukáš Hejl
1ea93f1181 Fixed compiler warnings 2021-04-27 00:41:20 +02:00
Lukáš Hejl
8ae1d180c7 Extended support of MMU segmentation backed for more than three colors.
Serialization and deserialization in TriangleSelector were extended to support up to 16 materials (3 unused states left for possible later extension). These changes also affect the encoding of data from custom supports and seams, but it is backward compatible with the previous encoding. And for custom supports and seams, it is produced exactly the same data encoding as before.
2021-04-27 00:37:49 +02:00
Lukáš Hejl
ea402ff871 Fixed case in MMU segmentation when the infinity-edge in the Voronoi diagram has vertex0(), and vertex1() equals nullptr. 2021-04-27 00:36:22 +02:00
Lukáš Hejl
37720e9b28 Added hiding of MMU segmentation gizmo when it is selected printer with only one extruder. 2021-04-27 00:35:43 +02:00
Lukas Matena
22af3b8e30 Fixed a memory leak when repairing an external stl 2021-04-26 20:45:43 +02:00
Lukas Matena
fa71246ca4 Fix normal direction when exporting STL (#6406)
The export function does not depend on Model/ModelObject::mesh() family of functions,
changing them might break the already too brittle code.
2021-04-26 19:58:08 +02:00
Vojtech Bubnik
9c606e7948 Refactoring of StaticPrintConfig & derived classes:
1) Using boost::preprocessor to reduce code duplicities when defining
   new configuration values.
2) Implemented static hash() and operator== on StaticPrintConfig derived
   classes to support hash tables of instances thereof.
2021-04-26 18:37:10 +02:00