I had some Julia code that loaded in OBJ format files into Meshes and then plotted them with mesh! or wireframe! using Makie, etc. I stored the obj after loading in a struct where the obj mesh type had to be set to: GeometryBasics.FaceMesh{3,Float32,GeometryBasics.GLTriangleElement}
to make it work.
I updated to Julia 1.5.1 and in this same package, the BasicGeometry and AbstractGeometry started conflicting with each other over Point3f0, so I had to fully qualify those as BasicGeometry.Point3f0. I don’t know why those were no longer compatible.
But I can’t get past this error with the Mesh not being able to identify the MeshIO type:
I define the object based on the error I got which was:
GeometryBasics.Mesh{3,Float32,GeometryBasics.Ngon{3,Float32,3,GeometryBasics.Point{3,Float32}},FaceView{GeometryBasics.Ngon{3,Float32,3,GeometryBasics.Point{3,Float32}}}}
So in my code, I have, among other lines of code:
using FileIO
using AbstractPlotting
using GeometryBasics
...
const ObjMeshType = GeometryBasics.Mesh{3,Float32,GeometryBasics.Ngon{3,Float32,3,GeometryBasics.Point{3,Float32}},FaceView{GeometryBasics.Ngon{3,Float32,3,GeometryBasics.Point{3,Float32}}}}
#const ObjMeshType = GeometryBasics.GLNormalMesh
#const ObjMeshType = GeometryBasics.FaceMesh{3,Float32,GeometryBasics.GLTriangleElement}
struct GraphicObject
filename::String
obj::ObjMeshType #Loaded with load
[...]
end
I get the following abnoxious error, which I don’t understand because I’ve told it the mesh type.
GeometryBasics.Mesh{3,Float32,GeometryBasics.Ngon{3,Float32,3,GeometryBasics.Point{3,Float32}},FaceView{GeometryBasics.Ngon{3,Float32,3,GeometryBasics.Point{3,Float32}}}} to an object of type and the error message seems to be telling me something else.
GeometryBasics.AbstractMesh{GeometryBasics.Ngon{Dim,Float32,3,GeometryBasics.PointMeta{Dim,Float32,GeometryBasics.Point{Dim,Float32},(:normals,),Tuple{GeometryBasics.Vec{3,Float32}}}}} where Dim
The structure GraphObject initializes the obj field with a load(filename) to an OBJ file.
Any thoughts on how to debug this?
Best Regards,
Allan Baker