Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
alchi86 opened this issue Feb 7, 2025 · 2 comments

Comments

@alchi86
Copy link

alchi86 commented Feb 7, 2025

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 alchi86 changed the title ply files containing point cloud only are correctly loaded using load and not load_mesh since version >=4.6.0 ply files, containing point cloud only, are correctly loaded using load and not load_mesh since version >=4.6.0 Feb 7, 2025
@mikedh
Copy link
Owner

mikedh commented Feb 13, 2025

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.

@alchi86
Copy link
Author

alchi86 commented Feb 14, 2025

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants