• 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

SQTOROUND LISP: Square-to-Round Transition Flat Pattern

August 6, 2026

SQTOROUND develops the flat blank for a transition piece: rectangular at one end, round at the other, with the round optionally offset from centre. Give the rectangle, the diameter, the height and any offset, and it draws the developed pattern — the shape to cut from flat sheet, with its fold lines — ready to plot at 1:1 and mark out.

What SquareToRound does

This is the commonest fitting in sheet-metal ductwork and the one that cannot be laid out by eye.

The piece is made of four flat triangular panels, one per side of the rectangle, separated by four conical corners. The flat panels lay out directly. The cones do not, so they are triangulated.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type SQTOROUND.
  3. Give the rectangle size, the round diameter, the height, and any offset of the round from centre.
  4. Pick where the pattern goes.
  5. Plot at 1:1 and mark out.

How it works

The round end is walked in one-degree steps. At each step the true length is found from the rectangle corner to that point on the circle — the diagonal of the horizontal offset and the height, which is a straight application of Pythagoras in three dimensions.

That true length, the previous one, and the one-degree arc between them form a thin triangle. Its apex angle comes from Heron’s formula: with semi-perimeter s and inradius r, the half-angle opposite side c has tangent r / (s - c).

Those apex angles accumulate. The running total is the angle the pattern has swept at that point, and the true length is its radius. Every fifteenth degree the pair is kept, giving six points per corner and twenty-four round the pattern.

Stepping at one degree and keeping every fifteenth is deliberate. The angles must accumulate finely to be accurate, but the drawn curve only needs enough points to fit smoothly.

The pattern is exact, not an approximation. Triangulation is not a way of guessing at the shape — a transition really is made of flat triangles, and this lays out the true size of each one. Cut to it and it rolls up to the right piece.

Notes and limits

  • Plot at 1:1. A pattern plotted to any other scale is not a pattern.
  • The round may be offset from the centre of the rectangle, which is the usual case where a duct has to dodge something.
  • Fold lines are drawn along with the outline.
  • One undo group covers the pattern.

Download and details

NameSquareToRound — develop the flat pattern for a square-to-round transition
DownloadSquareToRound.lsp — 13.8 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandSQTOROUND
Requiresnothing beyond a CAD platform with AutoLISP.
Source size13.8 KB, 321 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

  • FLEXDUCT LISP — flexible duct runs in plan
  • STAIRPAN LISP — the other developed-sheet routine, with stretch-out lengths
  • 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