Hello again!
I wanted to say that your solution works great, so thank you again! However I would add a small recommendation for any who would be interested in cleaning the dense cloud automatically this way. You need to actually make a loop where you first select the points, and then delete them, then go to the next iteration of the loop.
Here's my code:
point_cloud = doc.chunk.point_cloud
for i in doc.chunk.cameras:
log.info('Currently cleaning the point cloud, hang on')
point_cloud.selectMaskedPoints([i])
try:
point_cloud.removeSelectedPoints()
except Exception:
log.error('There was no point selected, moving on')
The "try except" block is there to prevent the code from crashing when, for some reason, no point is selected. I tried in the API to find a way to get a list of the points that are currently selected, but I didn't find it (if anyone can enlighten me on that point, that would be great
). I do think it would be more optimized to make a list of the selected points and add a condition that checks whether the list is empty or not.
Anyway, thanks again,
Dr Popi