summaryrefslogtreecommitdiff
path: root/gerber/rs274x.py
AgeCommit message (Collapse)AuthorFilesLines
2017-07-04Merge pull request #67 from jmargeta/python_3_fixHamilton Kibbe1-1/+1
Add GerberParser fix for Python 3.x
2017-04-15Add tolerance to center findingJan Margeta1-4/+7
In some cases, the computation of valid sweep angle hit numerical limits and no centers are found. This commit adds a small amount of tolerance.
2017-04-15Replace sys.maxint with sys.maxsizeJan Margeta1-1/+1
In Python 3, sys.maxint was removed, however its current use can be safely substituted with sys.maxsize (also in Python 2) See also: https://docs.python.org/3.1/whatsnew/3.0.html#integers
2016-11-18Finish adding square hole support, fix some primitive calculations, etc.Hamilton Kibbe1-30/+85
2016-11-18Add support for IF (Include File) rs274x commandHamilton Kibbe1-2/+24
2016-11-06Merge upstream changesHamilton Kibbe1-3/+6
2016-11-05Finish Merge, most tests passingHamilton Kibbe1-27/+30
2016-09-24Commit partial merge so I can work on the planeHamilton Kibbe1-5/+17
2016-08-06Manually mere rendering changesHamilton Kibbe1-15/+40
2016-07-24Add more tests for rendering to PNG. Start adding tests for rendering to ↵Garret Fick1-5/+5
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 Fick1-3/+21
rendering bugs, especially related to holes in flashed apertures
2016-07-17Manually merge af5541ac93b222c05229ee05c9def8dbae5f6e25Garret Fick1-3/+0
2016-07-17Merge in negative soldermask. Still required further changes to support ↵Garret Fick1-28/+40
negatives for shapes that dont exist in the merge source
2016-06-28Don't flash G03-only commandsGarret Fick1-0/+6
2016-06-25Add support for polygon aperturesGarret Fick1-2/+12
2016-06-03compliant fs format as FS<L or T><A or I>[Nn][Gn]<Xn><Yn>[Dn][Mn]visualgui823@live.com1-1/+1
2016-05-28Fix converting amgroup unitsGarret Fick1-1/+3
2016-04-23Correctly find the center for single quadrant arcsGarret Fick1-1/+32
2016-03-27Merge pull request #2 from qaulau/masterGarret Fick1-2/+2
Update rs274x.py
2016-03-26D02 in the middle of a region starts a new regionGarret Fick1-1/+7
2016-03-22Update rs274x.pyQau Lau1-2/+2
python 2.6 bug re incompatibility in sre, see https://bugs.python.org/issue214033
2016-03-19Correctly handle empty command statementsGarret Fick1-0/+6
2016-03-10Make sure apertures get a unitRobert Kirberich1-0/+1
2016-02-21Additional bounding box calcuation that considers only actual positions, not ↵Garret Fick1-0/+15
the movement of the machine
2016-02-16Keep aperature macros as single statement. Don't generate regions with no pointsGarret Fick1-3/+16
2016-02-16Handle multiple commands on a single lineGarret Fick1-3/+22
2016-02-14Fix convertion of units for apertures and regionsGarret Fick1-4/+4
2016-01-31Keep track of quadrant mode so we can draw full circlesGarret Fick1-3/+3
2016-01-28Cleanup, rendering fixes.Hamilton Kibbe1-2/+5
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 Kibbe1-20/+54
- '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-08More stability fixes for poorly constructed filesGarret Fick1-2/+4
2015-12-30Work with Diptrace that calls things D3 not D03Garret Fick1-3/+3
2015-12-20Allow renderer to write to memory per #38Hamilton Kibbe1-3/+0
Some updates to rendering colors/themes
2015-12-19Allow negative render of soldermask per #50Hamilton Kibbe1-27/+39
Update example code and rendering to show change
2015-12-03Move the coordinate matching to the beginning since most of the items are ↵Garret Fick1-9/+8
coordinates. For large files, this decreases total time by 10-20%
2015-11-18Regions with arcs would crash if they occured before any command to set the ↵Garret Fick1-2/+2
aperture
2015-11-15Use Python's universal newlines to open filesPaulo Henrique Silva1-1/+1
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-10-10Python 3 fixHamilton Kibbe1-1/+5
2015-10-10Allow files to be read from strings per #37Hamilton Kibbe1-10/+14
Adds a loads() method to the top level module which generates a GerberFile or ExcellonFile from a string
2015-08-09Add support for arcs in regions.Hamilton Kibbe1-12/+19
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-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 Silva1-1/+3
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-6/+6
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-16Add checks to ensure statement unit conversions are idempotentHamilton Kibbe1-0/+4
2015-04-24Fix for #25. Checking was happening at the gerber/excellon file level, but I ↵Hamilton Kibbe1-2/+3
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-13Fix issue where D01 and D03 are implicit.Paulo Henrique Silva1-4/+7
Based on code from @rdprescott.
2015-04-07Fix CoordStmt with missing i/j offsetsPaulo Henrique Silva1-2/+4
2015-04-07Add some deprecated but still found statementsPaulo Henrique Silva1-6/+26