Complete the code to define a via that connects ground planes.
via = Via(diameter=[1], drill=0.3, net='GND')
The standard via diameter for stitching ground planes is often 0.8mm to ensure good connectivity and manufacturability.
Complete the code to place vias in a grid pattern for stitching.
for x in range(0, board_width, [1]): for y in range(0, board_height, 10): place_via(x, y, net='GND')
Using a 10mm spacing between vias is a common practice to ensure effective ground stitching without overcrowding.
Fix the error in the via stitching code to ensure all vias connect the ground planes.
via = Via(diameter=0.8, drill=0.3, net=[1])
For ground plane stitching, the via must be connected to the ground net, which is 'GND'.
Fill both blanks to define a function that places a grid of vias for stitching.
def stitch_vias(board_width, board_height, spacing): for x in range(0, board_width, [1]): for y in range(0, board_height, [2]): place_via(x, y, net='GND')
Using the 'spacing' parameter for both x and y directions ensures a uniform grid of vias.
Fill the blanks to create a dictionary mapping via positions to their net for stitching.
via_map = { [1]: [2] for x in range(0, width, spacing) for y in range(0, height, spacing) if x != 0 and y != 0 }The dictionary keys are coordinate tuples (x, y), and the value is the net name 'GND'.
