Homeโ€บ Blogโ€บ XSM LISP: Smooth Cross-Section Ground Line Free Download
๐Ÿ“ LISP

XSM LISP: Smooth Cross-Section Ground Line Free Download

๐Ÿงฎ 2  |  ๐ŸŸข 2
19 Apr 2026 Trishunya Team
XSM LISP: Smooth Cross-Section Ground Line Free Download
๐Ÿ“ LISP · CAD UTILITIES

XSM LISP: Smooth Cross-Section Ground Line (Free AutoLISP Download)

๐Ÿ“… 19 Apr 2026 ๐Ÿท๏ธ CAD BGBgol Global
XSM AutoLISP routine, Smooth Cross-Section Ground Line, shown inside a CAD window

Cross-section drawings built from straight-line segments connecting each measured value make the natural ground line look artificially angular rather than like a real, continuously undulating surface. Native CAD spline smoothing can deviate too far from the actual surveyed values to be usable. XSM smooths a cross-section ground line while staying much closer to the true data, controlled by a user-specified vertex insertion interval.

XSSMOOTH-bgol (Smooth Cross-Section Ground Line)

CATEGORY
Polyline Lisps
COMMAND NAME
XSM
LISP FILE
XSSMOOTH-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 cross-section smoothing utilities used in survey/civil 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

Cross-section drawings built from straight-line segments connecting each measured value make the natural ground line look artificially angular rather than like a real, continuously undulating surface. Native CAD spline smoothing can deviate too far from the actual surveyed values to be usable. XSM smooths a cross-section ground line while staying much closer to the true data, controlled by a user-specified vertex insertion interval.

How to Use

  1. Load XSSMOOTH-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type XSM at the command line and press Enter.
  3. Select the ground/natural-surface cross-section line to smooth.
  4. Enter the vertex insertion interval (how densely new points should be sampled).
  5. A new, smoothed LWPOLYLINE is created on a dedicated layer, BGOL-XSM (colour blue), closely tracking the original data. The source line is left completely untouched.

Why Use It

  • Produces a much more realistic, natural-looking representation of ground surface in cross-section drawings compared to the raw straight-segment output most software generates.
  • Avoids the major shape-deviation problem of native CAD spline smoothing, which can distort surveyed ground data to the point of being misleading.
  • User control over the vertex insertion interval allows balancing smoothness against fidelity to the original data.
  • Only the selected line is touched, other cross-section elements (design/canal profile, dimension text, etc.) remain sharp and accurate.

Where to Use It

  • Improving the visual quality/realism of ground/natural-surface lines in cross-section drawings for canals, roads, drains, or any earthworks project.
  • Client-facing or presentation-quality cross-section deliverables where a jagged, obviously-segmented ground line looks unprofessional or hard to interpret.
  • Any cross-section drafting task needing a smoother ground representation while preserving reasonable adherence to surveyed values.

Notes

  • Smoothing uses a simple 3-point moving average applied to the elevation (Y) component of each sampled point, not a full spline fit, which is what keeps the result close to the original data instead of overshooting like a native spline conversion can.
  • The first and last points are left unsmoothed so the new line still starts and ends exactly where the original did.
  • 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 XSM work on?

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

Smoothing uses a simple 3-point moving average applied to the elevation (Y) component of each sampled point, not a full spline fit, which is what keeps the result close to the original data instead of overshooting like a native spline conversion can.

What is the main benefit of using XSM?

Produces a much more realistic, natural-looking representation of ground surface in cross-section drawings compared to the raw straight-segment output most software generates.

Is XSM free to use for commercial projects?

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

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