-
Notifications
You must be signed in to change notification settings - Fork 98
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
Mesh import/export from python #981
Conversation
3667ccd
to
3118a2e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #981 +/- ##
==========================================
- Coverage 91.84% 88.21% -3.63%
==========================================
Files 37 62 +25
Lines 4976 8670 +3694
Branches 0 1043 +1043
==========================================
+ Hits 4570 7648 +3078
- Misses 406 1022 +616 ☔ View full report in Codecov by Sentry. |
Thanks, but our recommendation is to use |
I did notice, but it feels redundant to use a separate library when the functionality is already there natively, just not exposed in the bindings. |
Thanks, but 3D file I/O is worth a library unto itself. We have the absolute bare minimum optional support to enable testing, but that's it, and even our support is through a 3rd-party library (Assimp). Trimesh is much better for Python file I/O than our MeshIO is, plus including our I/O in our bindings will make our Python library much larger (Assimp dwarfs our code base). |
I understand, but when compiled with MANIFOLD_EXPORT the python bindings are already pulling in assimp transitively, so exposing these two functions doesn't practically change the size/surface of the library. |
I think we can add trimesh as optional dependency and add support for it. Our pypi release will not be compiled with MANIFOLD_EXPORT so adding this will increase our binary size quite a bit. |
The change I proposed only applies when the library is compiled with both python bindings and assimp are enabled, so if MANIFOLD_EXPORT is disabled for the pypi release, then it will not be affected. |
What do you think of @pca006132 's idea? I think that would give a better result, and probably be easier to use too. And then all our Python users would be on the same page. |
Any added convenience in import/export would be welcome, I think most users would expect being able to do this in a one-liner. Right now the library is quite easy to get started and to create shapes just by reading the I'm of course not attached to the assimp solution, and if you think trimesh is more suitable then I trust your judgement. |
hi,
I thought this was a simple change that makes it easier to try out the library locally
I named the functions
import_mesh
andexport_mesh
, since justimport
is restricted