Find Open Polylines
eplisp, the free multilingual LISP library
| Openly licensed; the original file is hosted here together with its license. | |
… Rate this tool: | |
| Commands | GAPC |
|---|---|
| Category | Polyline Tools |
| Author | BGol Community |
| Source | thevijayparmar/bgol-cad-lisps |
| License | MIT |
| Requirements | AutoCAD (full version, not LT), BricsCAD; no Express Tools needed. |
| Prompt language | English |
| Files | GAPCHECK-bgol.lsp (4 KB) |
| Added | 2026-10-26 |
| Download the original fileSource repository | |
GAPC finds selected polylines that are not flagged as closed and marks each start point with a circle, a quick check before area takes or hatching.
GAPC is a check routine for finding polylines that look closed but are actually open. Area takes, hatching and region creation need closed boundaries, and a single open polyline can cause an error or a wrong result. GAPC makes such cases visible before you start.
Overview
The routine reads the Closed flag of every selected LWPOLYLINE. For each one that is not flagged as closed it draws a circle with radius 1.5 at the start point, on layer BGOL-GAPC (created in red if missing). The command line then reports how many polylines were found open. The polylines themselves are not changed.
How to use it
- Load GAPCHECK-bgol.lsp with APPLOAD.
- Type GAPC at the command line.
- Select the polylines to check and press Enter.
- Use the circles on layer BGOL-GAPC to find the open polylines, and close them with PEDIT if needed.
Notes and limitations
- Only the Closed flag is checked. A polyline whose last vertex sits on its first vertex but is not flagged closed is still reported as open; the actual gap is not measured.
- The marker radius is fixed at 1.5 units, which can be hard to see at very large or small scales; the value is a variable at the top of the file.
- Only LWPOLYLINE objects can be selected; LINE, SPLINE and old-style polylines are not checked.
- The circles are added on layer BGOL-GAPC; delete that layer after checking.
- License: the repository's LICENSE file is MIT; the file header also states the code is free to use, modify and share.
- The repository was published in 2026 and the amount of testing is not stated; try it on a copy of the drawing first.
Source and license
This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.
References
- Source repository: thevijayparmar/bgol-cad-lisps – https://github.com/thevijayparmar/bgol-cad-lisps/tree/3acbe32f71b489f4c81dcd9372f989591a9be858/Polyline%20Lisps/Find%20Open%20Polygon
- Author: BGol Community – https://bgol.in/
- License: MIT – https://github.com/thevijayparmar/bgol-cad-lisps/blob/3acbe32f71b489f4c81dcd9372f989591a9be858/LICENSE
Found a mistake, or are you the author of this tool? Request a correction or removal