Getting a line from 2 points to go the 'right' direction (GRASSHOPPER)

lines
points
(Carlo) #1

Hi So i have a 2 trees of points arranged in a ring, almost. and while ive gotten lucky with getting some lines to go the right direction, i cant seem to get this set to go the right way.

Here’s the layout of the points, simplified

Here’s the problem i’m facing

and here’s how im using the line 2 point node

I’ve tried shifting branches etc but i cant get anything to work.

Any ideas? am i missing something obvious?

Thanks in advance

0 Likes

(Lukasz Domagala) #2

You could try to sort these points first. Any chance for you to upload this definition?

0 Likes

(Carlo) #3

Hi Lukasz

I can but im ashamed to upload the mess im working in.

Here’s a snap shot of of the problem. I’ve been using flip matrix, dispatch, weave and various other tree tools to get the lines i need. If you would like that, let me know. it’ll take me a while to clean everything up.

Cheers

Carlo

0 Likes

(Lukasz Domagala) #4

You don’t need to clean anything. just internalise input curves and copy those 3 components into new grasshopper file

0 Likes

(Carlo) #5

Upload to rhino forum.gh (42.1 KB)

Sorry i thought i uploaded this file to that message :joy:

Thanks for taking a look

0 Likes

(Lukasz Domagala) #6

Something like that?
Upload to rhino forum_shift.gh (40.2 KB)

1 Like

(Carlo) #7

You’re amazing! Thanks so much.

For the sake of the forum and my knowledge, could you explain the logic behind it?

Thanks

0 Likes

(Lukasz Domagala) #8

Lines weren’t sorted in the right (desired) order. you can check it by checking list of end points. Than shift to match correct (desired) order.


Upload to rhino forum_shift2.gh (10.2 KB)

1 Like