Grasshopper

algorithmic modeling for Rhino

Hello,

I have a mesh grid that I have extracted the center point. My question, how do I form a new grid with these center points?

I've attached the GH definition for the above.

Tim

Views: 2384

Attachments:

Replies to This Discussion

If you have Weaverbird (and you should have it) you can use the dual graph algorithm (wbDual). But if you want to do it from scratch, you can use SandBox to know the faces connected to the not naked vertices.

Thanks Daniel, wbDual works, though it requires the initial quads to find the dual, and not just the points. I will look into the SandBox thing!

If you have a grid of points, you can have a mesh using [Mesh From Points] component. If you want to work with topology, using meshes will make things easier.

another solution could be the following

best

alex

Well, that's very interesting - I know nothing about meshes.  But your result doesn't match the list of square Polyline Curves in his "What I want to get" example.

GH code would have been nice, even for an example this simple.

Thanks alex, I realized my sample def does contain only a rectilinear grid. Delaunay would actually triangulate any other grid, no?

Here's something that works for different rectangular surfaces.

The yellow group discovers the U/V "dimensions" of the mesh (I have no clue what determines them?), which are then used (-1) as inputs for 'Divide' domain, which goes to 'SubSrf (Isotrim)'.  The edges of the sub-surfaces are joined to create the polyline curve for each grid square.

The sequence of the list of resulting Polyline Curves is top-to-bottom, then left-to-right, while the sequence of your "What I want to get" list is left-to-right, then top-to-bottom...

Attachments:

Hey, this works pretty well - and thanks to some sorting of center points, the list of resulting Polyline Curves is in the same sequence as your "What I want to get" list: left-to-right, then top-to-bottom.

re-posted to hide point sorting

Attachments:

Thanks Joseph, your def works fantastically for flat surfaces.

Though, I've attached an updated definition, adding two non-flat surfaces to it. One is a hypar, the other is a hemisphere. With the hemisphere, there's the additional question of how to connect the triangles at the apex.

Attachments:

Hi.

Let me try mine. As Daniel already mentioned above, Weaverbird's dual graph is definitely the simplest way.

And to me, this will fit well into "Relative Item" case.

Check attached. Best.

Attachments:

Nice one, M. Kim. Elegant use of tree partition, path manipulation and tree relative item components

Thanks for the algorithm Kim! Works fantastically.

But of course I have more questions!

In the case that the initial mesh is not a square with equal number of U and V, how do you partition it differently? For example, with the dome, you manually supplied 18 as the number, but if you are given a mesh, how would you automatically find the "dual".

Thanks! Tim

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service