A complex Edge.Cuts layer may require many lines and arcs. Often a Margin layer is needed to match the Edge.Cuts to allow a correctly bounded copper pour like in this image:
To date I have achieved this a few ways:
With a DXF double import: One to Edge.Cuts, another to Margin. However, if a DXF is not the source of the board outline, or is lost, or requires lots of tidying up etc., then I might try:
Graphically via two PCBNew instances:
- In high contrast mode, select and copy applicable Edge.Cuts artwork
- Open a new PCBNew window and paste.
- Edit > Move and Swap Layers.
- Copy+paste back into project’s PCBNew window. Or,
- Kicad script:
- In high contrast mode, select applicable Edge.Cuts artwork.
- Run this script to copy selected drawing segments to Margin:
import pcbnew board = pcbnew.GetBoard() for drw in board.GetDrawings(): if drw.IsSelected(): drwCpy = pcbnew.DRAWSEGMENT(board) board.Add(drwCpy) drwCpy.SetStart(drw.GetStart()) drwCpy.SetEnd(drw.GetEnd()) drwCpy.SetWidth(drw.GetWidth()) drwCpy.SetAngle(drw.GetAngle()) drwCpy.SetArcStart(drw.GetArcStart()) drwCpy.SetShape(drw.GetShape()) drwCpy.SetLayer(pcbnew.Margin)
- Because of a bug in Kicad I then need switch to legacy canvas (F9), then back to modern canvas (F11) to refresh the artwork.
All of these approaches can be pretty cumbersome, so I’m wondering if anybody has discovered a better way?
In Altium Designer for example, I am able to copy+paste, then use the PCB Inspector tool to switch the layer of any selected items.