Removing Points from a Point Cloud


How long should it take Rhino to remove a bunch of points from a point cloud? I’ve imported a relatively small .xyz file (around 40Mb) and Rhino lets me window select the points to remove without any hesitation, but I’ve been sat here waiting for a few minutes waiting for it to complete the command. Rhino hasn’t crashed. Task Manager is telling me I’m only using around 27% memory.


Hi Matt,

with “remove” do you mean delete or extract ? If you want to delete, you might check out the script posted here.



Hi Clement
I’m using PointCloud>Remove to select the parts of the cloud I’m not interested in (which is typically about 80-90% of each xyz file), followed by Delete.

Once the current command has completed (!), I’ll try the script you linked to. Many thanks.


Hi Matt,

it will probably never complete using _PointCloud > _Remove as this creates the removed point cloud points as point objects in the Rhino document before you’re able to delete them.

The script linked above is meant to define a boundary (surface, polysurface or mesh) and will delete all pointcloud points outside that boundary. It’s relatively fast, a pointcloud with 27Mio pts (no colors or normals) is clipped within 20s on a relatively old system.



You’re right. The larger point cloud I was working on broke Rhino’s back. I had to kill it in Task Manager.

One query: Some of the point clouds I’m working on have more than one object that I want to retain, but lots of garbage in between. Would it be easy to modify the script to allow selection of more than one bounding box, then run the command upon hitting Enter? Either that, allow inversion of selection, so that it culls everything inside the box rather than outside it? I think the former option would be better though.


Hi Matt, that one was easy to add without slowing things down: (3.9 KB)

You may now choose if you want to keep points inside (default) or outside the boundary. Btw. if you’re using the WIP you might try out _SelBrushPoints too.


Point cloud trimming

Thanks Clement. That’s very much appreciated.

One observation: Does this script just hide the clipped points from view in some way, or actually delete them? As I bring the various point clouds together into one Rhino file and use the script to reduce them to relevant information, I notice that the file size is quite a bit larger than I’d expect. It’s not a problem as Rhino seems to be coping incredibly well with what is now quite a big file - I’m just curious.

(Pascal Golay) #8

Hi Matt - file size as saved or current memory usage? If the latter, the Undo stack may be part of it - ClearUndo (careful!) may help.



Hi Matt,

it really deletes the original pointclouds and creates new ones with the points inside or outside the boundary. Btw. you can also trick it to use multiple boundaries for the inclusion / exclusion test, just use closed meshes and join them before selecting the joined mesh as boundary object.



Hi Pascal/Clement

Size on disk. Memory (RAM) usage doesn’t seem to be a problem on my lowly machine at least. I have 16Gb to hand. I don’t like using ClearUndo - have been bitten by that one before!

Clement - using meshes and joining them to create multiple boundaries is a cunning trick. I’d never have thought of that. I’m not ‘mesh minded’ enough…


If you’re willing to use a bit of Grasshopper, the Volvox plugin is terrific for handling and editing large point clouds.