Help me develop the Footprint Text Position Tool

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.

The bounding box will include the text, so you can’t use it to position the text. Can you use the footprint’s origin (GetPosition)?

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)

:blush:Thank you for your reply. I will try to see if it is feasible.

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.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.