@hpcreery/tracespace-plotter
TypeScript icon, indicating that this package has built-in type declarations

5.0.3 • Public • Published

@hpcreery/tracespace-plotter

npm

Plot @hpcreery/tracespace-parser ASTs into image trees. Part of the tracespace collection of PCB visualization tools.

This module is one part of the tracespace render pipeline, and you may not need to use it directly. See @tracespace/core to integrate the full render pipeline into your project.

npm install @hpcreery/tracespace-plotter@next

usage

import fs from 'node:fs/promises'
import {parse} from '@hpcreery/tracespace-parser'
import {plot} from '@hpcreery/tracespace-plotter'

const gerberContents = await fs.readFile('gerber.gbr', 'utf-8')
const syntaxTree = parse(gerberContents)
const imageTree = plot(syntaxTree)

await fs.writeFile('plot.json', JSON.stringify(imageTree, null, 2), 'utf-8')

Package Sidebar

Install

npm i @hpcreery/tracespace-plotter

Weekly Downloads

34

Version

5.0.3

License

MIT

Unpacked Size

259 kB

Total Files

35

Last publish

Collaborators

  • hpcreery