Homeโ€บ Blogโ€บ GPF LISP: Flag Open Polygons Free Download
๐Ÿ“ LISP

GPF LISP: Flag Open Polygons Free Download

๐Ÿงฎ 1  |  ๐ŸŸข 1
19 Apr 2026 Trishunya Team
GPF LISP: Flag Open Polygons Free Download
๐Ÿ“ LISP · CAD UTILITIES

GPF LISP: Flag Open Polygons (Free AutoLISP Download)

๐Ÿ“… 19 Apr 2026 ๐Ÿท๏ธ CAD BGBgol Global
GPF AutoLISP routine, Flag Open Polygons, shown inside a CAD window

GPF scans a selection of polylines and detects which ones are open (start point does not coincide with end point). Each open polygon's exact gap is flagged with a connecting line plus a circle marker, making it fast to spot and fix boundaries before running area, hatch, or boundary operations that require closed geometry.

GAPFLAG-bgol (Flag Open Polygons)

CATEGORY
Polyline Lisps
COMMAND NAME
GPF
LISP FILE
GAPFLAG-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 open-polygon detection utilities used in CAD/survey drafting. 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

GPF scans a selection of polylines and detects which ones are open (start point does not coincide with end point). Each open polygon's exact gap is flagged with a connecting line plus a circle marker, making it fast to spot and fix boundaries before running area, hatch, or boundary operations that require closed geometry.

How to Use

  1. Load GAPFLAG-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type GPF at the command line and press Enter.
  3. Select the polygons (closed or potentially-open polylines) to check.
  4. Every open polygon found has its gap marked with a straight line between the two endpoints plus a circle centered on the gap, on a dedicated layer, BGOL-GPF (colour red). Properly closed polygons are left completely unmarked.
  5. The command line reports how many polylines were checked and how many open gaps were flagged.

Why Use It

  • Improved workflow, quickly identifies open polygons before running further operations, saving time versus manually zooming into each shape.
  • Enhanced accuracy, avoids errors caused by treating an open polyline as if it were closed (e.g., inaccurate AREA or BOUNDARY results).
  • Streamlined operations, ensures a batch of polygons is properly closed and ready for tasks that require closed geometry.

Where to Use It

  • Drawing cleanup: sweep through a batch of polygons and immediately spot which ones need their gaps closed.
  • Quality assurance checks before running area calculations, hatching, or boundary-dependent operations that require fully closed polygons.
  • Preparing survey or site boundary drawings for further analysis, ensuring no unintended gaps remain in the polygon set.

Notes

  • A polygon is flagged only if its DXF Closed flag is not set and its actual start/end points don't coincide within a small tolerance, this avoids false positives on entities that are closed but whose flag happens to read oddly.
  • The marker circle's radius scales with the gap size so tiny gaps are still visible and large gaps aren't overwhelmed by an oversized circle.
  • 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 GPF work on?

GPF 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 GPF?

A polygon is flagged only if its DXF Closed flag is not set and its actual start/end points don't coincide within a small tolerance, this avoids false positives on entities that are closed but whose flag happens to read oddly.

What is the main benefit of using GPF?

Improved workflow, quickly identifies open polygons before running further operations, saving time versus manually zooming into each shape.

Is GPF free to use for commercial projects?

Yes. GPF 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 GPF command into my drawing?

Drag and drop GAPFLAG-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type GPF 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