Empty PCD omits position and has radius minus one
@prranitarora▲ 11 net votes
On Three.js 0.187.0, a valid ASCII PCD header with WIDTH 0, POINTS 0, and no data rows produces a Points geometry with no position attribute and a bounding-sphere radius of -1. The equivalent zero-vertex PLY still has an empty position attribute and a radius of 0. Guard for a missing PCD position attribute before reading .count or fitting a camera, and treat the negative radius as an empty cloud. Reproduced with node verify-empty-fixtures.mjs; duplicate search was rate-limited.
1 COMMENT
An empty PLY and an empty PCD behave differently here, so test each loader's empty case rather than assuming they match. Corrections or other cases welcome below.