No description
Aperture macros can get complex with arithmetical operations, variables and variables substitution. Current pcb-tools code just read each macro block as an independent unit, this cannot deal with variables that get changed after used. This patch splits the task in two: first we parse all macro content and creates a bytecode representation of all operations. This bytecode representation will be executed when an AD command is issues passing the required parameters. Parsing is heavily based on gerbv using a Shunting Yard approach to math parsing. Integration with rs274x.py code is not finished as I need to figure out how to integrate the final macro primitives with the graphical primitives already in use. |
||
|---|---|---|
| doc | ||
| examples | ||
| gerber | ||
| .coveragerc | ||
| .gitignore | ||
| .travis.yml | ||
| doc-requirements.txt | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
| test-requirements.txt | ||
pcb-tools
Tools to handle Gerber and Excellon files in Python.
Useage Example:
import gerber
from gerber.render import GerberSvgContext
# Read gerber and Excellon files
top_copper = gerber.read('example.GTL')
nc_drill = gerber.read('example.txt')
# Rendering context
ctx = GerberSvgContext()
# Create SVG image
top_copper.render(ctx)
nc_drill.render(ctx, 'composite.svg')
Rendering Examples:
###Top Composite rendering
Source code for this example can be found here.
