Grasshopper

algorithmic modeling for Rhino

making a (straight) stair within the limits of the staircase formula

Hello world!

I'm trying to make an expression in Grasshopper for a straight stair with focus on the riser, but im stuck. I guess many of you have been wondering the same thing, and there are probably alot of elegant solutions out there, i just can't find any (in my head, nor on the forum)

Some help would be greatly appreaciated :)

What i want to archieve is to use the zero and top point of the stair, to generate a staircase where the riser fits into the staircase formula, eg being 170-180 mm tall.

So: what I need is to make grasshopper compute how many steps i need (whole numbers), without getting any further input than the zero and top height of the stair

im not good at all with programming, but i guess the basic idea is:

if 1 step, will the height interval be correct? (less than 180 mm and more than 170 mm)

if not,

try 2.... and so on, until it finds the correct amount of steps.

(which then will be used to generate the geometry of the stair. but that should be simple enough for me to do)

Views: 858

Attachments:

Replies to This Discussion

Maybe something like this:

It doesn't enforce a valid solution but it warns you when outside it.

Attachments:

"...if 1 step, will the height interval be correct? (less than 180 mm and more than 170 mm)

if not,

try 2.... and so on, until it finds the correct amount of steps...."

I don't get the need for this kind of validation. the way I design stairs (when I have start and end points) is this: Decide the desired riser (eg. 0.175), divide available height with this number and find closest integer. And finaly divide available height with this integer to find the actual riser length.

here is a definition that does just that. (and just informs you of the riser and step sizes)

Attachments:

you're of course right, thanks :)

Hello, 

I know this is a super old thread... but I'll give it a try !

Could you post a screenshot of the def?

Some elements are not loading properly ... I could insert them myself 

Thanx

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service