Skip to content

Commit 5567b04

Browse files
committed
fix decompose test
1 parent 26a861a commit 5567b04

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/meshes.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@ const TriangleMesh{N} = SimpleMesh{N, Float32, GLTriangleFace}
3737
3838
Create a mesh from a polygon given as a vector of points, using triangulation.
3939
"""
40-
function mesh(polygon::AbstractVector{P}; pointtype=P) where {P<:Point{2}}
41-
return mesh(Polygon(polygon); pointtype=pointtype)
40+
function mesh(polygon::AbstractVector{P}; pointtype=P, facetype=GLTriangleFace) where {P<:Point{2}}
41+
return mesh(Polygon(polygon); pointtype=pointtype, facetype=facetype)
4242
end
4343

44-
function triangle_mesh(primitive::AbstractGeometry{N})::TriangleMesh{N} where {N}
45-
return mesh(primitive; pointtype=Point{N, Float32})
46-
end
44+
# function triangle_mesh(primitive::Union{AbstractGeometry{N}, AbstractVector{<: Point{2}}})::TriangleMesh{N} where {N}
45+
# return mesh(primitive; pointtype=Point{N, Float32})
46+
# end
4747

4848

4949
pointtype(x::Mesh) = eltype(decompose(Point, x))
@@ -58,7 +58,7 @@ function triangle_mesh(primitive::Mesh{N}) where {N}
5858
end
5959
end
6060

61-
function triangle_mesh(primitive::GeometryPrimitive{N}; nvertices=nothing) where {N}
61+
function triangle_mesh(primitive::Union{AbstractGeometry{N}, AbstractVector{<: Point{N}}}; nvertices = nothing)::TriangleMesh{N} where {N}
6262
if nvertices !== nothing
6363
@warn("nvertices argument deprecated. Wrap primitive in `Tesselation(primitive, nvertices)`")
6464
primitive = Tesselation(primitive, nvertices)

0 commit comments

Comments
 (0)