Skip to content

Commit c6fc596

Browse files
committed
Adapt to refactor of SpatialTreeInterface
do_query -> depth_first_search, etc. Otherwise all is the same.
1 parent 17b1487 commit c6fc596

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/methods/clipping/clipping_processor.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
305305
# as the nested loop above, and iterating through poly_b in order.
306306
if Extents.intersects(ext_l, ext_b)
307307
# Loop over the edges in b that might intersect the edges in a
308-
SpatialTreeInterface.do_query(Base.Fix1(Extents.intersects, ext_l), b_tree) do j
308+
SpatialTreeInterface.depth_first_search(Base.Fix1(Extents.intersects, ext_l), b_tree) do j
309309
b1t, b2t = edges_b[j].geom
310310
b1t == b2t && return LoopStateMachine.Continue()
311-
# LoopStateMachine control is managed outside the loop, by the do_query function.
311+
# LoopStateMachine control is managed outside the loop, by the depth_first_search function.
312312
return f_on_each_maybe_intersect(((a1t, a2t), i), ((b1t, b2t), j)) # note the indices_b[j] here - we are using the index of the edge in the original edge list, not the index of the edge in the STRtree.
313313
end
314314
end
@@ -323,7 +323,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
323323

324324
last_a_idx = 0
325325

326-
SpatialTreeInterface.do_dual_query(Extents.intersects, tree_a, tree_b) do a_edge_idx, b_edge_idx
326+
SpatialTreeInterface.dual_depth_first_search(Extents.intersects, tree_a, tree_b) do a_edge_idx, b_edge_idx
327327
a1t, a2t = edges_a[a_edge_idx].geom
328328
b1t, b2t = edges_b[b_edge_idx].geom
329329

@@ -381,7 +381,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
381381

382382
last_a_idx = 1
383383

384-
SpatialTreeInterface.do_dual_query(Extents.intersects, tree_a, tree_b) do a_thinned_idx, b_thinned_idx
384+
SpatialTreeInterface.dual_depth_first_search(Extents.intersects, tree_a, tree_b) do a_thinned_idx, b_thinned_idx
385385
a_edge_idx = indices_a[a_thinned_idx]
386386
b_edge_idx = indices_b[b_thinned_idx]
387387

src/methods/clipping/intersection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ function _intersection_points(manifold::M, accelerator::A, ::Type{T}, ::GI.Abstr
242242

243243
function f_on_each_maybe_intersect((a_edge, a_idx), (b_edge, b_idx))
244244
line_orient, intr1, intr2 = _intersection_point(manifold, T, a_edge, b_edge; exact)
245-
line_orient == line_out && return LoopStateMachine.Continue() # use LoopStateMachine.Continue() to skip this edge - in this case it doesn't matter but you could use it to e.g. break once you found the first intersecting point.
245+
line_orient == line_out && return LoopStateMachine.Action(:continue) # use LoopStateMachine.Continue() to skip this edge - in this case it doesn't matter but you could use it to e.g. break once you found the first intersecting point.
246246
pt1, _ = intr1
247247
push!(result, pt1) # if not line_out, there is at least one intersection point
248248
if line_orient == line_over # if line_over, there are two intersection points

0 commit comments

Comments
 (0)