Part 7 ended with the siege still in progress. This installment is the end of it - DRC errors 0 / unrouted 0 / shorts 0, measured five times with the same result five times.

The short our gate waved through - a missed crossing tally

The DRC gate threw the result away. The window cut had finally produced zero unrouted, and the gate discarded it because clearance violations had gone up by 5. After putting the priority (shorts > unrouted > clearance) into the gate so the result would be accepted, something odd caught our eye. Among the DRC items was tracks_crossing.

That means two pieces of copper physically overlap. That is a short. But our short counter was only counting the shorting_items category, and crossings were filed as generic errors and sailed through the gate. A board where +5V and an I2C signal crossed each other on an inner layer was being judged as having zero shorts.

Measurement trap number three. First: DRC overwrites the board. Second: overlapping zones make the numbers wobble. Third: when the tally misses a category, the gate closes its eyes.

One line of code later, the truth about the board read (9, 0, 1). It felt worse, but the measurement was honest.

Why the stitching created a short

The stitching code was the cause. The path the maze found passed its checks, but the hand-drawn straight stitch joining the end of the cut to the via was being laid without any check at all. That stitch crossed the window the wrong way and ran over another net’s vertical trace.

  • Two vias found by spiral search did not know about each other and landed 0.34mm apart (violating the minimum drill hole spacing)
  • The stitch went straight to mkseg without seg_clear

The lesson converges on the same sentence as the all-layer via check: any code that creates new copper must have the check built in, no exceptions. A hand-drawn straight line is more dangerous than a maze path, precisely because it sits outside the checks.

The second operation turned out to be simpler. We gave up on a new via and used an existing through via already sitting on that net as the junction, taking 11.8mm around on the bottom layer (B.Cu). The duplicate via only had to slide 0.17mm. (3, 0, 0) - the short was gone.

A pad is not a circle - obstacle model and search origin

The two remaining clearance violations were a common trace passing beside an optocoupler pad. Short by 0.06mm. Sixty-four micro-nudges, maze rerouting, chain rerouting - all of them ended in “no valid candidates.”

We already had a rule for this: if there are no valid candidates, question the candidate count first. This time it was not the count. There were two more causes.

One. The obstacle model was inflating pads into circles. The search tool approximated a pad as a circle of radius max(width,height)/2. Turn a 1.2×0.8 pad into a radius 0.6 circle and it over-blocks the short side by 0.2mm. In a fight where the shortfall is 0.06mm, that over-blocking means a legal channel that is missing only from the tool’s view. Back in part 4 we were told the pads in our renderer were too large and we fixed the drawing code - but the blocking code was using the same approximation. When the drawing code and the blocking code share a bug, they go wrong together, in the same place.

Two. The search origin was wrong. We used the coordinate of the first item in the DRC violation (the pad), while the trace that actually had to move sat 0.886mm away. With a search radius of 0.8mm there were literally zero candidates. Each net involved in a violation has to use the coordinate of its own item as the origin.

When it still will not work - the channel never existed

The two remaining violations stayed even after correcting the model, halving the grid, and fixing the origin. Only then did we work it out in coordinates.

From the corner of the power bus to the corner of the optocoupler pad: 0.959mm. For a trace to pass: clearance 0.2 × 2 + track width 0.3 + half the bus width 0.25 = 0.95mm.

A theoretical margin of 0.009mm - and that is before the grid, the pad corner radius, or the 45 degree constraint. Five generations of tools had not failed; the channel never existed. The most ironic part of this endgame is that only after stripping out every tool defect could we prove it was not a tool problem.

A channel that does not exist can be made. We moved the two optocouplers forming one wall of the alley 0.1mm down: a footprint move plus relocation of the trace endpoints attached to the pads, in a single transaction.

(0, 0, 0).

There is an order between fixing the routing tools and moving the placement. Move the placement before the tools are fixed and you sail past the real cause without knowing it; refuse to move the placement at all and you feed five generations of tooling into a channel that does not exist. Prove that routing is impossible in coordinates first, then move the placement.

Arbitrary angle cleanup - snaps, doglegs, and one by hand

Arbitrary angles were left behind by the finishing operations - 21 of them. The user’s rule is explicit - a slanted line is an error.

  • 30 snaps: pin one end and project the other onto an exact 0/45/90 line. Neighbouring endpoints move along with it, but if a neighbour then becomes a new arbitrary angle the candidate is discarded (so a snap cannot spawn another snap)
  • 4 dogleg splits: a segment whose two ends are both tied to other diagonals cannot move its endpoints, so it bends in the middle instead - into an exact 45 degrees plus an orthogonal piece
  • 1 by hand: the last segment, at 45.5 degrees, had its junction pushed 0.01mm along the direction of its vertical neighbour to reach 45.000 degrees

The whole process ran under a gate holding DRC at (0,0,0). Result: all 1,445 segments, orthogonal 823 / 45 degrees 622, arbitrary angles 0.

Final scorecard for the 4-layer board

Metric2-layer final4-layer done
DRC errors120
Unrouted30
Shorts (crossings included in the tally)00
Arbitrary-angle segments170
Right-angle corners98
Corners per net12.410.6
Max detour ratio3.07x2.37x
Total trace length4,633mm4,311mm
Track width rule violations00
NetlistMatchMatch
Measurement repeatability-5 runs identical

The two inner layers absorbed 78% of the routing (In1 1,776mm + In2 1,593mm out of 4,311mm total). The numbers say plainly why cramming everything onto the top and bottom of a two-layer board never worked.

Finished board, top side

Finished board, bottom side

Finished board, see-through view

Closing the series - seven tool defects

Seven tool defects ran through this endgame - the tools lied to us in seven different ways. Every one of them was caught by measurement.

#DefectSymptom
1Only one chamfer size triedRight angles that could be resolved were not
2Batches of 15 judged togetherOne bad move discarded the other 14
3Everything stopped at the first failureEasy cases behind it were never attempted
4Fixed +/-12mm search windowA way around that lies outside it is never found
5A single point per via candidateBlind to a spot 0.3mm away
6Pads over-approximated as circlesA legal channel missing only from the tool’s view
7Search origin fixed to items[0]The trace that has to move lies outside the search radius - zero candidates

Add the three measurement traps (overwriting, non-determinism, a missing category), the two stitching rules (every piece of new copper carries its own check; keep proposal separate from judgement), and the closing sentence (prove impossibility in coordinates, then move the placement). What this series leaves behind is not one finished board but this list, which keeps the next board out of the same traps.

The next board starts with these rules built in from the beginning. That is what automation means.

The gate only opens its eyes when the measurement is honest, and the placement only moves after impossibility has been proven in coordinates.


Part 9 follows: the things we thought we had verified. A review after we called the board done exposed the real gaps in the automation.

The earlier parts covered why we started this, the scale bug, the library, the routing failures, the measurement bug, the move to four layers, and the last mile. This part closes the main series.

Contact