Skip to content
This repository was archived by the owner on Nov 22, 2023. It is now read-only.
This repository was archived by the owner on Nov 22, 2023. It is now read-only.

Missing conversion for GLNormalMesh(vertices, faces) #90

@rdeits

Description

@rdeits

In the Julia v0.5 version, I could do:

M = GLNormalMesh
V = vertextype(M)
F = facetype(M)
vs = [V(0., 0, 0), V(1., 0, 0), V(0., 1, 0)]
fs = [F(1, 2, 3)]
GLNormalMesh(vs, fs)

but in GeometryTypes master, that now throws:

MethodError: Cannot `convert` an object of type GeometryTypes.HomogenousMesh{GeometryTypes.Point{3,Float32},GeometryTypes.Face{3,GeometryTypes.OffsetInteger{1,UInt32}},Void,Void,Void,Void,Void} to an object of type GeometryTypes.HomogenousMesh{GeometryTypes.Point{3,Float32},GeometryTypes.Face{3,GeometryTypes.OffsetInteger{1,UInt32}},GeometryTypes.Normal{3,Float32},Void,Void,Void,Void}
This may have arisen from a call to the constructor GeometryTypes.HomogenousMesh{GeometryTypes.Point{3,Float32},GeometryTypes.Face{3,GeometryTypes.OffsetInteger{1,UInt32}},GeometryTypes.Normal{3,Float32},Void,Void,Void,Void}(...),
since type constructors fall back to convert methods.

Stacktrace:
 [1] GeometryTypes.HomogenousMesh{GeometryTypes.Point{3,Float32},GeometryTypes.Face{3,GeometryTypes.OffsetInteger{1,UInt32}},GeometryTypes.Normal{3,Float32},Void,Void,Void,Void}(::Array{GeometryTypes.Point{3,Float32},1}, ::Array{GeometryTypes.Face{3,GeometryTypes.OffsetInteger{1,UInt32}},1}) at /Users/rdeits/.julia/v0.6/GeometryTypes/src/meshes.jl:107

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions