Skip to content

Commit 5774d0b

Browse files
committed
always use EarCut
1 parent 117271f commit 5774d0b

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/triangulation.jl

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -227,12 +227,8 @@ best_earcut_eltype(::Type{Int32}) = Int32
227227
best_earcut_eltype(::Type{<:Integer}) = Int64
228228

229229
function faces(polygon::Polygon{Dim, T}) where {Dim, T}
230-
if isempty(polygon.interiors)
231-
return decompose(GLTriangleFace, coordinates(polygon))
232-
else
233-
PT = Point{Dim, best_earcut_eltype(T)}
234-
points = [decompose(PT, polygon.exterior)]
235-
foreach(x-> push!(points, decompose(PT, x)), polygon.interiors)
236-
return earcut_triangulate(points)
237-
end
230+
PT = Point{Dim, best_earcut_eltype(T)}
231+
points = [decompose(PT, polygon.exterior)]
232+
foreach(x-> push!(points, decompose(PT, x)), polygon.interiors)
233+
return earcut_triangulate(points)
238234
end

0 commit comments

Comments
 (0)