Ip031 — OFF well-formed n-gon face crashes fan-triangulation on an independent reader

§12.15 import-format parser robustness (sub-class: n-gon-fan-triangulation)

P2 — spec deviation (no data loss)

crash

Sources

Description

An OFF file whose header `8 1 0` and body counts are exactly correct (8 vertex rows, 1 face row) — no declared-count-vs-body mismatch, unlike Ip003 — defines a single well-formed 7-gon face `7 4 6 0 2 3 1 5`. The face is syntactically valid: all 7 referenced indices are in range and none repeat (unlike Ip010's out-of-range face index). vcglib's polygon→triangle fan-triangulation path (used by MeshLab's OFF importer) mishandles n>4 polygons on this input (ml#1163, `confirmed`). This is a pure differential: the file has no malformation an OFF-spec validator would flag.

Reproducer recipe

OFF header `8 1 0` matching 8 coordinate rows and 1 face row exactly, with the face line `7 4 6 0 2 3 1 5` — a 7-sided polygon (k=7 followed by 7 valid, non-repeating vertex indices, one vertex of the 8 left unreferenced).

Expected kernel behavior

fan-triangulate (or ear-clip) an arbitrary well-formed n-gon face robustly for any n, or reject with a diagnostic naming the face; never crash on a syntactically valid polygon record.

Notes

Live-verified 2026-07-17 with trimesh 4.12.2: loads cleanly, fan-triangulates the 7-gon from its first listed index (vertex 4) into 5 triangles `[[4,6,0],[4,0,2],[4,2,3],[4,3,1],[4,1,5]]`, drops the one unreferenced vertex (7 verts / 5 faces reported) — no exception. ml#1163 documents MeshLab's vcglib-based OFF importer crashing (`confirmed` label) on this same well-formed-n-gon pattern — a clean cross-oracle divergence on identical, spec-valid bytes. Synonyms: "OFF n-gon fan triangulation crash", "polygon face k>4 crash", "well-formed OFF polygon crashes importer", "vcglib populateTriangles n-gon". Provenance tier: bytes-only.

Expected validation

Provenance tier

bytes-only — defect not fully embodied in fixture bytes.

Byte assertions

Live oracle output

No live oracle data — run _run_corpus to populate.

Fixture content

Show fixture bytes (with defect highlighting)
1OFF
28 1 0
30.0 0.0 0.0
41.0 0.0 0.0
51.0 1.0 0.0
60.0 1.0 0.0
70.5 -0.5 0.0
81.5 0.5 0.0
90.5 1.5 0.0
10-0.5 0.5 0.0
117 4 6 0 2 3 1 5