Can point clouds be merged? Or anything else to make them lighter?

I was able to read your entire pointcloud into my Rhino session; it takes up 42.8 GB of memory which is OK on my machine with 128 GB. It is a little slow to rotate and move but does not crash my session. If you set Skip = 10 at the top of the script, then the peak memory required drops to 22 GB and results in the pointcloud below. Is this cloud complete or are some parts missing? The bounding box for the cloud is quite large, extending 3X higher that what appears below. This is due to a few points up at 59m whereas most points are below 35m. I have include an option, Zlimit, for ignoring points above a Zlimit so that the resulting pointcloud is better centered in the views.

Even with Skip = 10 the memory usage is still quite high because a 16-way parallel read of the data is used for performance. This means all the pointcloud data is held in memory before it is reduced to make the points, colors and normals array by skipping lines while reading. If I make the read serial using 16 blocks, then the read will be slower but the memory footprint will be much lower. Since the parallel read is so fast, under 3 sec, reading the blocks serially will still be quick, maybe around 16 sec.

I introduced a new control, minimize_footprint = True, to read the data serially and found the peak memory usage dropped dramatically to 4 GB, a big improvement. The script still runs quickly, under 25 sec with Skip = 10.

The updated files are posted above: (1) Python script (2) C++ DLL for Windows (will not work on Mac) (3) Listing of C++ code used in DLL (for reference only). Please follow the instructions in that prior post like you did before to run the script. The current settings in the script are to reduce the density by 2X (Skip = 2), minimize the memory footprint by serially reading the data in 16 blocks, include Normals and ignore the outlying points above 40 m. @yvonne


I agree. The pointcloud data structure has an entry for an intensity array, m_V. I will modify my code to include using this array.



Please try the updated script and let me know if it works. Also let me know if you would like additional options.


Hi @Terry_Chappell.
Can’t thank you enough for the work you’ve put into this.
Unfortunately, I keep running into the same problem. I’ve been trying to run it all morning but keep getting a message saying ‘too many values to unpack’ and ‘WARNING: Did not find DLL at C:\Users…\scripts\ReadObjMakeMesh.cpp. A 5X slower all Python version will be used.’
I’m really not sure why is not running correctly. Any idea, could I be inputting something wrong?
Thanks, Yvonne

It is not running because the address of the DLL is incorrect. The backup, all-Python code will not handle your case; only the version with the DLL will work on a Windows machine.

You need to check that the DLL you downloaded really is at the address you put into the top of the Python script. Then it should run. I have had this problem many times and it always turned out to be my error it where I placed the DLL or in my correctly entering the full path to the file. As you know from looking at the original version of my script, the full path to the DLL in my case is:

dll_name = r’C:\Users\Terry\source\repos\ReadObjMakeMesh\x64\Release\ReadObjMakeMesh.dll’

Notice the r just before the string starts with: 'C. This tells Python to use the raw string exactly as typed. Without this you need to enter \\ where ever you have one \ because this is a special escape character. But I hate typing paths with \\ in them. So I always put r just before the path name. This is why your path, which you showed above, is failing. So do these 2 things (1) check DLL is actually at the full path you are using and (2) that the path looks like mine with an r in front of the string. Then I am sure it will work.

Computers can do wonderful work for us but they only work when everything we give them is perfect. Learning how to do it perfectly is a never ending process it seems.


Hi, I d’like to use your incredible script, but how can I install the python module System.Threading? I can’t use it.