summaryrefslogtreecommitdiff
path: root/gerber/tests
AgeCommit message (Collapse)AuthorFilesLines
2019-11-26Migrate to pytest (#111)Paulo Henrique Silva14-2076/+2333
* Migrate to pytest All tests were update to use pytest. Tests were alse black formatted. Eventually all code will be black formatted but need to merge some PRs first.
2018-06-26Match full filename instead of the base nameju5t1-1/+1
Regular expressions only matched the base name. This matches the entire filename which allows for more advanced regular expressions.
2017-11-22Merge pull request #76 from ju5t/guess-layerHamilton Kibbe2-1/+189
Check gerber content for layer hints
2017-11-14Add test that reproduces #77Hamilton Kibbe1-0/+14
2017-11-01Check gerber content for layer hintsju5t2-1/+189
2017-07-04Fix handling of multi-line strings per #66Hamilton Kibbe1-3/+24
2017-04-15Fix Cairo backend for svg saving and Python 3Jan Margeta1-1/+39
2016-12-01(#61) Add regex option to discover layer classesju5t1-0/+21
2016-11-18Fix drill testsHamilton Kibbe1-6/+6
2016-11-18Clean up rs274x output testsHamilton Kibbe1-19/+19
2016-11-18Add more tests for primitivesHamilton Kibbe1-12/+87
2016-11-18Excellon updateHamilton Kibbe1-7/+147
2016-11-06Fix tests on python3Hamilton Kibbe1-2/+1
2016-11-06temporarily disable tests faillin g on CIHamilton Kibbe1-5/+5
2016-11-06Merge upstream changesHamilton Kibbe6-23/+100
2016-11-05Finish Merge, most tests passingHamilton Kibbe5-49/+63
2016-09-24Commit partial merge so I can work on the planeHamilton Kibbe3-5/+28
2016-08-06Fix multiple problems with the merge. There are still errors, but I will ↵Garret Fick3-5/+21
intentionally leave them because future merges might resolve them
2016-08-06Manually mere rendering changesHamilton Kibbe12-318/+592
2016-07-24Add more tests for rendering to PNG. Start adding tests for rendering to ↵Garret Fick8-11/+254
Gerber format. Changed definition of no hole to use None instead of 0 so we can differentiate when writing to Gerber format. Makde polygon use hole diameter instead of hole radius to match other primitives
2016-07-24Add many render tests based on the Umaco gerger specification. Fix multiple ↵Garret Fick36-6/+559
rendering bugs, especially related to holes in flashed apertures
2016-07-24Merge commit '2fa585853beff6527ea71084640f91bad290fac2' into ↵Garret Fick1-1/+4
merge-curtacircuitos
2016-07-20Manually merge change 6f876edd09d9b81649691e529f85653f14b8fd1cGarret Fick1-0/+33
2016-07-17Manually merge af5541ac93b222c05229ee05c9def8dbae5f6e25Garret Fick1-2/+1
2016-07-17Create first test that renders and validates the the rendered PNG is correct.Garret Fick4-2/+88
2016-07-17Merge in negative soldermask. Still required further changes to support ↵Garret Fick2-23/+24
negatives for shapes that dont exist in the merge source
2016-07-16Fix most broken tests so that I can safely merge into changes with known ↵Garret Fick4-38/+52
expected test result
2016-05-28Fix AMParamStmt to_gerber to write changes back.Paulo Henrique Silva1-2/+2
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.
2016-01-28Cleanup, rendering fixes.Hamilton Kibbe2-4/+73
fixed rendering of tented vias fixed rendering of semi-transparent layers fixed file type detection issues added some examples
2016-01-21Fix a bunch of rendering bugs.Hamilton Kibbe12-324/+598
- '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
2015-12-22Add PCB interfaceHamilton Kibbe1-0/+33
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-19Allow negative render of soldermask per #50Hamilton Kibbe2-23/+24
Update example code and rendering to show change
2015-12-06Add test case to start working on a fixPaulo Henrique Silva1-1/+4
2015-11-23Fix AMParamStmt to_gerber to write changes back.Paulo Henrique Silva1-2/+2
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-15Use Python's universal newlines to open filesPaulo Henrique Silva2-5/+5
2015-11-13Improve Excellon parsing coveragePaulo Henrique Silva1-0/+50
Add some not so used codes that were generating unknown stmt.
2015-10-10Allow files to be read from strings per #37Hamilton Kibbe2-9/+42
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 Kibbe1-20/+14
Cairo render unification
2015-08-09Add support for arcs in regions.Hamilton Kibbe1-20/+14
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-06-11Add keys to statements for linking to primitives. Add some API features to ↵Hamilton Kibbe1-2/+15
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 Kibbe1-0/+10
eagle per #28.
2015-05-21Fix multiline read of mixed statements (%XXX*% followed by DNN*)Paulo Henrique Silva2-0/+17
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 Silva1-3458/+1
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 Silva1-0/+18
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 Kibbe2-14/+254
2015-04-27Allow 3 digits on Excellon tool selectionPaulo Henrique Silva1-0/+3
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 Kibbe1-24/+310
2015-04-24Fix for #25. Checking was happening at the gerber/excellon file level, but I ↵Hamilton Kibbe1-38/+77
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-14Fix AM statement testPaulo Henrique Silva1-2/+2
2015-04-07Small change on __str__ for SF StatementPaulo Henrique Silva1-1/+1