Skip to content

[io] Support large polygons in PLY output - #6464

Draft
fallenmi wants to merge 1 commit into
PointCloudLibrary:masterfrom
fallenmi:agent/support-large-ply-polygons
Draft

[io] Support large polygons in PLY output#6464
fallenmi wants to merge 1 commit into
PointCloudLibrary:masterfrom
fallenmi:agent/support-large-ply-polygons

Conversation

@fallenmi

Copy link
Copy Markdown

Fixes #6087.

Summary

  • keep uchar face-list counts for meshes whose polygons have at most 255 vertices
  • switch the whole face-list property to uint when any polygon is larger
  • write matching 32-bit counts for every binary face in promoted files
  • add ASCII and binary round-trip coverage at the 255/256 boundary

Why

PLY declares one list-count type per face property. A 256-vertex polygon was previously declared as uchar; in binary output its size was cast to zero, corrupting the following index stream. The mesh-wide choice preserves compatibility for ordinary files while making mixed small/large meshes self-consistent.

Validation

  • regression against master: failed on the missing uint header and ASCII parse mismatch
  • patched focused regression: 10 repeated passes
  • full test_ply_io: 74/74 passed
  • git diff --check
  • local macOS arm64 Debug build with VTK, OpenNI, CUDA, and Qhull disabled

AI assistance disclosure: OpenAI Codex helped investigate and draft this change; I reproduced the bug, reviewed the patch, and ran the tests listed above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IO PolygonMesh to PLY output cannot support large polygons

1 participant