Skip to content

Commit

Permalink
Merge branch 'main' into spherical2
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVandH authored Oct 2, 2024
2 parents 6c216bb + 586d888 commit decd2d6
Show file tree
Hide file tree
Showing 57 changed files with 1,450 additions and 190 deletions.
9 changes: 8 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
- `orientation_markers` now uses `uniquetol` instead of `unique` for the final set of markers (it already did it for the intermediate markers). See [#195](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/195).
- For large `Tuple`s, functions like `eval_fnc_at_het_tuple_two_elements` are problematic and allocate more than their non-type-stable counterparts. To get around this, for `Tuple`s of length `N > 32`, the non-type-stable version is used. See [#195](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/195).
- 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).
- 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).
- Introduced the (currently internal) function `get_positive_curve_indices` for finding curves with positive orientation in a `Triangulation`. See [#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).
- PrecompileTools.jl is now used. See [#200](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/200).
- 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).
- `PointLocationHistory` was not marked as public. This has been fixed. See [#198](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/198).
- Fixed an issue with missing docstrings and duplicate docstrings in the documentation. See [#198](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/198).
- `copy` and `deepcopy` are now correctly implemented for `PolygonTree`s and `PolygonHierarchy`s. See [#199](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/199)
- Implemented `copy` and `deepcopy` for `Triangulation` and `VoronoiTessellation`. See [#201](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/201).
- Fixed a bug with `Triangulation`s `polygon_hierarchy` not being correctly aliased with the `polygon_hierarchy` from the `BoundaryEnricher`, and similarly for the `boundary_edge_map`. See [#201](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/201).
- Implemented `==` for `VoronoiTessellation`. See [#201](https://github.com/JuliaGeometry/DelaunayTriangulation.jl/pull/201).

## 1.5.0

Expand Down
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ version = "1.6.0"
AdaptivePredicates = "35492f91-a3bd-45ad-95db-fcad7dcfedb7"
EnumX = "4e289a0a-7415-4d19-859d-a7e5c4648b56"
ExactPredicates = "429591f6-91af-11e9-00e2-59fbe8cec110"
PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[compat]
AdaptivePredicates = "1.2"
EnumX = "1.0"
ExactPredicates = "2.2"
PrecompileTools = "1.2"
Random = "1"
Test = "1"
julia = "1.6"
Expand Down
2 changes: 1 addition & 1 deletion docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
1 change: 1 addition & 0 deletions docs/src/api/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Triangulation
VoronoiTessellation
ConvexHull
InsertionEventHistory
PointLocationHistory
```
2 changes: 1 addition & 1 deletion docs/src/api/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
```
3 changes: 3 additions & 0 deletions docs/src/extended/algorithms.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
84 changes: 82 additions & 2 deletions docs/src/extended/data_structures.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ MaxPriorityQueue
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/queue/max_priority_queue.jl"]
Filter = t -> !(t in (DelaunayTriangulation.MaxPriorityQueue,))
```

## Queue
Expand All @@ -30,6 +31,7 @@ Queue
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/queue/queue.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Queue,))
```

## BalancedBST
Expand All @@ -43,6 +45,7 @@ BalancedBST
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/trees/bst.jl"]
Filter = t -> !(t in (DelaunayTriangulation.BalancedBST,))
```

## RTree
Expand All @@ -56,6 +59,7 @@ RTree
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/trees/rtree.jl"]
Filter = t -> !(t in (DelaunayTriangulation.RTree,))
```

```@docs
Expand All @@ -73,6 +77,7 @@ PolygonHierarchy
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/trees/polygon_hierarchy.jl"]
Filter = t -> !(t in (DelaunayTriangulation.PolygonHierarchy,))
```

## Adjacent
Expand All @@ -86,6 +91,7 @@ Adjacent
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/adjacent.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Adjacent,))
```

## Adjacent2Vertex
Expand All @@ -99,6 +105,7 @@ Adjacent2Vertex
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/adjacent2vertex.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Adjacent2Vertex,))
```

## Graph
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -211,6 +235,7 @@ ConvexHull
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/convex_hull.jl"]
Filter = t -> !(t in (DelaunayTriangulation.ConvexHull,))
```

## Triangulation
Expand All @@ -224,6 +249,7 @@ Triangulation
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/triangulation/triangulation.jl"]
Filter = t -> !(t in (DelaunayTriangulation.Triangulation,))
```

## TriangulationCache
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -339,6 +378,7 @@ VoronoiTessellation
```@autodocs
Modules = [DelaunayTriangulation]
Pages = ["data_structures/voronoi.jl"]
Filter = t -> !(t in (DelaunayTriangulation.VoronoiTessellation,))
```

## Polygon
Expand All @@ -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))
```
5 changes: 5 additions & 0 deletions docs/src/extended/utils.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/src/literate_tutorials/centroidal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
Loading

0 comments on commit decd2d6

Please sign in to comment.