trimesh icon indicating copy to clipboard operation
trimesh copied to clipboard

ply files, containing point cloud only, are correctly loaded using load and not load_mesh since version >=4.6.0

Open alchi86 opened this issue 10 months ago • 2 comments

When trying to load a ply file containing point cloud only load_mesh is returning <trimesh.Trimesh(vertices.shape=(0, 3), faces.shape=(0, 3))>.

Using the deprecated load I obtain <trimesh.PointCloud(vertices.shape=(3712, 3))>

python3.12, numpy==2.2.2

test_2.zip

alchi86 avatar Feb 07 '25 08:02 alchi86

Hey, yeah since load_mesh -> Trimesh is now typed it only returns a trimesh, and will fail unit tests if it returns any other type. load is fine to keep using as there are no plans to remove it, or for new work you could use trimesh.load_scene and then checking what types of geometry the file contained.

mikedh avatar Feb 13 '25 21:02 mikedh

Thank you for looking into that, have a great weekend!

alchi86 avatar Feb 14 '25 08:02 alchi86