layout_edge_and_cutout module#
Keep copper back from the board edge, cutouts and holes with two rules.
Two builtin tags name the board’s openings, so these rules need no tag of your own:
IsBoardEdgeis the outer edge of the board outline, and only that.IsHoleis every opening inside it. Measured on jitx 4.6, it matches a hole in the board outline polygon, a circuitCutout(a routed slot) and a via’s drill. The drill of a plated through-hole pad was not tested.
design_constraint(IsBoardEdge, AnyObject).clearance(EDGE_CLEARANCE) keeps
all copper 1.5 mm (EDGE_CLEARANCE) from the outer edge, and
design_constraint(IsHole, AnyObject).clearance(HOLE_CLEARANCE) keeps it
0.5 mm (HOLE_CLEARANCE) from every opening. The board here has both
kinds of inner opening: slot is a hole in CutoutBoard.shape, and
cutout is a Cutout in the circuit. A GND pour larger than the board
shows the pullback from each.
Measured on jitx 4.6, with a pour that reaches every feature:
The pour stops 1.51 mm from the outer edge, the edge rule plus 0.01 mm. Neither the outline slot nor the cutout follows the edge rule.
It stops 0.5 mm from the slot, from the cutout and from the drill of a via on another net (
other_viahere), each within 0.005 mm, measured from the drill, not the via pad.The pour stays joined to
gnd_anchor, its own net’s via. The hole pullback applies to the drills of other-net vias.With neither rule, the pour stops 0.51 mm from the outer edge, the sample substrate’s
min_copper_edge_spaceof 0.5 mm plus 0.01, and 0.206 mm from the slot and the cutout.min_copper_edge_spacereaches only the outer edge too. The 0.206 mm at the slot and the cutout is just above the substrate’smin_copper_hole_spaceof 0.2032 mm; whether that floor sets it was not tested.
Because IsHole matches via drills, a hole rule wider than the via pad
pulls copper back from other-net vias as well, and no second condition limits
it to the board openings. A second condition narrows the other side of the
rule: design_constraint(IsHole, IsPour) acts on pour copper only, and via
drills still match it. Measured on jitx 4.6, under a 0.8 mm
(IsHole, IsPour) rule in place of both rules here, the pour stopped
0.8 mm from the slot and the cutout and 0.8018 mm from another net’s via
drill.
- EDGE_CLEARANCE = 1.5#
Copper to the outer board edge, mm.
- HOLE_CLEARANCE = 0.5#
Copper to any hole, slot or cutout, mm.
- SLOT = [(9, -3), (11, -3), (11, 3), (9, 3)]#
A 2 mm by 6 mm slot in the board outline, centred at (10, 0).
- class CutoutBoard[source]#
Bases:
BoardA 40 mm by 30 mm board whose outline polygon has a slot in it.