Simple tool for extruding stair. Create flat stair from your plan, convert to poly, select start step and click <create stair>.
Most of stair scripts around are dependent of polygon number order. When you create stair from attaching multiple spline without orderly fashion you will get random polygon order in your editable poly object. This script will sort adjacent polys and save the number in an orderly array before extruding polygons.

Feature:

  • Height: is adjustable and is overall height minus one step. It means this height is based on floor to floor dimension, not floor to top stair.
  • if height is clicked, will switch to mode step height.
  • Flip is for flipping stair direction. Object must be recreated. Use Auto update for easy replace.
  • Click Create stair will create only shell, for full block stair shift+click. Control+click will create stair treads only (ie: only elevate each piece of polygons) (v0.0.5)
  • Extrude type might not have any effect on flat stair, these are only internal options used when extruding poly.
  • All unit is Centimeter.
    Now using #worldUnit (v0.0.3)
  • Righclick Create stair to access menu/a̶u̶t̶o̶u̶p̶d̶a̶t̶e̶/help or close script.

Updates

v0.0.5: (06:03 10/19/2024)

  • Rewrite to single struct with install option. Now you can install it using rightClick UI > install rBStair. The script will be available under rBScript category.
    Do not move the script file after installation or macro will cease to work.
  • Add stair treads only to creation type (Control+click “Create stair”)
  • Enhance Auto Update function. Auto update now visible in UI (instead of right click in v0.0.4). New features of auto update:
    • When no object is selected, it will update latest rBStair object created in scene (if both stair-base and stair object exist). This data saved in rootscene with id 9310. You can check with “getAppData rootscene 9310” to see the last node handle saved or delete it in unlikely case any other script also using it.
    • When objects are selected, it will:
      • If object is stair-base (that is planar editable_poly used to create rBStair objects), it will update all rBStair objects that was generated using this stair-base object. For example, if one stair-base is used to create many stair objects or when stair objects are copied/instanced, then all of these stair objects share one common stair-base. Auto update then will update all of its generated objects (including copy/instance objects).
      • If objects are stair objects (named “rBStair_xxx” by default, although it can be renamed), the script will search its corresponding stair-base object. If stair-base object exist in scene, it will update the stair objects.
      • Both of these functions relies on object’s “user defined properties“. For stair objects the property is “rBStair_base“. For stair-base objects the property is “rBStair_param“. Remove these properties to exclude your final objects from auto update mechanism.
    • Auto update will only update height and flip options. Stair type (ie: basic, boxed or treads only) will be retained.
    • You can select multiple stair-base or stair object and modify them in one go.
    • The “Basic stair” type is still the longest calculation due switch to “max modify mode”. For example using the same stair-base:
      • rBStair_002 updated in 0.328s (basic)
      • rBStair_003 updated in 0.016s (tread only)
      • rBStair_004 updated in 0.01s (boxed)
    • Button “Create stair” is off when Auto update is active to avoid accidental clicking. It also prevent new stair object creation when doing Auto update.
  • Remove “Extrude type” option from UI.
  • There is hidden function to display stair-base polygon order (Shift+Control+click “Create stair”)

v0.0.4: (14:02 8/13/2021)

  • Auto update stair creation (rightClick [Create stair] > Auto update)
    Only work if stair-base object still available.
  • Simplified UI
  • Small help (rightClick [Create stair] > help)

v0.0.3: (07:33 3/28/2021)

  • No need to pick subobject polygon as firststep anymore.
    Now its done via sorting polys which atleast has 2 verts which are not shared with another poly
  • Fix random missing riser. Thanks to ali shafiee for reporting the bug. Weld all vertices before extruding, also related to object pos from origin
  • Fix nagging messagebox for original object deletion
  • Set 2 materialID for tread and riser
  • set subobjectlevel = 0 if subobject is still on when user create stair otherwise it causes weird viewport artifact



Recommended Articles

3 Comments

  1. Hello dear Mr. Bren
    I downloaded and use the rBStair script. Thanks for your good script.
    I wanted to report a bug to you and please let me know if you fix it.
    This bug consists of two parts:
    First: the distance between the stairs means that the height of the stairs is not always filled with the plate and sometimes the distance between the stairs is empty.
    Second: The stairs are of the type without a stair box and the bottom is empty, while in the tutorial video you create two types of stairs, both with a box under the stairs and without a box under the stairs, but in the script, only the box model without the stairs is modeled. .
    Thank you. Good luck

    1. 1. For the faces to (create riser from step to step) be connected they need to share exact vertices location. So for example if landing step share edge with two steps above and below it, this landing step polygon needs to have 6 vertices instead of only 4.
      2. You need to press shift on your keyboard while clicking “create stair” to get full boxed stair. I suggest to weld all vertices before doing this, otherwise the script will create messy additional faces inside the stair.

      — edit
      I just found out random missing riser like you mean. It happened with unwelded vertices. I will fix this for next update.

      1. Thanks for the successful answer

Comments are closed.