Grasshopper

algorithmic modeling for Rhino

Hello all I am trying to write a definition that preserves the structure of a space frame as a enlarge its length. Obviously, I can't perfectly preserve the original structure because its a function of a division of the length, but I want to get relatively close.

The best idea I have come up to do this is to do some sort of If, Then, Until command.

If the length of one cell in the space frame exceeds a number, Then increase the V divide of the surface until each cell is back under the set number.

I attached the relative part of my definition (although its obviously not close to being done.) Any help/or other ways of doing this would be much appreciated!!

Thanks!!

Views: 381

Attachments:

Replies to This Discussion

I will try to explain it differently. I have a created a space frame using the divide domain/extract iso curve function. In this image, the space-frame is divide into 13 sections (triangles), V=13. If I was to increase the length, instead of adding sections, it would simply stretch the existing 13 sections.

What I want to do is make it so as I increase the length, instead of increasing stretching the existing sections, it adds another one (relative to a preset maximum), so it stretches until the maximum, and then adds another section.

Is a If, Then, Until, the best way to do this? Thanks!

Hello,

what you are suggesting would require using a loop plugin (GH doesn't allow loops by default).

Instead you could do the following (using the divide line example for simplicity):

provide the desired segment length and then divide the line's length by this number and find the closest integer. This integer will be the number of segments you want!

Attachments:

Hey Nikos,

Thanks! That looks a very elegant solution! I assume t would connect to the V in Divide Domain. I am going to try this first thing when I get into work tomorrow! One question, what do you have Int set as?

Hello Ol,

there is no [DivideDomain] in this definition. The DivideCurve component [Divide] does the job.

The rest of the definition is just used to get the length of the segments in order to display it in the bottom-left panel (just so that you can see the actual length VS desired length). That's why I have left it out of the screen capture.

The [Int] container is not set to something. It just takes the output (float number) of the divination and converts it to the closest integer.

hope this makes sense,

nikos

Yes I get it! By some miracle of math, if you divide an initial number by x and get y, then divide the initial number by y, you get x! The integer component makes sure you divide the curve by a integer, not a decimal. Fantastic!!!

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service