RecipesDraw and lay out

How do I fill a closed shape with a grid of circles in AutoCAD?

Select the outline, then type "fill this shape with circles" in the cadssistant palette. It reads the selected polyline's extents, chooses a radius of roughly a twelfth of the short side and a square grid with a small gap, computes every centre itself and creates all the circles in one batch on the current layer, then reports how many it drew and the assumptions it made. Say "10 mm circles, 25 apart, staggered" to set them yourself. With nothing selected it asks you to pick the shape through AutoCAD's own prompt.

Checked 2026-10-30 · one of the tasks cadssistant's models are benchmarked on

What you typeCommand: CADSSISTANT

fill this shape with circles

Paste it into the palette, or pick it from the recipes inside the chat.

What cadssistant does

  1. Takes the shape from your grip selection, or asks "Select the shape:" through AutoCAD's own selection prompt. Esc cancels like any command.
  2. Reads the polyline's geometry and bounding box: a closed 100 × 60 LWPOLYLINE gives a radius of 5, a 2-unit gap and a square grid.
  3. Computes the centres and creates every circle in one step on the current layer, then replies with the count and the assumptions: radius, spacing, pattern, layer.

The same task in AutoLISP

(progn
  (setq p1 (getpoint "\nFirst corner: ") p2 (getcorner p1 "\nOpposite corner: ")
        r 5.0 gap 2.0 step (+ (* 2 r) gap) n 0
        x (+ (min (car p1) (car p2)) r))
  (while (<= (+ x r) (max (car p1) (car p2)))
    (setq y (+ (min (cadr p1) (cadr p2)) r))
    (while (<= (+ y r) (max (cadr p1) (cadr p2)))
      (entmake (list '(0 . "CIRCLE") (list 10 x y 0.0) (cons 40 r)))
      (setq y (+ y step) n (1+ n)))
    (setq x (+ x step)))
  n)

A rectangular fill by hand: two corners, radius 5, gap 2, returns the circle count. cadssistant does the same arithmetic from the polyline it read, so it works on the outline you already have.

Good to know

  • For an L-shaped or curved outline, say "only circles fully inside the boundary" and it checks each centre against the outline before drawing.
  • "On layer HOLES" puts them on that layer, creating it if needed. "Staggered" offsets alternate rows by half a step.
  • Revert in the chat undoes the whole turn if the grid isn't what you wanted.

More in draw and lay out

Command: CADSSISTANT

Works in AutoCAD 2024 and newer on Windows. Free trial, no card, no API key.

Get cadssistant