Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change default clipping to false #82

Merged
merged 1 commit into from
Aug 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/DelaunayTriangulation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export num_polygons
export get_polygon
export each_polygon
export get_polygon_point
export get_polygon_vertex
export get_area
export each_generator
export get_generator
Expand Down
2 changes: 1 addition & 1 deletion src/data_structures/voronoi/voronoi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ Gets the area and centroid of the polygon with index `i` in `vor`.
"""
function polygon_features(vor::VoronoiTessellation, i)
polygon = get_polygon(vor, i)
if any(is_boundary_index, polygon)
if i ∈ get_unbounded_polygons(vor)
F = number_type(vor)
return (typemax(F), (typemax(F), typemax(F)))
end
Expand Down
4 changes: 2 additions & 2 deletions src/voronoi/main.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
voronoi(tri::Triangulation, clip=has_boundary_nodes(tri)) -> VoronoiTessellation
voronoi(tri::Triangulation, clip=false) -> VoronoiTessellation

Construct the Voronoi tessellation of the points in `tri`. If `clip` is `true` then the
Voronoi tessellation will be clipped to the convex hull of the points in `tri`.
Expand All @@ -25,7 +25,7 @@ Voronoi tessellation will be clipped to the convex hull of the points in `tri`.

Clipping is not yet guaranteed to work for constrained triangulations.
"""
function voronoi(tri::Triangulation, clip=has_boundary_nodes(tri))
function voronoi(tri::Triangulation, clip=false)
has_ghost = has_ghost_triangles(tri)
!has_ghost && add_ghost_triangles!(tri)
vorn = initialise_voronoi_tessellation(tri)
Expand Down
Loading