Repository navigation
Conversation
The reader took the blocks of the leaves of a scan for point records of one fixed size and rejected a file whose blocks did not fit that size. A table in the header names the sections of the file: a leaves section with one record per leaf of the octree, and a points section with one block per leaf that holds the index words of the leaf followed by its 16-byte records. - A position is three 18-bit fields on a 1 mm grid, counted from the cube of the leaf. Intensity, colour and a packed normal follow the flags of the header, and a point has a normal only when its record states a plain cell code. - The sections are taken from the table whatever their order, and the file is checked as a whole before the first point is returned. - PointCount is the number of points the file stores. The count stated in the header is not that number and stays as DeclaredPointCount.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes and why
The ReCap scan reader (
.rcs) could not decode real files: it took the blocks of the leaves of a scan for point records of one fixed size, and rejected every file whose blocks did not fit. This change decodes the points of container major version 3 from the sections that the table in the header names.InvalidDataException, and nothing is returned. Before, the records were checked one at a time while the points were streamed.RcsScan.PointCountis the number of points the file stores, which a full read returns. The count stated in the header is not that number; it stays available asRcsScanDocument.DeclaredPointCount.No public signature changes.
PointCount,TotalPointCountandHasColors,HasIntensities,HasNormalsof a ReCap scan now report the stored points and the flags of the header; the README, the API documentation and the changelog say so.How it was checked
dotnet build PclIO.slnx -c Releasehas no warnings, anddotnet format PclIO.slnx --verify-no-changesreports nothing.dotnet testpasses onnet8.0andnet10.0. On the machine the branch was made on, one test ofRepositoryHygieneTestsalso fails: its history check sees a local notes ref of a tool on that machine, which is not part of the repository and not on the remote.infoandscansof the command line are identical on the private files tried (the LAS files compared by SHA-256). For ReCap scans and ReCap projects the export failed with "node payload does not match a known point record layout" and now writes the points; that is the intended difference..rcsfile of the local corpus, which comes from several scanners and from one converted mesh, was read to its end. Each read returned exactlyPointCountpoints, no point lies outside the bounds of its header, and the channels of every point follow the flags of its header. Records sampled from every file match an independent decoder of the same layout bit for bit in their positions. The normal codes were checked against the geometry of the scans: points on the floor face up, and the stored normals agree with the surfaces their neighbours form, where a mapping with two cell axes exchanged does not.