MeshIO.jl
MeshIO.jl copied to clipboard
This package needs to work with an interface, not with types
Right now this package can only work with the Mesh type as defined in GeometryBasics. Which, given how poorly this type is documented, makes it quite unuseable.
Instead of forcing the user to use these classes, the Julian way is to work with interfaces, not with types. As an example, one could look at this wonderful little package called AbstractTrees.jl: this manages to offer a number of useful algorithms for general tree types without forcing the user to use any explicit type (and not even forcing them to derive from a given abstract type).
This would be even more adapted to this package given that the interface used is really simple:
- extract vertices and triangles from a mesh,
- compute the normal for each face of the mesh (this can have a default method),
- build a mesh from vertices and triangles.
If you have a PR with the needed changes, I'm happy to review it ;)
I am indeed trying to write a proof of concept, although 1) it will start by implementing only a small subset and 2) don't expect it too soon...
This should be a bit easier going now with Pkg extensions in 1.9.