Files
Petru Conduraru c85bf90558 Correct OBJ texture-coordinate indices (#8457)
The OBJ serializer wrote the normal index into the texture-coordinate slot
of a v/vt/vn face (emitting v/vn/vn), so exported UVs were wrong. Track a
separate texcoord counter and emit the correct vt index.

Per review, the material lookup is left relying on ApplyDefaultMaterials
(default on, and IfcConvert exposes no toggle to disable it) so an unstyled
element is given the default style before triangulation and material_ids
never contain the -1 no-style sentinel, matching how the Collada serializer
already indexes its materials without an ad hoc guard. The earlier
material_id >= 0 guard is therefore removed.

Verified on OCC 7.9.2: a styled box exports its material, an unstyled box
exports the injected DefaultMaterial (valid index, no out-of-bounds) on
both the default and --generate-uvs paths, and the UV path now emits
correct v/vt/vn indices.

Generated with the assistance of an AI coding tool.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 18:34:22 +03:00
..
2026-02-27 14:52:55 +05:00
2026-02-27 14:52:55 +05:00
2026-06-11 21:09:56 +02:00
2026-06-29 11:30:37 +02:00