Open zekeriyasari opened 3 years ago
The aim was to construct a hexagon. Calling the constructor directly, I think, solves the problem.
using StaticArrays
using GeometryBasics
hexagon = GeometryBasics.Ngon(@SVector [Point(BigFloat(cos(θ)), BigFloat(sin(θ))) for θ in 0 : π / 3 : 2π - π / 3])
Oh yeah, there is some branch missing to handle non isbits element types... https://github.com/JuliaGeometry/GeometryBasics.jl/blob/master/src/viewtypes.jl#L77 This needs to check for isbits, and if not isbits copy instead of reinterprete
@zekeriyasari why did you close this? I think https://github.com/JuliaGeometry/GeometryBasics.jl/issues/132#issuecomment-841818308 would need to be changed in this package to fix this issue.
The construction of a polygon with
Float64
points such asdoes not throw an error, while the one with
BigFloat
points such asdoes throw an error. The error thrown is
Is there a possible workaround for this error?