Grasshopper

algorithmic modeling for Rhino

Hello,
Does anyone know of a way to sort through a dense list of curves. I'm trying to take the intersections of a grid of curves, explode them by their intersections and then evaluate the segments about their midpoints and then draw a line between the midpoints. However, the order that Grasshopper draws the line is not working. Is there a way to re-shuffle/ sort the starting curves? I guess this is a question about sorting information properly. Any ideas?

Views: 2639

Replies to This Discussion

have you tried sorting via the Sort (list) component. Depending on how you want to organize them, the sort keys will re-shuffle your corresponding curve list.

Hi Dirk,
Thanks so much for your reply. I've attached a screen shot. It shows how I am wanting to weave the points to draw closed polylines. Do you think this will be possible?

Thanks!
Attachments:
I don't understand why you need to intersect a grid of lines. Is it possible that you can use a scaffold (an underlying surface) to generate a point grid and then use a script (similar to this) or component assembly to organize the point grid?

Hi Dirk,
I just opened up the file, and it appears that it is making a 4-point grid. Would I be able to use this script using a 2-dimensional u/v interval component (composed through the graph mapper), instead of u/v numbers?
No, the file is definately a 3 point grid system. You can use the same technique to feed graph mapper list data into (below is a reductive pattern).


Just replace the i/j (as double) to integers and call surface uv co-ordinates from this:

Dim pathA As New EH_Path(pathNum)
dTree.Add(nSrf.PointAt(uVar(i), vVar(j)), pathA)
dTree.Add(nSrf.PointAt(uVar(i), vVar(j + 1)), pathA)
dTree.Add(nSrf.PointAt(uVar(i + 1), vVar(j)), pathA)

From here you should understand the pattern of collecting points with the i and j (with additional i+1) pulling the neighbour list entities. Also have a look at Luis' hexgrid component for alternative list organizations - this will give you an idea of where to start with your geometry.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service