Skip to content

Read packed CCB2 point normals (#37) - #90

Merged
mahach666 merged 1 commit into
mainfrom
codex/ccb2-normals
Nov 18, 2026
Merged

mahach666 merged 1 commit into
mainfrom
codex/ccb2-normals

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Follow-up to #89 for #37.

Summary

  • Read packed point normals in CCB2 file versions 41, 42 and 50. Expose them through PclScan.HasNormals and PclPoint.Normal.
  • Keep normal reads aligned with coordinates, colors and intensity during streaming and subsampling. Validate array lengths, counts and direction codes.
  • Add synthetic coverage for both array layouts, zero vectors, direction transforms, truncated data and unsupported versions. Document the supported versions.

The layout and decoder were derived from files produced through the CloudCompare command line, without reading its implementation. Each reference PLY was exported after reopening the corresponding CCB2 file.

Verification

  • dotnet test PclIO.slnx -c Release with the Zenodo fixture. On .NET 8 and .NET 10, 1,126 tests passed and 25 were skipped per target.
  • Compared all 6,014 points in the calibration cloud and all 116,018 points in a real Zenodo tile with normals computed in CloudCompare. On both .NET targets, the real tile matched the reference PLY exactly for XYZ, RGB and intensity. The maximum Euclidean difference between decoded and reference normals was 8.67e-8.
  • dotnet docfx docfx.json --warningsAsErrors passed with zero warnings. git diff --check passed.

@mahach666
mahach666 merged commit d1f90a5 into main Nov 18, 2026
7 of 8 checks passed
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