31
Python and Java API / Re: easy way to count number of selected points in sparse cloud?
« on: December 07, 2017, 10:48:52 AM »
You can solve it with a list comprehension, like you started on.
or just
It calculates it really quickly on my computer.
Code: [Select]
chunk = doc.chunk
points = chunk.point_cloud.points
nselected = len([p for p in points if p.selected])
or just
Code: [Select]
chunk = doc.chunk
nselected = len([p for p in chunk.point_cloud.points if p.selected])
It calculates it really quickly on my computer.