Lines from 2 point sets

hey guys,

grasshopper noob here. i need to create a lot of lines from 2 point sets and then measure them.

unfortunatly the line component connects all my points, which leads to thousand of lines, and not just the wanted pairs.

i remember, about 10 years ago, we used the cull component to control that, but i have no clue which pattern i have to use here.

could you guys pls help me out?

This is usually related to the datatree structure of your input, and the usual solution is to use a combination of grafting/flattening + merging operations, but to give you a precise indication we would need to see the actual file

Well … without data here’s a naive answer: graft your Lists and cross fingers

hey, thx, here is an example file including the gh-definition.

at first i tried to create lines from the division points of the bottom curve and the intersection points of the top curve and measure them.

then i tried to measure just the distance between the points.

line-measure.3dm (46.4 KB) (6.4 KB)

That’s elementary my Dear Watson (10 years eh? ).

Since the Ccx thingy outputs a Tree


The Line/Dist/Tag things shoud somehow follow (Graft, that is: resulting 1:1 pt A, ptB for doing the lines or computing distances, placing Tags etc etc).

Tip: spend some time on DataTrees (kinda a Dictionary of Lists). 99.99999% of the issues that people have are because they think that understand what a DT is.

NOTE: a DT is NOT a List of List of …

1 Like

hey Pfotiad0, yeah, must be 10 years or longer. :wink:

thank you, i know there is this wonderful primer from David, but usually I model everything per hand (really).
I should definitly give it a try.

works like a charme! =P

You are a wise man. Stay away from computers (I hate’m) and be a happy bunny.

But IF you want to walk the walk … here’s the controvercy of the day: it’s by far easier to handle DT’s (and anything else) via code than using components. But is it easy to learn coding? That’s the 1M question, he he.


haha, no, i meant without code or grasshopper, drawing with mouse and hand.

i never will learn coding, maybe using grasshopper a little bit better, because its so super handy. i saw a guy doing some impressing stuff in f#, this is not my world. i am a shaper, designer, curvy thingy making guy, no numbers, just colors and form.

have fun,