← Back to team overview

kicad-developers team mailing list archive

Re: Proposal for batch plotting

 

On 8/6/2012 2:03 PM, Lorenzo Marcantonio wrote:
On Mon, Aug 06, 2012 at 09:54:35AM -0400, Wayne Stambaugh wrote:
Shouldn't this be:
        (output TYPE   # Where TYPE is PDF, SVG, GERBER, etc?

It the same issue as the XML 'attribute or subelement' debate. A sexp could contain everything... it seems to me that the 'rule' was "first element is the record type, following are items containing attributes/subelement"

The issue is when to stop since if you says that instead of

(output (type dxf) (stem "Assembly") ... )

you have to use

(output dxf (stem "Assembly") ... )

then why not

(output dxf "Assembly" ... )

or even a lambda list with keywords (the last one could be a lambda list, too)

(output :type dxf :stem "Assembly" ... )

And you're lucky we don't have destructuring binds in C++ ...

Do we have some design doc explaining the use of sexps in file formats?

Other than the SWEET and new schematic file format documents, no. Feel free to use these documents a guideline. Ultimately, you are writing the code so you get the final say. However, it would be nice if there was some consistency between the different s-expression file formats.


I would also like to see a path for each plot type which can be made
relative to the project path to save the plot files into.  I like to
avoid putting a bunch of plot files in my project directory.

At the moment I implemented the output dir feature from the plot dialog. So you get:
- The output directory from the plot dialog
- The base name from the board file
- A stem declared in the plot statement
- An extension which could be the default from the file type or specified with the stem

Should be flexible enough... with some more work we could also set the output dir as a plot-level attribute instead of a job-level one. But then just put the full filename instead of a stem to add to a board name.

I was just putting in my request. I personally would prefer each file format in a separate directory rather than all the files in a single directory. Even if you could only put them all in a single directory, it would be a huge improvement over what we have now. Thanks you for your efforts.

Wayne

I'd leave that for a successive step of refinement, now I'm trying to make the parser work.




References