Detalhes do pacote

gerber-parser

tracespace1.2kMIT4.2.7

Streaming Gerber/drill file parser

PCB, Gerber, drill, circuit

readme (leia-me)

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

changelog (log de mudanças)

Change Log

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

4.2.7 (2022-03-12)

Note: Version bump only for package gerber-parser

4.2.6 (2022-03-12)

Bug Fixes

  • gerber-parser: ignore object attribute %TO blocks (#376) (844d44b), closes #375

4.2.4 (2020-12-15)

Bug Fixes

  • parser: accept units on same line as format (#350) (eb2feae)

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

Features

  • gerber-parser: Identify hole-plating in drill files (#285) (497f506)

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)

4.0.1 (2019-03-23)

Bug Fixes

  • gerber-parser: Parse DipTrace drill coordinate format command (#168) (b0de854), closes #137

4.0.0 (2019-03-09)

Note: Version bump only for package gerber-parser

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.17 (2018-12-20)

Bug Fixes

  • parser: Set units with M71/M72 in drill files (#96) (11066d2)

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.9 (2018-06-19)

Note: Version bump only for package gerber-parser

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

Note: Version bump only for package gerber-parser