summaryrefslogtreecommitdiff
path: root/gerber
AgeCommit message (Collapse)AuthorFilesLines
2016-03-10Make sure apertures get a unitRobert Kirberich1-0/+1
2016-01-28Cleanup, rendering fixes.Hamilton Kibbe16-195/+343
fixed rendering of tented vias fixed rendering of semi-transparent layers fixed file type detection issues added some examples
2016-01-25Excellon format detection uses ExcelonFile.bounds nowPaulo Henrique Silva1-2/+2
Long term we should have only one .bounds method. But ExcellonParser right now is not correct for cases with two drills in the same line (it will report one dimension being zero)
2016-01-22Fix NameError on Polygon primitive renderingPaulo Henrique Silva1-1/+1
2016-01-21Add support for mirrored renderingHamilton Kibbe2-12/+18
- The default theme now renders the bottom layers mirrored. - see https://github.com/curtacircuitos/pcb-tools/blob/master/examples/pcb_bottom.png for an example.
2016-01-21Fix a bunch of rendering bugs.Hamilton Kibbe29-936/+1766
- 'clear' polarity primitives no longer erase background - Added aperture macro support for polygons - Added aperture macro rendring support - Renderer now creates a new surface for each layer and merges them instead of working directly on a single surface - Updated examples accordingly
2016-01-01Refactor a littleHamilton Kibbe5-74/+68
pulled all rendering stuff out of the pcb/layer objects
2015-12-22Python3 fixHamilton Kibbe1-2/+2
2015-12-22Add PCB interfaceHamilton Kibbe11-117/+496
this incorporates some of @chintal's layers.py changes PCB.from_directory() simplifies loading of multiple gerbers the PCB() class should be pretty helpful going forward... the context classes could use some cleaning up, although I'd like to wait until the freecad stuff gets merged, that way we can try to refactor the context base to support more use cases
2015-12-20Allow renderer to write to memory per #38Hamilton Kibbe5-11/+35
Some updates to rendering colors/themes
2015-12-20Clean up negative render codeHamilton Kibbe1-76/+69
2015-12-19Allow negative render of soldermask per #50Hamilton Kibbe10-99/+263
Update example code and rendering to show change
2015-11-23Fix AMParamStmt to_gerber to write changes back.Paulo Henrique Silva2-3/+3
AMParamStmt was not calling to_gerber on each of its primitives on his own to_gerber method. That way primitives that changes after reading, such as when you call to_inch/to_metric was failing because it was writing only the original macro back.
2015-11-15Remove svgwrite backendPaulo Henrique Silva3-133/+2
We moved the functionality to cairo backend, it can write png and svg and maybe more (pdfs?)
2015-11-15Use Python's universal newlines to open filesPaulo Henrique Silva6-11/+11
2015-11-13Add fix to work with excellon with no tool definition.Paulo Henrique Silva1-1/+18
I found out that Proteus generate some strange Excellon without any tool definition. Gerbv renders it correctly and after digging in I found the heuristic that they use to "guess" the tool diameter. This change replicates this behavior on pcb-tools.
2015-11-13Fix issue when a region is created as the first graphical object in a filePaulo Henrique Silva1-2/+5
When regions were the first thing draw there is no current aperture defined, as regions do not require an aperture, so we use an zeroed Circle as aperture in this case. Gerber spec says that apertures have no graphical meaning for regions, so this should be enough.
2015-11-13Improve Excellon parsing coveragePaulo Henrique Silva3-16/+226
Add some not so used codes that were generating unknown stmt.
2015-10-10Python 3 fixHamilton Kibbe2-2/+10
2015-10-10Allow files to be read from strings per #37Hamilton Kibbe9-50/+140
Adds a loads() method to the top level module which generates a GerberFile or ExcellonFile from a string
2015-09-10Merge pull request #40 from curtacircuitos/cairo-render-unificationHamilton Kibbe6-86/+141
Cairo render unification
2015-08-09Add support for arcs in regions.Hamilton Kibbe4-49/+70
This fixes the circular cutout issue described in #32. Regions were previously stored as a collection of points, now they are stored as a collection of line and arc primitives.
2015-07-25Fix windows permission errorHamilton Kibbe1-1/+3
per #33 the issue was trying to re-open the temporary file. it works on everything but windows. I've changed it to seek to the beginning and read from the file without re-opening, which should fix the issue.
2015-07-22Fix multiple layer issue in cairo-unification branch (see #33)Hamilton Kibbe2-11/+14
2015-07-09Fix arcs and ackground paintingPaulo Henrique Silva2-2/+8
2015-07-09Initial patch to unify our render towards cairoPaulo Henrique Silva3-39/+62
This branch allows a pure cairo based render for both PNG and SVG. Cairo backend is mostly the same but with improved support for configurable scale, orientation and inverted color drawing. API is not yet final.
2015-07-06Add tool path optimization exampleHamilton Kibbe1-10/+25
Add example demonstrating use of tsp-solver with pcb-tools to optimize tool paths in an excellon file. This is based on @koppi's script in #30
2015-06-11Python 3 fixHamilton Kibbe1-3/+3
remove dict itervalues() calls
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-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-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.