Point clouds (.pcd)
A PCD file (Point Cloud Library, ASCII or binary) opens as its header facts and a scatter of up to 5,000 sampled points.
- Page: the file page shows points, width × height, data format, version, viewpoint, bytes per point, the field table (name, type, size, count) and three server-drawn SVG projections (x-y, x-z, y-z). No script, no library. PCD states no unit, so the page says the axes are in the file's own units; the ranges under each panel are those of the sample.
- Sampling: every
ceil(points / 5000)th point; a sampled point with a NaN or infinite coordinate is left out and counted. - Terminal: opening a
.pcdin the workspace (src/tui/screens/workspace.ts,pcdFacts) shows the same facts, sample ranges and field rows as a table;sflips to the source. Same gate as the page. - MCP:
read_fileon a.pcdcarriesabout: { kind: "pcd", points, width, height, data, fields, sampled, bounds?, says }; no new tool. - Gate: the name and a
VERSIONline must both say PCD, and the file must be at most 5 MB; past that, or when it does not parse (no x, y, z, a short body, a lying count,binary_compressed), the page keeps the source view with one line saying why. - Hostile input: header at most 16 KB and 64 fields; a binary body is checked as
points × stride ≤ bytesbefore any read; an ASCII body is walked once, bounded by its bytes; every name is escaped. - Left out:
binary_compressed(LZF), colour, normals, rotating the cloud, exact bounds over all points. - Fixtures:
test/fixtures/cloud.pcd(ASCII) andcloud-compressed.pcd(binary_compressed, which keeps the source view). - Code:
src/web/render/pcd.ts, stylespcd-css.ts, kindpcdinkinds.ts; testtest/pcd-render.test.ts.