Placing components along curve: custom scripts?

I’d like to create a board with components placed along a curve (circle, ellipse, spline) with tangent orientation. Is there a way how to perform placement automatically (at least for the simplest case - circle)?

I would be (pleasantly) surprised if KiCAD would support this feature. However if it isn’t possible, is it possible to write custom scripts for component placement? And if not so, is there a library/framework which simplifies editation of kicad_pcb file, so I could write a custom board generator for my case?

Did you know that kicad (pcbnew) has python scripting?

Here I’ve created an example script: https://github.com/hyOzd/kicad-python/blob/master/examples/putonarc.py

Note that this script requires you to install(*) my fork of kicad-python.

(*) you don’t really have to install it. You can use it simply by adding directory ‘kicad-python’ to python path.

1 Like

I picked KiCad as my new PCB editor to learn last summer just for that reason.

Since the python scripting support is not enabled in the default binaries, I built it from source for Linux, with scripting enabled. I wrote a script similar to hyOzd to place and angle components on a circle. It worked quite nice, at least as a proof-of-concept for me.

Unfortuanetly, I havent looked at the project or KiCad since, but have a goal setting up my KiCad environment from scratch, document the prosess and refactor the scripts.

Oh, that sounds nice, I was actually looking for signs for that beeing the case when 4.0 launched.
Can anyone confirm that the (“advanced”) python scripting is enabled by default in the regular binaries?