Skip to content

OBJ file imports appear to be forced to a triangulation #259

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

Closed
Kevin-Mattheus-Moerman opened this issue May 14, 2025 · 2 comments
Closed

Comments

@Kevin-Mattheus-Moerman
Copy link
Contributor

The OBJ file for the model shown has quadrilateral faces (see also 4 highlighted face entries for a section of the OBJ file shown on the left. However upon import it becomes available as a triangulation. Can this behaviour be fixed/avoided so the mesh is imported as is?

Image

@ffreyer
Copy link
Collaborator

ffreyer commented May 14, 2025

I think you can do something like load("mesh.obj, facetype = QuadFace{Int})`.

For mixed types https://github.com/JuliaIO/MeshIO.jl/blob/master/src/io/obj.jl would have to be changed. Currently it strictly types the faces array and converts every face to the target type. I'm not sure if this is important for performance

@Kevin-Mattheus-Moerman
Copy link
Contributor Author

Thanks @ffreyer this seems to be a MeshIO point rather than GeometryBasics so we can close it. That fix with facetype works for pure quad faces. Like you say it doesn't for mixed meshes. I'll post on issue on that for MeshIO soon.

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