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
- Load the routine with
APPLOAD, or put it on your support file search path. - Type
SQTOROUND. - Give the rectangle size, the round diameter, the height, and any offset of the round from centre.
- Pick where the pattern goes.
- 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
| Name | SquareToRound — develop the flat pattern for a square-to-round transition |
| Download | SquareToRound.lsp — 13.8 KB, plain AutoLISP source. Downloads directly; no zip to unpack. |
| Type | AutoCAD AutoLISP routine |
| Command | SQTOROUND |
| Requires | nothing beyond a CAD platform with AutoLISP. |
| Source size | 13.8 KB, 321 lines |
| Error handling | Yes — a *error* handler restores every system variable it changed, on cancel as well as on error. |
| Undo | The whole operation is wrapped in a single undo group, so one U reverses all of it. |
| Compatibility | AutoCAD (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. |
| Author | YZ, August 2026 |
| Licence | Free 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