Skip to content

Commit

Permalink
Merge pull request #2 from JuliaGeometry/master
Browse files Browse the repository at this point in the history
update branch
  • Loading branch information
Sov-trotter authored Jun 30, 2020
2 parents 1edb9e7 + 053ada8 commit f86b0b3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GeometryBasics"
uuid = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
authors = ["SimonDanisch <[email protected]>"]
version = "0.2.13"
version = "0.2.14"

[deps]
IterTools = "c8e1da08-722c-5040-9ed9-7db0dc04731e"
Expand Down
4 changes: 2 additions & 2 deletions src/interfaces.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function faces(f::AbstractVector{<:AbstractFace})
return f
end

function normals(primitive, nvertices=nothing)
function normals(primitive, nvertices=nothing; kw...)
# doesn't have any specific algorithm to generate normals
# so will be generated from faces + positions
# which we indicate by returning nothing!
Expand All @@ -27,7 +27,7 @@ function normals(primitive, nvertices=nothing)
return nothing
end

function faces(primitive, nvertices=nothing)
function faces(primitive, nvertices=nothing; kw...)
# doesn't have any specific algorithm to generate faces
# so will try to triangulate the coordinates!
return nothing
Expand Down
6 changes: 5 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,11 @@ end
@test coordinates(m) === points
end


@testset "convert mesh + meta" begin
m = uv_normal_mesh(Circle(Point2f0(0), 1f0))
# for 2D primitives we dont actually calculate normals
@test !hasproperty(m, :normals)
end

@testset "convert mesh + meta" begin
m = uv_normal_mesh(FRect3D(Vec3f0(-1), Vec3f0(1, 2, 3)))
Expand Down

0 comments on commit f86b0b3

Please sign in to comment.