Skip to content

[Bug]: Inconsistent triangle winding order between Linux and macOS #1811

@noclone

Description

@noclone

What happened?

When loading the same IFC file (https://github.com/ThatOpen/engine_web-ifc/blob/main/tests/ifcfiles/public/IfcOpenHouse_IFC4.ifc) on Linux and macOS, some triangles have opposite winding order. This causes visible rendering differences on Linux (left image) but render correctly on macOS (right image).

Image Image

The vertex normals are correct on both platforms, but the triangle index order doesn't always match the normal direction. I found a workaround for my program: compare the geometric normal (from cross product) with vertex normals and swap winding when they disagree.
However there seems to be an issue in the lib, which should be fixed.

This may be related to #1670 which noted face orientation issues.

I'm using Ubuntu 24.04.3 LTS and engine_web-ifc 0.75

Version

0.75

What browsers are you seeing the problem on?

No response

Relevant log output

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions