GithubHelp home page GithubHelp logo

lucansky / pcb-tools Goto Github PK

View Code? Open in Web Editor NEW
4.0 5.0 2.0 926 KB

PCB stuff related (pcb2gode, drillmerge, viewgerber,...)

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.48% Haskell 99.00% Shell 0.52%

pcb-tools's Introduction

pcb-tools

PCB tooling written in Haskell. This library provides Gerber RS-274X and Excellon parser, as well as some other useful programs generally used in PCB Milling hobby industry, locally in Brno hackerspace base48.cz.

Programs

drillmerge (work in-progress)

Rounds diameters of the holes to available drills. Current strategy is regular rounding.

drillmerge --drills 0.8,0.9,1.0,1.1,1.2,1.4,2.0,3.0 --tolerance 0.1 drill.drl

Suggested features:

  • --drills 0.8,0.9..1.4,2.0,3.0
  • ability to define whether to round up or down for each drill --drills 1.0,1.4,2.0+,3.0- (or whatever better)

drawgerber

Mock-up parsing gerber file and drawing to file. Uses diagrams.

stack exec -- drawgerber --width=400 -o test.pdf

Currently has some perfomance issues O(2^n) :/

generategerber

A generator of sample random gerber files for testing performance.

stack exec -- generategerber --count 200 generated/sample1.gbr

gcoder (work in-progress)

pcb2gcode alternative (with fixed thermals!), not quite done, will come after drawgerber outputs valid diagrams for all edge cases

Install

Install stack and run stack install

Goals

  • Try LBNF complete Alex/Happy parser with EBNF grammar
  • Attoparsec parser for Gerber format
  • Understand monads
  • Use monads
  • Gerber interpreter/exporter
  • Excellon parser / interpreter
  • drillmerge
  • Outliner & G-Code generator

What's missing

  • Aperture macros
  • Polygon definition
  • Circular interpolation mode

Demo

Parsed gerber

pcb-tools's People

Contributors

lucansky avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.