There’s this script that makes it easier to make stairs, the problem is that it is a rhinocommon script (.rvb) and Rhino on OSX to my knowledge/experience just allows for running python scripts.
Working on windows (because it’s a .rvb), however I work on Mac OS as well and would like to use this script.riserMaker.rvb (2.4 KB)
''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''
''
'' http://ofthiswearesure.com/rhino
''
'' (c) bryan boyer 2008, of this we are sure
'' this script comes with no guarantee and
'' barely any help. be smart, save you work,
'' sleep regularly, tip your waiter, and
'' clean up your own mess.
''
'' risermaker makes basic risers on a sloped surface!
'' define the two edges of the sloped surface and a
'' height for the riser and watch in awe!
''
''''''''''''''''''''''''''''''''''''''''''''''''''
''''''''''''''''''''''''''''''''''''''''''''''''''
Option Explicit
Dim edge1, edge2, riserHeight, line1, line2
Dim len1, len2, yDomain1, yDomain2
Dim points1, points2,i
Dim p1,p2,p3,p4,p5,p6, myStep
' For some reason joinsurfaces is not working later on, so instead we do it with a COMMANd call. Dumb.
Call rhino.UnselectAllObjects()
edge1 = Rhino.getPoints(True,False,"Bottom of stair edge1","top of stair edge1",2)
edge2 = Rhino.getPoints(True,False,"Bottom of stair edge2","top of stair edge2",2)
riserHeight = rhino.GetReal("how high is the riser?")
line1 = rhino.addline(edge1(0),edge1(1))
line2 = rhino.addline(edge2(0),edge2(1))
yDomain1 = edge1(1)(2)-edge1(0)(2)
yDomain2 = edge2(1)(2)-edge2(0)(2)
len1 = Abs((riserHeight * Rhino.CurveLength(line1)) / yDomain1)
len2 = Abs((riserHeight * Rhino.CurveLength(line2)) / yDomain2)
points1 = rhino.DivideCurvelength(line1,len1,False)
points2 = rhino.DivideCurvelength(line2,len2,False)
For i = 0 To ubound(points1)-1
p1 = points1(i)
p2 = array(points1(i)(0),points1(i)(1),points1(i)(2)+riserHeight)
p3 = points1(i+1)
p4 = points2(i)
p5 = array(points2(i)(0),points2(i)(1),points2(i)(2)+riserHeight)
p6 = points2(i+1)
Call makeStep(p1,p2,p3,p4,p5,p6)
Next
Call rhino.deleteObjects(array(line1,line2))
rhino.Print "Riser depth is between " + FormatNumber(Rhino.Distance(p2,p3),2) + " and " + FormatNumber(Rhino.Distance(p5,p6),2)
Function makeStep(p1,p2,p3,p4,p5,p6)
rhino.EnableRedraw(False)
Dim s1,s2,s3,s4,s5, bobby
s1 = rhino.AddSrfPt(array(p1,p2,p3))
s2 = rhino.AddSrfPt(array(p4,p5,p6))
s3 = rhino.AddSrfPt(array(p1,p4,p5,p2))
s4 = rhino.AddSrfPt(array(p2,p5,p6,p3))
s5 = rhino.AddSrfPt(array(p1,p4,p6,p3))
rhino.selectObjects(array(s1,s2,s3,s4,s5))
rhino.command("Join ")
makeStep = array(s1,s2,s3,s4,s5)
rhino.EnableRedraw(True)
End Function
Thanks for the help