AFLT LISP: Decurve a Polyline / Remove Arcs (Free AutoLISP Download)
AFLT removes arc segments from a selected polyline by clearing every non-zero bulge value, converting each arc into a straight chord between its two endpoints. Unlike AutoCAD's native PEDIT โ Decurve option, this also works on arcs created by FILLET, which the native option cannot process.
ARCFLAT-bgol (Decurve a Polyline / Remove Arcs)
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 arc-removal / un-fillet 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
AFLT removes arc segments from a selected polyline by clearing every non-zero bulge value, converting each arc into a straight chord between its two endpoints. Unlike AutoCAD's native PEDIT โ Decurve option, this also works on arcs created by FILLET, which the native option cannot process.
How to Use
- Load
ARCFLAT-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
AFLTat the command line and press Enter. - Select one or more polylines containing arc/fillet segments.
- Press Enter to finish the selection.
- A new straight-segment-only polyline is created for each selected entity on a dedicated layer,
BGOL-AFLT(colour green). The original polylines are left untouched.
Why Use It
- Handles Fillet arcs, fills a real gap in AutoCAD's native Decurve option, which cannot process
FILLET-created arcs. - Simple, select-and-run workflow, accessible to users of any skill level.
- Prep step for other tools, a straight-segment-only polyline is easier to measure, edit, export, and process with other vertex-based routines that assume straight segments.
Where to Use It
- Preparing filleted/rounded polylines (rounded building corners, rounded road edges) for tools or export formats that don't handle arc geometry well.
- Simplifying complex drawings for clarity and easier downstream editing where arc geometry isn't needed.
- Any workflow needing straight-segment-only polylines as a prerequisite for other vertex-based processing.
Notes
- The default behaviour clears each bulge value, replacing every arc with a straight chord between its original two vertices (a fast, simple approximation). For a shape-preserving result that samples multiple points along each original arc instead, adapt
BGOL:AFLT-FlattenOneto usevlax-curve-getPointAtParam. - Works on LWPOLYLINE entities; the original selected polylines are not deleted, so you can compare or remove them manually afterward.
- 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
AFLT is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
The default behaviour clears each bulge value, replacing every arc with a straight chord between its original two vertices (a fast, simple approximation). For a shape-preserving result that samples multiple points along each original arc instead, adapt BGOL:AFLT-FlattenOne to use vlax-curve-getPointAtParam.
Handles Fillet arcs, fills a real gap in AutoCAD's native Decurve option, which cannot process FILLET-created arcs.
Yes. AFLT is fully open-source and free to use, modify, and redistribute for both personal and commercial work, developed and shared by the BGol Community.
Drag and drop ARCFLAT-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type AFLT 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.