I imported above PCB outline from dxf file and try to set drill/plane origin to the center of the main circle, which coordinate is (104.082857, 65.658537).
Is there anyway to set this instead of using the mouse click?
Hi Masappo2023, and welcome to the kicad forum!
One nice thing about kicad is that the schematic and pcb files are plain-text. I have hacked many a project in a text editor. Something like changing the name of your local library, can be tweaked with judicious find/replace with the appropriate text snippets.
I have never tried to change the drill or grid origin, but if you open your x.kicad_pcb file in any old text editor you can see perhaps how it might be modified to your needs – a quick test looks to me like aux_axis_origin is the drill datum, and grid_origin is, well, the grid:
And, of course, do this on a copy of your project just in case…
Also note that kicad’s Y axis goes in the wonky down direction (it is one of the first things to change in the preferences).
edit: yeah, there is probably a more proper way to do this via python, but for a one-off change, it’s hard beat a quick text edit.
It was very helpful.
It seems that we can create a command processor in Python.
KiCAD text files looks having their own syntax, but is it possible to follow the structure in Python like XML?
Do a search for Python modules for parsing S-expressions.
Thank you for this information.
I will do it soon.
Add a pad at that location (you can set the precise location in the pad properties) . . . once you have a pad there you can snap to it when you set the origins . . . when happy delete the added pad.
When I prepared in LibreCad the dxf of my round PCB I have added there a small cross at circle center. Then importing I placed that cross at 0,0 absolute coordinates and finally deleted it.
I don’t remember if I was able to position it that way at once or I had to use Move Exactly (I was doing it few years ago).
That helped me also to position footprints that were in symmetry regarding the center point (connectors at right and left, round antenna and its connector have coordinates X=0):
I see a point.
Even if the arc is selected, the center coordinates are not known, but in the case of the circle, it turned out that the start x, y are the center coordinates. I found that it can be easily done by drawing a circle of center (0,0) in dxf.
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.