Electrical – KICAD PCB coil design related

coilkicad

My almost completed pcb design in KICAD requires a coil which needs to be accurate in dimension (coil is optimized using a optimization calculation algorithm developed in our lab which needs to be realized as is). If I draw using gui tools in KICAD, it is hard to make it accurate in terms of coordinates even with lowest possible grid size. I am looking for something similar to Allegro PCB editor where we can draw traces using instructions in KICAD. I believe it is possible since, I saw a python console in Pcbnew tool. Can somebody help with any information or tips that can at least draw lines with coordinates provided in instructions?

Best Answer

You can use the Python console like this:

import pcbnew
from pcbnew import wxPointMM
board = pcbnew.GetBoard()
tracks = board.GetTracks()
new_track = pcbnew.TRACK(board)
new_track.SetStart(wxPointMM(STARTX,STARTY))
new_track.SetEnd(wxPointMM(ENDX,ENDY))
tracks.Append(new_track)

Alternatively, you can click on a track in pcbnew and type 'E' (or right-click and select Properties) Selecting Track Properties

This will bring up the Track and Via Properties window where you can choose the start/end positions to finer than the user grid. Track and Via Properties