# Pointcloud into GH

**URL:** <https://discourse.mcneel.com/t/pointcloud-into-gh/6259>\
**Category:** Grasshopper\
**Created:** [February 24, 2014, 2:39pm UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259 "2014-02-24T14:39:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [February 24, 2014, 2:39pm UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/1 "2014-02-24T14:39:13Z")

</div>

I think I must have asked this once before on the GH Forum, but I’ll throw it out here again… Just looking for a “cheap” way to make meshes from largish pointclouds in Rhino via GH… But there is no component that seems able to reference a pointcloud object. Even the GeometryPipeline refuses…

What I found I can do is script a Python component to get ALL the pointclouds in the document, then with an integer I can “scroll” through the list and see which one is activated:

```python
import Rhino
import rhinoscriptsyntax as rs
if objN == None: objN=0
otype=Rhino.DocObjects.ObjectType.PointSet
objs=Rhino.RhinoDoc.ActiveDoc.Objects.FindByObjectType(otype)
pts=rs.PointCloudPoints(objs[objN])

```

But this is kind of a kludge… Shouldn’t there be a pointcloud parameter component to reference pointcloud objects in Rhino?

I also can simply do the whole thing in Python by importing the grasshopper component Delaunay… But still think this should be possible in GH.

Thx,  
–Mitch

---

<div class="post-metadata">

**Author:** ![piac](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/piac/32/769366_2.png) [@piac](https://discourse.mcneel.com/u/piac)\
**Post date:** [February 24, 2014, 6:26pm UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/2 "2014-02-24T18:26:17Z")

</div>

I’m just mentioning @DavidRutten so he sees this conversation.  
Thanks Mitch for the report.

## Giulio

Giulio Piacentino  
for Robert McNeel & Associates  
[giulio@mcneel.com](mailto:giulio@mcneel.com)

---

<div class="post-metadata">

**Author:** ![DavidRutten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/davidrutten/32/755688_2.png) [@DavidRutten](https://discourse.mcneel.com/u/DavidRutten)\
**Post date:** [February 24, 2014, 6:53pm UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/3 "2014-02-24T18:53:58Z")

</div>

PointCloud is a datatype which GH doesn’t know anything about (there are many other types of Rhino object that GH is ignorant of) and as such none of the components can handle it. However you _can_ use the GUID parameter to at least select a point-cloud and then use VB/C#/Python to get the points out (see attached).

[ParsePointCloudData.gh](https://global.discourse-cdn.com/mcneel/uploads/default/original/3X/9/5/95a501b1179ba19569929bac31a5b1d3a7526b35.gh) (3.0 KB)

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [February 25, 2014, 10:52am UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/4 "2014-02-25T10:52:52Z")

</div>

OK, thanks David. I hadn’t thought of grabbing it via GUID.

I had thought this should be simple, that a pointcloud parameter would just reference a pointcloud object and output a list of points… Did forget about the various other attributes it might have like colors, normals, etc. but then again, if you reference a point object via the point parameter, you don’t get colors either…

Cheers, --Mitch

---

<div class="post-metadata">

**Author:** ![DavidRutten](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/davidrutten/32/755688_2.png) [@DavidRutten](https://discourse.mcneel.com/u/DavidRutten)\
**Post date:** [February 25, 2014, 11:52am UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/5 "2014-02-25T11:52:31Z")

</div>

Points themselves don’t have colour though, the attributes of the point may specify a colour, but it’s not part of the geometry. Only meshes and point-clouds (potentially) carry colour data inside the geometry itself.

---

<div class="post-metadata">

**Author:** ![w1228313](https://avatars.discourse-cdn.com/v4/letter/w/d9b06d/32.png) [@w1228313](https://discourse.mcneel.com/u/w1228313)\
**Post date:** [December 29, 2014, 6:31pm UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/6 "2014-12-29T18:31:24Z")

</div>

Hi David,

Following on from this post, I wonder if you may be able to help?

I have a point cloud which has colour attributes, I am trying to export all the points as a CSV file which contains the x,y,z coordinates for each point, and the RGB colour that it has in the point cloud. However, when I explode the point cloud, it loses its attributes.

Do you know of a way I can do this?

Thanks,

Josh

---

<div class="post-metadata">

**Author:** ![Helvetosaur](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/helvetosaur/32/635974_2.png) [@Helvetosaur](https://discourse.mcneel.com/u/Helvetosaur)\
**Post date:** [December 29, 2014, 10:19pm UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/7 "2014-12-29T22:19:17Z")

</div>

Yes, there are several scripts floating around out there that can do this. Below is mine…

–Mitch

[XYZRGBExport2.py](https://sea3.discourse-cdn.com/mcneel/uploads/default/14970/96022cf6c8b17a2e.py) (2.6 KB)

---

<div class="post-metadata">

**Author:** ![tsakalotosl](https://sea3.discourse-cdn.com/mcneel/user_avatar/discourse.mcneel.com/tsakalotosl/32/187313_2.png) [@tsakalotosl](https://discourse.mcneel.com/u/tsakalotosl)\
**Post date:** [November 16, 2019, 11:41am UTC](https://discourse.mcneel.com/t/pointcloud-into-gh/6259/8 "2019-11-16T11:41:45Z")

</div>

Hi David,

I am a fairly new to Grasshopper and was wondering if you could help me out.

I would like to convert a list of points into a point cloud within grasshopper. Currently I have been baking the points and using the rhino command to do so and then applying the point cloud back into grasshopper through the GUID component, which is not suitable for what I am trying to achieve.

Any advice would be greatly appreciated.

Leo
