Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This package needs to work with an interface, not with types #79

Open
plut opened this issue Nov 17, 2021 · 3 comments
Open

This package needs to work with an interface, not with types #79

plut opened this issue Nov 17, 2021 · 3 comments

Comments

@plut
Copy link

plut commented Nov 17, 2021

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.
@SimonDanisch
Copy link
Member

If you have a PR with the needed changes, I'm happy to review it ;)

@plut
Copy link
Author

plut commented Nov 17, 2021

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...

@sjkelly
Copy link
Member

sjkelly commented Jun 26, 2024

This should be a bit easier going now with Pkg extensions in 1.9.

@sjkelly sjkelly closed this as completed Jun 26, 2024
@sjkelly sjkelly reopened this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants