The pcb-stackup converter function.
| Param | Type | Description |
|---|---|---|
| layers | array.<Layer> |
Array of layer objects |
| [options] | Options |
Optional options, see pcb-stackup-core docs. Setting createElement will override that setting in the gerber-to-svg options. |
| done | Done |
Callback function. |
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| gerber | string | NodeJS.ReadableStream |
The gerber data as a string or ReadableStream | |
| filename | string |
The filename so we can try and identify the type of the layer. You either have to provide this or the type. | |
| type | string |
The layer type, a valid layer type as given by whats-that-gerber. | |
| options | object |
{id: shortId.generate()} |
gerber-to-svg options |
| converter | gerber-to-svg converter stream |
A converter stream returned from gerber-to-svg. The converter is added in the layers cache to avoid re-converting gerbers. When no gerber property is present the converter is used and new options won't be applied to the conversion (but the layer type will still be applied). |
Properties
| Name | Type | Default | Description |
|---|---|---|---|
| id | string |
shortId.generate() |
Unique board identifier, generated by shortid for you by default |
| color | object |
see pcb-stackup-core docs | Colors to apply to the board render by layer type |
| outlineGapFill | number |
0.00011 | Threshold value for filling in gaps in the board outline. Units are whatever units the outline layer Gerber file is in. |
| maskWithOutline | boolean |
true |
Use the board outline layer as a mask for the board shape |
| createElement | function |
see pcb-stackup-core docs | Function used to create the XML element nodes |
See pcb-stackup-core docs for more details and additional options.
| Param | Type | Description |
|---|---|---|
| error | Error |
Error if something goes wrong. |
| stackup | Stackup |
The stackup data. |
Properties
| Name | Type | Description |
|---|---|---|
| top | object |
The top view SVG object, see pcb-stackup-core docs for full details. |
| top.svg | string |
The top SVG string. |
| bottom | object |
The bottom view SVG object, see pcb-stackup-core docs for full details. |
| bottom.svg | string |
The bottom SVG string. |
| layers | Array.<Layer> |
A cache of the processed layers that can be passed back to pcbStackup. |