Skip to content

Commit a58103e

Browse files
committed
Init
1 parent 9134c8e commit a58103e

File tree

4 files changed

+12
-6
lines changed

4 files changed

+12
-6
lines changed

Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "DelaunayTriangulation"
22
uuid = "927a84f5-c5f4-47a5-9785-b46e178433df"
33
authors = ["Daniel VandenHeuvel <[email protected]>"]
4-
version = "1.6.3"
4+
version = "1.6.4"
55

66
[deps]
77
AdaptivePredicates = "35492f91-a3bd-45ad-95db-fcad7dcfedb7"

src/algorithms/point_location/jump_and_march.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ function search_right_down_adjacent_boundary_edges(tri::Triangulation, q, q_pos,
419419
k = get_adjacent(tri, i, j)
420420
return (true, Cert.On, i, j, k) # true is the return_flag
421421
end
422-
return (false, Cert.Outside, i, j, k)
422+
return (false, Cert.Outside, i, j, get_adjacent(tri, i, j))
423423
end
424424
function search_left_down_adjacent_boundary_edges(tri::Triangulation, q, q_pos, predicates::AbstractPredicateKernel, store_history::F, history, ghost_vertex, i, j, pⱼ) where {F}
425425
if is_true(store_history) # in case we don't enter the loop
@@ -445,7 +445,7 @@ function search_left_down_adjacent_boundary_edges(tri::Triangulation, q, q_pos,
445445
k = get_adjacent(tri, j, i)
446446
return (true, Cert.On, j, i, k)
447447
end
448-
return (false, Cert.Outside, i, j, k)
448+
return (false, Cert.Outside, i, j, get_adjacent(tri, i, j))
449449
end
450450

451451
"""

src/algorithms/triangulation/unconstrained_triangulation.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ function unconstrained_triangulation!(
457457
) where {M}
458458
initialise_bowyer_watson!(tri, insertion_order, predicates)
459459
remaining_points = @view insertion_order[(begin + 3):end]
460-
for (num_points, new_point) in enumerate(remaining_points)
461-
initial_search_point = get_initial_search_point(tri, num_points, new_point, insertion_order, num_sample_rule, rng, try_last_inserted_point)
460+
for (npts, new_point) in enumerate(remaining_points)
461+
initial_search_point = get_initial_search_point(tri, npts, new_point, insertion_order, num_sample_rule, rng, try_last_inserted_point)
462462
add_point_bowyer_watson!(tri, new_point, initial_search_point, rng, predicates)
463463
end
464464
convex_hull!(tri; predicates, reconstruct = false)

test/point_location/jump_and_march.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -764,4 +764,10 @@ end
764764
@test DT.is_positively_oriented(DT.triangle_orientation(tri, V))
765765
@test DT.is_inside(DT.point_position_relative_to_triangle(tri, V, (1e-16, 0.0)))
766766
end
767-
end
767+
end
768+
769+
"Issue #216"
770+
points = [(1.0791812460476249, -3.7886681935906106), (1.0791812460476249, -4.4006006582615305), (1.0791812460476249, -5.012533122932451), (1.0791812460476249, -4.022405596275408), (1.0791812460476249, -4.634338060946328), (1.0791812460476249, -5.2462705256172475), (1.0791812460476249, -4.256142998960205), (1.0791812460476249, -4.868075463631126), (1.0791812460476249, -3.877947936974082), (1.0791812460476249, -4.489880401645002), (1.0791812460476249, -5.101812866315922), (1.0791812460476249, -4.111685339658881), (1.0791812460476249, -4.723617804329802), (1.0791812460476249, -3.7334902776727588), (1.0791812460476249, -4.345422742343679), (1.0791812460476249, -4.957355207014598), (1.0791812460476249, -3.967227680357556), (1.0791812460476249, -4.579160145028475), (1.0791812460476249, -5.191092609699395), (1.0791812460476249, -4.200965083042353), (1.0791812460476249, -4.8128975477132725)]
771+
tri = triangulate(points; randomise=false) # PointNotFoundError
772+
tri = Triangulation(points)
773+
DelaunayTriangulation.initialise_bowyer_watson!(tri, insertion_order, predicates)

0 commit comments

Comments
 (0)