Thank you @Gnimuc for wrapping the library. Is there an easy method to load simple PLY files from disk and retrieve the coordinates and connectivities of faces?
It seems that assimp has a much broader scope, but I wonder if we could have something similar to the pyassimp package? They seem to provide a `load(fname)` function which returns an object that is iterable with all meshes in the scene.
Hi @juliohm, those high-level iterator APIs of 3D asset libraries are all similar to each other. It's not hard to implement a high-level API for the following example in Julia, but I just don't have time at the moment. If you'd like to contribute, I would be happy to invite you as a collaborator. :)
```
scene = aiImportFile(joinpath(@__DIR__, "test.stl"),
aiProcess_CalcTangentSpace |
aiProcess_Triangulate |
aiProcess_JoinIdenticalVertices |
aiProcess_SortByPType
)
if scene == C_NULL
@error aiGetErrorString() |> unsafe_string
@test false
end
scene_obj = unsafe_load(scene)
num_mesh = scene_obj.mNumMeshes
for i = 1:num_mesh
mesh_obj = unsafe_load(unsafe_load(scene_obj.mMeshes, i))
for j = 1:mesh_obj.mNumVertices
vt = unsafe_load(mesh_obj.mVertices, j)
@show vt
end
end
aiReleaseImport(scene)
```
That would be nice too, any organization like JuliaIO or JuliaGeometry seems like a nice fit. I am part of the latter only, but I am sure that we can contribute wherever the package is. :)