Pointcloud - Select Points inside closed polysurface

Hi all,

I would like to find the clashes between a closed polysurface and a given point cloud.
The procedure that i follow gives not the desired result and i think it is because of a bug.
Below i describe the procedure that i m following; your opinion is highly appreciated
Starting point:

  • 1 Pointcloud and 1 closed polysurface

I use the Pointcloud command and i select the remove option.
I then type the selvolumeobject and i select my closed polysurface object.
I expect that the selection will be all points that are in the enclosed volume of that polysurface
However the result is shown in the attached screenshot.

Can you please advise?

Hello - for now, here is a script that will extract points contained by the breps to a new point cloud.

pcBrepClash.py (1.9 KB)

(works on meshes as well)

To use the Python script use RunPythonScript, or a macro:

_-RunPythonScript "Full path to py file inside double-quotes"

Testing on a 47 million point pc and… not good enough.


1 Like

As a pointcloud is one object, I don’t think SelVolumeObject will select only part of it. Below is a script that will clip a point cloud with a closed brep or mesh volume. It is not parallel processed, so it might be slow with huge point clouds. FWIW…

Edit: added closed mesh volume selection as well.
Edit 2: added color support
Edit 3: fixed bug - extrusions weren’t working

ClipPointCloudWVolume.py (2.4 KB)

1 Like

Hi Pascal,

Thanks alot for the script!
I just tested with a point cloud of 35M points and works very well.
The only thing that it does is that the color of the parent point cloud is being discarded after.
But this i can easily solve with just having a copy of the point cloud.
Thanks again!!

I think I can fix that, hang on bit. OK, I uploaded a new version above. Should preserve point cloud colors if present.


Hi Helvetosaur,

Any luck with maintaining the colour of the pointcloud??
Any hint so that i can experiment by myself is very welcome!
Thanks in advance

Re-download the script in post #3 above, I added that…

1 Like

It works like a charm!!
Thanks alot!!