• 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

RAFTERCUT LISP: Cut Rafters and Truss Rafters in Section

August 6, 2026

Draws a rafter as it is actually cut — the sloping member, the birdsmouth seat where it sits on the wall plate, the tail overhang, and the blocking behind the seat. RAFTER draws a single cut rafter; RAFTERTRUSS draws a truss rafter with separate top and bottom cords. Both will mirror about the ridge to give you the opposite side in the same operation.

What RafterCut does

Note: there are two RAFTER routines on this site. This one and the older RAFTER LISP both define a command called RAFTER, so load one or the other, not both — whichever is loaded second silently replaces the first. They solve the job differently and both are worth having, so neither has been retired.

Pitch is given as rise and run, because that is how a roof is specified and how a framing square is set. Give 6 and 12 for a 6-in-12 roof; the routine works out the angle.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type RAFTER or RAFTERTRUSS.
  3. Give the pitch as rise and run, and the member depth, tail and seat dimensions.
  4. Pick the seat point first, then the ridge.
  5. Mirror about the ridge if you want the opposite side.

How it works

The trigonometry, said plainly:

pitch angle                = (atan rise run)
vertical depth of a
rafter cut square      = depth / (cos pitch)

The routine this replaces carried two helper functions that between them ran to nine lines of nested polar and sqrt calls, building right triangles out of unit vectors to recover an angle. They compute exactly the two lines above.

The second is the standard result that a member of perpendicular depth D, laid at a pitch, measures D / cos(pitch) when you measure it vertically. That is the dimension the tail cut is set out from.

Which way the roof slopes comes from your two picks. Seat point first, ridge second — drawing right to left is as valid as left to right, and the seat, the blocking and the tail all flip with it.

The baseline must be horizontal, because a wall plate is, and the routine says so rather than drawing a nonsense rafter.

Notes and limits

  • Command name clash. Do not load this alongside the older RAFTER LISP.
  • Pitch as rise and run, the way a framing square is set.
  • Seat point first, ridge second — that sets the hand.
  • One undo group covers the rafter.

Download and details

NameRafterCut — draw a rafter as it is actually cut
DownloadRafterCut.lsp — 13.9 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandsRAFTER, RAFTERTRUSS
Requiresnothing beyond a CAD platform with AutoLISP.
Source size13.9 KB, 337 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • RAFTER LISP — the older routine of the same command name
  • TRUSSFRAME LISP — the whole truss in six web patterns
  • ROOFPITCH LISP — the pitch triangle the numbers come from
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

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