When a homeowner or remodeler sketches a room addition, basement finish, or kitchen renovation, drawing the walls is only half the job. Before an electrician can bid the rough-in, every wall segment needs a preliminary electrical plan (Sheet E-101) showing standard 120V duplex receptacles, kitchen and bath GFCI circuits, and dedicated 240V appliance drops.

In the United States, general habitable room receptacle layout follows NEC 210.52(A) (commonly known as the "6-foot / 12-foot rule"):

  1. No point measured horizontally along the floor line of any usable wall space may be more than 6 feet (72") from a receptacle outlet.
  2. Any usable wall segment 2 feet (24") or wider counts as wall space and requires at least one outlet.
  3. Wall continuity breaks at doorways, sliding glass doors, fireplaces, and fixed cabinetry.

Manually clicking 40 outlets onto a multi-room floor plan is tedious and error-prone. While building the browser-based CAD studio at PlanCaliber, we turned NEC 210.52(A) into a deterministic wall-graph algorithm in TypeScript that populates Sheet E-101 and exports every receptacle onto AIA layer E-POWR (ACI color 2, yellow) in AutoCAD R12 .DXF.

1. Decomposing Each Wall Into Usable Continuous Segments

A wall in a 2D CAD model is a line segment from (x1, y1) to (x2, y2) of length L inches, carrying zero or more openings (door, sliding_door, garage_door, cased_opening, or window).

Notice the critical NEC distinction:

  • Doors, cased openings, and floor-to-ceiling sliders break the floor line, splitting the wall into independent usable segments.
  • Standard raised windows (with a sill height above the floor, e.g. 36" off the finished floor) do not break the floor line; the wall beneath the sill remains continuous usable wall space.
export interface WallOpening { offsetIn: number; // distance from wall start to opening start widthIn: number; kind: 'door' | 'sliding_door' | 'cased_opening' | 'window' | 'egress_window'; sillHeightIn: number; } export interface UsableSegment { startIn: number; endIn: number; lengthIn: number; } export function extractUsableWallSegments( wallLengthIn: number, openings: readonly WallOpening[], cornerTrimIn = 6 ): UsableSegment[] { const floorBreaks = openings .filter((o) => (o.kind !== 'window' && o.kind !== 'egress_window') || o.sillHeightIn < 18) .map((o) => ({ start: Math.max(0, o.offsetIn), end: Math.min(wallLengthIn, o.offsetIn + o.widthIn) })) .sort((a, b) => a.start - b.start); const segments: UsableSegment[] = []; let cursor = 0; for (const brk of floorBreaks) { if (brk.start > cursor) { segments.push({ startIn: cursor, endIn: brk.start, lengthIn: brk.start - cursor }); } cursor = Math.max(cursor, brk.end); } if (wallLengthIn > cursor) { segments.push({ startIn: cursor, endIn: wallLengthIn, lengthIn: wallLengthIn - cursor }); } // NEC 210.52(A)(2): usable wall space >= 24 inches wide requires at least one receptacle return segments.filter((seg) => seg.lengthIn >= 24 && seg.lengthIn > cornerTrimIn); } 

2. Computing Exact Receptacle Offsets Along Each Segment

Given a continuous wall segment of length S inches (where S >= 24"):

  • Every end of the segment must be within 72" (6'-0") of an outlet.
  • Every pair of consecutive outlets along the segment must be within 144" (12'-0") of each other.

What is the minimum number of outlets N required to cover length S?

  • If S <= 144", a single centered outlet sits at S / 2 <= 72" from both ends (N = 1).
  • In general, N = Math.max(1, Math.ceil(S / 144))!
  • Placing those N outlets uniformly at the midpoints of N equal sub-intervals of width step = S / N guarantees:
    • Distance from either end to the nearest outlet = step / 2 = S / (2 * N) <= 144 / 2 = 72" (<= 6'-0" exact).
    • Distance between any two adjacent outlets = step = S / N <= 144" (<= 12'-0" exact).
export function computeNecOutletOffsets(seg: UsableSegment, edgeGuardIn = 12): number[] { const count = Math.max(1, Math.ceil(seg.lengthIn / 144)); const step = seg.lengthIn / count; const offsets: number[] = []; for (let i = 0; i < count; i++) { const raw = seg.startIn + step * (i + 0.5); const clamped = Math.min( seg.endIn - Math.min(edgeGuardIn, seg.lengthIn / 2), Math.max(seg.startIn + Math.min(edgeGuardIn, seg.lengthIn / 2), raw) ); offsets.push(Math.round(clamped)); } return offsets; } 

Check this on a concrete 16'-0" (192") living-room wall with no door openings:

  • count = Math.ceil(192 / 144) = 2
  • step = 192 / 2 = 96" (8'-0")
  • Offsets = 48" (4'-0" from left corner, <= 6'-0") and 144" (4'-0" from right corner, <= 6'-0", with 8'-0" spacing between them, <= 12'-0").

Check a 16'-0" wall interrupted by a 36" door starting 30" from the left corner:

  • Segment 1: [0, 30] (30" >= 24") -> count = 1, outlet placed at 15".
  • Segment 2: [66, 192] (126" <= 144") -> count = 1, outlet placed at 129" (63" from door jamb and 63" from right corner, both <= 72").

3. Room-Type Overrides: Kitchen Countertops, Baths, and Garages

General habitable walls use the 6' / 12' rule, while wet and utility zones trigger stricter NEC 210.52 subsections:

Space NEC Reference Rule Summary
Habitable rooms (Living, Bedroom, Office) 210.52(A) <= 6' from breaks, <= 12' on center, walls >= 24"
Kitchen countertop walls 210.52(C) <= 24" from break, <= 48" on center, 20A GFCI small-appliance circuits
Bathrooms 210.52(D) At least one 20A GFCI within 36" of the outside edge of each basin
Garages & Workshops 210.52(G) At least one 20A GFCI receptacle per vehicle bay
Laundry & Dedicated Appliances 210.52(F) Dedicated 20A laundry circuit + dedicated 240V range/dryer drops

In PlanCaliber, every room polygon already knows its room type (kitchen, bath, bedroom, garage, laundry). When projecting outlets onto interior faces, we compute the inward unit normal (nx, ny) pointing toward the room interior and offset the electrical symbol 4" inward from the drywall face so Sheet E-101 symbols never overlap exterior dimension chains or wall framing hatches.

You can test room-by-room outlet counts and breaker circuit estimates immediately in our free NEC Electrical Outlet Placement Calculator, or inspect how Sheet E-101 renders automatically on prebuilt US layouts like our Kitchen Island Remodel and 40'x60' Barndominium + Shop.

4. Exporting Clean Electrical Geometry to Sheet E-101 & AutoCAD .DXF

Every auto-placed or manually dragged outlet in PlanCaliber is written to two downstream deliverables:

  • Sheet E-101 (Electrical & Lighting Plan) in the 5-sheet 1/4" = 1'-0" vector PDF set, complete with circuit legend (120V Duplex, 20A GFCI, 240V Dedicated, Recessed Light, Smoke/CO Alarm, 200A Panel).
  • AutoCAD R12 ASCII .DXF (AC1009) on standard AIA layer E-POWR (ACI color 2), allowing electrical estimators and CAD drafters to toggle electrical layers on and off cleanly inside AutoCAD, BricsCAD, or LibreCAD.

PlanCaliber pricing stays transparent:

  • Free Studio Draft ($0): Full 2D/3D studio, 40 US templates, 20 US building-code calculators, 2 AI scans/day, and instant watermarked proof PNG exports.
  • Print Pass ($9 one-time): Unwatermarked 2-sheet PDF (A-101 + M-101), 2400px PNG, SVG, and custom title block.
  • Full CAD Pack ($19 one-time, or $49 5-Plan Pack): Full 5-sheet vector PDF including Sheet E-101, 8-layer AutoCAD R12 .DXF (E-POWR), 3D .OBJ/.MTL, and Framing & Drywall .CSV takeoff.

Disclaimer: PlanCaliber provides preliminary space-planning drawings and NEC reference calculations only. Local amendments, AFCI/GFCI panel requirements, and final load calculations must be verified by a licensed electrician and your local Authority Having Jurisdiction (AHJ) prior to work.