Skip to content

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

@Kevin-Mattheus-Moerman

Description

@Kevin-Mattheus-Moerman
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

Activity

ffreyer

ffreyer commented on May 14, 2025

@ffreyer
Collaborator

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

Kevin-Mattheus-Moerman commented on May 14, 2025

@Kevin-Mattheus-Moerman
ContributorAuthor

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @Kevin-Mattheus-Moerman@ffreyer

        Issue actions

          OBJ file imports appear to be forced to a triangulation · Issue #259 · JuliaGeometry/GeometryBasics.jl