summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-06-11Add keys to statements for linking to primitives. Add some API features to ↵Hamilton Kibbe5-80/+185
ExcellonFile, such as getting a tool path length and changing tool parameters. Excellonfiles write method generates statements based on the drill hits in the hits member, so drill hits in a generated file can be re-ordered by re-ordering the drill hits in ExcellonFile.hits. see #30
2015-06-02Merge pull request #29 from curtacircuitos/eagle_netlist_fixPaulo Henrique Silva2-33/+47
Fix IPC-D-356 parser. Handle too-long reference designators exported …
2015-06-01Fix IPC-D-356 parser. Handle too-long reference designators exported by ↵Hamilton Kibbe2-33/+47
eagle per #28.
2015-05-21G70/G71 are now interpreted as MOParamStmt.Paulo Henrique Silva1-2/+4
Got a bunch of metric files with no MOMM but only G71, this should be pretty mush harmless.
2015-05-21Fix multiline read of mixed statements (%XXX*% followed by DNN*)Paulo Henrique Silva3-1/+20
We now check if there is a %XXX*% command inside the line before considering it a multiline statement.
2015-05-21Fix ADD statement parsing for concatened statements.Paulo Henrique Silva2-3464/+7
ADDxxx param statements were too greedy on the mofidiers and were matching more than it should in cases where there are no newlines after the statement like: '%ADD12C,0.305*%%LPD*%', in a single line. The '%' was not exluded form modifiers so it got confused with the %LPD*% concatened. top_copper.GTL example was changed to be in a single line now with no spaces at all and it works well.
2015-05-20Add support for PCBmodE generated files.Paulo Henrique Silva2-1/+19
PCBmodE uses a standard but probably undefined behaviour issue on Gerber where it defines circle apertures with a single modifier but leaves a trilling 'X' after it. 'X' is modifiers separator but when there is only one modifier the behaviour is undefined. For parsing we are just ignoring blank modifiers. Test updated to catch this case.
2015-05-16Add checks to ensure statement unit conversions are idempotentHamilton Kibbe6-89/+379
2015-04-27Allow 3 digits on Excellon tool selectionPaulo Henrique Silva2-2/+10
Fritzing uses more than 2 digits for tool in their Excellons. To comply with that, I check specifically for 3 or less digits and use as tool number, more than that we treat as the standard (2 for tool and 2 for compensation index)
2015-04-26Refactor primitive unit conversion and add regression coverage to testsHamilton Kibbe2-280/+414
2015-04-24Fix indentation after PR #26Paulo Henrique Silva1-2/+2
2015-04-24Merge pull request #26 from curtacircuitos/unit_conversion_fixPaulo Henrique Silva4-136/+241
Fix for #25. Check units at the primitive level
2015-04-24Fix for #25. Checking was happening at the gerber/excellon file level, but I ↵Hamilton Kibbe4-136/+241
added units checking at the primitive level so the use case shown in the example is covered. Might want to throw a bunch more assertions in the test code (i started doing a few) to cover multiple calls to unit conversion functions
2015-04-23Fix Gerber generation for coord blocks with implicit op codePaulo Henrique Silva1-0/+3
2015-04-14Fix AM statement testPaulo Henrique Silva1-2/+2
2015-04-14AMStatement are used as is when gerbers are generatedPaulo Henrique Silva1-2/+2
2015-04-13Fix issue where D01 and D03 are implicit.Paulo Henrique Silva1-4/+7
Based on code from @rdprescott.
2015-04-07(really) Fix parsing for AM macros with zero modifiersPaulo Henrique Silva1-1/+1
2015-04-07Fix CoordStmt with missing i/j offsetsPaulo Henrique Silva1-2/+4
2015-04-07Fix CommentStmt for multi-line commentsPaulo Henrique Silva1-1/+5
2015-04-07Add some deprecated but still found statementsPaulo Henrique Silva2-6/+57
2015-04-07Small change on __str__ for SF StatementPaulo Henrique Silva2-2/+2
2015-04-07Fix parsing for AM macros with zero modifiersPaulo Henrique Silva1-2/+2
2015-04-07Add unspecified FS D leading zeros formatPaulo Henrique Silva3-14/+21
FS D leading zero format (probably form Direct) is an unspecified coordinate format where all numbers are specified with both leading and trailing zeros.
2015-04-07Fix Excellon repeat commandPaulo Henrique Silva3-14/+23
2015-04-07Allowance for weird case modifier with no zero after periodPaulo Henrique Silva1-1/+3
2015-03-06fix testsHamilton Kibbe1-9/+13
2015-03-06add rest of altium-supported ipc-d-356 statementsHamilton Kibbe1-25/+109
2015-03-06Add support for unary minus operator on macro parsingPaulo Henrique Silva1-1/+15
2015-03-05Fix parsing for multiline ipc-d-356 recordsHamilton Kibbe8-55/+218
2015-03-05Merge pull request #23 from curtacircuitos/macro-parse-evalHamilton Kibbe6-47/+418
Add aperture macro parsing and evaluation.
2015-03-05More py3 fixesPaulo Henrique Silva1-3/+3
2015-03-05Fix for py3Paulo Henrique Silva2-2/+2
2015-03-05Fix tests for macros with no variables.Paulo Henrique Silva5-33/+45
All AM*Primitive classes now handles float for all but the code modifiers. This simplifies the reading/parsing.
2015-03-03Add aperture macro parsing and evaluation.Paulo Henrique Silva5-31/+390
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.
2015-02-28Merge pull request #22 from pklaus/python3Hamilton Kibbe1-1/+1
Updating gerber/__main__.py for Python3
2015-02-28`sys.stderr.write()` instead of `print >> sys.stderr, "..."`Philipp Klaus1-1/+1
2015-02-24Merge pull request #21 from bcho/hotfix/py3k-map-objectPaulo Henrique Silva1-1/+1
Convert py3k's map object to tuple explicitly.
2015-02-25Convert py3k's map object to tuple explicitly.hbc1-1/+1
2015-02-21Merge pull request #20 from curtacircuitos/ipc-d-356Paulo Henrique Silva6-5/+562
Add IPC-D-356 Netlist Parsing
2015-02-20Add IPC-D-356 Netlist ParsingHamilton Kibbe6-5/+562
2015-02-20Fix floating point equality testPaulo Henrique Silva1-2/+2
2015-02-20Fix size test, board is slight out of origin, so size does change now that ↵Paulo Henrique Silva1-2/+2
we properly handle non-zero origins
2015-02-20Fix GerberFile.bounds when board origin is negativePaulo Henrique Silva1-13/+10
2015-02-20Fix arc width per comment in #12Hamilton Kibbe2-2/+2
2015-02-18doc optionsHamilton Kibbe1-1/+1
2015-02-18Doc updateHamilton Kibbe4-14/+38
2015-02-18Add offset operationHamilton Kibbe9-67/+348
2015-02-19Merge pull request #19 from curtacircuitos/python3Paulo Henrique Silva11-30/+28
Python 3 tests passing
2015-02-18Add documentation link to READMEHamilton Kibbe1-0/+6