Author Topic: Scripting gerber generation  (Read 1367 times)

0 Members and 1 Guest are viewing this topic.

Offline Rachie5272

  • Regular Contributor
  • *
  • Posts: 145
Scripting gerber generation
« on: January 05, 2019, 07:49:01 pm »
Is there a reasonable way to script the generation of gerber/drill files, to make it a single command operation?  Right now I have to go to the fabrication output gerber menu, manually check every option in the dialogue box (they keep resetting), generate the files, close the annoying gerber viewer, delete the extra garbage files, then repeat for the NC drill file.

Surely there must be a better way.  I've looked into scripting for altium, but I have no idea how to interface with their system.  How do I go about adding this sort of functionality?

Additionally, is there a way to create more readable filenames for the gerber output?  It generates a dozen files with the exact same project name, differing only in the extension.  I'd rather not waste time trying to interpret what "project.gbs" means, when it could be a much more obvious "project_bottom_solder_mask.gbs".
« Last Edit: January 05, 2019, 08:03:27 pm by Rachie5272 »
 

Offline ajb

  • Super Contributor
  • ***
  • Posts: 1679
  • Country: us
Re: Scripting gerber generation
« Reply #1 on: January 06, 2019, 01:13:27 am »
This is what outjobs are for.  There are some limitations, but you can set it up so that an entire contract assembly package -- gerbers, drill files, BOM, pick-and-place, stackup report, etc -- are generated with one click.  You can also set up jobs for documentation outputs.

https://www.altium.com/documentation/18.0/display/ADES/((Preparing+Multiple+Outputs+in+an+OutputJob))_AD

I don't think you can set the name of the gerber outputs on a per-layer basis.  The standard extensions are at least sort of mnemonic:

T = Top
B = Bottom

L = Copper Layer
S = Solder Mask
O = Overlay (silkscreen)
P = Paste Mask

1,2,3 = additional copper layers, numbered from top to bottom
 

Offline free_electron

  • Super Contributor
  • ***
  • Posts: 7218
  • Country: us
    • SiliconValleyGarage
Re: Scripting gerber generation
« Reply #2 on: January 06, 2019, 05:04:00 pm »
you don't want to mess with naming and extensions.

format is <board_name>.<layer>

the gerber processors are all working on that principle. if you deviate from that you will get lots of questions from the company that needs to read your data...

Professional Electron Wrangler.
Any comments, or points of view expressed, are my own and not endorsed , induced or compensated by my employer(s).
 

Offline ddavidebor

  • Super Contributor
  • ***
  • Posts: 1135
  • Country: it
    • Fermium LABS website
Re: Scripting gerber generation
« Reply #3 on: March 09, 2019, 06:36:37 pm »
Is there a reasonable way to script the generation of gerber/drill files, to make it a single command operation?  Right now I have to go to the fabrication output gerber menu, manually check every option in the dialogue box (they keep resetting), generate the files, close the annoying gerber viewer, delete the extra garbage files, then repeat for the NC drill file.

Surely there must be a better way.  I've looked into scripting for altium, but I have no idea how to interface with their system.  How do I go about adding this sort of functionality?

Additionally, is there a way to create more readable filenames for the gerber output?  It generates a dozen files with the exact same project name, differing only in the extension.  I'd rather not waste time trying to interpret what "project.gbs" means, when it could be a much more obvious "project_bottom_solder_mask.gbs".



Leave them, they're industry standard. Is much worse if the pcb manufacturer screws them.


Not hard if you know the various synonyms.

GTL: Gerber Top Layer (copper)
GTS: Gerber Top Solder
GTO: Gerber Top Overlay (silkscreen)
GTP: Gerber Top Paste (solder paste)

GB: Gerber Bottom

G1, G2, G3: INNER COPPER LAYER
TXT: DRILL
Davide Bortolami,
Fermium LABS srl
 

Offline tycz

  • Regular Contributor
  • *
  • Posts: 74
Re: Scripting gerber generation
« Reply #4 on: March 10, 2019, 02:24:09 am »
you don't want to mess with naming and extensions.

format is <board_name>.<layer>

the gerber processors are all working on that principle. if you deviate from that you will get lots of questions from the company that needs to read your data...

The Protel file extensions are not part of any standard, they are just familiar to the Chinese factories because Protel/Altium is very popular over there. The idea of describing the content of the file in the file extension (as opposed to the data format) seems very much a byproduct of the 8+3 filename limitation of the early DOS software.

I find them very confusing myself so never use them. Especially the copper layers. For a four layer board you get something like *.GBL *.G1 *.G2 *.GTL. So which order are the coppers layers in then? I'd have to look it up.

If they are named something more readable like Bottom_layer_4.ger Inner_layer_3.ger Inner_layer_2.ger Top_layer_1.ger then the layer order is obvious. I've been naming my files this way for years because it makes it easier for me to check them. I've never been asked a for clarification on layer names by a factory receiving them. This popular idea that PCB factories are staffed with feeble-minded technicians that are unable to comprehend anything other than the old Protel extensions is a bit ridiculous isn't it?

Anyway, just about every PCB package with a long history has its own funny way to name gerber files. Not everybody uses Protel/Altium in fact.

For example,
Quote from: Eagle 6.5.0 help file
The following file names are commonly used:
-------------------------------------------------------
File   Layers               Meaning
-------------------------------------------------------
*.cmp  Top, Via, Pad        Component side
*.ly2  Route2, Via, Pad     Inner signal layer
*.ly3  Route3, Via, Pad     Inner signal layer
...                         ...
*.sol  Bot, Via, Pad        Solder side
*.plc  tPl, Dim, tName,     Silkscreen comp. side
*.pls  bPl, Dim, bName,     Silkscreen solder side
*.stc  tStop                Solder stop mask comp. side
*.sts  bStop                Solder stop mask sold. side
*.drd  Drills, Holes        Drill data for NC drill st.
-------------------------------------------------------

I'm not saying that people shouldn't use the Protel file extensions. Just that anybody than chooses not to can do so without fear. I suppose Gerber X2 format will make the them totally obsolete...eventually.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf