Closed Polyline DXF Fixer

Detect and close open polylines so your DXF cuts clean, every time.

Drop DXF or ZIP here or click to upload

Free tier: 20 DXFs/day. ZIP (up to 20 files, 50 MB) or single DXF (20 MB).

Accepts: .dxf .zip

Why open polylines break the cut

A closed polyline tells your CAM software that the shape is a sealed loop: an outer contour, a hole, a cutout. The DXF format has an explicit closed flag on both POLYLINE and LWPOLYLINE entities. When this flag is missing, CAM software treats the shape as an open cut path, which usually means wrong tool offset, missing kerf compensation, or a cut that starts and ends at the same spot but is not recognised as enclosing an area.

The two common failure modes:

  1. The flag is simply not set. The polyline looks closed because the last vertex coincides with the first, but the DXF reader sees two overlapping endpoints and leaves the shape open.
  2. The last vertex is near, but not exactly on, the first vertex. Rounding error at export time can leave a 0.001 mm gap that is invisible but prevents the shape from closing when imported.

How polyline closes gaps

When you drop a DXF above, we read every polyline entity. For each one that is marked open, we measure the distance between the first and last vertex. If that distance is less than the gap tolerance (0.05 mm by default, which is below laser kerf), we snap the last vertex to the first and set the closed flag.

If the gap is larger than tolerance, the polyline stays open and we flag it in the report with a bounding box so you can zoom in and inspect visually. The pulse markers in the preview show you exactly where every open path is.

FAQ

What does a closed polyline mean in DXF?

A closed polyline has its first and last vertices joined. The closed flag tells readers to treat it as a sealed loop (region, hole, cutout).

Why do my polylines come out open?

SVG-to-DXF converters forgetting to set the closed flag, CAD chaining individual LINE entities, or endpoint rounding error. All three happen often.

How does polyline decide what to close?

If the first and last vertex are within gap tolerance (default 0.05 mm), we snap and set closed. Otherwise it stays open and we flag it.

Can I control the gap tolerance?

Yes. 0.05 mm is safe for laser, 0.1 to 0.5 mm reasonable for CNC routing.