Commit Graph

7618 Commits

Author SHA1 Message Date
Vojtech Bubnik
0ca6b12da1 Print/PrintObject/PrintRegion refactoring:
Newly the PrintObjects own PrintRegions and Print contains references
to PrintRegions owned by PrintObjects, so that a PrintRegion of the same
content is referenced by Print only once.

The refactoring is a WIP to support multi-material painting.
2021-05-06 13:01:09 +02:00
enricoturri1966
123c5af347 #6473 - Update titlebar when opening a project file by double-clicking the file icon 2021-05-06 10:11:53 +02:00
Vojtech Bubnik
ee15f00574 FDM backend refactoring: Return PrintRegion by reference, not by pointer.
Added PrintRegion hashing.
2021-05-05 18:13:58 +02:00
Vojtech Bubnik
714149dab2 WIP: Moving ownership of PrintRegions to PrintObjects. 2021-05-05 16:21:55 +02:00
Vojtech Bubnik
a7c67415c7 Another try of fixing compilation on gcc. 2021-05-05 14:34:54 +02:00
Vojtech Bubnik
18001fbb4e Fixing compilation on gcc 2021-05-05 14:32:19 +02:00
Vojtech Bubnik
d6c5961eb0 Factored out the Print::apply() method and its dependending free functions
into PrintApply.cpp module.
2021-05-05 14:30:09 +02:00
Vojtech Bubnik
72ce8cb28d PrintRegion refactoring: Getting rid of the Print pointer. 2021-05-05 14:17:36 +02:00
Vojtech Bubnik
a2de09e11e Fixing unit tests. 2021-05-05 13:19:01 +02:00
Vojtech Bubnik
7d4b3f2992 Fix of safety_offset() after ClipperUtils refactoring.
Fixes Solid infill where there should be none #6482
Also the safety offsetting was revised to be enabled only where needed,
the "do safety offset" is now easy to discover by
a new ApplySafetyOffset::Yes enum, and safety offset over union, which
is better done by offset() / offset_ex() has been replaced with
new union_safety_offset() / union_safety_offset_ex() functions, which
better convey their meaning and which could be better optimized than
union() with the safety offset applied.
2021-05-05 12:16:47 +02:00
Vojtech Bubnik
fd3dd1611c Fixed alignment of sparse infill over multiple layers of the same region,
which was broken with 68666de521b1cb15e41ac6728c0e8d3b4b0d4ed0
"Reworked the "new" bridging to respect the bridge_flow_ratio
by maintaining extrusion spacing, but modifying the extrusion width
and / or height."
2021-05-04 18:27:53 +02:00
Vojtech Bubnik
00835c7367 Fixing compilation on clang in debug mode. 2021-05-04 16:13:40 +02:00
Vojtech Bubnik
1aef86f650 Implemented generic mechanism for executing tasks on UI thread synchronously
from the background slicing thread, that supports cancellation.
The generic mechanism is used for generating thumbnails into G-code and
Fixes Fix deadlock when canceling the slicing while gcode is creating thumbnails #6476
Thanks @supermerill for pointing out the issue.
2021-05-04 16:07:32 +02:00
YuSanka
4fe6f726de ObjectList: Fixed update of the selection, when some gizmo in 3D-Scene is activated 2021-05-04 14:20:19 +02:00
enricoturri1966
cb294e0b3e Follow-up of 15c32d636d -> Small refactoring 2021-05-04 13:31:07 +02:00
enricoturri1966
15c32d636d Seams detection for gcode saved with other slicers 2021-05-04 12:45:51 +02:00
Vojtech Bubnik
5cc6dc59dc Fixed compilation with GCC 2021-05-04 11:22:38 +02:00
Vojtech Bubnik
a7368b9deb Fixing thread-safe StaticConfig creations #6477
fix un-threadsafe code for creating config enum hashtable. #6475
2021-05-04 11:03:26 +02:00
Vojtech Bubnik
ab74ea5c90 One more fix after merge. 2021-05-03 15:30:10 +02:00
Vojtech Bubnik
2aadc1cefa Fixing after merge. 2021-05-03 15:28:03 +02:00
Vojtech Bubnik
eb66111eda Merge branch 'vb_clipper_optimization' 2021-05-03 15:24:04 +02:00
Vojtech Bubnik
ef07644bf2 Merge branch 'master' of https://github.com/Prusa3d/PrusaSlicer 2021-05-03 15:23:57 +02:00
Vojtech Bubnik
7563c885a1 Fixing compiler warnings 2021-05-03 15:00:23 +02:00
Vojtech Bubnik
96f8744e05 Another fix for C++ conformant compilers 2021-05-03 11:55:23 +02:00
Vojtech Bubnik
c7c7983e77 Fixing compilation on C++ conforming compilers 2021-05-03 11:50:05 +02:00
Vojtech Bubnik
09a80d954c 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
62592cab48 Added missing include (GCC 11.1) 2021-05-01 22:33:59 +02:00
YuSanka
c414f932d4 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
4ffbd027d0 OSX specific: Fixed scale of the frequently settings, when extra display is connected 2021-04-30 16:49:13 +02:00
enricoturri1966
395164c7a1 Fixed conflicts after merge with master 2021-04-30 14:54:58 +02:00
Lukas Matena
95f5b82d6a Improved MM priming lines placement on circular beds (#6459) 2021-04-30 13:11:33 +02:00
Vojtech Bubnik
9fbba855ef 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
28d01542ed Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-29 11:07:47 +02:00
Vojtech Bubnik
b327314b02 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
3a28fe62b5 Fixed missing ending cap for toolpaths having a single segment 2021-04-29 09:09:49 +02:00
enricoturri1966
9086542a08 Follow-up of 2c6472ebc3 -> Ensure backward compatibility 2021-04-28 16:06:49 +02:00
enricoturri1966
1863d622b5 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
7ae77c06d0 Tech ENABLE_SEAMS_VISUALIZATION -> Added threshold to place seams 2021-04-27 15:12:45 +02:00
enricoturri1966
15f376e468 Tech ENABLE_SEAMS_VISUALIZATION -> Fixed build on Mac 2021-04-27 11:11:21 +02:00
enricoturri1966
2c6472ebc3 Replace label Skirt with Skirt/Brim in preview legend 2021-04-27 10:46:42 +02:00
enricoturri1966
076fdc90c0 Tech ENABLE_SEAMS_VISUALIZATION -> 1st installment of seams visualization in preview 2021-04-27 09:45:15 +02:00
Lukas Matena
da702ab135 Fixed a memory leak when repairing an external stl 2021-04-26 20:45:43 +02:00
Lukas Matena
978b359492 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
d1cfdcb49e 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
Lukas Matena
5783cc62fb Wipe tower priming lines are placed at origin with custom bed shapes
Custom shapes were previously detected as circular and the lines were placed off the bed
2021-04-26 09:21:18 +02:00
Vojtech Bubnik
9f4e9da5c6 Merge branch 'tm_vb_clipper_eigen' 2021-04-23 11:44:25 +02:00
enricoturri1966
70ec034281 Merge branch 'master' of https://github.com/prusa3d/PrusaSlicer into et_custom_gcode_detection 2021-04-22 15:30:27 +02:00
enricoturri1966
52583bbe30 Extrusions in custom start g-code forced to be at first layer height level 2021-04-22 15:15:19 +02:00
tamasmeszaros
ea26581959 Move iterator stuff from polygon to multipoint 2021-04-22 09:44:08 +02:00
Vojtech Bubnik
3b86cb3a3c Added missing files 2021-04-22 09:26:07 +02:00