pcb

Comment 2 for bug 746178

Revision history for this message
Luis de Arquer (ldearquer) wrote :

I have been stumbling with DRC issues which could be reduced to the same problem, even with latest master as of 07/2018 (commit 475c79598)
The reason why this happens is that, when the track is considered to plow through the polygon, only the clearance of the line is taken into account, not the real distance to the polygon.

if (line->Clearance < 2 * PCB->Bloat)
{
  AddObjectToFlagUndoList (type, ptr1, ptr2, ptr2);
  SET_FLAG (i->flag, line);
  message = _("Line with insufficient clearance inside polygon\n");
  goto doIsBad;
}

But PlowsPolygon() uses the bounding box of the line, which is not very accurate, rendering some false positives. The function IsLineInPolygon(), though, performs an accurate, though more expensive, test.

If we use IsLineInPolygon() with the "candidates" detected by PlowsPolygon(), the bug is fixed. Also, it fixed other related bugs (for example, when the plowing line has low clearance, but still is far from the polygon because other elements of higher clearance plow the polygon at the same place too).