105 Commits

Author SHA1 Message Date
Martin Šach
0a032dd1c2 Fix: Invalid assert in SupportSpotsGenerator 2023-12-05 10:12:48 +01:00
Martin Šach
e8064cdb14 Refactor: SupportSpotsGenerator integrals implementation improvements.
Split Integrals constructor to accept polygon and polygons.
Add operator+(Integrals, Integrals).
Make sure extrusion extraction for integral calculation throws in invalid case.
2023-12-01 09:28:21 +01:00
Martin Šach
782fa47791 Remove usage of polygons_covered_by_width.
In SupportSpotsGenerator there is a need to compute integral over
extrusions.
The mentioned function is slow for this use case. As it solves a harder
problem.
It is better to iterate the extrusion lines directly.
2023-12-01 09:28:21 +01:00
Martin Šach
5e8a1ffd38 Split check_stability into multiple functions.
In the SupportSpotsGenerator the function check_stability got out
of hand. It is refactored into multiple smaller functions.
2023-09-29 12:44:19 +02:00
Martin Šach
26fbf6e111 Refactor out reckon_new_support_point
In support spots generator, reckon_new_support_point was lamda with
many captures. This led to confusion. Now it is a proper function.
2023-09-29 12:44:19 +02:00
Martin Šach
003232dfb6 Add tests for SupportSpotsGenerator::ObjectPart construction.
Ensuring that ObjectParts in SupportSpotsGenerator are properly
generated from slice is crucial for any further computations.
2023-09-26 16:11:19 +02:00
Martin Šach
13579fff45 Move definitons to header in the SupportSpotsGenerator.
Moving the definitions to a header file will enable testing the
functions involved.
2023-09-26 16:11:19 +02:00
Martin Šach
ea69deef24 Use exact intergral in SupportSpotsGenerator.
Previously a numerical integration for ObjectPart was performed.
Now it is calculated exactly over triangles. The code has
also been refactored to enable unit testing.
2023-09-26 16:11:19 +02:00
Martin Šach
6164051d60 Use proper formula for second moment of area.
SupportSpotsGenerator originally used a heuristic formula. Current
formula is properly derived using known properties of
second moment of area. Several tests of this formula are added.
2023-09-22 13:30:05 +02:00
Vojtech Bubnik
8dad25efc4 Merge branch 'master' into master_262 2023-09-04 14:44:32 +02:00
ps_copyright
f32859c302 final copyright headers 2023-09-01 14:49:07 +02:00
Vojtech Bubnik
fa0986c0c5 Rebased pm_arcwelder_overhangs_port to vb_arc_welder 2023-07-27 09:17:35 +02:00
Pavel
7f8b03fd79 Fix of SPE-1811 - rarely, the support spot generator runs supper slow. Caused by too many slice connections detected by z-graph. The Z-Graph issue is not solved.
github issue https://github.com/prusa3d/PrusaSlicer/issues/10940
2023-07-17 09:37:16 +02:00
Pavel Mikus
29282e206f Fix warnings in ExtrusionProcessor and SupportSpotGenerator 2023-05-31 10:12:05 +02:00
PavelMikus
4c872b0352 Paralellize SupportSpotGenerator!
Fix extra perimeters crash - problem with new ankerl hash map
Fix progress bar
2023-04-27 15:37:25 +02:00
PavelMikus
13c7744443 Disable debug data output 2023-04-21 10:04:45 +02:00
PavelMikus
f6c38fb7f9 Smoothen the results, fix some issues. 2023-04-21 10:04:45 +02:00
PavelMikus
798396d918 Fixed several issues with smoothening of the slowdown, but there are still artefacts in the preview, on curved into flat srufaces 2023-04-21 10:04:45 +02:00
PavelMikus
aa0e21eed1 Center estiamted curvature values,
Center esimtated curling - transfering data by nearest line caused CCW or CW shift, based on which point of the current line was used. By switching the points on layer basis, this problem disapeared
2023-04-21 10:04:45 +02:00
PavelMikus
da6b972a79 Smoothen the curled height estimations and slowdown 2023-04-21 10:04:45 +02:00
PavelMikus
6e40e061f6 Finish rough implementation of slowdown over curled filament 2023-04-21 10:04:45 +02:00
PavelMikus
6ee674316d Finally some working curling model 2023-04-21 10:04:45 +02:00
PavelMikus
4ade7d6e8c Some improvements of the algortihm for curled height estim 2023-04-21 10:04:45 +02:00
Pavel Mikus
b04e3bc25e Initial implementation, requieres both dynamic speed and avoid curled overhangs options to be enabled
Also implements new, probably far better estimation of curled height of filament
2023-04-21 10:04:45 +02:00
PavelMikus
475c77ca96 fix some double to float truncation warnings 2023-03-02 17:06:06 +01:00
Pavel Mikus
5e550709ff fix issue 9800 - Avoid Crossing Curled Overhangs Not Respecting Printer Bed Size
Fix Avoid curled overhang functionality actually not working correctly, especially on multiple objects/instances
2023-02-20 21:14:34 +01:00
PavelMikus
73635e0855 Lower the curled height tolerance from 0.3 to 0.1 mm of the curled overhang avoidance algorithm. 2023-02-09 13:36:42 +01:00
PavelMikus
06e602afd3 \#9480 Fix weird path connections in Extra Perimeters when gap fill is applied
\#9513 \#9489 Fix crash when brim is used - the expansion of very small drops may result in empty polygon, which the support spot generator did not reflect
Fix crashes of stability alert checker, when empty print object was passed to it
2023-02-02 14:46:48 +01:00
PavelMikus
716e0254f4 Fix notifications during GCode export - only CRTICAL are now shown
Relax support detector parameters and warnings
2023-01-31 11:12:36 +01:00
Pavel Mikus
66a4b5b82a Refactored stability alert step from object step into print step,
implemented stability issues grouping based on number of issues and objects,
maximum of single warning message emitted
2023-01-29 20:11:50 +01:00
PavelMikus
05c4e759cf Move checkbox for support alerts into AppConfig preferences.
Separate Alerts into new print object step so that not warnings are thrown for autopaint.
finally fix -1 access int SupportSpotGenerator bridge detection
2023-01-27 15:00:10 +01:00
PavelMikus
4a9a40c654 SupportSpots: Fix typo bug in Bridge check 2023-01-27 11:40:51 +01:00
PavelMikus
d0c86403a5 Fix lslices ordering - keep topological ordering from clipper, and separate print ordering into vector of indices 2023-01-26 15:50:18 +01:00
PavelMikus
5839e78a5e minor issues fix 2023-01-26 15:50:18 +01:00
Pavel Mikuš
37ca6e30bd
Update SupportSpotsGenerator.cpp 2023-01-25 17:24:53 +01:00
PavelMikus
c09a44779d brim integration into SupportSpotGenerator 2023-01-25 17:01:58 +01:00
PavelMikus
c31e3ec1a2 Bugfix in extrusion quality estimator, Refactoring of alerts, rename of autogenerate button 2023-01-25 17:01:58 +01:00
PavelMikus
a4de5c6553 initial warnings version 2023-01-25 17:01:58 +01:00
PavelMikus
41f1b83ae4 raft layers, partial objects memory, params acceleration 2023-01-25 17:01:58 +01:00
PavelMikus
f2deefd1de Support spot generator improvement - supporting bridges only in one direction 2023-01-25 17:01:58 +01:00
PavelMikus
821d2391b4 Added SupportPointCause describing the reason for the support point 2023-01-25 17:01:58 +01:00
PavelMikus
be61ab37f4 Document extensively the generated SupportPoint structure,
fix wrong estimation of weight torque for connections
2023-01-19 15:07:06 +01:00
PavelMikus
bdcb773202 replace triangulation in SupportSpotGenerator with triangle formula and winding number
Use the same apporach in computation of polygon area principal components
2023-01-18 16:01:09 +01:00
Vojtech Bubnik
ca0c83d914 The new ExtrusionRole implementation newly supports both "Bridging"
and "External" attributes at the same time.
PerimeterGenerator was updated to make use of it and set "External"
attribute for overhang perimeters.
2023-01-16 14:39:57 +01:00
Vojtech Bubnik
d1f610d957 Extending the expressivity of ExtrusionRole
Moved is_xx() test functions to ExtrusionRole enum class,
changed the tests to use the new ExtrusionRole bitmask.
Follow-up to 5991850db1f2d09d1b7713f42300e2bfe4a42128
e50e96bb26eab4f9d56c98706c03166635cf4fff
c64dbacf88c617e3d676bdaa6c8c81317ccaee5d
2023-01-16 12:39:08 +01:00
Vojtech Bubnik
5991850db1 WIP Extending the expressivity of ExtrusionRole
Co-authored-by: supermerill <merill@free.fr>
Based on the unfinished idea of @supermerill, defining ExtrusionRole
as a bit mask of ExtrusionRoleModifier.
Because the ExtrusionRole was used for both ExtrusionEntity and
G-code export / G-code viewer, the original ExtrusionRole had to be split
to ExtrusionRole and GCodeExtrusionRole to support bitmask attributes
for the former while keeing a low number of ordinary values for the latter.
2023-01-16 10:14:46 +01:00
PavelMikus
9ccb413c02 Extra perimeters fix 2023-01-11 17:15:11 +01:00
PavelMikus
d20f880124 local issues support generator fix 2023-01-11 17:15:11 +01:00
PavelMikus
727e7cc4f1 add throw if canceled calls into support spot generating algorithm 2023-01-11 17:15:11 +01:00
Pavel Mikus
a57680ea67 BUGFIX in aabb intersections, additional debug info 2023-01-11 17:15:11 +01:00