Skip to content

Read the pose and the bounds of the setups of a Leica container - #55

Open
mahach666 wants to merge 1 commit into
feature/issue-3-leica-setup-scansfrom
feature/issue-4-leica-poses-bounds
Open

mahach666 wants to merge 1 commit into
feature/issue-3-leica-setup-scansfrom
feature/issue-4-leica-poses-bounds

Conversation

@mahach666

Copy link
Copy Markdown
Contributor

Closes #4

Based on #54 (the branch feature/issue-3-leica-setup-scans); merge that pull request first.

What changed

  • The payload of a container entry that lists a setup is now read as the record of the setup: the translation of the setup, the bounds of its points (six doubles) and the range of the point blocks it owns. The pose is exposed as PclScan.Transform, the bounds as PclScan.Bounds, and the pose is applied to the points of the setup unless ApplyTransform is false.
  • A record that is too short, that holds a value that is not a number or whose bounds are empty is left unread: the setup keeps an unknown pose instead of a wrong one, and the container falls back to one scan with the warning that the points are not assigned to the setups.
  • LgsxSetup carries the translation, the bounds and the point range of the setup.

Files changed

  • src/PclIO/Formats/Leica/LgsxDocument.cs: the setup record is read, the pose and the bounds are exposed and applied, the warning about the unread poses was replaced by one that names the setups whose pose was read.
  • tests/PclIO.Tests/SyntheticFixtures.cs: the synthetic container writes a setup record (assignPointsToSetups), and can write a damaged one (damagedSetupRecord).
  • tests/PclIO.Tests/FormatTests.cs: new tests for the pose, the bounds, the applied and the unapplied pose and for a damaged record.
  • README.md, docs/public-api.md, CHANGELOG.md: the new behaviour.

Tests

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

Limits

  • The record of a setup is expected to hold the translation and the bounds of the setup as doubles, followed by the offset and the length of the range of its point blocks. A container that stores them in another form leaves the pose and the bounds unread; the reader does not guess.
  • The rotation of a setup is not stored in the record, so PclTransform.Rotation stays empty; the library applies scale and translation only.
  • The point count is still found by decoding the data (issue Leica: Find the point count without decoding all data #5).

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