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

Reading files with pathlib #82

Open
paddyroddy opened this issue Mar 11, 2021 · 5 comments · May be fixed by #243
Open

Reading files with pathlib #82

paddyroddy opened this issue Mar 11, 2021 · 5 comments · May be fixed by #243
Labels
enhancement New feature or request

Comments

@paddyroddy
Copy link
Contributor

Have to convert to string before reading in
image

@teseoch
Copy link
Collaborator

teseoch commented Mar 11, 2021

Interesting, I have no idea how to fix this. Seems more of an issue in pybin11 than igl

@paddyroddy
Copy link
Contributor Author

in the code I just convert it to a string which works i.e. I pass in str(_meshes_path / f"{mesh_name}.obj") in this example

@alecjacobson alecjacobson added the enhancement New feature or request label Feb 6, 2023
@alecjacobson
Copy link
Contributor

My understanding is that the implicit feature request here is for igl.read* (and igl.write*) functions to accept pathlib paths as input in addition to strings. Sounds like a good request and would be happy to merge a PR if anyone wants to take it on.

@paddyroddy
Copy link
Contributor Author

My understanding is that the implicit feature request here is for igl.read* (and igl.write*) functions to accept pathlib paths as input in addition to strings. Sounds like a good request and would be happy to merge a PR if anyone wants to take it on.

Yep, that's what I was thinking!

@alecjacobson
Copy link
Contributor

I think this means that the underlying C++ function in libigl should probably take std::filesystem::path as input.

If I read that page correctly then std::filesystem::path is convertable to string as well. So maybe we could already start with using std::filesystem::path as the input type on the bindings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
3 participants