Skip to main content

Create Stairs from a Line

Make stairs from a line, taking advantage of the Index parameters within the map node to iterate stair heights.

Written by Holly Conrad Smith

Make stairs parametric — change one input and the whole stair updates instantly.

How the data flows:

  1. Input Parameter (Stair Width, Tread Depth, Tread Height)
    These are your controls. You set the step size, and the flow uses those values later.

  2. Read Feature
    Starts the flow. It reads the base shape you’re building stairs on.

  3. Divide Distance
    Splits the total run into equal segments (one per step).

  4. Map
    Loops through each segment and applies the step logic to every one.

  5. Unproject → Offset Polygon
    Creates the step outline and offsets it to form the stair profile.

  6. Add → Multiply
    Calculates the vertical height for each step.

  7. Write Feature Property (height)
    Assigns that height value to each step feature.

  8. Write Features
    Final step — this outputs the stairs so they appear on the map.

So in plain English:

👉 You define step size → split the run → loop through each step → build the shape → assign height → output stairs.

How to Build It

Start by drawing a line on your canvas.

  1. Create a new flow
    Start a blank flow. It will begin with a Read Feature and Write Features node.

    Add the flow to your line geometry.

  2. Add your input parameters
    Drag in three Input Parameter nodes. Name them:
    • Stair Width
    • Tread Depth
    • Tread Height
    Set each one to Number type, and Length Dimension.

    These become adjustable values in the Properties panel.

  3. Divide the line

    Drag in the Divide Distance node.

    Connect the read features to the L in the divide distance node.

    Connect the Tread Depth input to the D in the Divide Distance node.

  4. Add a map node

    Connect the S[] output of the divide distance to the L[] of the map node.

    Map will iterate through each individual segment of the line to create the stairs!

  5. Inside Map:

    1. Convert cartesian to feature

      The divide distance node outputs cartesians. Most nodes want projected features.

      Use unproject to turn the segment back into a feature.

      Connect the V of map to the C of unproject.

    2. Set the stair width

      Drag the offset polygon node onto the canvas.

      To keep the input parameters simple, right click the offset polygon node -> select "expose inputs"

      This makes the node's settings entirely controlled within the flow canvas.

      • Connect the F of unproject into the F[] of Offset Polygon.

      • Connect the tread width input parameter to the D of offset polygon.

      • Type "left" into the S box.

    3. Use the index to set the stair height

      This is a fun trick with Map nodes! The built-in index output is perfect for iterating numeric values. Take advantage of the index values of the list to generate a linear equation.

      The goal: each step is {{tread height}} higher than the previous step.

      To create:

      • Drag the Add node to the canvas. Because the index always starts at 0, you will want to add 1 to each index value so the first step is not 0 height.

        Connect the I output of the map to the input of Add. Type "1" in the other box of the add node.

      • Drag the multiply node to the canvas. Connect the tread height input parameter to the top input of multiply. Connect the result of Add to the bottom input of multiply.

        What this does:

        Each list item is evaluated as part of the linear equation (x+1)*{{tread height}}.

        Example:

        • Index 0: (0+1)*1 = height of 1 ft

        • Index 5: (5+1)*1 = height of 5 ft

    4. Use the index calculation to write the height property

      Drag a write feature property node to the canvas

      type "height" into the P box of the node

      Connect the output of Offset Polygon to the F of write feature property

      Connect the results of multiply node to the V input of write feature property

      Connect write feature property to the R input of the map node.

  6. Output the stairs
    Connect the R[] output of map to Write Features so it appears on the map.

  7. Test it
    Adjust the inputs and change the line to change the stairs.

Did this answer your question?