Grasshopper

algorithmic modeling for Rhino

Assign numeric values to A,B,C, etc. and then create a pattern

Hello GH community,

I feel like a moron asking this question as I have been using grasshopper off and on for a few years now.  It may just be lack of sleep and the gears not turning, but this seems very easy to figure out and I just can't get it.

I have 5 different lengths that I want to displace over one longer curve multiple times.  I want to assign each length to a letter (EX 1=A, 1.3=B, 2=C, 2.5=D, 2.7=E) and then create my own pattern (EX C,E,B,C,E,A,etc.).  I would like to use the points inbetween the each of the distances to then offset a certain length and create a curve between the two so that I can make my own irregular ribbon pattern.

This only the beginning of what I want to do, eventually I would like to look similar to the picture attached with the diagonal lines inbetween the ribbon lines.

Any help is appreciated... Many thanks

Views: 993

Replies to This Discussion

Hi Jason,

about the assigning to A, B, C, etc., do you mean something like this?

Best,

Martin.

Is the attached any help?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Attachments:

It seems to me it took a lot of components to achieve what I just did. I added three new ones that reduce the file I posted to this:

  • Chars: convert a string into a list of chars. I.e. "ABCABC" -> "A", "B", "C", "A", "B", "C"
  • Lookup Key: Matches the data in S to the list of K and when a match is found the value at the same index in V is returned.
  • Consecutive Domains: Create a list of domains from a list of numbers. I.e. {0, 0.5, 2.0, 3.5} -> {(0 to 0.5), (0.5 to 2.5), (2.5 to 6.0)}. If A=False then the result would be {(0 to 0.5), (0.5 to 2.0), (2.0 to 3.5)}

Hopefully they can be used in many a file to simplify things. (Also note my original file could have been simplified already with the use of [Cull Index].)

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Nice! :)

Thank you some of this has been helpful so far... but I can't find all three of the buttons you labeled.  I'm using v. 8.0061.  Are these from another grasshopper plug-in?

The image I posted shows the 3 new components I only just wrote. They won't be available to anyone else until the next version goes out (0.8.0064). I'm trying hard to get it out the door asap but some bits are in tatters and I need to finish rewriting them before I can release.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Oh, I see... Wow, did you write them because of my problem or because these have been reoccurring issues that people have been having? Either way it's good to know that this process will become a little easier.

Thanks,

Jason

Hi Jason, for the Consecutive Domains I made a UO a while ago (I needed it pretty often) you can use until GH0.8.0064 is released. Great to see its going to be superfluous soon, thanks in advance David :)

Attachments:

Sweet!! Thanks alot!

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service