XPM LISP: Find Intersections โ Arc, Line, Polyline (Free AutoLISP Download)
XPM finds every point where selected LINE, ARC and/or LWPOLYLINE entities intersect one another and marks each intersection point with a visible circle, including geometrically complex arc intersections, which are error-prone to determine manually.
XPTMARK-bgol (Find Intersections โ Arc, Line, Polyline)
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 intersection-marking 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
XPM finds every point where selected LINE, ARC and/or LWPOLYLINE entities intersect one another and marks each intersection point with a visible circle, including geometrically complex arc intersections, which are error-prone to determine manually.
How to Use
- Load
XPTMARK-bgol.lspinto your CAD session (drag-and-drop the file onto the drawing window, or use theAPPLOADcommand). - Type
XPMat the command line and press Enter. - Select two or more LINE, ARC and/or LWPOLYLINE entities (any mix).
- Press Enter to finish the selection.
- Every intersection point found is marked with a small circle on a dedicated layer,
BGOL-XPM(colour magenta). The selected entities are left untouched.
Why Use It
- Mixed entity types in one pass, handles lines, arcs and polylines together, removing the need for separate manual checks per entity type.
- Correct arc intersections, computed via the ActiveX
IntersectWithmethod, avoiding manual/visual arc geometry errors. - Immediately reviewable, clear visual markers appear right on the drawing instead of a separate text report to interpret.
Where to Use It
- Reviewing complex survey or design drawings with numerous crossing lines, arcs, and polylines.
- Identifying crossing points between features such as utility lines, road edges, or boundary segments that include curved sections.
- Any drafting QA or analysis task needing to programmatically identify all intersection points among a set of mixed-type linear entities.
Notes
- Intersection points are de-duplicated (within a small tolerance) before marking, so entities crossing at the same point are not marked twice.
- Marker circle radius defaults to 1.5 drawing units; edit the
*bgol-xpm-radius*constant near the top of the .lsp file to change marker size. - Uses
vlax-invoke ... 'IntersectWithat the ActiveX object level, so line-line, line-arc, arc-arc, and polyline combinations are all handled automatically without separate formulas per entity-type pair. - 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
XPM is a standard AutoLISP routine, so it runs in AutoCAD, BricsCAD, ZWCAD, and most other AutoLISP-compatible CAD platforms without modification.
Intersection points are de-duplicated (within a small tolerance) before marking, so entities crossing at the same point are not marked twice.
Mixed entity types in one pass, handles lines, arcs and polylines together, removing the need for separate manual checks per entity type.
Yes. XPM 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 XPTMARK-bgol.lsp onto your open drawing window, or load it through the APPLOAD command, then type XPM 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.