Is there any way to convert a Point cloud in rhino to list of points in Grasshopper?
I figured it out. Use Explode and then select your point cloud, then it can be used as a data source for Points in Grasshopper.
I wrote this a month ago using Python to take a Rhino Point Cloud and return lists of points and colors.
Here is the Python:
import Rhino import rhinoscriptsyntax as rs mport scriptcontext as sc sc.doc = Rhino.RhinoDoc.ActiveDoc cloud = sc.doc.Objects.Find(PtCloud) rs.EnableRedraw(False) cloud_points = rs.PointCloudPoints(cloud) cloud_colors = rs.PointCloudPointColors(cloud) print len(cloud_points) pts = cloud_points colors = cloud_colors
Rhino 8 WIP has a point cloud data type so you should be able reference in a point cloud from your Rhino model and work from there. If you need additional features, please let us know.
I see the Point Cloud container component, and I am able to reference a Rhino Pointcloud to it. But what can I do with it after? I would like to cross section, for example.
Hi Pedro. Can you explain what you mean by taking a cross-section of a point cloud? You’re correct that currently there’s not a whole lot that you can do with the point clouds in Grasshopper… However, one thing you can do is to feed them into the ShrinkWrap component and return a valid mesh.
I imagine a cross-section of a point cloud to be a thin planar box, gimbaled by azimuth / altitude controls, infinite in relative X and Y with a Z ‘Tolerance’ (height or thickness) control that determines how many points of the cloud will be found inside the thin box.
This is what I mean: PointCloudSection | Rhino 3-D modeling
I see. Thank you for the clarification. I have added it as a feature request and made a YouTrack issue for this. Thanks!
Sorry for being nosy! I noticed this and I think it’s great, thank you! It takes less time to reference a cloud from rhino with the ‘new’ component in grasshopper - l mean less time than via the python method, or the .E57 plugin (speaking for myself/my case). However, that’s just for referencing the cloud…similar to what @Pedro_Varela mentions, I cannot find other cloud point options within grasshopper other than referencing the cloud from Rhino. In my case I’m importing a .PLY with grayscale colors. Are more options coming to the pointcloud referencing within gh for R8 to facilitate ‘DeCloud’ stuff? What I mean is obtaining attributes such as color information per point given the cloud is already getting displayed with color/brightness levels. I know I can use a .PLY mesh instead and deconstruct that mesh to get the color, however we’re dealing with a workflow involving many pointclouds coming in one at a time and not all of them can get meshed quickly or automatically.The python method from @Joseph_Oster has been saving us lately!
Thanks for your attention!
we’re using lidar data to turn them into wall patterns - the styles or sizing of these patterns come from the brightness or color levels in the point clouds - this is for historic preservation/restoration purposes: ‘bringing back’ previously-existing (and 3D-scanned) walls that are no longer existent.
Yes, we do plan to add more components to help deal with Point Clouds… and part of the new “Data Types” project we’ve been working on for Grasshopper will included getting access to the attributes to these new data types (like point clouds). So this is on our road map… but thank you for bringing this to our attention.
@Pedro_Varela @corellaman I just wanted to let you know that the latest Rhino 8 WIP now has several new Point Cloud components. Some of them are located under the Vector → Point category, while the Point Cloud Section/Contour components are found under Intersect → Mathematical.
That is great! I am eager to try it! (asaiht)
I should note that there are “extra” parameters that can be set on the Section and/or Contour components. Right-click on the component and select “Show All Parameters” to expose these extra values (in case you need them).