True-Shape DXF Nesting for Laser, Plasma & Waterjet

Open your part DXFs, set the quantities and the sheet, and the nester fits the real shapes together, not just their rectangles: L shapes interlock, small parts drop into the holes of big ones, and grain direction is respected. Download the nested sheets as DXF (lines and arcs kept as they were drawn) or SVG.

Your files never leave your browser. The nesting runs on your own device in a WebAssembly engine.
for the sheet, spacing and results

1. Parts

Drop DXF files here or tap to open
ASCII DXF, any version. Each closed outline (with the holes inside it) is one part.
Rotation: Any tries 15° steps, 90° and 180° keep the grain along or across the sheet, Fixed never turns the part. Mirror lets a part be flipped over (only for parts that look the same from both sides).

2. Sheet

Spacing is the clear gap between parts: kerf width plus the web you want left between cuts (for example 0.2 mm kerf + 2.8 mm web = 3 mm). The X direction is the sheet's long side and the grain direction.

3. Search

The nester tries many layouts and keeps the best. The same seed and effort always give the same layout (unless the time limit cuts the run short). Try another seed for a different result.

Nesting Result

Load the demo parts or open your DXFs, then press Nest parts.

Nested Sheets

The sheets appear here, updating as better layouts are found.

How the DXF Nesting Tool Works

Nesting means arranging the parts you need on a sheet so they use as little material as possible, with a safe gap between them for the cut. A good nest saves material on every job, and on a laser or plasma table it also decides how many sheets you buy.

Rectangular nesting (like our Sheet Cut Optimizer) treats every part as its bounding rectangle. That is right for panels cut on a saw, but it wastes the corners of L shapes, triangles, rings and brackets. True-shape nesting uses the real outline: an L can tuck into another L turned round, a gusset can sit against the slope of the next one, and a washer can be cut from the middle of a flange.

The Method

1. Parts from the DXF
Lines, arcs, circles, polylines, splines and ellipses are joined into closed loops (the same reader as the DXF Cut Cost Estimator). Each outer loop and the holes inside it make one part. Layers named for centre lines, dimensions, text and so on are left out.
2. Curves to a chord tolerance
sagitta s = r (1 − cos(θ/2))
largest step θ = 2 acos(1 − tol/r)
For the nesting maths each arc becomes straight chords, none further than half the curve tolerance from the arc; simplifying uses the other half. The engine knows each part's real error and adds it to the gap, so the true curves always keep the full spacing. Straight-sided parts get no extra gap at all.
3. Spacing
gap between outlines ≥ spacing
Keeping every outline at least the spacing apart is the same as growing each part by half the spacing (a rounded offset) and stopping the grown shapes from overlapping. The margin keeps parts that far from the sheet edges.
4. Exact placement
Parts are pushed towards the left-hand end of the sheet. At a trial height, every pair of edges (one on the new part, one on a placed part) blocks one exact range of positions: the shapes' Minkowski difference grown by the spacing. The leftmost unblocked position wins, after a point-in-polygon check that also lets a part sit inside another's hole. Several heights are tried, then refined.
5. Search
The first layout places the biggest parts first, trying four rotations of each. Then a genetic search mixes and changes the order and rotations (order crossover, swaps, moves and turns) and keeps the best layout found: first the most parts placed, then the fewest sheets, then the shortest length used on the last sheet. A fixed seed always gives the same sequence of layouts.

Worked Examples

1. Ten 100 × 50 mm rectangles on a 1000 × 500 mm sheet, no margin or spacing
  • Part area 10 × 100 × 50 = 50,000 mm² of a 500,000 mm² sheet: 1 sheet, 10.0 % utilisation.
  • They fit in one column of ten at the left-hand end: used length 100.0 mm, leaving a 900 × 500 mm strip for the next job.
  • Cut length 10 × (2 × 100 + 2 × 50) = 3.00 m, 10 pierces.
2. The demo parts on a 1250 × 625 mm sheet, 10 mm margin, 3 mm spacing, Normal effort, seed 1
  • 6 mounting plates, 8 L brackets, 6 gussets, 4 flanges and 10 washers: 34 parts.
  • Part area (holes taken off) ÷ sheet area = 27.3 % of the sheet, on 1 sheet.
  • Used length 528.7 mm of 1250, so the parts fill 63.3 % of the length they use, and a 718 × 625 mm strip is left over.
  • Total cut length 15.41 m with 106 pierces (34 outlines and 72 holes). The closest two parts are 3.045 mm apart, just over the 3 mm spacing.
  • The quick search that runs when the page opens (40 layouts) uses 534.8 mm; Normal effort shortens it by 6 mm. Turning on part-in-part puts washers in the flange bores.

Tips for Using the Results

  • Spacing: use at least the kerf plus a web that will not warp or burn away. Typical starting points: fibre laser on thin steel 1–3 mm, plasma about 1.5 × the kerf plus 3 mm, waterjet 2–3 mm, a router the cutter diameter plus 2 mm (or more for tabs). Thick plate needs more web, as the heat moves the parts.
  • Grain and brushed finishes: set those parts to 180° or Fixed so the grain or brush lines run the same way on every part. The sheet's X direction is taken as the grain.
  • Mirror only for parts that are the same on both faces. A part with a countersink, a brushed face or a bend line usually is not.
  • Part-in-part saves material when big parts have big holes, but the small part is cut loose inside a part that is cut later: make sure your CAM cuts inner parts before the outer profile around them.
  • Cost the job: the cut length and pierce count go straight into the DXF Cut Cost Estimator. For rectangular panels use the Sheet Cut Optimizer.
  • Remnant: parts are packed to the left, so what is left is one full-height strip on the right. Keep it on the rack for the next job.

Frequently Asked Questions

True-shape nesting arranges parts by their real outlines instead of their bounding rectangles, so irregular parts can interlock and small parts can sit in the holes of large ones. In our test, twelve 100 mm L shapes with 30 mm legs on a 260 mm high strip needed 360 mm of length, against 600 mm when each L is treated as a 100 × 100 mm box.

The spacing is the clear gap between part outlines, so it must be at least the kerf plus a web of material that stays stiff while the parts around it are cut. As a starting point use 1 to 3 mm on a fibre laser in thin sheet, more on plasma (its kerf is wider and the heat moves the plate), and a cutter diameter plus a couple of millimetres on a router. Your machine's own nesting defaults are the best guide.

Yes. The nester works on a polygon copy of each part, but the download moves and turns your original lines, arcs and circles, so arcs stay true arcs. Splines and ellipses come out as fine polylines. The sheet outline and the part numbers go on separate layers (SHEET_BORDER and TEXT_LABELS) that most CAM software skips or that you can turn off.

Set the part's rotation to 180° or Fixed. With 180° the part can be turned end for end, which keeps the grain or brush lines running the same way along the sheet's X direction; Fixed never turns it. Leave Mirror off for parts with a finished face.

It gives good, safe nests that are often close, but not the same as commercial nesting packages, which use more refined algorithms, run for longer and add common-line cutting, lead-ins, cut order, micro-joints and remnant management. Use it to plan material and quotes, or for hobby and small-batch work, and check the layout in your CAM before cutting.

No. The files are read in your browser and the nesting engine (written in Rust and compiled to WebAssembly) runs on your own computer or phone in a background worker. Nothing about your parts is sent to a server.
Limits: results are good but not optimal, and a different seed or more effort can find a better nest. Parts are placed as flat 2D outlines: no common-line cutting, lead-ins, tabs, cut order or heat distortion. Up to 600 parts per run. Big, detailed jobs take longer; raise the curve tolerance to speed them up. Always check the layout in your CAM or machine software before cutting.

Open-source credits: the nesting engine is our own Rust code compiled to WebAssembly with wasm-bindgen (MIT / Apache-2.0) and optimised with Binaryen wasm-opt (Apache-2.0). The page uses Bootstrap and Bootstrap Icons (MIT).