← Back to team overview

kicad-developers team mailing list archive

Re: Plot and drill file generation via scripts


On Thu, May 02, 2013 at 09:16:23AM +0200, Miguel Angel Ajo wrote:
> I haven't worked very much with the plotters & drillers, but may be Lorenzo 
> could help us take a look at it before committing, he was working
> on the PLOT_CONTROLLER / python integration later (may be more, I'm 
> unsure).

I'm not qualified to look at python code, however he's right saying that
some of the plot logic is in the dialog and needs to be duplicated. The
'right thing' would be refactoring it to a separate function (probably
in BOARD?).

The way I designed the plot interface is meant to avoid the 'outer layer
loops', i.e. the caller should know what *single* layer wants to plot
and with which options.

So the calling code should be something like (in pseudo)

Set option for upper
Open upper file
Plot upper
Close upper file

Set option for lower
Open lower file
Plot lower file
Close lower file

This has the best flexibility on option, obviously.

or, alternatively, mimicking the plot dialog

Set options
for each layer in (upper,lower,whatever)
    open layer file
    plot layer
    close layer file

The drill generator is a whole different thing and it's not integrated,
so it's correct to have to 'duplicate more' (a refactoring would be
welcomed here, too)

Lorenzo Marcantonio
Logos Srl

Follow ups