Skip to content

Commit 9fae766

Browse files
committed
Adapt to refactor of SpatialTreeInterface
do_query -> depth_first_search, etc. Otherwise all is the same.
1 parent 3277eea commit 9fae766

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
@@ -306,10 +306,10 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
306306
# as the nested loop above, and iterating through poly_b in order.
307307
if Extents.intersects(ext_l, ext_b)
308308
# Loop over the edges in b that might intersect the edges in a
309-
SpatialTreeInterface.do_query(Base.Fix1(Extents.intersects, ext_l), b_tree) do j
309+
SpatialTreeInterface.depth_first_search(Base.Fix1(Extents.intersects, ext_l), b_tree) do j
310310
b1t, b2t = edges_b[j].geom
311311
b1t == b2t && return LoopStateMachine.Continue()
312-
# LoopStateMachine control is managed outside the loop, by the do_query function.
312+
# LoopStateMachine control is managed outside the loop, by the depth_first_search function.
313313
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.
314314
end
315315
end
@@ -324,7 +324,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
324324

325325
last_a_idx = 0
326326

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

@@ -382,7 +382,7 @@ function foreach_pair_of_maybe_intersecting_edges_in_order(
382382

383383
last_a_idx = 1
384384

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

src/methods/clipping/intersection.jl

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

247247
function f_on_each_maybe_intersect((a_edge, a_idx), (b_edge, b_idx))
248248
line_orient, intr1, intr2 = _intersection_point(manifold, T, a_edge, b_edge; exact)
249-
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.
249+
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.
250250
pt1, _ = intr1
251251
push!(result, pt1) # if not line_out, there is at least one intersection point
252252
if line_orient == line_over # if line_over, there are two intersection points

0 commit comments

Comments
 (0)