Grasshopper

algorithmic modeling for Rhino

Hi guys!

My problem may appear very easy to solve, but i still didn't find a way:

I've a branch of flatten data like that:

{0}

0 Poly Curve

1 Poly Curve

2 Poly Curve

3 Poly Curve

4 Poly Curve

5 Poly Curve

6 Poly Curve

7 Poly Curve ... etc

I need to loft half of them as a pattern like 2 by 2... ex:

0 with 1 ---> loft

1 with 2 ---> no loft

2 with 3 ---> loft

3 with 4 ---> loft 

4 w.... etc.

In my case (as you can see in the screenshot) i've two list in whic i've to apply this process.

I can't use list items because the numbers of items may change, and if i get a grafted list of items i can't loft the curves, but if i get the flattened pattern of data the loft component loft everything without considering the sequence.

I guess i've been clear to explain my data structure problem! 

Pls! I'm waiting for some help!!! Thx a lot in advance,

Marco 

Views: 2810

Attachments:

Replies to This Discussion

* errata corrige: 2 with 3 ---> No loft

Ups... 3 with 4 eheh ....so one yes one no
List items should work. Just plug in a series component to select just the ones you want. E.g. Start number 0, step size 2, number of values in the series = the list length of the list of curves.

So two series, two list items, two grafts and a loft.

Thx Brian, but mmmh... no I've tried in that way but doesn't work, because what i need is to create a sort of group of items each couple {0} 0;1 {1} 2;3 {3} 4;5 etc... each 2 list items have to became a new branch... how can i do that? :(

What Brian is suggesting will work, you simply have to graft the output of the series components. 

Oh and don't worry about the red loft... there are some nulls in there because I set the series to go way higher than necessary.

Uh yes! It works perfectly, sorry but I didn't get what Brian suggested to me exactly! Sorry, i've missed the second part with the injection of the new merged index into another item list component! So thank you Brain and thank you Andrew for your help! :)

My shot at it without the series.

Attachments:

Hi Hannes! That's very nice! But where I can find a dictionary for the possible lexical operations??? ^^ Thank you!

Hi Hannes, hi guys!
what if the output was 01 12 23 34 instead of 01 23 34 ecc...? 

is there a specific lexical operation that allows to do so in one shot? 

thanx in advance

marco

i arranged it this way

You can graft and use the relative item like this:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service