← Back to team overview

kicad-developers team mailing list archive

Re: Plot and drill file generation via scripts

 

On 05/03/2013 01:56 PM, Lorenzo Marcantonio wrote:
> 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.

What about what I think Lorenzo?  Is that important to you in any way?




Follow ups

References