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

Integration with manifold3d #2318

Open
pca006132 opened this issue Nov 4, 2024 · 2 comments
Open

Integration with manifold3d #2318

pca006132 opened this issue Nov 4, 2024 · 2 comments

Comments

@pca006132
Copy link

Some users (of manifold3d) asked if manifold3d can provide methods for import/export meshes using trimesh. However, we are not sure how optional dependencies work in trimesh, as well as how cyclic dependencies work (because trimesh also depends on manifold3d). I wonder if we can have functions in trimesh that convert a mesh to manifold3d mesh and reverse?

We already have a simple implementation of that: https://colab.research.google.com/drive/1VxrFYHPSHZgUbl9TeWzCeovlpXrPQ5J5?usp=sharing, the main problem is where this code should go to.

ping @elalish.

@mikedh
Copy link
Owner

mikedh commented Nov 5, 2024

Nice!! Yeah I think that makes total sense and happy to help!

However, we are not sure how optional dependencies work in trimesh

So the base dependencies pulled in by pip install trimesh is just numpy, which lets you do most things you'd want, and adding bare trimesh as a dep here would be easy.

as well as how cyclic dependencies work (because trimesh also depends on manifold3d)

So pip install trimesh[easy] does pull in manifold3d. I also am not all that sure how the pip resolver deals with a circular but seemingly resolvable dependency in an extra.

I think the case to check would be to add trimesh to a manifold dependency (maybe as a .rc0 prerelease for testing?), and then see if pip install --pre trimesh[easy] manifold3d does anything disastrous? My reading of the relevant document is that it seems like this should work? Happy to play with the dependency in trimesh too if that's necessary.

@pca006132
Copy link
Author

Sorry for the delay, I was busy working on the v3.0 release for manifold. Now that the package is released I finally have more time to come back and look at this. (and let you know the dependency can be updated!)

I'm thinking if it will be simpler if we add trimesh.exchange.manifold3d, and make trimesh.load/trimesh.export work with manifold3d object. Not sure if load and export will be the correct APIs here, considering they work with files instead of 3rd-party objects. Adding to trimesh simplifies the dependency issue because trimesh already (optionally) depends on manifold3d.

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

2 participants