kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #10310
Re: Plot and drill file generation via scripts
On Fri, May 03, 2013 at 01:38:58PM -0500, Adam Wolf wrote:
> Lorenzo,
>
> I've already done the SWIG magic to hook up FILE * to Python file like
> objects. It was about 5 lines in the SWIG files. It works, today,
> using my patch and drill.py. This did not involve mmap, or rewriting
> anything to think of files as strings. I do not understand why you
> think this would require changes to Kicad. Can you explain your
> reasoning behind that more?
That's because it's not only a FILE*, there are more FILE* and
temporaries being renamed and stuff. In fact the FILE* stored in the PDF
plotter changes for each stream opened. You can't pass the FILE* to open
plot because itself is not enough to do the whole shebang.
> Thank you. I personally don't care if there is logic in the dialogs.
> My opening email for this said, "If people want the logic out of the
> dialogs, I volunteer to move it; if they want it to stay there, I
> volunteer to watch this interface and keep the scripts working." This
Logic in dialog is not bad in itself... it could became *if* it were
duplicated for other purposes. So, now the drill logic is (partially) on
the dialog, and I'm fine with it. However should be some kind of drill
controller be implemented needing the same logic it would be best to
refactor it out so that it could be used by both. Of course this only if
they need to do the same thing...
I think that separating 'just because they should be separated' in many
case is too extreme.
--
Lorenzo Marcantonio
Logos Srl
Follow ups
References