Ip022 — ASCII STL with multiple solid…endsolid bodies in one file

§12.15 import-format parser robustness (sub-class: multi-body-container)

P2 — spec deviation (no data loss)

encoding

Sources

Description

One ASCII STL file concatenates two independent `solid NAME … endsolid NAME` blocks back to back. STL is an informal, never-formally-standardized format usually read as single-solid; a strict reader that stops parsing after the first `endsolid` silently truncates the file to one body, discarding the second solid entirely with no diagnostic. First multi-body container class for a flat mesh format in this section, and the first STL-format fixture in the corpus.

Reproducer recipe

a single `.stl` file containing two complete, well-formed `solid NAME … endsolid NAME` blocks, each with one triangle, back to back with no separator beyond the second `solid` keyword.

Expected kernel behavior

treat the file as a scene of N named solids and load all of them; never silently stop after the first `endsolid` and discard the remainder of the file.

Notes

Cross-oracle: trimesh 4.12.2 correctly treats the file as a multi-body container — `trimesh.load()` returns a `Scene` with `geometry.keys()==['bodyA','bodyB']`, each a well-formed one-triangle mesh — verified 2026-07-17. Positive/reference result: trimesh's ASCII STL loader (`exchange/stl.py::load_stl_ascii`) explicitly scans for repeated `solid`/`endsolid` chunk pairs rather than stopping at the first `endsolid`, proving the multi-body case is a deliberate design decision a naive single-pass reader would get wrong. Synonyms: "STL multi-solid file", "multiple solid blocks in one STL", "STL container truncated to first body", "ASCII STL scene of N solids". Provenance tier: bytes-only. First STL-format fixture in the corpus.

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)
1solid bodyA
2facet normal 0 0 1
3outer loop
4vertex 0 0 0
5vertex 1 0 0
6vertex 0 1 0
7endloop
8endfacet
9endsolid bodyA
10solid bodyB
11facet normal 0 0 1
12outer loop
13vertex 2 0 0
14vertex 3 0 0
15vertex 2 1 0
16endloop
17endfacet
18endsolid bodyB