PCB Courtyard Overlap Error (pcb_courtyard_overlap_error)

Diagnostic signature

pcb_courtyard_overlap_error

Emitted by tscircuit when two component courtyard boundaries intersect or overlap on the same printed circuit board layer, violating manufacturing placement clearance rules.

What it means

In tscircuit and Circuit JSON specifications, a component courtyard represents the keepout boundary surrounding a footprint that accounts for physical package dimensions, solder fillet margins, and automated pick-and-place assembly tolerances. The pcb_courtyard_overlap_error diagnostic signifies that Design Rule Checking (DRC) detected an intersection between the courtyard geometries (such as rectangle, pill, circle, or polygon outlines) of two distinct PCB components on the same board layer.

Why it happens

This error occurs during circuit compilation and DRC evaluation (specifically within @tscircuit/checks and @tscircuit/core) when the coordinates, rotations, or package dimensions of two components cause their designated courtyard boundary shapes to physically collide or occupy overlapping bounding areas. Common causes include placing multiple components at identical or insufficiently spaced PCB coordinates, failing to specify unique coordinates for duplicate components, or not moving back-side surface-mount components to the bottom layer.

Minimal reproduction

import React from 'react';
import { createRoot } from '@tscircuit/core';

export const OverlappingCircuit = () => (
  <board width="20mm" height="20mm">
    <resistor
      name="R1"
      resistance="10k"
      footprint="0402"
      pcbX={0}
      pcbY={0}
    />
    <resistor
      name="R2"
      resistance="10k"
      footprint="0402"
      pcbX={0}
      pcbY={0}
    />
  </board>
);

How to fix it

Reposition one or both conflicting components, adjust package orientations, or move components to the opposite board layer to eliminate courtyard intersection.

```tsx
import React from 'react';
import { createRoot } from '@tscircuit/core';

export const CorrectedCircuit = () => (
  <board width="20mm" height="20mm">
    <resistor
      name="R1"
      resistance="10k"
      footprint="0402"
      pcbX={-2}
      pcbY={0}
    />
    <resistor
      name="R2"
      resistance="10k"
      footprint="0402"
      pcbX={2}
      pcbY={0}
    />
  </board>
);
```

Step 1

Step 2

Step 3

Step 4

Upstream references

circuit-json [email protected] — PcbCourtyardOverlapError — retrieved 2026-08-11

PcbCourtyardOverlapError Source Definition

Issue #2084: Error pcb courtyard overlap error even if they are on different layers