From 280a9247a725aac5a889dba97fa1d361d5fd9c1d Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:20:35 +0100 Subject: [PATCH 1/8] c --- docs/src/tutorials/clipped_polygon.md | 150 ++++++++++++++++++++++++++ docs/src/tutorials/power.md | 150 ++++++++++++++++++++++++++ docs/src/tutorials/weighted.md | 113 +++++++++++++++++++ 3 files changed, 413 insertions(+) create mode 100644 docs/src/tutorials/clipped_polygon.md create mode 100644 docs/src/tutorials/power.md create mode 100644 docs/src/tutorials/weighted.md diff --git a/docs/src/tutorials/clipped_polygon.md b/docs/src/tutorials/clipped_polygon.md new file mode 100644 index 000000000..69a6db133 --- /dev/null +++ b/docs/src/tutorials/clipped_polygon.md @@ -0,0 +1,150 @@ +```@meta +EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/clipped_polygon.jl" +``` + +# Clipped Voronoi Tessellations +## Clipping to a Generic Convex Polygon + +In this tutorial we show how to clip a Voronoi tessellation to +more generic convex polygons (non-convex polygons are not currently supported) than just a convex hull or a rectangle. This is +done by using the `clip_polygon` keyword argument in `voronoi`. + +We start by clipping the tessellation to a rectangle, showing an alternative +to the [previous tutorial](clipped_rectangle.md). To start, we load in the packages +we need and generate some data. + +````@example clipped_polygon +using DelaunayTriangulation +using DelaunayTriangulation: EllipticalArc +using CairoMakie +using StableRNGs + +rng = StableRNG(123) +points = randn(rng, 2, 50) +tri = triangulate(points; rng) +vorn = voronoi(tri) +```` + +To define the polygon, we define the points and vertices just as we would, for example, +the boundary of a triangulation. + +````@example clipped_polygon +xmin, xmax, ymin, ymax = -1/2, 1/2, -1.0, 1.0 +clip_points = ((xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)) +clip_vertices = (1, 2, 3, 4, 1) +clip_polygon = (clip_points, clip_vertices) +```` + +Now we simply pass the polygon into `voronoi`. + +````@example clipped_polygon +clipped_vorn = voronoi(tri, clip = true, clip_polygon = clip_polygon) +```` + +Now let's look at the results. + +````@example clipped_polygon +fig = Figure() +ax1 = Axis(fig[1, 1], title = "Unclipped", width = 600, height = 400) +ax2 = Axis(fig[1, 2], title = "Clipped", width = 600, height = 400) +voronoiplot!(ax1, vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax1, -2, 2) +ylims!(ax1, -2, 2) +lines!(ax1, [clip_points..., clip_points[begin]], color = :black, linewidth = 4, linestyle = :dash) +voronoiplot!(ax2, clipped_vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax2, -2, 2) +ylims!(ax2, -2, 2) +resize_to_layout!(fig) +fig +```` + +We can clip to any convex polygon that we want to. For example, below we clip to an elliptical boundary. + +````@example clipped_polygon +rng = StableRNG(123333) +points = randn(rng, 2, 50) +tri = triangulate(points; rng) +vorn = voronoi(tri) +ellip = EllipticalArc((1/2, 0.0), (1/2, 0.0), (0.0, 0.0), 1/2, 1.0, 0.0) +t = LinRange(0, 1, 50) +clip_points = ellip.(t) +clip_vertices = [1:(length(clip_points)-1); 1] +clip_polygon = (clip_points, clip_vertices) +clipped_vorn = voronoi(tri, clip = true, clip_polygon = clip_polygon) +fig = Figure() +ax1 = Axis(fig[1, 1], title = "Unclipped", width = 600, height = 400) +ax2 = Axis(fig[1, 2], title = "Clipped", width = 600, height = 400) +voronoiplot!(ax1, vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax1, -2, 2) +ylims!(ax1, -2, 2) +lines!(ax1, [clip_points..., clip_points[begin]], color = :black, linewidth = 4, linestyle = :dash) +voronoiplot!(ax2, clipped_vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax2, -2, 2) +ylims!(ax2, -2, 2) +resize_to_layout!(fig) +fig +```` + +## Just the code +An uncommented version of this example is given below. +You can view the source code for this file [here](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/clipped_polygon.jl). + +```julia +using DelaunayTriangulation +using DelaunayTriangulation: EllipticalArc +using CairoMakie +using StableRNGs + +rng = StableRNG(123) +points = randn(rng, 2, 50) +tri = triangulate(points; rng) +vorn = voronoi(tri) + +xmin, xmax, ymin, ymax = -1/2, 1/2, -1.0, 1.0 +clip_points = ((xmin, ymin), (xmax, ymin), (xmax, ymax), (xmin, ymax)) +clip_vertices = (1, 2, 3, 4, 1) +clip_polygon = (clip_points, clip_vertices) + +clipped_vorn = voronoi(tri, clip = true, clip_polygon = clip_polygon) + +fig = Figure() +ax1 = Axis(fig[1, 1], title = "Unclipped", width = 600, height = 400) +ax2 = Axis(fig[1, 2], title = "Clipped", width = 600, height = 400) +voronoiplot!(ax1, vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax1, -2, 2) +ylims!(ax1, -2, 2) +lines!(ax1, [clip_points..., clip_points[begin]], color = :black, linewidth = 4, linestyle = :dash) +voronoiplot!(ax2, clipped_vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax2, -2, 2) +ylims!(ax2, -2, 2) +resize_to_layout!(fig) +fig + +rng = StableRNG(123333) +points = randn(rng, 2, 50) +tri = triangulate(points; rng) +vorn = voronoi(tri) +ellip = EllipticalArc((1/2, 0.0), (1/2, 0.0), (0.0, 0.0), 1/2, 1.0, 0.0) +t = LinRange(0, 1, 50) +clip_points = ellip.(t) +clip_vertices = [1:(length(clip_points)-1); 1] +clip_polygon = (clip_points, clip_vertices) +clipped_vorn = voronoi(tri, clip = true, clip_polygon = clip_polygon) +fig = Figure() +ax1 = Axis(fig[1, 1], title = "Unclipped", width = 600, height = 400) +ax2 = Axis(fig[1, 2], title = "Clipped", width = 600, height = 400) +voronoiplot!(ax1, vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax1, -2, 2) +ylims!(ax1, -2, 2) +lines!(ax1, [clip_points..., clip_points[begin]], color = :black, linewidth = 4, linestyle = :dash) +voronoiplot!(ax2, clipped_vorn, show_generators = false, colormap = :matter, strokewidth = 4) +xlims!(ax2, -2, 2) +ylims!(ax2, -2, 2) +resize_to_layout!(fig) +fig +``` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/tutorials/power.md b/docs/src/tutorials/power.md new file mode 100644 index 000000000..958eb7b6f --- /dev/null +++ b/docs/src/tutorials/power.md @@ -0,0 +1,150 @@ +```@meta +EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/power.jl" +``` + +# Power Diagrams + +In this tutorial, we demonstrate how we can construct +power diagrams (also called weighted Voronoi tessellations). +These are dual to the weighted Delaunay triangulation and, +instead of being based on the Euclidean metric like Voronoi tessellations, +the power distance is used to define the Voronoi tiles. The power distance +is defined by $\pi(p, q) = d(p, q)^2 - w_p - w_q$, where $d(p, q)$ +is the Euclidean distance between points $p$ and $q$, and $w_p$ and $w_q$ +are _weights_ associated with $p$ and $q$. See [this page](../math/power.md) +for more details. To start with the tutorial, we load in the packages we'll need. + +````@example power +using DelaunayTriangulation +using CairoMakie +using StableRNGs +```` + +To build a power diagram, you need to start from a weighted +Delaunay triangulation as described in [this tutorial](weighted.md). + +````@example power +points = [ + (-3.0, 7.0), (1.0, 6.0), (-1.0, 3.0), + (-2.0, 4.0), (3.0, -2.0), (5.0, 5.0), + (-4.0, -3.0), (3.0, 8.0), +] +weights = [0.2, 0.0, -3.0, 2.0, 7.5, 2.3, 0.0, -0.5] +rng = StableRNG(123) +tri = triangulate(points; weights, rng) +pvorn = voronoi(tri; rng) +```` + +Let's compare the power diagram to its unweighted counterpart. + +````@example power +vorn = voronoi(triangulate(points; rng); rng) +fig = Figure() +ax1 = Axis(fig[1, 1], title="Unweighted", width=300, height=400) +ax2 = Axis(fig[1, 2], title="Weighted", width=300, height=400) +voronoiplot!(ax1, vorn, show_generators=true, colormap=:matter, strokewidth=4, clip=(-5, 5, -5, 10)) +voronoiplot!(ax2, pvorn, show_generators=true, colormap=:matter, strokewidth=4, clip=(-5, 5, -5, 10)) +resize_to_layout!(fig) +fig +```` + +Notice that, unlike the unweighted tessellation, the generators in the power diagram +don't actually have to live in their own tile, and more than one generator +may inhibit a tile. This is because the power diagram is based on the power distance, +not the Euclidean distance. + +We can easily look at the affect of the weights on the power diagram. + +````@example power +A, B, C, D, E, F, G, H, +I, J, K, L, M, N = (-1.0, 3.0), (1.0, 3.0), +(2.0, 2.0), (2.0, 0.0), (1.0, -1.0), (-1.0, -1.0), +(-2.0, 0.0), (-2.0, 2.0), (-1.0, 2.0), +(0.0, 1.5), (1.0, 2.5), (-1.0, 0.5), +(1.0, 0.0), (1.5, 1.0) +points = [A, B, C, D, E, F, G, H, I, J, K, L, M, N] +w = Observable(-10.0) +weights = @lift (wts = zeros(length(points)); wts[10] = $w; wts) +tri = @lift tri = triangulate(points; weights=$weights) +vorn = @lift voronoi($tri) +weight_itr_base = LinRange(-10, 10, 30 * 5) +weight_itr = vcat(weight_itr_base, reverse(weight_itr_base)) +title_obs = lift(w -> L"w_{10} = %$(round(w, sigdigits = 4))", w) +fig, ax, sc = voronoiplot(vorn, + axis=(title=title_obs, titlealign=:left), + figure=(fontsize=24,), + clip = (-4, 4, -4, 4), + color = [:red, :blue, :green, :purple, :orange, :yellow, :cyan, :white, :black, :magenta, :gray, :brown, :pink, :lightblue] +) +scatter!(ax, [J], color=:red, markersize=13) +record(fig, "varying_weight_power.mp4", weight_itr; framerate=30) do _w + w[] = _w +end; +nothing #hide +```` + +![](varying_weight_power.mp4) + +See that, for small weights, the Voronoi tile of the 10th point isn't even present. As the weight increases, the tile +grows and eventually dominates the tessellation. + +We also note that, just like standard Voronoi tessellations, we can also +apply clipping and smoothing to power diagrams. These can be done in exactly the same manner. +## Just the code +An uncommented version of this example is given below. +You can view the source code for this file [here](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/power.jl). + +```julia +using DelaunayTriangulation +using CairoMakie +using StableRNGs + +points = [ + (-3.0, 7.0), (1.0, 6.0), (-1.0, 3.0), + (-2.0, 4.0), (3.0, -2.0), (5.0, 5.0), + (-4.0, -3.0), (3.0, 8.0), +] +weights = [0.2, 0.0, -3.0, 2.0, 7.5, 2.3, 0.0, -0.5] +rng = StableRNG(123) +tri = triangulate(points; weights, rng) +pvorn = voronoi(tri; rng) + +vorn = voronoi(triangulate(points; rng); rng) +fig = Figure() +ax1 = Axis(fig[1, 1], title="Unweighted", width=300, height=400) +ax2 = Axis(fig[1, 2], title="Weighted", width=300, height=400) +voronoiplot!(ax1, vorn, show_generators=true, colormap=:matter, strokewidth=4, clip=(-5, 5, -5, 10)) +voronoiplot!(ax2, pvorn, show_generators=true, colormap=:matter, strokewidth=4, clip=(-5, 5, -5, 10)) +resize_to_layout!(fig) +fig + +A, B, C, D, E, F, G, H, +I, J, K, L, M, N = (-1.0, 3.0), (1.0, 3.0), +(2.0, 2.0), (2.0, 0.0), (1.0, -1.0), (-1.0, -1.0), +(-2.0, 0.0), (-2.0, 2.0), (-1.0, 2.0), +(0.0, 1.5), (1.0, 2.5), (-1.0, 0.5), +(1.0, 0.0), (1.5, 1.0) +points = [A, B, C, D, E, F, G, H, I, J, K, L, M, N] +w = Observable(-10.0) +weights = @lift (wts = zeros(length(points)); wts[10] = $w; wts) +tri = @lift tri = triangulate(points; weights=$weights) +vorn = @lift voronoi($tri) +weight_itr_base = LinRange(-10, 10, 30 * 5) +weight_itr = vcat(weight_itr_base, reverse(weight_itr_base)) +title_obs = lift(w -> L"w_{10} = %$(round(w, sigdigits = 4))", w) +fig, ax, sc = voronoiplot(vorn, + axis=(title=title_obs, titlealign=:left), + figure=(fontsize=24,), + clip = (-4, 4, -4, 4), + color = [:red, :blue, :green, :purple, :orange, :yellow, :cyan, :white, :black, :magenta, :gray, :brown, :pink, :lightblue] +) +scatter!(ax, [J], color=:red, markersize=13) +record(fig, "varying_weight_power.mp4", weight_itr; framerate=30) do _w + w[] = _w +end; +``` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + diff --git a/docs/src/tutorials/weighted.md b/docs/src/tutorials/weighted.md new file mode 100644 index 000000000..b1fd4c5a1 --- /dev/null +++ b/docs/src/tutorials/weighted.md @@ -0,0 +1,113 @@ +```@meta +EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/weighted.jl" +``` + +# Weighted Triangulations + +In this tutorial, we demonstrate how to construct a weighted Delaunay triangulation. +For more information about weighted Delaunay triangulations, see the [math details here](../math/weighted.md). +To summarise, weighted Delaunay triangulations associate with each vertex $p_i$ a scalar +weight $w_i$. To pass weights into `triangulate`, use the `weights` keyword argument, +which by default is `ZeroWeight()`. + +Let's first consider a simple example. We use a triangulation with random weights and compare +it to the standard unweighted Delaunay triangulation. + +````@example weighted +using DelaunayTriangulation, CairoMakie +A, B, C, D, E, F, G, H, +I, J, K, L, M, N = (-1.0, 3.0), (1.0, 3.0), +(2.0, 2.0), (2.0, 0.0), (1.0, -1.0), (-1.0, -1.0), +(-2.0, 0.0), (-2.0, 2.0), (-1.0, 2.0), +(0.0, 1.5), (1.0, 2.5), (-1.0, 0.5), +(1.0, 0.0), (1.5, 1.0) +points = [A, B, C, D, E, F, G, H, I, J, K, L, M, N] +weights = randn(length(points)) +tri = triangulate(points; weights) +```` + +````@example weighted +tri_unweighted = triangulate(points) +```` + +````@example weighted +fig = Figure() +ax = Axis(fig[1, 1], width = 400, height = 400, title = "Unweighted", titlealign = :left) +triplot!(ax, tri_unweighted, strokecolor = :black) +ax2 = Axis(fig[1, 2], width = 400, height = 400, title = "Weighted", titlealign = :left) +triplot!(ax2, tri, strokecolor = :red) +resize_to_layout!(fig) +fig +```` + +The triangles are of course not the same. Also, note that not all +vertices appear in the weighted triangulation. To see the effect of the +weights, let's reset all the weights to zero and see how the triangulation changes +as we vary the weight of the point at $(x, y) = (0, 1.5)$, starting with a +weight of $-10$. + +````@example weighted +w = Observable(-10.0) +weights = @lift (wts = zeros(length(points)); wts[10] = $w; wts) +tri = @lift triangulate(points; weights = $weights) +weight_itr_base = LinRange(-10, 10, 30*5) +weight_itr = vcat(weight_itr_base, reverse(weight_itr_base)) +title_obs = lift(w -> L"w_{10} = %$(round(w, sigdigits = 4))", w) +fig, ax, sc = triplot(tri, +axis = (title = title_obs, titlealign = :left), +figure = (fontsize = 24,)) +scatter!(ax, [J], color = :red, markersize = 13) +record(fig, "varying_weight.mp4", weight_itr; framerate = 30) do _w + w[] = _w +end; +nothing #hide +```` + +![](varying_weight.mp4) + +See that, once the weight gets so large, it essentially dominates the triangulation. +## Just the code +An uncommented version of this example is given below. +You can view the source code for this file [here](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/weighted.jl). + +```julia +using DelaunayTriangulation, CairoMakie +A, B, C, D, E, F, G, H, +I, J, K, L, M, N = (-1.0, 3.0), (1.0, 3.0), +(2.0, 2.0), (2.0, 0.0), (1.0, -1.0), (-1.0, -1.0), +(-2.0, 0.0), (-2.0, 2.0), (-1.0, 2.0), +(0.0, 1.5), (1.0, 2.5), (-1.0, 0.5), +(1.0, 0.0), (1.5, 1.0) +points = [A, B, C, D, E, F, G, H, I, J, K, L, M, N] +weights = randn(length(points)) +tri = triangulate(points; weights) + +tri_unweighted = triangulate(points) + +fig = Figure() +ax = Axis(fig[1, 1], width = 400, height = 400, title = "Unweighted", titlealign = :left) +triplot!(ax, tri_unweighted, strokecolor = :black) +ax2 = Axis(fig[1, 2], width = 400, height = 400, title = "Weighted", titlealign = :left) +triplot!(ax2, tri, strokecolor = :red) +resize_to_layout!(fig) +fig + +w = Observable(-10.0) +weights = @lift (wts = zeros(length(points)); wts[10] = $w; wts) +tri = @lift triangulate(points; weights = $weights) +weight_itr_base = LinRange(-10, 10, 30*5) +weight_itr = vcat(weight_itr_base, reverse(weight_itr_base)) +title_obs = lift(w -> L"w_{10} = %$(round(w, sigdigits = 4))", w) +fig, ax, sc = triplot(tri, +axis = (title = title_obs, titlealign = :left), +figure = (fontsize = 24,)) +scatter!(ax, [J], color = :red, markersize = 13) +record(fig, "varying_weight.mp4", weight_itr; framerate = 30) do _w + w[] = _w +end; +``` + +--- + +*This page was generated using [Literate.jl](https://github.com/fredrikekre/Literate.jl).* + From 7ab8da8c566f62eb9bcaef9b133583e0ae891d31 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:47:03 +0100 Subject: [PATCH 2/8] fix docstrings --- NEWS.md | 1 + docs/make.jl | 2 +- docs/src/api/data_structures.md | 1 + docs/src/extended/algorithms.md | 3 + docs/src/extended/data_structures.md | 84 ++++++++++++++++++++++++- docs/src/extended/utils.md | 5 ++ docs/src/tutorials/centroidal.md | 2 +- docs/src/tutorials/clipped.md | 5 +- docs/src/tutorials/clipped_rectangle.md | 6 +- docs/src/tutorials/curve_bounded.md | 2 +- docs/src/tutorials/custom_primitive.md | 2 + docs/src/tutorials/nearest.md | 6 +- src/DelaunayTriangulation.jl | 17 ----- src/public.jl | 1 + 14 files changed, 108 insertions(+), 29 deletions(-) diff --git a/NEWS.md b/NEWS.md index ce97d6a0e..edbc9d3dd 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,6 +9,7 @@ - Bigfix: Fixed issue with `use_barriers` when a ghost edge is selected at random during point location. See [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196). - Feature: Introduced the (currently internal) function `get_positive_curve_indices` for finding curves with positive orientation in a `Triangulation`. [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196). - `is_exterior_curve`, `is_interior_curve`, `num_exterior_curves`, and `is_disjoint` are now defined based on `get_positive_curve_indices` rather than `get_exterior_curve_indices`. See [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196). +- Bugfix: `PointLocationHistory` was not marked as public. This has been fixed. ## 1.5.0 diff --git a/docs/make.jl b/docs/make.jl index e2719337c..84135b8a1 100644 --- a/docs/make.jl +++ b/docs/make.jl @@ -9,7 +9,7 @@ DocMeta.setdocmeta!( recursive = true, ) -const IS_LIVESERVER = false && get(ENV, "LIVESERVER_ACTIVE", "false") == "true" +const IS_LIVESERVER = get(ENV, "LIVESERVER_ACTIVE", "false") == "true" if IS_LIVESERVER using Revise Revise.revise() diff --git a/docs/src/api/data_structures.md b/docs/src/api/data_structures.md index 6821d1498..1ba281ec9 100644 --- a/docs/src/api/data_structures.md +++ b/docs/src/api/data_structures.md @@ -12,4 +12,5 @@ Triangulation VoronoiTessellation ConvexHull InsertionEventHistory +PointLocationHistory ``` \ No newline at end of file diff --git a/docs/src/extended/algorithms.md b/docs/src/extended/algorithms.md index 710e22b6d..cb3420c06 100644 --- a/docs/src/extended/algorithms.md +++ b/docs/src/extended/algorithms.md @@ -50,6 +50,7 @@ Pages = ["src/algorithms/triangulation/basic_operations/add_segment.jl"] ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/algorithms/triangulation/constrained_triangulation.jl"] +Filter = t -> !(t in (DelaunayTriangulation.convert_boundary_points_to_indices,)) ``` ```@autodocs @@ -92,6 +93,7 @@ Pages = ["src/data_structures/triangulation/methods/segments.jl"] ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/data_structures/triangulation/methods/weights.jl"] +Filter = t -> !(t in (DelaunayTriangulation.ZeroWeight,)) ``` ## Mesh Refinement @@ -170,6 +172,7 @@ Pages = ["src/data_structures/triangulation/methods/adjacent2vertex.jl"] ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/data_structures/triangulation/methods/graph.jl"] +Filter = t -> !(t in (DelaunayTriangulation.get_vertices, DelaunayTriangulation.get_edges)) ``` ```@autodocs diff --git a/docs/src/extended/data_structures.md b/docs/src/extended/data_structures.md index 911b547e1..de06ffc42 100644 --- a/docs/src/extended/data_structures.md +++ b/docs/src/extended/data_structures.md @@ -17,6 +17,7 @@ MaxPriorityQueue ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/queue/max_priority_queue.jl"] +Filter = t -> !(t in (DelaunayTriangulation.MaxPriorityQueue,)) ``` ## Queue @@ -30,6 +31,7 @@ Queue ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/queue/queue.jl"] +Filter = t -> !(t in (DelaunayTriangulation.Queue,)) ``` ## BalancedBST @@ -43,6 +45,7 @@ BalancedBST ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/trees/bst.jl"] +Filter = t -> !(t in (DelaunayTriangulation.BalancedBST,)) ``` ## RTree @@ -56,6 +59,7 @@ RTree ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/trees/rtree.jl"] +Filter = t -> !(t in (DelaunayTriangulation.RTree,)) ``` ```@docs @@ -73,6 +77,7 @@ PolygonHierarchy ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/trees/polygon_hierarchy.jl"] +Filter = t -> !(t in (DelaunayTriangulation.PolygonHierarchy,)) ``` ## Adjacent @@ -86,6 +91,7 @@ Adjacent ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/triangulation/adjacent.jl"] +Filter = t -> !(t in (DelaunayTriangulation.Adjacent,)) ``` ## Adjacent2Vertex @@ -99,6 +105,7 @@ Adjacent2Vertex ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/triangulation/adjacent2vertex.jl"] +Filter = t -> !(t in (DelaunayTriangulation.Adjacent2Vertex,)) ``` ## Graph @@ -112,13 +119,14 @@ Graph ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/triangulation/graph.jl"] +Filter = t -> !(t in (DelaunayTriangulation.Graph,)) ``` ## Curves There are many data structures used to define the curves we provide in this package, all subtyping the `AbstractParametricCurve` type. This type, and its subtypes, are all in the public API with the exception of `PiecewiseLinear`. -```@docs; canonical=false +```@docs; canonical=false AbstractParametricCurve LineSegment CircularArc @@ -128,39 +136,55 @@ BSpline CatmullRomSpline ``` +```@docs; canonical=false +twice_differentiate +total_variation +thrice_differentiate +differentiate +arc_length +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/abstract.jl"] +Filter = t -> !(t in (DelaunayTriangulation.AbstractParametricCurve, DelaunayTriangulation.twice_differentiate, DelaunayTriangulation.total_variation, DelaunayTriangulation.thrice_differentiate, DelaunayTriangulation.differentiate, DelaunayTriangulation.arc_length)) ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/beziercurve.jl"] +Filter = t -> !(t in (DelaunayTriangulation.BezierCurve,)) + ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/bspline.jl"] +Filter = t -> !(t in (DelaunayTriangulation.BSpline,)) ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/catmullromspline.jl"] +Filter = t -> !(t in (DelaunayTriangulation.CatmullRomSpline,)) ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/circulararc.jl"] +Filter = t -> !(t in (DelaunayTriangulation.CircularArc,)) ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/ellipticalarc.jl"] +Filter = t -> !(t in (DelaunayTriangulation.EllipticalArc,)) ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/curves/linesegment.jl"] +Filter = t -> !(t in (DelaunayTriangulation.LineSegment,)) ``` ```@autodocs @@ -211,6 +235,7 @@ ConvexHull ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/convex_hull.jl"] +Filter = t -> !(t in (DelaunayTriangulation.ConvexHull,)) ``` ## Triangulation @@ -224,6 +249,7 @@ Triangulation ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/triangulation/triangulation.jl"] +Filter = t -> !(t in (DelaunayTriangulation.Triangulation,)) ``` ## TriangulationCache @@ -246,6 +272,7 @@ BoundaryEnricher ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/boundary_enricher.jl"] +Filter = t -> !(t in (DelaunayTriangulation.BoundaryEnricher,)) ``` ## AbstractEach(Vertex/Edge/Triangle) Iterators @@ -261,22 +288,28 @@ Pages = ["data_structures/triangulation/methods/iterators.jl"] We provide a means for storing the history of triangles encountered during point location, using a `PointLocationHistory` struct. The main motivation for this struct is for constrained triangulations. +```@docs; canonical=false +PointLocationHistory +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/point_location_history.jl"] +Filter = t -> !(t in (DelaunayTriangulation.PointLocationHistory,)) ``` ## IndividualTriangleStatistics We provide an `IndividualTriangleStatistics` struct for storing statistics about individual triangles in a triangulation. This struct is in the public API, as listed in the [API](../api/overview.md). -```@docs; canonical=false +```@docs; canonical=false IndividualTriangleStatistics ``` ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/statistics/individual_triangle_statistics.jl"] +Filter = t -> !(t in (DelaunayTriangulation.IndividualTriangleStatistics,)) ``` ## TriangulationStatistics @@ -290,15 +323,21 @@ TriangulationStatistics ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/statistics/triangulation_statistics.jl"] +Filter = t -> !(t in (DelaunayTriangulation.TriangulationStatistics,)) ``` ## InsertionEventHistory For mesh refinement we need a way to identify what happens to a triangulation after a point is added, in case we need to reverse the insertion. For this, we use `InsertionEventHistory` internally. +```@docs; canonical=false +InsertionEventHistory +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/mesh_refinement/insertion_event_history.jl"] +Filter = t -> !(t in (DelaunayTriangulation.InsertionEventHistory,)) ``` ## RefinementConstraints @@ -339,6 +378,7 @@ VoronoiTessellation ```@autodocs Modules = [DelaunayTriangulation] Pages = ["data_structures/voronoi.jl"] +Filter = t -> !(t in (DelaunayTriangulation.VoronoiTessellation,)) ``` ## Polygon @@ -363,34 +403,74 @@ Pages = ["data_structures/shuffled_polygon_linked_list.jl"] Here are functions that are used for defining and working with points in the package. +```@docs; canonical=false +set_point! +push_point! +pop_point! +num_points +getpoint +get_point +each_point_index +each_point +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/geometric_primitives/points.jl"] +Filter = t -> !(t in (DelaunayTriangulation.set_point!, DelaunayTriangulation.push_point!, DelaunayTriangulation.pop_point!, DelaunayTriangulation.num_points, DelaunayTriangulation.getpoint, DelaunayTriangulation.get_point, DelaunayTriangulation.each_point_index, DelaunayTriangulation.each_point)) ``` ## Edges (Primitive Interface) Here are functions that are used for defining and working with edges in the package. +```@docs; canonical=false +random_edge +each_edge +contains_edge +construct_edge +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/geometric_primitives/edges.jl"] +Filter = t -> !(t in (DelaunayTriangulation.random_edge, DelaunayTriangulation.each_edge, DelaunayTriangulation.contains_edge, DelaunayTriangulation.construct_edge)) ``` ## Triangles (Primitive Interface) Here are functions that are used for defining and working with triangles in the package. +```@docs; canonical=false +triangle_edges +sort_triangle +each_triangle +delete_triangle! +contains_triangle +construct_triangle +add_triangle! +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/geometric_primitives/triangles.jl"] +Filter = t -> !(t in (DelaunayTriangulation.triangle_edges, DelaunayTriangulation.sort_triangle, DelaunayTriangulation.each_triangle, DelaunayTriangulation.delete_triangle!, DelaunayTriangulation.contains_triangle, DelaunayTriangulation.construct_triangle, DelaunayTriangulation.add_triangle!)) ``` ## Boundary Nodes (Primitive Interface) Here are functions that are used for defining and working with boundary nodes in the package. +```@docs; canonical=false +has_multiple_sections +has_multiple_curves +get_section_index +get_curve_index +get_boundary_nodes +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/geometric_primitives/boundary_nodes.jl"] +Filter = t -> !(t in (DelaunayTriangulation.has_multiple_sections, DelaunayTriangulation.has_multiple_curves, DelaunayTriangulation.get_section_index, DelaunayTriangulation.get_curve_index, DelaunayTriangulation.get_boundary_nodes)) ``` \ No newline at end of file diff --git a/docs/src/extended/utils.md b/docs/src/extended/utils.md index a8368d1f7..2873e55a7 100644 --- a/docs/src/extended/utils.md +++ b/docs/src/extended/utils.md @@ -6,9 +6,14 @@ CurrentModule = DelaunayTriangulation This section lists some of the internal utility functions, or other miscellaneous functions, used in this package. +```@docs; canonical=false +number_type +``` + ```@autodocs Modules = [DelaunayTriangulation] Pages = ["src/utils/utils.jl"] +Filter = t -> !(t in (DelaunayTriangulation.number_type,)) ``` ```@autodocs diff --git a/docs/src/tutorials/centroidal.md b/docs/src/tutorials/centroidal.md index 789840356..4191fdc53 100644 --- a/docs/src/tutorials/centroidal.md +++ b/docs/src/tutorials/centroidal.md @@ -23,7 +23,7 @@ vorn = voronoi(tri, clip = true) ```` To now compute the centroidal tessellation, use [`centroidal_smooth`](@ref). ( -If you want to go straight from a triangulation to a centroidal tessellation, you +If you want to straight from a triangulation to a centroidal tessellation, you can also just use `smooth_vorn = voronoi(tri, clip = true, smooth = true)`.) ````@example centroidal diff --git a/docs/src/tutorials/clipped.md b/docs/src/tutorials/clipped.md index 9326ed870..472ceb8e6 100644 --- a/docs/src/tutorials/clipped.md +++ b/docs/src/tutorials/clipped.md @@ -7,8 +7,8 @@ EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/d One issue that may arise when dealing with Voronoi tessellations is the presence of unbounded polygons occurring on the boundary. One way to deal with this -is to clip polygons to the convex hull of the tessellation. (Arbitrary clipping boundaries -are on the to-do list, but they are not yet implemented.) +is to clip polygons to the convex hull of the tessellation. We describe how to also clip +the tessellation to a generic convex polygon, instead of just the convex hull, in [this tutorial](clipped_polygon.md). In the example below, we clip the tessellation to the convex hull of the point set by using `clip=true` in the keyword arguments. @@ -43,7 +43,6 @@ fig As you can see, the unbounded polygons, and any polygons that included points outside of the convex hull, have now been clipped to the convex hull. - ## Just the code An uncommented version of this example is given below. You can view the source code for this file [here](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/docs/src/literate_tutorials/clipped.jl). diff --git a/docs/src/tutorials/clipped_rectangle.md b/docs/src/tutorials/clipped_rectangle.md index a9c1ab9bb..bca362518 100644 --- a/docs/src/tutorials/clipped_rectangle.md +++ b/docs/src/tutorials/clipped_rectangle.md @@ -8,9 +8,9 @@ EditURL = "https://github.com/JuliaGeometry/DelaunayTriangulation.jl/tree/main/d In the previous tutorial, we demonstrated how we can clip to the convex hull of the point set. However, it is often useful to clip to a rectangle, for example if you want to clip to a region of interest -in a simulation. We do not yet support this within [`voronoi`](@ref) itself, -but we provide the function [`get_polygon_coordinates`](@ref) for this (this is what -`voronoiplot` uses to plot inside a bounding box). +in a simulation. Here we obtain the coordinates just by looping over all +the polygons, but you can also use this by providing a `clip_polygon` into +`voronoi`, as described in [this tutorial](clipped_polygon.md). Let us now demonstrate. First, we construct a tessellation of some example point set. diff --git a/docs/src/tutorials/curve_bounded.md b/docs/src/tutorials/curve_bounded.md index 2df4dfcab..2798df6ac 100644 --- a/docs/src/tutorials/curve_bounded.md +++ b/docs/src/tutorials/curve_bounded.md @@ -277,7 +277,7 @@ with this package we need: - To represent the curve as a callable struct that subtypes `AbstractParametricCurve` that maps `Float64 -> NTuple{2,Float64}`. - To define [`DelaunayTriangulation.differentiate`](@ref), [`DelaunayTriangulation.twice_differentiate`](@ref), and [`DelaunayTriangulation.thrice_differentiate`](@ref). -- Have a `lookup_table` field that maps `lookup_table[i]` to `(i - 1) / (length(lookup_table) - 1)`, where `lookup_table` is a `Dict`. +- Have a `lookup_table` field that maps `lookup_table[i]` to the position of the curve at `t = (i - 1) / (length(lookup_table) - 1)`, where `lookup_table` is a `Vector`. - Have defined the parametric curve according to $0 ≤ t ≤ 1$ (already done). Let's now meet these requirements. diff --git a/docs/src/tutorials/custom_primitive.md b/docs/src/tutorials/custom_primitive.md index 8dfe9445e..ef60c9a01 100644 --- a/docs/src/tutorials/custom_primitive.md +++ b/docs/src/tutorials/custom_primitive.md @@ -71,6 +71,7 @@ Base.iterate(points::CustomPoints, state...) = Base.iterate(points.points, state Base.length(points::CustomPoints) = length(points.points) Base.getindex(points::CustomPoints, i) = points.points[i] DT.number_type(::Type{CustomPoints}) = Float64 +DT.is_planar(::CustomPoints) = true DT.geti(T::CustomTriangle) = T.i DT.getj(T::CustomTriangle) = T.j @@ -276,6 +277,7 @@ Base.iterate(points::CustomPoints, state...) = Base.iterate(points.points, state Base.length(points::CustomPoints) = length(points.points) Base.getindex(points::CustomPoints, i) = points.points[i] DT.number_type(::Type{CustomPoints}) = Float64 +DT.is_planar(::CustomPoints) = true DT.geti(T::CustomTriangle) = T.i DT.getj(T::CustomTriangle) = T.j diff --git a/docs/src/tutorials/nearest.md b/docs/src/tutorials/nearest.md index 1d29e15ff..621721662 100644 --- a/docs/src/tutorials/nearest.md +++ b/docs/src/tutorials/nearest.md @@ -10,7 +10,11 @@ points in the plane closest to the associated generator. This implies that finding a nearest neighbour is the same as a point location problem, meaning given a point `p` find the Voronoi tile `P` containing it. Here we give an example of how we can use triangulations or tessellations to find the nearest neighbour -in the point set to a given point. First, we load in the packages we need. +in the point set to a given point. We note that these same ideas +could be applied for power diagrams, except that the metric used for defining distances +is based on the power distance instead of the Euclidean distance (see the [power diagram tutorial](power.md) +for more details); this is not demonstrated +in this tutorial. First, we load in the packages we need. ````@example nearest using DelaunayTriangulation diff --git a/src/DelaunayTriangulation.jl b/src/DelaunayTriangulation.jl index 89f8c0750..ef99cc13b 100644 --- a/src/DelaunayTriangulation.jl +++ b/src/DelaunayTriangulation.jl @@ -1,20 +1,3 @@ -""" - DelaunayTriangulation - -Module for computing Delaunay triangulations and Voronoi tessellations in two dimensions. There -are many features available, including: - -- Unconstrained and constrained Delaunay triangulations - see `triangulate`. -- Computation of Voronoi tessellations, clipped Voronoi tessellations (clipped to the convex hull), and centroidal Voronoi tessellations - see `voronoi`. -- Mesh refinement, with support custom angles and area constraints, as well as refinement of curve-bounded domains - see `refine!`. -- Dynamic updates such as point insertion and segment insertion - see e.g. `add_point!`, `delete_vertex!`, and `add_segment!`. -- Computation of convex hulls - see `convex_hull` (or use `get_convex_hull` on a computed triangulation). -- Triangulation of convex polygons - see `triangulate_convex`. Lattices can also be triangulated, see `triangulate_rectangle`. -- Point location - see `find_triangle` and `find_polygon`. -- Computation of the pole of inaccessibility - see `DelaunayTriangulation.pole_of_inaccessibility`. - -See the documentation for more, and the package's associated GitHub repository's README. -""" module DelaunayTriangulation include("setup.jl") diff --git a/src/public.jl b/src/public.jl index 82637b7b1..4d144fc1c 100644 --- a/src/public.jl +++ b/src/public.jl @@ -6,6 +6,7 @@ Adjacent2Vertex, Graph, InsertionEventHistory, + PointLocationHistory, ZeroWeight, all_ghost_vertices, check_args, From 2a825487180f5d7aa45f669c29c57d79e96be504 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:50:49 +0100 Subject: [PATCH 3/8] duh --- docs/src/api/overview.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/api/overview.md b/docs/src/api/overview.md index 745c880d6..804dbd924 100644 --- a/docs/src/api/overview.md +++ b/docs/src/api/overview.md @@ -23,5 +23,5 @@ associated accessor functions are intended to be used, e.g. prefer `get_X(tri)` Each section will first start with the list of all functions to be listed, and then the docstrings of those functions will be given. There will be some docstrings that fit into multiple categories, in which case one is chosen. Here is an index of all the functions listed in the above pages. ```@index -Pages = ["data_structures.md", "triangulation.md", "operations.md", "voronoi.md", "convex_hull.md", "curves.md", "iterators.md", "point_location.md", "predicates.md", "statistics.md", "primitive_interfaces.md", "other.md"] +Pages = ["convex_hull.md", "curves.md", "data_structures.md", "iterators.md", "operations.md", "other.md", "point_location.md", "predicates.md", "primitives.md", "statistics.md", "triangulation.md", "voronoi.md"] ``` \ No newline at end of file From d8b72de10a59ba9f1e485f0f13f8ef4665b92fdf Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:51:32 +0100 Subject: [PATCH 4/8] pr --- NEWS.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index edbc9d3dd..5e932f03f 100644 --- a/NEWS.md +++ b/NEWS.md @@ -9,7 +9,8 @@ - Bigfix: Fixed issue with `use_barriers` when a ghost edge is selected at random during point location. See [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196). - Feature: Introduced the (currently internal) function `get_positive_curve_indices` for finding curves with positive orientation in a `Triangulation`. [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196). - `is_exterior_curve`, `is_interior_curve`, `num_exterior_curves`, and `is_disjoint` are now defined based on `get_positive_curve_indices` rather than `get_exterior_curve_indices`. See [#196](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/196). -- Bugfix: `PointLocationHistory` was not marked as public. This has been fixed. +- Bugfix: `PointLocationHistory` was not marked as public. This has been fixed. See [#198](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/198). +- Bugfix: Fixed an issue with missing docstrings and duplicate docstrings in the documentation. See [#198](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/198). ## 1.5.0 From 5b2f331f28b40bd299167619bd62977a39b81d85 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:52:40 +0100 Subject: [PATCH 5/8] typo --- docs/src/literate_tutorials/centroidal.jl | 2 +- docs/src/tutorials/centroidal.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/literate_tutorials/centroidal.jl b/docs/src/literate_tutorials/centroidal.jl index e839ffbef..1175e491f 100644 --- a/docs/src/literate_tutorials/centroidal.jl +++ b/docs/src/literate_tutorials/centroidal.jl @@ -19,7 +19,7 @@ tri = triangulate(points; rng) vorn = voronoi(tri, clip = true) # To now compute the centroidal tessellation, use [`centroidal_smooth`](@ref). ( -# If you want to straight from a triangulation to a centroidal tessellation, you +# If you want to go straight from a triangulation to a centroidal tessellation, you # can also just use `smooth_vorn = voronoi(tri, clip = true, smooth = true)`.) smooth_vorn = centroidal_smooth(vorn; rng) diff --git a/docs/src/tutorials/centroidal.md b/docs/src/tutorials/centroidal.md index 4191fdc53..789840356 100644 --- a/docs/src/tutorials/centroidal.md +++ b/docs/src/tutorials/centroidal.md @@ -23,7 +23,7 @@ vorn = voronoi(tri, clip = true) ```` To now compute the centroidal tessellation, use [`centroidal_smooth`](@ref). ( -If you want to straight from a triangulation to a centroidal tessellation, you +If you want to go straight from a triangulation to a centroidal tessellation, you can also just use `smooth_vorn = voronoi(tri, clip = true, smooth = true)`.) ````@example centroidal From 14bb6510e048497ce2ef64946ae6b4b87fe122d1 Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 09:59:23 +0100 Subject: [PATCH 6/8] b --- test/runtests.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runtests.jl b/test/runtests.jl index b3804d653..a7a5b2372 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ using Test using Random if isdefined(Docs, :undocumented_names) - @test isempty(Docs.undocumented_names(DelaunayTriangulation)) + @test isempty(Docs.undocumented_names(DelaunayTriangulation)) || Docs.undocumented_names(DelaunayTriangulation) == [:DelauanayTriangulation] end const ALL_TEST_SCRIPTS = Set{String}() From 210b136a3000b9ad6dd39685aad4f336a1c5027c Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:12:36 +0100 Subject: [PATCH 7/8] Update runtests.jl --- test/runtests.jl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index a7a5b2372..814694207 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -5,7 +5,7 @@ using Test using Random if isdefined(Docs, :undocumented_names) - @test isempty(Docs.undocumented_names(DelaunayTriangulation)) || Docs.undocumented_names(DelaunayTriangulation) == [:DelauanayTriangulation] + @test isempty(Docs.undocumented_names(DelaunayTriangulation)) || (Docs.undocumented_names(DelaunayTriangulation) == [:DelauanayTriangulation]) end const ALL_TEST_SCRIPTS = Set{String}() @@ -163,4 +163,4 @@ end end @test isempty(missing_set) end -end \ No newline at end of file +end From 331ad663020835fb10cf5f82fba3a3e9a359808d Mon Sep 17 00:00:00 2001 From: Daniel VandenHeuvel <95613936+DanielVandH@users.noreply.github.com> Date: Tue, 1 Oct 2024 10:21:47 +0100 Subject: [PATCH 8/8] Update runtests.jl --- test/runtests.jl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 814694207..8d77b744e 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -4,10 +4,6 @@ using Aqua using Test using Random -if isdefined(Docs, :undocumented_names) - @test isempty(Docs.undocumented_names(DelaunayTriangulation)) || (Docs.undocumented_names(DelaunayTriangulation) == [:DelauanayTriangulation]) -end - const ALL_TEST_SCRIPTS = Set{String}() const NON_TEST_SCRIPTS = Set{String}(["helper_functions.jl", "runtests.jl"]) include("helper_functions.jl")