daavoo / pyntcloud

pyntcloud is a Python library for working with 3D point clouds.
http://pyntcloud.readthedocs.io
MIT License
1.39k stars 221 forks source link

FIX: slow `read_off` method #353

Closed safesintesi closed 7 months ago

safesintesi commented 9 months ago

Had to use this method for a project and it was incredibly slow.

Fixed changing the engine and tweaking the parameters so that no new import is required.

Also fixes:

I tried to modify the least I could.

Problems not solved:

safesintesi commented 9 months ago

Not sure how to act if a file exists and respects the standard but has no points and no shapes. At first I added a check that raises a ValueError, but then I commented it out because returning an empty point cloud might be better. Thinking about it, maybe a loop that loads a bunch of files shouldn't break just because one of them is empty. Thoughts about this?

daavoo commented 9 months ago

Not sure how to act if a file exists and respects the standard but has no points and no shapes. At first I added a check that raises a ValueError, but then I commented it out because returning an empty point cloud might be better. Thinking about it, maybe a loop that loads a bunch of files shouldn't break just because one of them is empty. Thoughts about this?

I think it is ok (and would prefer it) to raise an exception. People could handle exceptions in their loop

safesintesi commented 9 months ago

@daavoo done 🦤

safesintesi commented 8 months ago

Kindly pinging to remind someone about this <3

tflidd commented 7 months ago

Just on the commit f9bbff7cde3c996b70045dcc729d97c1d64c82a4, this works for me :+1: