Homeโ€บ Blogโ€บ 3PR LISP: 3-Point Rectangle Free Download
๐Ÿ“ LISP

3PR LISP: 3-Point Rectangle Free Download

๐Ÿงฎ 3  |  ๐ŸŸข 3
02 Jan 2026 Trishunya Team
3PR LISP: 3-Point Rectangle Free Download
๐Ÿ“ LISP · CAD UTILITIES

3PR LISP: 3-Point Rectangle (Free AutoLISP Download)

๐Ÿ“… 02 Jan 2026 ๐Ÿท๏ธ CAD BGBgol Global
3PR AutoLISP routine, 3-Point Rectangle, shown inside a CAD window

3PR draws a closed, perfectly square rectangle from just three picked points, typically three corners of a building or structure captured with a Total Station in the field. Instead of manually joining four corner points (and inheriting any small field-pick error), the routine computes the true perpendicular/parallel geometry mathematically from the first two points and a third width-reference point.

3PTRECT-bgol (3-Point Rectangle)

CATEGORY
3D Polyline Lisps
COMMAND NAME
3PR
LISP FILE
3PTRECT-bgol.lsp
LICENSE
Open-source, free

Command Type: AutoLISP routine (works in AutoCAD, BricsCAD, ZWCAD and most AutoLISP-compatible CAD platforms)
Developed by: BGol Community, bgol.in

Inspired by the general concept of 3-point rectangle utilities used in survey/drafting workflows. This is an original, independently written routine, new file name, new command name, new source code, created so the CAD community has a free, editable, open-source alternative.

Overview

3PR draws a closed, perfectly square rectangle from just three picked points, typically three corners of a building or structure captured with a Total Station in the field. Instead of manually joining four corner points (and inheriting any small field-pick error), the routine computes the true perpendicular/parallel geometry mathematically from the first two points and a third width-reference point.

How to Use

  1. Load 3PTRECT-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type 3PR at the command line and press Enter.
  3. Pick the 1st corner point.
  4. Pick the 2nd corner point, together with the 1st point this defines the rectangle's primary edge and angle.
  5. Pick a 3rd point anywhere near the opposite side, its perpendicular distance from the first edge defines the rectangle's width.
  6. A closed rectangular LWPOLYLINE is created through the 4 computed corners on a dedicated layer, BGOL-3PR (colour green).

Why Use It

  • Speed, replaces four manual point picks (and the line-joining afterward) with just three picks and one command.
  • Self-correcting geometry, because the 4th corner is computed from perpendicular/parallel math rather than literally connecting the picked points, small field-survey pick errors are absorbed automatically and the result is always a true rectangle.
  • Clean output, produces one closed polyline ready for area calculation, GIS export, or further drafting, instead of three disconnected points.

Where to Use It

  • Converting Total Station survey shots of building corners into a base map or site plan.
  • Any topographic or cadastral survey workflow where structures are captured as 3-corner point clusters and need to become regularized rectangles quickly.
  • Land survey, infrastructure engineering, and drafting workflows with large numbers of building footprints to regularize fast.

Notes

  • Point 3 only needs to be roughly near the opposite side, the routine uses its perpendicular distance from line 1-2, not its exact position, so it does not need to align precisely with either corner.
  • The resulting polyline is always closed (4 vertices, closed flag set), ready for AREA, LIST, or export commands.
  • Source code is fully open, feel free to study, modify, and redistribute it under the same open, free-for-all spirit.

Credits

Developed and shared for the CAD community by BGol Community. Website: https://bgol.in/ Free and open-source, use it, modify it, share it, for personal or commercial work alike.

Frequently Asked Questions

What CAD platforms does 3PR work on?

3PR is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.

What should I know before using 3PR?

Point 3 only needs to be roughly near the opposite side, the routine uses its perpendicular distance from line 1-2, not its exact position, so it does not need to align precisely with either corner.

What is the main benefit of using 3PR?

Speed, replaces four manual point picks (and the line-joining afterward) with just three picks and one command.

Is 3PR free to use for commercial projects?

Yes. 3PR is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.

How do I load the 3PR command into my drawing?

Drag and drop 3PTRECT-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type 3PR at the command line to run it.

๐Ÿค About BGol Community

BGol Community of Advanced Surveying builds and shares free, open-source tools for the survey and CAD drafting community.

๐Ÿ™Œ Made with โค๏ธ by BGol Community of Advanced Surveying

Free, open-source, and built for the CAD community, for personal or commercial use, always.

Back to all articles