From d65272098fce31e78202278a3d220007b3e0debe Mon Sep 17 00:00:00 2001 From: wo80 Date: Mon, 8 Jan 2024 12:28:30 +0100 Subject: [PATCH] Set the label of Voronoi vertices to the label of their dual triangle. --- src/Triangle/Voronoi/IVoronoiFactory.cs | 2 +- src/Triangle/Voronoi/StandardVoronoi.cs | 2 -- src/Triangle/Voronoi/VoronoiBase.cs | 1 + 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Triangle/Voronoi/IVoronoiFactory.cs b/src/Triangle/Voronoi/IVoronoiFactory.cs index 2c3108d..83ca851 100644 --- a/src/Triangle/Voronoi/IVoronoiFactory.cs +++ b/src/Triangle/Voronoi/IVoronoiFactory.cs @@ -4,7 +4,7 @@ namespace TriangleNet.Voronoi using TriangleNet.Topology.DCEL; /// - /// Factory for Voronoi DCEL datastructure. + /// Factory for Voronoi DCEL data structure. /// public interface IVoronoiFactory { diff --git a/src/Triangle/Voronoi/StandardVoronoi.cs b/src/Triangle/Voronoi/StandardVoronoi.cs index 5a88830..839bcd5 100644 --- a/src/Triangle/Voronoi/StandardVoronoi.cs +++ b/src/Triangle/Voronoi/StandardVoronoi.cs @@ -6,10 +6,8 @@ namespace TriangleNet.Voronoi { - using System.Collections.Generic; using TriangleNet.Geometry; using TriangleNet.Tools; - using TriangleNet.Topology.DCEL; /// /// Computing the standard Voronoi diagram of a Delaunay triangulation. diff --git a/src/Triangle/Voronoi/VoronoiBase.cs b/src/Triangle/Voronoi/VoronoiBase.cs index 92a5b81..e93699d 100644 --- a/src/Triangle/Voronoi/VoronoiBase.cs +++ b/src/Triangle/Voronoi/VoronoiBase.cs @@ -130,6 +130,7 @@ protected List[] ComputeVertices(Mesh mesh, Vertex[] vertices) vertex = factory.CreateVertex(pt.x, pt.y); vertex.id = id; + vertex.label = t.label; vertices[id] = vertex; map[id] = new List();