Grasshopper

algorithmic modeling for Rhino

Hi Guys. I have a list of plots, numbered from 0-108 as shown. If I add any new lines to create new plots, I want the new plots to start from 109 and not interrupt all numbers after the location it was added to (see image). Is there a list/sequence component that would allow me to do this? Thanks for the help!

Views: 1133

Attachments:

Replies to This Discussion

Yes, it is possible. Basically you set the new lines, check which existing plot is closest, get those IDs, remove the corresponding points and insert them at the end.

Have fun! :)

ps: I havent tested it very much and I can see a lot of ways it could break or still end up shifting the numbers. But its a starting point.. ;)

Attachments:

Armin, thanks so much! Quite a creative solution. Greatly appreciated, and thanks for the learning experience too. 

Hi Armin (and all), 

I've been playing around with the setup you provided me, and got stuck on a point which I'm wondering if you or anyone can help me with. Basically I want to assign different things to each plot based on the plot numbers. In this example I'm just using boundary colors, but it could be geometry, etc. As you can see the correct plots are colored up until I reach an area where a new plot was added, at which point they begin to be shifted by the number of plots that were added before them. I just want my plot colors to correspond to the correct plots.

I see the reason is that I'm linking the item lists with the original polylines and not the post-inserted lines. But I can't seem to find a way around this. Is there anything I'm missing? 

I'd be adding new plots on an ongoing basis, so I want to find a way that works other than manually counting the number of plots to shift each colored plot by. 

Thanks to Armin or anyone who could help out with this. 

Attachments:

I wont be back in front of GH until Monday, but I am very certain this can be done. After all the power of GH lies in being able to shuffle data around any way you like ;)

Yes, I'm certain as well. Frustrating knowing the answer is close by but unable to find it. Thanks Armin, and anyone else who has an idea feel free to chime in, it's well appreciated. 

Alright, that was very easy.

The "problem" was that you are using the curves from the initial offset component. But later on we reshuffle the points for propper numbering. So all you have to do is shuffle the curves in the same way so they still correspond. This is a very common thing in GH. If you rearrange some data, you might need to rearrange other data in the same way. Operations that work on lists or sets work the same for any kind of data (points, numbers, curves, geometry, etc.) so you can literally just copy the components that do the rearranging and rewire them (to do that very quickly highlight the components, click and drag, then press ALT once and you will have a copy with the wires still attached, then reattach the appropriate wires - in this case just 2 of them).

The longer you work with GH, this will become second nature.

Attachments:

Hi Armin, 

Thank you very much, this helped a lot. I have a much larger file with a complex set of plot types that was basically unmanageable before this fix. Thanks for the clear explanation and example file too!

Hope in the future that I'll be able to help newcomers with Grasshopper as you're doing now~

You're welcome. I have been using Grasshopper for about a year now, but have the luxury of working with it almost every day and getting to experiment a lot. 

Also I can really recommend doing an advanced workshop. I went to one in Paris (http://www.co-de-it.com/wordpress/informed-matter-gh-ws-paris.html) last year and it helped tremendously. I was still really new to GH but just seeing whats possible and the small tips and tricks or even how to start with some things was really helpful.

There are a few good books, like AAD - Algorithm Aided Design by Arturo Tedeshi or The new mathematics of architecture by Jane & Mark Burry, which are great references.

For some very good video tutorials, which are totally worth their price, check out these: http://grasshopper.rese-arch.org/

Happy grasshopping!

Hi again, 

(images attached)-This system has worked well to keep the plot index integrity after making initial changes to plots. However I've encountered a problem (probably an error on my part) where if I make *another* set of changes and try to add those curves, the plot numbering integrity breaks down. I'm not sure what is going wrong. I've illustrated where the problem lay in the attached files. Appreciate any help that can be offered!

Attachments:

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service