4.2.7 • Published 3 years ago

gerber-parser v4.2.7

Weekly downloads
159
License
MIT
Repository
github
Last release
3 years ago

gerber parser

Streaming Gerber/drill file parser

latest next david

A printed circuit board Gerber and drill file parser. Implemented as a Node transform stream that takes a Gerber text stream and emits objects to be consumed by some sort of PCB plotter.

Part of the tracespace collection of PCB visualization tools.

install

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

Or, use a script tag:

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

example

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

var parser = gerberParser()

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

fs.createReadStream('/path/to/gerber/file.gbr')
  .pipe(parser)
  .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 gerberParser available after you have included gerber-parser.min.js.

api

See API.md

4.2.7

3 years ago

4.2.6

3 years ago

4.2.4

4 years ago

4.2.2

5 years ago

4.2.1

5 years ago

4.2.0

6 years ago

4.1.1

6 years ago

4.1.0

6 years ago

4.0.3

6 years ago

4.0.2

6 years ago

4.0.1

6 years ago

4.0.0

6 years ago

4.0.0-next.19

6 years ago

4.0.0-next.17

6 years ago

4.0.0-next.15

7 years ago

4.0.0-next.9

7 years ago

4.0.0-next.8

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.7

7 years ago

1.0.6

9 years ago

1.0.5

9 years ago

1.0.4

9 years ago

1.0.3

9 years ago

1.0.2

9 years ago

1.0.1

9 years ago

1.0.0

9 years ago

0.1.7

9 years ago

0.1.6

10 years ago

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

10 years ago

0.1.2

10 years ago

0.1.1

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago