Skip to content

State the EdgeWise cluster position scale explicitly - #72

Open
mahach666 wants to merge 1 commit into
feature/issue-20-e57-codecsfrom
feature/issue-21-edgewise-scale
Open

mahach666 wants to merge 1 commit into
feature/issue-20-e57-codecsfrom
feature/issue-21-edgewise-scale

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #21

Based on #71 (the branch feature/issue-20-e57-codecs); merge the earlier pull requests first.

What changed

  • The fixed-point scale of the EdgeWise cluster offsets is now an explicit option,
    PclReadOptions.EdgeWiseCoordinateScale (metres per unit, must be finite and above zero). The files do not declare the
    scale — the database carries only bounds and file references, and a point record is just three 16-bit offsets — so the
    default keeps the long-standing assumption (32768 units = 0.128 m) and the caller states it when the files use another
    scale. Default reads decode exactly as before.
  • EdgeWiseScan.ReadPoints uses the scale from its read options; the class documentation states the record layout.

Files changed

  • src/PclIO/PclReadOptions.cs: the new validated EdgeWiseCoordinateScale option.
  • src/PclIO/Formats/EdgeWise/EdgeWiseDocument.cs: the scale comes from the read options; record layout documented.
  • tests/PclIO.Tests/FormatTests.cs: a test that reads with a stated scale.
  • tests/PclIO.Tests/OptionsAndPathTests.cs: the default value and the validation of the new option.
  • README.md, docs/public-api.md, CHANGELOG.md: the new behaviour.

Tests

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

Limits

  • No place in the files was found that stores the scale (the .c3db database holds bounds and file references, the
    .c3ptx records hold only centre + counts + int16 offsets), so the assumption stays the default rather than being
    replaced by a stored value.
  • Further channels are still not read: a point record holds exactly three 16-bit offsets, and no verifiable wider layout
    is available; wider records fail the size check as before. Only positions are returned and no exporter writes normals.

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