I want to make a plug-in similar to the Component Text Position in the Altium Designer software.
I’m almost done with the plugin, but I’m running into a problem.
Who has a Reference point for the Reference and Value movement of footprint in KiCad?
My current idea is to get the BoundingBox() of the footprint as the Reference point to move the position of Reference and Value by fixing the distance.
In my tests, I found that Footprint’s boundingBox () returned more data than I had expected.
New users can only upload 1 picture, so I combined 3 pictures into 1 picture.
How do I move the ref outside the border of the footprint for different sizes?
I really like this feature of Altium Designer, so I wanted to make a plug-in to run in KiCad that could easily move the ref of footprint to where I wanted it.
If you take the courtyard of the footprint as the border, try GetPolyCourtyardFront() (there is also GetPolyCourtyardBack() for footprints that have back courtyard)
If footprint doesn’t have a courtyard those methods will probably not work, in that case I suggest building a bounding box of your own by combining bounding boxes of pads and padding it a bit.