From 286f302ac0b68bea4d2ccc15ee6972ee97120f61 Mon Sep 17 00:00:00 2001 From: Nick Playfair Date: Sun, 7 Feb 2021 20:08:00 +0000 Subject: [PATCH] Update README --- README.md | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 85709e2..9511a05 100644 --- a/README.md +++ b/README.md @@ -23,9 +23,18 @@ const imageConfig = { compLevel: 1 } +const layerNames = [ + 'CAMOutputs/DrillFiles/drills.xln', + 'CAMOutputs/GerberFiles/copper_top.gbr', + 'CAMOutputs/GerberFiles/silkscreen_top.gbr', + 'CAMOutputs/GerberFiles/soldermask_top.gbr', + 'CAMOutputs/GerberFiles/solderpaste_top.gbr', + 'CAMOutputs/GerberFiles/profile.gbr', +]; + const gerberArchive = '/path/to/gerber.zip'; -const fileProc = new ImageGenerator(folderConfig, imageConfig); +const fileProc = new ImageGenerator(folderConfig, imageConfig, layerNames); fileProc.gerberToImage(gerberArchive) .then(filename => { @@ -47,15 +56,27 @@ const imageConfig = { compLevel: 1 } +const layerNames = [ + 'CAMOutputs/DrillFiles/drills.xln', + 'CAMOutputs/GerberFiles/copper_top.gbr', + 'CAMOutputs/GerberFiles/silkscreen_top.gbr', + 'CAMOutputs/GerberFiles/soldermask_top.gbr', + 'CAMOutputs/GerberFiles/solderpaste_top.gbr', + 'CAMOutputs/GerberFiles/profile.gbr', +]; + const gerberArchive = '/path/to/gerber.zip'; -const fileProc = new ImageGenerator(folderConfig, imageConfig); +const fileProc = new ImageGenerator(folderConfig, imageConfig, layerNames); fileProc.gerberToStream(gerberArchive) .then(stream => { // Do something with the stream }) ``` +## Layer Names + +The constructor must be passed an array of filenames that correspond to the layers in the gerber archives you expect to be uploaded. The example above shows which names are used by EAGLE but other applications may use different filenames. ## Image Processing Configuratation