kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #08700
Re: Proposal for batch plotting
Nice proof of concept :-), It's really useful already :-)
Let me understand the interpretation of your pctl file, as I imagine, it
reads options, options options, and then you run an output like HGPL= or
PS= or PDF= ,
when you run an output, then all the previous options get cleared? :)
For a final s-expr format it could be something like:
(....
(output
(filename xxxx.pdf)
(format PDF)
(option1 value1)
(option2 value2)
(option3 value3)
)
....)
?
:-)
2012/8/4 Lorenzo Marcantonio <l.marcantonio@xxxxxxxxxxxx>
> On Sat, Aug 04, 2012 at 07:40:15PM +0200, jean-pierre charras wrote:
> > With all the code made by Dick, S expression is even easier to use than
> scanf (with a (very) short leaning curve).
>
> The nested paren were a joke about sexp, I'd assume:D
>
> > And the code will be 100% (or 99%) good for any way chosen to store
> these settings.
>
> I've no issue with that, really. I've done a test bed for the idea. Well,
> actually it's already almost working (simply it has no GUI and spits stuff
> on stdout).
>
> The idea is pretty simple and IMHO it goes beautifully with the scripting
> layer: I bound a simple keyword/value parser to the PCB_PLOT_PARAMS class
> to set options and added two operations:
> 1) open a plotfile (with the current options)
> 2) plot a layer (with the current options)
>
> Each run can do many plotfiles and each plotfile can contain many layers.
> To made it useful I added a color options for layers. Also I enabled the
> PDF driver.
>
> Once finished the current plot routines could be altered to simply call it
> (to avoid bloat and duplication, the plot open routine are exactly the
> same!)
>
> I'm testing it on an old board I made, the plot control file is heavily
> commented so it should be clear what I'm trying to get done. It seems to
> work, the prognosis is good.
>
> Code size is about 400 lines for the main routines (one small class, about
> 180 lines are for the huge option dispatch if bank) and some light
> modifications to the rest of the plot stuff: mainly for decoupling from the
> global plotOption object, also I've fully accessorized the PCB_PLOT_PARAMS
> and factored out in a routine the 'gerber extension' switch case (it was
> asking me to do it:D).
>
> --
> 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
>
>
--
Miguel Angel Ajo Pelayo
http://www.nbee.es
+34 636 52 25 69
skype: ajoajoajo
Follow ups
References