Skip to content

Commit

Permalink
cleaner initial edge selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sjkelly committed May 7, 2020
1 parent 8852007 commit 1f43642
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Contour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -283,13 +283,7 @@ function trace_contour(x, y, z, h::Number, cells::Dict)

# Pick a starting edge
crossing = get_first_crossing(cell)
starting_edge = UInt8(0)
for edge in (N, S, E, W)
if !iszero(edge & crossing)
starting_edge = edge
break
end
end
starting_edge = 0x01 << trailing_zeros(crossing)

# Add the contour entry location for cell (xi_0,yi_0)
push!(contour_arr, interpolate(x, y, z, h, ind[1], ind[2], starting_edge, VT))
Expand Down

0 comments on commit 1f43642

Please sign in to comment.