Repository navigation
3D preview of E57 point clouds (#373) - #453
Merged
Merged
Conversation
Format sections of ASTM E2807 and the libE57 notes the preview needs, and why an own bounded reader instead of the e57 crate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Own bounded reader src/mesh/e57.rs in the isolated preview process: the CRC-32C of every 1 KiB page is checked first (a damaged file is refused with the page named), the XML section is parsed with size, element and depth limits, every data3D scan is read (cartesian or spherical, float or scaled integer), moved by its pose and converted from metres to mm; colours scaled by colorLimits, otherwise the intensity as a colour-mapped field; invalid points, images and unknown fields are left out. Points are thinned evenly over all scans with the same budget as LAS and PTS. Thinned point clouds now carry the point count of the file (TCMESH01 flag 8, between the fields and the face count) and the viewer says so; LAS, PTS/XYZ and point-only OFF set it too. PTS files whose point count was underestimated no longer fail with "not thinned out". PreviewFormat::E57, fuzz target e57 (re-seals the page checksums so the fuzzer reaches the parser) with a seed, corpus entry, docs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- PTS/XYZ: thin evenly over the whole file when the row estimate was too low (drop every second kept point and double the stride at the budget), with a test - unit test that reads the committed fuzz seed (3 points, 0.1 m pose) - research page: source of every format finding (ASTM text not available) - formats.md, configuration.md: E57 shares the mesh size cap; raise it and the preview memory limit for real scans Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sebagrei
marked this pull request as ready for review
November 22, 2026 20:51
…-cloud-preview # Conflicts: # CHANGELOG.md # desktop/README.md # docs/src/SUMMARY.md # docs/src/dev/threat-model.md # docs/src/research/index.md
Sebagrei
added a commit
that referenced
this pull request
Nov 22, 2026
) Resolving the conflicts of #440–#453 left duplicate *Changed*/*Fixed* sections under [Unreleased] in CHANGELOG.md, a half-merged #408 paragraph in docs/OPEN_WORK.md (now one paragraph: done #415, #416, #418, #419, #420, #407, #422, #423; left #424 and the named follow-ups) and two *Revisions* rows in docs/src/reference/api.md. Text only, nothing dropped (checked: same non-heading lines before and after in CHANGELOG). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: fork <fork@foo.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
E57 point clouds (
.e57, ASTM E2807) now get a 3D preview. The parser was written for this project, and it runs in the isolated preview child.Closes #373
What changed
docs/src/research/e57-preview.md, own commit): the ASTM E2807 sections the preview uses (header, 1 KiB pages with CRC-32C, the XML tree, compressed-vector packets, the bit-pack codec, pose, colour and intensity limits, invalid states) and the libE57 format notes. It also explains why we wrote our own bounded reader and did not use thee57crate. No new dependency.src/mesh/e57.rs:data3Dscan is read, in cartesian or spherical coordinates, as floats or scaled integers;colorLimits. A scan without colours keeps its intensity as a colour-mapped field;images2Dand unknown fields are left out;stride_within, which shares its budget withstride_for)."e57"was added inmesh::read, plusPreviewFormat::E57(a point cloud). Because of that,cadformatnow reports a preview for e57.Mesh::thinnedholds the number of points in the file;TCMESH01it is flag 8: a u64 placed between the field section and the face count, so older viewers are not affected;thin_out) set it too.fuzz/fuzz_targets/e57.rs, also added to thefuzz.ymlmatrix and tofuzz_harness::TARGETS;fuzz/seeds/e57/three-points.e57, generated by a small writer script;tests/parser_corpus.rsentry.MESH_FORMATSnow includese57.reference/formats.md(new section E57 in the 3D preview),guide/files.md,guide/desktop.md,desktop/README.md;dev/fuzzing.md,dev/threat-model.md,reference/architecture.md;How it was tested
Not compiled or tested locally. Builds are not allowed on this machine, so CI is the check. Only
cargo fmt --allwas run.Tests added (synthetic files from a minimal E57 writer in the test module):
colorLimits;stride_within;PreviewFormatandcadformatmappings.Not covered:
tests/fixtures. The libE57 samples do not have a clear redistribution licence. This is listed as open in OPEN_WORK.node --check(no Node.js on this machine).Checklist
knowledge), or openly licensed material under a compatible licence
that is credited. It contains no code decompiled, disassembled or
rewritten from proprietary software and no leaked code
(CONTRIBUTING.md).
docs/src/research/namesthe sample files and specifications each finding came from.
CHANGELOG.md,README.md,docs/src/**,docs/OPEN_WORK.mdwhere it applies).cargo fmt --all --check,cargo clippy --all-targets -- -D warningsand
cargo testpass locally, or CI runs them. (Only fmt was run locally. CI runs clippy and the tests.)🤖 Generated with Claude Code