← Back to team overview

kicad-developers team mailing list archive

Re: Plot and drill file generation via scripts

 

Hi Lorenzo,

The print script uses plot controller--thanks for writing that!  Right
now, it does basically only what it needs to do to support gerber
generation--there are no "per layer" settings.

There is about as much logic in the drill generation script as there
is in the plot script--that is to say, not much.

I don't think I have added any technical debt to Kicad with this
patch.  I'll gladly automate the regression tests on plotting and
drilling. If the rest of the team wants it, I'd also do the
refactoring of drilling and plotting according to a design approved by
the team, and keep the scripts working with the new calls.

Adam Wolf
Wayne and Layne, LLC

On Thu, May 2, 2013 at 2:44 AM, Lorenzo Marcantonio
<l.marcantonio@xxxxxxxxxxxx> wrote:
> 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
> next
>
> 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
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References