Skip to content

POLYLINE (MESH) reads five BS without §20.4.34's curve type, in a different order #273

Closed

Description

@DrunkOnJava

Spec: §20.4.34 POLYLINE (MESH) (30), p130: Flags BS 70, Curve type BS 75, M vert count BS 71, N vert count BS 72, M density BS 73, N density BS 74, R2004+ Owned Object Count BL.

Finding

The spec's own example, §20.4.34.1 (p130-131, OBJECT: 3d surf sol st (1EH), len 1AH (26), handle: 66, printed CRC verifies), closes exactly on its §20.4.1 RL boundary under that list: flags 17, curve type 0, M vert count 6, N vert count 7, M density 0, N density 0.

entities::polygon_mesh::decode reads five BS, in the order flags, M density, N density, M vert count, N vert count. It has no curve type, so it ends one BS short on this record:

POLYLINE_MESH data fields ended at bit 107, data stream ends at 109 (delta -2)

and the counts and densities it does read land in each other's fields (here it would report M density 0, N density 6, M count 7, N count 0). It also takes no Version, so the R2004+ Owned Object Count is never read.

No POLYLINE (MESH) record is in the local 19-file corpus, so the closes state of §20.4.34 in docs/spec-coverage.md should be re-checked against the pinned CI corpus.

Reproduce

cargo run --release --example spec_examples

Row 20.4.34 of tests/fixtures/spec-examples/r14-objects.tsv (#107).

Acceptance

  • The decoder reads §20.4.34's six BS in the spec's order, plus the R2004+ BL.
  • The §20.4.34.1 row closes, and its expect cell becomes closes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:entitiesEntity prescriptions in spec §20.4priority:P2Quality and completenessrelease:R14Affects R14 filestype:bugSomething reads, writes or reports wrongly

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions