• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

Spiral Staircase LISP for AutoCAD: Draw Stairs in 3D (Free)

September 19, 2020

Last updated July 28, 2026

SPST draws a complete spiral staircase in 3D from about a dozen answers: centre point, inner and outer radius, the angle swept between the first and last steps, the total rise, and the number of steps. It builds the treads and the railings as 3D mesh surfaces, so what you get is a genuine three-dimensional object you can view from any angle, not a plan symbol.

It is by Xue-dong Zhao, copyright 1995. Free routines that generate real 3D geometry are rare — most of the library on this site draws in plan — and this one is also unusually well written, which is covered further down.

What it does in practice

The geometry is worked out rather than approximated. From your inputs it derives the angle between consecutive steps and the rise per step, then walks around the spiral placing each tread at its own angle and height. Treads are built as a mesh spanning from the inner radius to the outer radius.

Stairs can go up or down: enter a positive height to rise and a negative height to fall, and the routine adjusts which end of each tread the riser attaches to accordingly. It also treats the first and last steps as special cases so the ends of the flight close off properly rather than leaving a floating tread.

Two staircase types are offered at a prompt. Type A adds a separate railing on the inner and outer edges, built as its own pair of meshes and given a thickness you specify. Type B builds the railings into the same mesh as the treads. Both ask for a railing width and height.

Every mesh is closed off in one direction after it is created, so the surfaces read as continuous rather than showing a seam where the spiral meets its start.

A properly behaved routine

Worth pointing out, because so many routines of this era get it wrong. SPST declares almost all of its working variables as local, so it does not litter your drawing session. It saves your command echo, blip mode and object snap settings at the start, switches them to what it needs, and puts all three back at the end — and it turns object snap off before drawing, which matters when a routine is placing hundreds of points that would otherwise snap to each other.

It also validates input properly instead of trusting you. The radii and step count will not accept zero or a negative number; the centre point and staircase type cannot be skipped; the railing dimensions must be positive. That is more input checking than most commercial-era routines bothered with.

The one slip is minor: the railing height variable is not in the local list, so it is left behind in the drawing session after the command finishes. It has no effect on the geometry.

Command reference

The file defines a single command, SPST. It announces itself when it loads with “SPST.LSP loaded. Type SPST to draw spiral stair.”

How to load it

Unzip Spst.zip and load Spst.lsp with APPLOAD, or add it to the Startup Suite. There are no support files. Our AutoLISP guide covers loading if it is new to you.

Step-by-step usage

  1. Type SPST, then answer the prompts in order: centre point; rotation angle of the first step; inner radius; outer radius.
  2. “Angle between first and last steps” — the total sweep in degrees. A half turn is 180, a full turn 360.
  3. “Stair height [+ up][- down]” — the total rise. Negative goes down from the centre point.
  4. “Number of steps” — check your local rules for maximum riser height before choosing, since the routine will divide whatever total rise you gave by whatever number you enter without comment.
  5. “Spiral stair type <A><B>” — A for separate railings with a thickness, B for railings built into the tread mesh.
  6. Give the railing width and height, and for type A a railing thickness. The staircase is built.

Set a 3D view before you run it, or switch to one afterwards — in plan the result looks like a set of concentric lines and gives you no idea whether the proportions are right.

Compatibility notes

Dated 1995, so written-for rather than tested-on. It is plain AutoLISP with no dialog boxes and no Express Tools calls, driving AutoCAD’s 3DMESH command, so nothing in it requires the full product; LT users on LT 2024 or later, the release that brought AutoLISP to LT, should be able to run it, though 3D work on LT is limited in other ways. See what runs on AutoCAD LT. It creates a lot of geometry in one go, so run it in a blank area or on a copy the first time and get a feel for the proportions before committing it to a live drawing.

Download

Name: Spiral Staircase
Description: Automatically draws a spiral staircase based on minimum user input.
Type: AutoCAD AutoLISP Routine
Author: Xue-dong Zhao
File Size: 2 Kb
Cost: Free
Worked on: AutoCAD
Download File: Spst.zip

Related routines

  • WALLS — wall generation for the floor plan the staircase sits in.
  • Door LISP routine — doors to go with them.
  • DTWALL — a wall layer manager from the same era.

References

  • AutoLISP: the complete guide
  • Free LISP routines library
  • AutoLISP on AutoCAD LT

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in