Homeโ€บ Blogโ€บ CWW LISP: Recreate Polygon Clockwise Free Download
๐Ÿ“ LISP

CWW LISP: Recreate Polygon Clockwise Free Download

๐Ÿงฎ 2  |  ๐ŸŸข 2
08 Apr 2026 Trishunya Team
CWW LISP: Recreate Polygon Clockwise Free Download
๐Ÿ“ LISP · CAD UTILITIES

CWW LISP: Recreate Polygon Clockwise (Free AutoLISP Download)

๐Ÿ“… 08 Apr 2026 ๐Ÿท๏ธ CAD BGBgol Global
CWW AutoLISP routine, Recreate Polygon Clockwise, shown inside a CAD window

CWW rebuilds a closed polygon so its vertices run clockwise, starting from a point you specify. Many survey and GIS systems require boundary polygons wound in a specific direction; a polygon drawn or imported with the opposite winding can fail validation or produce incorrect area-sign results downstream. CWW determines the current winding, reverses it if necessary, and rotates the vertex order to start exactly where you want.

CWWIND-bgol (Recreate Polygon Clockwise)

CATEGORY
Polyline Lisps
COMMAND NAME
CWW
LISP FILE
CWWIND-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 polygon-winding normalization utilities used in survey/GIS 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

CWW rebuilds a closed polygon so its vertices run clockwise, starting from a point you specify. Many survey and GIS systems require boundary polygons wound in a specific direction; a polygon drawn or imported with the opposite winding can fail validation or produce incorrect area-sign results downstream. CWW determines the current winding, reverses it if necessary, and rotates the vertex order to start exactly where you want.

How to Use

  1. Load CWWIND-bgol.lsp into your CAD session (drag-and-drop the file onto the drawing window, or use the APPLOAD command).
  2. Type CWW at the command line and press Enter.
  3. Select a closed polyline (the routine requires the Closed property to already be set, it will abort with a message otherwise).
  4. Specify a starting point; the nearest existing vertex to that point becomes the new starting vertex.
  5. The routine erases the original polyline and creates a new one, starting from that vertex, with all vertices traversed clockwise, on a dedicated layer, BGOL-CWW (colour blue).

Why Use It

  • Ensures compliance with survey/GIS system requirements that mandate clockwise-wound polygons, avoiding validation failures or sign- convention errors downstream.
  • Gives explicit control over both the winding direction and the starting vertex, useful when a specific starting point (e.g., a legal boundary's point of commencement) is required by convention.
  • Removes the need to manually determine a polygon's current winding direction and manually reverse/rebuild it by hand.

Where to Use It

  • Preparing land parcel boundaries or survey polygons for export to systems that require a specific (clockwise) winding convention.
  • Standardizing polygon direction across a drawing or dataset where mixed winding directions would cause inconsistent area sign results or GIS import issues.
  • Any survey/cadastral workflow needing to enforce a specific starting point and winding direction on boundary polygons.

Notes

  • Winding direction is computed with the shoelace (signed area) formula; the routine automatically reverses the vertex order when needed so the result is always clockwise, regardless of how the original was drawn.
  • The original entity is deleted and replaced, if you need to keep the original for comparison, copy it first.
  • 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 CWW work on?

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

Winding direction is computed with the shoelace (signed area) formula; the routine automatically reverses the vertex order when needed so the result is always clockwise, regardless of how the original was drawn.

What is the main benefit of using CWW?

Ensures compliance with survey/GIS system requirements that mandate clockwise-wound polygons, avoiding validation failures or sign- convention errors downstream.

Is CWW free to use for commercial projects?

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

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