28 Commits

Author SHA1 Message Date
Filip Sykala - NTB T15p
7c2132bdc8 Comment changes which could lead to crash of tests in build enviroment 2025-02-25 16:41:16 +01:00
LAPTOP-R2AR8CRT\filip
54bc516da6 Fixes of bad merges during rebase
Add missing includes into CMakeLists
IndexMesh change to AABBMesh
construct_voronoi become class function
2025-02-25 16:41:15 +01:00
Filip Sykala
3c4f68fa3f Fix: change .value() connected with optional to dereferece by *
Os X do NOT support std::optional::value()
PrusaSlicer_OsX_Mojave:
../src/libslic3r/SLA/SupportIslands/ExpandNeighbor.cpp:23:50: error: 'value' is unavailable: introduced in macOS 10.14
2025-02-25 16:41:15 +01:00
Filip Sykala
381c9d8fb4 Fix: Linux Warnings 2025-02-25 16:41:15 +01:00
Filip Sykala
85984ca189 Support island points are generated as unique ptr for option to move with them
+ add fix for cell 2 polygon transformation
2025-02-25 16:41:14 +01:00
Filip Sykala
7c4b711aeb separate Voronoi graf and searching longest path into own files 2025-02-25 16:41:14 +01:00
Jan Bařtipán
2b01d14f7b Catch2 updated to v3.8, all tests migrated 2025-02-06 15:55:09 +01:00
Lukáš Hejl
c44ffed475 SPE-2298: Add detection of Voronoi diagram with parabolic edge without a focus point. 2024-06-18 07:50:04 +02:00
Lukáš Hejl
4de0fdebda Enable most of the Voronoi diagram test cases because most of them are correctly detected and handled. 2024-06-18 07:50:03 +02:00
Lukáš Hejl
2de1f3aa45 SPE-2256: Fix the issue that we used the old Voronoi graph during the detection of invalid Voronoi diagrams.
This happens because we didn't set a modified flag that is required to be set before we use the new Voronoi graph.
Possibly related to #12385
2024-04-30 12:48:46 +02:00
Lukáš Hejl
8784ca0ecf SPE-1729: Try to compute the Voronoi diagram again on modified ExPolygon when an invalid Voronoi diagram is produced during the calculation of the medial axis.
There are several ExPolygons with very thin lines and holes formed by very close (1-5nm) vertices that are on the edge of our resolution. Those thin lines and holes are both unprintable and cause the Voronoi diagram to be invalid.
So, we filtered out such thin lines and holes and tried to compute the Voronoi diagram again.
2024-02-08 15:40:20 +01:00
Lukáš Hejl
fb84f3113a Introduce wrapper class around boost::polygon::voronoi_diagram. 2024-02-08 15:40:02 +01:00
Vojtech Bubnik
fe51f77839 Improvements in performance of Medial Axis algorithm.
Fixes Slicing slows or hangs on "Generating Permiters 20%" cpu load is at 100% #8164
Fixes Slicing hangs on generating perimeters with thing:3565827 (30g) #3259
2022-11-16 12:03:31 +01:00
Lukas Matena
bce2b148f4 Merged 2.5.0-beta1 into master (NO CONFLICTS FIXED) 2022-08-15 13:41:40 +02:00
Lukáš Hejl
77f5973c25 Fix of #8446: Non-planar Voronoi diagram.
This is the follow-up to 63c66f4f189b6f3d3a3b95ddd158c66ee5166420. Detection of non-planar (degenerated) Voronoi diagrams was rewritten to check if all neighboring edges of the Voronoi vertex are CCW ordered.
2022-07-26 13:47:40 +02:00
Lukáš Hejl
63c66f4f18 Fix of #8474 and #8514: Voronoi generator sometimes produced a non-planar Voronoi diagram.
We introduced detecting for those degeneration cases. When degenerated Voronoi diagram is detected, then the input polygons are rotated, and the Voronoi diagram is recomputed. Usually, rotation of input data solves issues like this.
2022-07-21 08:47:48 +02:00
Lukáš Hejl
97a5aa9592 Added a new test case for a missing Voronoi vertex. 2022-03-24 11:30:32 +01:00
Vojtech Bubnik
cf7b6fb19a Extracted MedialAxis code from Geometry.cpp/hpp, moved to its own
files to Geometry/
Moved other Voronoi files to Geometry/
2021-10-27 16:03:04 +02:00
Lukáš Hejl
dd4b26ba25 Fix of 7bd412a2cabaf1068b21dee87ce37b67dcd3a912 2021-04-05 20:32:41 +02:00
Lukáš Hejl
7bd412a2ca A few test cases for Voronoi diagrams.
A few test cases collected from multi-material segmentation. All new test cases are suppressed not to fail a building process.
2021-04-05 16:47:00 +02:00
Vojtech Bubnik
5449e6c549 Fixing some compiler warnings on Linux 2021-02-08 11:58:03 +01:00
Vojtech Bubnik
a116914fce WIP VoronoiOffset: Squash merge of vb_voronoi_offset
Working contour offsetting,
skeleton_edges_rough() to detect "important" skeleton edges.
Radius of an inscribed circle along the "important" skeleton edges
changes slowly, therefore these "important" skeleton edges signify
oblong regions possibly needing a gap fill.
2021-01-29 16:34:22 +01:00
Vojtech Bubnik
3cfccf1a5a Fixed unit tests broken with 3502f256fac0d0793f8314a7ab4a2788e93d74f8 2020-10-29 12:39:03 +01:00
Vojtech Bubnik
851ebc7991 fix of previous commit, missing include 2020-06-16 14:00:25 +02:00
Vojtech Bubnik
b101a8e266 Fixes of the offset curves from Voronoi diagram.
The offset curve extractor is already quite usable,
though singular cases are still not covered yet
when the offset curve intersects or nearly intersects
a Voronoi vertex.

Removal of the PRINTF_ZU "%zu" Visual Studio printf compatibility macro.
Fixes of a contours self intersection test for collinear segments.
SVG exporter now exports white background, so that the GNOME Eye viewer is usable.
2020-06-16 13:15:48 +02:00
Vojtech Bubnik
1c95ceaeaa Reworked algorithm for Voronoi Offset curve extraction.
Now the algorithm is very different from the OpenVoronoi implementation
and hopefully it is now correct (save numerical issues, which will be
a big PITA).
2020-06-11 16:11:02 +02:00
Vojtech Bubnik
6f4d24ab95 WIP: Generating offset curves with properly rounded corners from
a Voronoi diagram. Curve extraction is based on the OpenVoronoi implementation.
2020-06-04 13:50:09 +02:00
Vojtech Bubnik
6f92538c20 BoundingBox support for Lines,
BoundingBox constructor will no more throw for empty vector of points.

GMP allowed for Vojtech's fork of boost::polygon Voronoi implementation.

Added libslic3r tests for boost::polygon Voronoi. All Voronoi issues
ever reported on the Internet are captured by the tests. Two issues
reported (the two test cases) are real issues which may influence
PrusaSlicer negatively, namely

https://github.com/boostorg/polygon/issues/43
2020-05-28 15:53:53 +02:00