Skip to content

Read normals from the PinPoint sectioned data file - #64

Open
mahach666 wants to merge 1 commit into
feature/issue-12-pinpoint-filterbitsfrom
feature/issue-13-pinpoint-normals
Open

mahach666 wants to merge 1 commit into
feature/issue-12-pinpoint-filterbitsfrom
feature/issue-13-pinpoint-normals

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #13

Based on #63 (the branch feature/issue-12-pinpoint-filterbits); merge the earlier pull requests first.

What changed

  • The Normals channel of the PinPoint sectioned layout is now read and validated (three float32 components per stored
    point, checked against the stored point count like the other channels). A wrong size fails with InvalidDataException.
  • HasNormals reports what the file contains for the sectioned layout too (it already did for the table layout): the packed
    form checks the presence of the channel instead of dividing a compressed length.
  • The trailing-bytes check at the end of a packed read now covers the normals stream as well.

Files changed

  • src/PclIO/Formats/PinPoint/PinPointPackedLayout.cs: Normals is a known channel (12 bytes per point).
  • src/PclIO/Formats/PinPoint/PinPointDocument.cs: packed-aware HasNormals and point total, normals stream in the
    trailing-bytes check, reader documentation updated.
  • tests/PclIO.Tests/PinPointPackedFixtures.cs: the fixture accepts normals (float[], three components per point).
  • tests/PclIO.Tests/PinPointPackedTests.cs: new tests for normals being read (values, all-zero means none) and for a
    wrong-size channel; existing no-channel tests now also assert HasNormals == false.
  • README.md, CHANGELOG.md: the new behaviour.

Tests

  • dotnet build — 0 warnings, 0 errors.
  • dotnet test — 624 passed, 0 failed, 10 skipped (the tests that need private scan files) on .NET 8 and .NET 10.

Limits

  • The normals channel is expected under the name Normals with three float32 components per point, the same shape as the
    table layout. A file that stores them under another name or in another encoding stays unread for that channel; the reader
    does not guess.
  • RowColIndex stays unread.

@mahach666
mahach666 force-pushed the feature/issue-12-pinpoint-filterbits branch from afcc67f to 993e93c Compare November 17, 2026 15:01
@mahach666
mahach666 force-pushed the feature/issue-13-pinpoint-normals branch from 0f35ff9 to ef58f14 Compare November 17, 2026 15:01

This branch has not been deployed

No deployments
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.

1 participant