You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constructing a NgonFace from an SVector fails because of ambiguity: StaticArrays defines some conversion constructors, which interfere with the NgonFace constructors because NgonFace <: StaticVector
MWE
using GeometryBasic, StaticArrays
t =TriangleFace(SA[0.4, 0.2, 0.55])
results in
ERROR: MethodError: (TriangleFace{T} where T)(::SVector{3, Float64}) is ambiguous. Candidates:
(::Type{SV})(x::StaticVector{N, T}where {N, T}) where SV<:NgonFacein GeometryBasics at /home/$USER/.julia/packages/GeometryBasics/WMp6v/src/fixed_arrays.jl:74
(::Type{SA})(a::StaticArray) where SA<:StaticArrayin StaticArrays at /home/$USER/.julia/packages/StaticArrays/vxjOO/src/convert.jl:5
(NgonFace{S, T} where T)(x::AbstractVector{T}) where {S, T} in GeometryBasics at /home/$USER/.julia/packages/GeometryBasics/WMp6v/src/fixed_arrays.jl:34
(::Type{SA})(a::AbstractArray) where SA<:StaticArrayin StaticArrays at /home/$USER/.julia/packages/StaticArrays/vxjOO/src/convert.jl:7
(NgonFace{S, T} where T)(x::T) where {S, T} in GeometryBasics at /home/$USER/.julia/packages/GeometryBasics/WMp6v/src/fixed_arrays.jl:48
Possible fix, define
(NgonFace{S, T} where T)(::StaticVector{N, T}where N) where {S, T}
Stacktrace:
[1] top-level scope
@ REPL[4]:1
The text was updated successfully, but these errors were encountered:
Constructing a
NgonFace
from anSVector
fails because of ambiguity:StaticArrays
defines some conversion constructors, which interfere with theNgonFace
constructors becauseNgonFace <: StaticVector
MWE
results in
The text was updated successfully, but these errors were encountered: