Pruning branches by content

Afternoon All, appreciate if you have the time to help with the below problem, which I’m sure is rather basic.

I am well and truly stuck with manipulating data in a tree. The tree has three branches, (

. Data to populate the branches is read from a spreadsheet using TT toolbox.

Branch 1, {4}: Points to draw line from

Branch 2, {7}; Points to draw line to

Branch 3, {10}; Type of line (there are 5 types) to draw between the nodes from and to.

Problem: How do I draw lines between the nodes, and be able to distinguish between their line type?

thanks in advance


Internalize and post the data in that panel as a GH file. Explain “Type of line”?

We don’t need or want TT toolbox or the spreadsheet, just the data please. Do you expect people to re-create your example by hand?

Hint: Explode Tree

Apologies, as you can see I am a novice.

Attached is the Grasshopper file. To simplify the problem, I would like to be able to draw lines between “Points to” and “Points from” with Line type 1 or 2 (1 = Column, 2 = Beam). For now, a simple cube is drawn, but the lines simply join the nodes, and there is no way to distinguish between columns and beams.

This way, I can use Tekla plugin to model a building frame later.

STICK (5.6 KB)


how about testing dot product with Z-vector?

Sorry, i reread your post, the structure will be more complicated then cube…

Maybe Member Index is what you are looking for…

Is this what you have in mind? Obviously there is a problem resolving the intersections… (19.0 KB)


This is excellent, and I believe we are so very close. Tekla plugin simply requires lines to be plugged into their components, dont actually need to model any extrusions in Rhino. So simply differentiate between columns and beams with their lines, and then insert lines into the component - any thoughts?

Screenshot to illustrate what I am trying to ask:

Really? As before: Explode Tree

Just a note: You can always sort your set and rename paths so you dont get confused which branch goes where.


Thankyou very much for solving my problem - much appreciated. I’d have never got there on my own