SPE-2298: Add detection of Voronoi diagram with parabolic edge without a focus point.

Cherry-picked from prusa3d/PrusaSlicer@c44ffed475

Co-authored-by: Lukáš Hejl <hejl.lukas@gmail.com>
This commit is contained in:
Noisyfox
2024-12-22 17:01:54 +08:00
parent 44e53c90f0
commit 4b739539a4
2 changed files with 19 additions and 7 deletions

View File

@@ -44,7 +44,8 @@ public:
MISSING_VORONOI_VERTEX,
NON_PLANAR_VORONOI_DIAGRAM,
VORONOI_EDGE_INTERSECTING_INPUT_SEGMENT,
UNKNOWN // Repairs are disabled in the constructor.
PARABOLIC_VORONOI_EDGE_WITHOUT_FOCUS_POINT,
UNKNOWN // Repairs are disabled in the constructor.
};
enum class State {
@@ -158,7 +159,10 @@ private:
IssueType>::type
detect_known_voronoi_cell_issues(const VoronoiDiagram &voronoi_diagram, SegmentIterator segment_begin, SegmentIterator segment_end);
static bool has_finite_edge_with_non_finite_vertex(const VoronoiDiagram &voronoi_diagram);
// Detect issues related to Voronoi edges, or that can be detected by iterating over Voronoi edges.
// The first type of issue that can be detected is a finite Voronoi edge with a non-finite vertex.
// The second type of issue that can be detected is a parabolic Voronoi edge without a focus point (produced by two segments).
static IssueType detect_known_voronoi_edge_issues(const VoronoiDiagram &voronoi_diagram);
voronoi_diagram_type m_voronoi_diagram;
vertex_container_type m_vertices;