Grasshopper

algorithmic modeling for Rhino

I have two point clouds and I would like to have the second point cloud replace a portion of the first point cloud. Basically the first point cloud is a mesh created from Rhino terrain and we are extracting the points using meshray to pull the intersecting points from a grid.

The second point cloud is a subset of this that has been altered. This subset is defined by a smaller grid and the points are added to the larger surfaces z values to create a new surface that is the composite of the two.

With these two point clouds I would like to create a new point cloud based off the first point cloud with the second subset of points replacing the points on the first point cloud.

I assume I could do this by creating a list of the x,y,z values of the first point cloud, then cull out the values that are identical x,y (different z) in subset and replace them with the second point cloud values. Basically the area to be replaced by the second point cloud shares the same x,y values but different z values.

This new point cloud would be used to create the new composite surface.

My assumption is that it isn't that difficult with lists but I am unsure where to start.

Views: 2718

Replies to This Discussion

That should work:

List_Replace (P1, P2, (Closest_Point(P2,P1).i, False)

with P1 and P2 the projections of first and second point cloud on XY.

Thank you for the quick reply. I have a screenshot attached of a simplified version. You can see that I have two point grids, the top one is the initial and the bottom is the one I am trying to combine to make the new composite. I was attempting to do this with a list replace but I am not sorting it correctly. 

Attachments:

This should work better with your structured data.

Attachments:

that helped so much, thank you.

Hi Brad,

I am always intrigued with the many ways GH solves problems.  So, why not another.

Attachments:

very nice, thanks Robin.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service