Package detail

gerber-plotter

tracespace1.1kMIT4.2.8

Streaming Gerber / NC drill layer image plotter

PCB, Gerber, drill, circuit

readme

gerber plotter

Streaming Gerber / NC drill layer image plotter

latest next david

A printed circuit board Gerber and drill file plotter. Implemented as a Node transform stream that consumes objects output by gerber-parser and outputs PCB image objects.

Part of the tracespace collection of PCB visualization tools.

install

npm install --save gerber-plotter
# or
yarn add gerber-plotter

gerber-parser is a peer dependency, so you probably want to install it too:

npm install --save gerber-parser
# or
yarn add gerber-parser

Or, use a script tag:

<script src="https://unpkg.com/gerber-plotter@^4.0.0/dist/gerber-plotter.min.js"></script>
<script>
  // global variable gerberPlotter now available
  var plotter = gerberPlotter()
</script>

example

var fs = require('fs')
var gerberParser = require('gerber-parser')
var gerberPlotter = require('gerber-plotter')

var parser = gerberParser()
var plotter = gerberPlotter()

plotter.on('warning', function(w) {
  console.warn('plotter warning at line ' + w.line + ': ' + w.message)
})

plotter.once('error', function(e) {
  console.error('plotter error: ' + e.message)
})

fs.createReadStream('/path/to/gerber/file.gbr')
  .pipe(parser)
  .pipe(plotter)
  .on('data', function(obj) {
    console.log(JSON.stringify(obj))
  })

To run this module in a browser, it should be bundled with a tool like browserify or webpack. If you are using the script tag installation method instead, there will be a global variable gerberPlotter available after you have included gerber-plotter.min.js.

api

See API.md

changelog

Change Log

All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.

4.2.8 (2022-03-28)

Bug Fixes

  • plotter: do not ignore duplicate tool definitions (#379) (87a0849)

4.2.7 (2022-03-12)

Note: Version bump only for package gerber-plotter

4.2.5 (2020-12-18)

Bug Fixes

  • gerber-plotter: allow unset tool when drawing region arcs (#356) (f18d796), closes #355

4.2.4 (2020-12-15)

Bug Fixes

  • types: define more types for gerber-plotter (#349) (d1a1417)

4.2.2 (2020-10-13)

Bug Fixes

  • parser,plotter: resolve issues with macro parsing and plotting (#346) (09d4a28), closes #345

4.2.1 (2020-04-30)

Bug Fixes

  • deps: update devDependencies, React, and yargs (#315) (34ebb3e)

4.2.0 (2019-10-10)

Bug Fixes

4.1.1 (2019-06-05)

Bug Fixes

  • deps: update dependency readable-stream to ^3.4.0 (#264) (1936088)
  • deps: update type definitions (#245) (d227db3)

4.1.0 (2019-05-01)

Bug Fixes

4.0.3 (2019-04-10)

Bug Fixes

  • deps: update dependency @types/node to ^11.13.0 (#193) (44f2d60)
  • deps: update dependency @types/node to ^11.13.2 (#217) (e981a4e)
  • deps: update dependency readable-stream to ^3.3.0 (#199) (594e947)

4.0.2 (2019-03-24)

Bug Fixes

  • deps: update dependency @types/node to ^11.11.6 (#184) (c3bb301)
  • gerber-plotter: Emit correct 'repeat' object on steprepeat disable (#188) (930d133), closes #81
  • gerber-to-svg: Allow options parameter to be skipped (#181) (bbe5c07)

4.0.0 (2019-03-09)

Note: Version bump only for package gerber-plotter

4.0.0-next.19 (2019-03-09)

Features

  • Add typescript definitions to all consumable modules (#103) (bb6e8f9)
  • Update dependencies and enable Greenkeeper (9db54cc)

Performance Improvements

  • Align and simplify parameters, defaults, and return values (#102) (c4e3a84), closes #99

BREAKING CHANGES

  • Parameters, defaults, and return types have changed in pcb-stackup, pcb-stackup-core, and gerber-to-svg

4.0.0-next.15 (2018-11-13)

Features

  • whats-that-gerber: Use collection of filenames to determine type (#77) (6919549)

BREAKING CHANGES

  • whats-that-gerber: Output of whats-that-gerber changed from a single string to an object keyed by the filenames passed in as an array

4.0.0-next.13 (2018-09-12)

Note: Version bump only for package gerber-plotter

4.0.0-next.9 (2018-06-19)

Bug Fixes

  • gerber-plotter: Fix outline regression with duplicate paths(#64) (23b4bcb)

4.0.0-next.8 (2018-06-16)

Note: Version bump only for package gerber-plotter

4.0.0-next.7 (2018-06-16)

Bug Fixes

  • gerber-plotter: Fix gap fill ruining arcs (mcous/gerber-plotter#13) (6cf04b7)