9and3 / Cockroach

A plug-in for Rhino point cloud post-processing and meshing
GNU Lesser General Public License v3.0
66 stars 10 forks source link

"Point values" are not carried over after Box Crop and Compute Normals #1

Open fraguada opened 3 years ago

fraguada commented 3 years ago

Hello! I have been using this plugin to process some LiDAR data I am getting from the ICGC and am glad to have some tools right in GH.

I first open the .laz files in Cloud Compare and export them to .e57. I then import into Rhino and use the Cockroach GH tools to crop, merge, mesh, etc. The lidar data includes intensity values assigned to each point. I can use this, for example, to assign a greyscale color to the point cloud which represents this intensity value.

When I use Box Crop of Cloud Normals components the resulting point cloud no longer has these Point Values. With other components, like Cloud Merge, the Point Values are carried over.

For example, the Box Crop component passes location, normal, and color to the cropped cloud, but not the Point Values: https://github.com/9and3/Cockroach/blob/Cockroach/CockroachGH/Cleaning/CloudBoxCrop.cs#L116

My suggestion is to add these values by using the AddRange overflow which allows the 4th argument: https://developer.rhino3d.com/api/RhinoCommon/html/M_Rhino_Geometry_PointCloud_AddRange_3.htm

9and3 commented 3 years ago

Hello @fraguada , thanks for the feedback and suggestion, we will definitely have a look into that. Indeed, what you are mentioning are most probably the radiance values that are not carried over in some methods. We will add this to the revision list.