Grasshopper

algorithmic modeling for Rhino

I have a question regarding these confusing trees. Any insight would be incredibly appreciated.

I have a series of lines intersecting with a bunch of breps - and im trying to select all the points which intersect with each of the lines separately - ie all the intersection from line 1, line 2, - so that i can reconnect them once again.

any ideas? ive been playing with the tree branch/ item component but i cant figure it out. in addition i looked at the design -analyze tutorial but that didnt help me.

Views: 285

Replies to This Discussion

The resulting list is allready divided into branches, each corresponding to the input curves. So all the points that intersect with each line are grouped together. What do you mean with 'reconnect them once again'?
hey Vincent thanks a bunch for the reply.

i uploaded the file. basically i want to make a curve that would go through all the points that are the result of the intersection of the one line and the series of breps.

thanks a lot for all the help - i really appreciate it
Attachments:
The .3dm file seems to be corrupt. Nevertheless, try setting the intersect component as cross-reference. The graft component is not necesary.
Im sorry I miss spelled your name =).
i think its because its an sr6 file. I tried the cross reference however it still doesnt produce one uninterepted line reconnecting all of the intersections that happened with each line. (if that makes any sense)
Attachments:
> i think its because its an sr6 file.
I just realized i don't even have sr2 installed. Today i installed windows 7 x64 and i'm trying V5 beta 64 bits.

Sorry, i'm a bit slow today. To achieve what you want you need to flatten the tree one step down, there are no components for achieving this easily, so the quickest way would be to script the intersection (i think). Copy this to a vb.net component:


Dim tol As Double = doc.AbsoluteTolerance
Dim pts As New List(Of On3dPoint)
For i As Integer = 0 To x.count - 1
Dim curves As New list(Of OnCurve)
Dim pt As New on3dpointarray
rhutil.RhinoCurveBrepIntersect(y, x(i), tol, curves.toarray, pt)
For j As Integer = 0 To pt.Count - 1
pts.Add(pt(j))
Next
Next
a = pts


Connect the breps to the x input and the curves to the y input. Set only the x input as 'list'. Connect the interpolate curve component directly to the A output. The brep list order is important.
thanks a bunch Vincente! This is fantastic!

how is the new windows and rhino 5 working out for you!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service