Files
Petru Conduraru 71c18a9ad1 Serializers: index positions and normals independently in OBJ/DAE output
When vertices are not welded (the default IfcConvert path when normals
are requested), IfcGeom::Representation::Triangulation stores one
position and one normal per triangle corner, so both arrays repeat the
same values many times. The OBJ and COLLADA formats support indexing
positions, normals and texture coordinates independently, but the
serializers were reusing a single combined index for all of them,
inflating output size without needing to. Positions and normals are
now deduplicated by exact value within each serializer and referenced
through their own index streams (UV indices are left untouched, since
a UV depends on both position and normal together).

Verified against a real IFC model (test/input/IfcReinforcingBar.ifc):
DAE output drops from 48.4MB to 20.6MB (-57.5%) and OBJ output from
51.3MB to 23.6MB (-54.0%), with the decoded position/normal value for
every triangle corner checked byte-identical to the unpatched output.

Addresses #46.

Generated with the assistance of an AI coding tool.
2026-07-21 16:20:55 +03:00
..
2026-07-18 22:39:33 +05:00
2026-07-15 19:20:17 +05:00
2026-07-18 22:39:33 +05:00
2026-02-27 14:52:55 +05:00
2026-07-18 22:39:33 +05:00