All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
2.12.1 - 2024-09-09
- Fixes #113. This could lead to rare crashes when calling
ConstrainedDelaunayTriangulation::add_constraint_and_split
2.12.0 - 2024-08-13
- Fixes potential crash of
ConstrainedDelaunayTriangulation::add_constraint_and_split
. This could only happen in rare situations if a newly inserted split point would lie very close to other vertices or edges of the triangulation. See #111 - Potentially breaking:
Triangulation::locate
,Triangulation::locate_with_hint
,Triangulation::locate_vertex
andTriangulation::locate_and_remove
will all panic if called with a position with aNAN
coordinate. The previous behavior was inconsistent - the methods would either crash or return a nonsensical result.
2.11.0 - 2024-08-03
- Added
ConstrainedDelaunayTriangulation::remove_constraint_edge(edge)
- Fixes potential crash when using
ConstrainedDelaunayTriangulation::add_constraint_and_split
. See #109
2.10.0 - 2024-07-25
- Added basic
mint
support via themint
feature - Implements
Triangulation::get_vertex(FixedVertexHandle)
(See #106)
- Fixes potential crash when inserting / locating vertices (See #107)
2.9.0 - 2024-06-14
- Added
ConstrainedDelaunayTriangulation::try_add_constraint
- Added
ConstrainedDelaunayTriangulation::add_constraint_and_split
2.8.0 - 2024-05-22
- Added
LineIntersectionIterator
andIntersection
- Added
Cdt::get_conflicting_edges_between_vertices
andCdt::get_conflicting_edges_between_points
2.7.0 - 2024-05-17
- Implements
ConstrainedDelaunayTriangulation::bulk_load_cdt
- Implements
ConstrainedDelaunayTriangulation::bulk_load_cdt_stable
2.6.0 - 2024-01-14
- Implements
DelaunayTriangulation::bulk_load_stable
(See #77) - Implements
FixedVertexHandle::from_index(usize)
2.5.1 - 2023-12-27
- Locating or inserting vertices into a CDT could sometimes end up in an infinite loop. See #98.
2.5.0 - 2023-12-26
- Implements natural neighbor interpolation. See type
NaturalNeighbor
for more on this!
- Fixes
PointProjection::reversed()
- the method would return a projection that gives sometimes incorrect results.
2.4.1 - 2023-12-01
- Fixes panic during refinement due to rounding errors (see #96)
- Inserting a vertex onto a constraint edge of a degenerate CDT would not create a new constraint edge.
2.4.0 - 2023-11-19
- Implements Delaunay refinement: Adds
ConstrainedDelaunayTriangulation::refine
, along withRefinementParameters
to modify the refinement behavior. - Added method
ConstrainedDelaunayTriangulation::add_constraint_edges
for simpler creation of strips and loops of connected constraint edges. - Adds
impl From<DelaunayTriangulation<...>>
forConstrainedDelaunayTriangulation<...>
for converting regular triangulations into CDTs.
2.3.1 - 2023-11-14
- Fixes compilation issues when using
serde
together with--no-default-features
(#95)
2.3.0 - 2023-11-09
- Adds
no_std
support (when usingdefault-features = false
, #92)
2.2.1 - 2023-11-03
- Specializes
nth
andnth_back
for any vertex, face and edge iterator - Removed
optional
dependency (#91) - Updated
robust
crate to 1.1.0 (#90)
2.2.0 - 2023-04-18
- Added
DirectedEdgeHandle::center
andUndirectedEdgeHandle::center
- Added
UndirectedEdgeHandle::nearest_point
- Adds
UndirectedEdgeHandle::is_constraint_edge
andDirectedEdgeHandle::is_constraint_edge
(only implemented for edge handles of a CDT)
- Fix
nearest_neighbor
hinting
2.1.0 - 2023-01-01
- Added
crate::FloatTriangulations
for additional methods of triangulations overf32
orf64
- Added
FloatTriangulation::get_edges_in_rectangle
- Added
FloatTriangulation::get_edges_in_circle
- Added
FloatTriangulation::get_vertices_in_rectangle
- Added
FloatTriangulation::get_vertices_in_circle
- Added
index
function for any fixed and dynamic handle, returning the internal index of the element. - Added missing
DelaunayTriangulation::Clone
implementation - Added
DirectedEdgeHandle::positions
- Added
Triangulation::clear
- (breaking fix)
ConstrainedDelaunayTriangulation::can_add_constraint_edge
accidentally returned the wrong result (true
when it should have returnedfalse
and vice versa) #75 - Fixes a crash that could occur when inserting an element into a CDT (#78)
2.0.0 - 2022-01-29
This release is focussed on API refinement, performance improvements and usability improvements.
Many features of Spade 1 showed too little benefit to legitimize keeping them. Spade 2.0 attempts to slim down the API surface to a few important functions and types and leaves out the more complicated bits to make it more simple to use.
- Removed interpolation functions
- Removed support for integer coordinates. Only
f64
andf32
can be used as scalar types. - Removed support for
cgmath
andnalgebra
crate to slim down the crate dependencies. - Removed
PointN
. Using Spade now requires to convert any position intoSpade::Point2
. - Removed r-tree data structure (it has been moved into the
rstar
crate) - Removed geometric primitives (
SimpleCircle
,SimpleEdge
,SimpleTriangle
) - Removed support for custom calculation kernels. Spade now uses the precise calculation kernel by default (previously
called
FloatKernel
). - Removed support for Delaunay triangulations backed by r-trees. Use the newly introduced
HierarchyHintGenerator
instead.
- Added basic support for Voronoi diagrams (refer to the documentation of struct
DelaunayTriangulation
) - Added struct
HierarchyHintGenerator
, a hint generator with small performance and memory overhead which is optimized for uniformly distributed data. - Improved conciseness of handle types (refer to the
handles
module for more information):- Introduced
UndirectedEdgeHandle
to refer to undirected edges of the triangulation FaceHandle
is now parameterized to denote if it refers to an inner face or to the single outer face- Added some methods on the individual handle types
- Added iterators for all handle types (see
handles
module) - Fixed directed edge handles can now be
rev
ersed
- Introduced
- Both
DelaunayTriangulation
andCDT
now allow to also annotate undirected edges with arbitrary data - Added
Triangulation::convex_hull
which allows to directly iterate over the triangulation's convex hull - Added
Triangulation::bulk_load
for efficient bulk creation of triangulations.
- Performance improvements
- The newly introduced
HierarchyHintGenerator
should outperform the r-tree based hint generator consistently for uniformly distributed data sets (2x - 3x times faster) LastUsedVertexHintGenerator
and its predecessorDelaunayWalkLocate
are still comparable.- The new
Triangulation::bulk_load
will be more efficient for creating triangulations from a given set of vertices compared to inserting them incrementally. - Cleaned up crate dependencies: Spade 2.0 depends only on 4 other crates without any transitive dependencies. This should make it more viable to include Spade into other projects.
- Renamed any
o_next
/o_prev
function tonext
/prev
. - Renamed
sym
torev
- Many other smaller changes - they are omitted from this changelog.
Keep in mind that not all features have been preserved before attempting to upgrade. Other than that, upgrading should be mostly consist of renaming:
FloatDelaunayTriangulation
andFloatCdt
have been replaced byDelaunayTriangulation
andConstrainedDelaunayTriangulation
IntDelaunayTriangulation
is not supported anymore. Usef64
orf32
as scalar type instead if possible.DelaunayWalkLocate
has been renamed toLastUsedVertexHintGenerator
DelaunayTreeLocate
has been replaced byHierarchyHintGenerator
1.8.2 - 2020-04-01
- Removing elements from an rtree could leave the tree in an inconsistent state (#55). This made some nearest neighbor queries return incorrect results.
1.8.0 - 2019-06-20
- Bumped compatible nalgebra version to 0.18
- Updated edition to 2018
- Fixed all clippy findings
- Cargo fmt'ed source code
- SimpleTriangle now overwrites both Hash and PartialEq
1.7.0 - 2019-02-08
- Updated README.md
- Merge #41: Use smallvec in barycentric interpolation
- Bumped compatible cgmath version to 0.17.*
- Bumped compatible nalgebra version to 0.17.*
1.6.0 - 2018-11-1
SimpleEdge
,SimpleCircle
,BoundingRect
now deriveClone
,Copy
,PartialEq
,Eq
,PartialOrd
,Ord
andHash
CdtEdge
is now public - the type cannot be used, but may be necessary for method signatures containing CDTs.- Added some standard
derive
s for various other types that are applicable.
- Bumped compatible nalgebra version to 0.16.*
- Bumped compatible num version to
>=0.1, <=0.2.*
. This may be a breaking change due to the way cargo resolves dependencies. An upgrade to num 0.2 is recommended.
1.5.1 - 2018-06-12
nearest_neighbor
sometimes incorrectly returnedNone
1.5.0 - 2018-06-07
- Added
RTree::nearest_neighbor_iterator
- Improved performance of single nearest neighbor queries
- Bumped compatible nalgebra version to 0.15.*
- Bumped compatible cgmath version to 0.16.*
1.4.0 - 2018-02-25
- Added cargo feature 'serde_serialize', rtrees, triangulations and primitives now support serialization with serde!
RTree
s implementDebug
- New constructor:
BoundingRect::from_points
- Bumped compatible nalgebra version to 0.14.*
BoundingRect
now implementsSpatialObject
1.3.0 - 2018-01-06
spade::delaunay::DelaunayTriangulation::lookup
is deprecated, uselocate_vertex
insteadspade::delaunay::DelaunayTriangulation::lookup_and_remove
is deprecated, uselocate_and_remove
instead
- Bumped compatible
cgmath
andnalgebra
versions. - Spade's various kernels are not instantiable anymore and implement
Clone
.
- Spade now implements constrained delaunay triangulations!
locate
andnearest_neighbor
now also work with degenerate triangulations- Added constrained triangulation example
- Added bulk loading for r-trees
DelaunayTriangulation
now implementsClone
- New method for triangulations:
get_edge_from_neighbors
to get an existing edge from its two adjacent points.
- Fixed
SimpleCircle
distance calculation for more than 2 dimensions.
1.2.0 - 2017-05-13
- Bumped compatible
cgmath
andnalgebra
versions. Unfortunately, due to the way Cargo handles "external dependencies" (thus, dependencies whose types are part of spade's public API likecgmath
andnalgebra
Points), this must be considered a breaking change. FloatKernel
now works happily withf32
coordinates. They will be cast to double precision before the kernel evaluates any query, thus, no performance gain results from this. Only the space requirements will differ.
1.1.0 - 2017-04-12
spade::delaunay::RTreeDelaunayLocate<T>
is deprecated, usespade::delaunay::DelaunayTreeLocate<T>
insteadspade::delaunay::TriangulationWalkLocate<T>
is deprecated, usespade::delaunay::DelaunayWalkLocate
instead ( without any type argument)
- Insertion into a delaunay triangulation now uses
SmallVec
from thesmallvec
crate for better performance. - Improved interpolation performance - natural neighbor interpolation methods will be significantly faster now.
- Added struct
spade::delaunay::DelaunayWalkLocate
. The struct will now keep track of the last query made and use it for the next query. A query can be an interpolation, lookup, locate or nearest neighbor query, insertion will also update the hint to the inserted vertex. This means: Subsequent queries that are close to each other will run in O(1) without the need of giving an explicit hint. This behaviour was only implemented for insertion until now. - Added method
spade::delaunay::DelaunayTriangulation::nearest_neighbor
- Added method
spade::delaunay::DelaunayTriangulation::locate_vertex
- Added method
spade::primitives::SimpleEdge::length2
- Added an interpolation benchmark
1.0.0 - 2017-03-02
A lot has changed for the 1.0. release, only larger changes are shown.
- Changed project license from Apache 2.0 to dual MIT / Apache 2.0
VectorN
renamed toPointN
- Bumped supported nalgebra version to
0.11.*
Point2
,Point3
... from cgmath and nalgebra crates do implementVectorN
Vector2
,Vector3
... from cgmath and nalgebra crates do not implementVectorN
- Moved all kernels from the root to
spade::kernels
- Moved delaunay triangulation and handle types to
spade::delaunay
- Moved the rtree to
spade::rtree::RTree
- Renamed
DelaunayTriangulation::lookup_in_triangulation
tolocate
- Renamed
DelaunayTriangulation::handle(..)
tovertex(..)
- Added support for vertex removal in delaunay triangulations!
- Added
DelaunayTriangulation::barycentric_interpolation(..)
- Added support for different lookup methods for delaunay triangulation (see
DelaunayLookupStructure
) - Added a user guide! Check it out here
locate
andlookup
can now be used with a hint (see{insert|locate}_with_hint
)- Added type shorthands
spade::delaunay::{Float|Int}Triangulation
and quick creation methodswith_tree_lookup
andwith_walk_lookup
- Added struct
EdgeHandle
and typeFixedEdgeHandle
. - Added struct
FaceHandle
and typeFixedFaceHandle
. - Added methods
DelaunayTriangulation::edge(..)
and::face(..)
- Added
DelaunayTriangulation::infinite_face()
- Added
DelaunayTriangulation::is_degenerate()
- Added
DelaunayTriangulation::num_{edges|triangles|faces}()
CCWIterator
andONextIterator
now both implementDoubleEndedIterator
- Removed support for pointer like types (e.g. inserting
Box<Point2<_>>
) to simplify type signatures. - Removed
DelaunayTriangulation::lookup_in_circle(..)
andlookup_in_rect(..)
. These methods will likely be added again in a later release.
0.3.0 - 2016-12-10
VectorN
trait trimmed down, now contains only a small set of functions.
[S; 2]
,[S; 3]
and[S; 4]
now implementVectorN
andTwoDimensional
orThreeDimensional
when appropriate. This change allows to insert fixed size arrays that encode positions directly intoRTree
orDelaunayInterpolation
.
- Removed dependencies on crate
rand
and cratenoise
0.2.1 - 2016-10-11
- Function signatures of
nn_interpolation_c1_*
slightly modified. - Sibson's c1 interpolant now comes with a flatness factor
- Wrong documentation link in crate description
- Fixed signatures of
estimate_normal
andestimate_gradient
0.2.0 - 2016-10-08
DelaunayTriangulation
:estimate_normal
,estimate_normals
,estimate_gradient
,estimate_gradients
- Added Sibson's c1 interpolant,
DelaunayTriangulation::nn_interpolation_c1_sibson
- Added Farin's c1 interpolant,
DelaunayTriangulation::nn_interpolation_c1_farin
- trait
ThreeDimensional
- Type signatures of
RTree
andDelaunayTriangulation
have now an additional parameter,B
. This allows to insert pointer like objects (that is, an objectB: Borrow<T>
) into the tree.
0.1.1 - 2016-09-28
- Documentaion to all functions and types intended for public use
RTree::lookup_mut(..)
RTree::contains(..)
DelaunayTriangulation::handle_mut(..)
DelaunayTriangulation::lookup_mut(..)
DelaunayKernel::point_on_edge(..)
SimpleTriangle::nearest_point_on_edge(..)
- types
TwoDimensional
,HasPosition2D
SimpleEdge::point_on_edge(..)
SimpleTriangle::is_ordered_ccw(..)
- Potential crashes when inserting points into a
DelaunayTriangulation
, even thoughFloatKernel
was used.
- cgmath dependency bumped to 0.12.*
- DelaunayTriangulations and some primitives now will only work with two-dimensional coordinates. Using higher dimensions actually yielded unspecified results.
Initial commit