Skip to content

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

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

[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

@fallenmi fallenmi commented Aug 15, 2026

Copy link
Copy Markdown
Contributor

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 assisted with investigation, reproduction, implementation, test design, validation, and drafting this change.

@fallenmi
fallenmi marked this pull request as ready for review August 25, 2026 12:28
@larshg larshg added the changelog: enhancement Meta-information for changelog generation label Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog: enhancement Meta-information for changelog generation module: io

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IO PolygonMesh to PLY output cannot support large polygons

3 participants