Skip to content

Commit

Permalink
Change default clipping to false (#82)
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielVandH authored Aug 13, 2023
1 parent 29aba1b commit a310d56
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
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

0 comments on commit a310d56

Please sign in to comment.