Hamilton Kibbe
724c2b3bce
Finish Merge, most tests passing
2016-11-05 20:56:47 -04:00
Hamilton Kibbe
5af19af190
Commit partial merge so I can work on the plane
2016-09-24 02:28:36 +08:00
Garret Fick
8d5e782ccf
Fix multiple problems with the merge. There are still errors, but I will intentionally leave them because future merges might resolve them
2016-08-06 09:51:58 +08:00
Hamilton Kibbe
8cd842a41a
Manually mere rendering changes
2016-08-06 09:40:40 +08:00
Garret Fick
965d3ce23b
Add more tests for rendering to PNG. Start adding tests for rendering to 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-24 22:08:31 +08:00
Garret Fick
7cd6acf126
Add many render tests based on the Umaco gerger specification. Fix multiple rendering bugs, especially related to holes in flashed apertures
2016-07-24 17:08:47 +08:00
Garret Fick
cd4614f997
Merge commit ' 2fa585853b' into merge-curtacircuitos
2016-07-24 11:18:28 +08:00
Garret Fick
76a49ec8e7
Manually merge change 6f876edd09
2016-07-20 23:20:15 +08:00
Garret Fick
34f20ee90f
Manually merge af5541ac93
2016-07-17 21:04:15 +08:00
Garret Fick
f0585baefa
Create first test that renders and validates the the rendered PNG is correct.
2016-07-17 13:14:54 +08:00
Garret Fick
0dded38353
Merge in negative soldermask. Still required further changes to support negatives for shapes that dont exist in the merge source
2016-07-17 10:42:03 +08:00
Garret Fick
52c6d4928a
Fix most broken tests so that I can safely merge into changes with known expected test result
2016-07-16 15:49:48 +08:00
Paulo Henrique Silva
49dadd46ee
Fix AMParamStmt to_gerber to write changes back.
...
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-05-28 12:39:05 +08:00
Hamilton Kibbe
6f876edd09
Add PCB interface
...
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-22 02:47:23 -05:00
Hamilton Kibbe
1cb269131b
Allow negative render of soldermask per #50
...
Update example code and rendering to show change
2015-12-19 21:54:29 -05:00
Paulo Henrique Silva
2fa585853b
Add test case to start working on a fix
2015-12-06 21:44:09 -02:00
Paulo Henrique Silva
2e2b4e49c3
Fix AMParamStmt to_gerber to write changes back.
...
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-23 16:04:25 -02:00
Paulo Henrique Silva
6e29b9bcae
Use Python's universal newlines to open files
2015-11-15 22:28:56 -02:00
Paulo Henrique Silva
9ca75f991a
Improve Excellon parsing coverage
...
Add some not so used codes that were generating unknown stmt.
2015-11-13 03:31:32 -02:00
Hamilton Kibbe
dd63b169f1
Allow files to be read from strings per #37
...
Adds a loads() method to the top level module which generates a GerberFile or ExcellonFile from a string
2015-10-10 16:51:21 -04:00
Hamilton Kibbe
b81c9d4bf9
Merge pull request #40 from curtacircuitos/cairo-render-unification
...
Cairo render unification
2015-09-10 15:54:29 -04:00
Hamilton Kibbe
cb2fa34e88
Add support for arcs in regions.
...
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-08-09 15:11:13 -04:00
Hamilton Kibbe
94f3976915
Add keys to statements for linking to primitives. Add some API features to 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-11 11:20:56 -04:00
Hamilton Kibbe
faa44ab731
Fix IPC-D-356 parser. Handle too-long reference designators exported by eagle per #28 .
2015-06-01 20:58:16 -04:00
Paulo Henrique Silva
aff36a4dca
Fix multiline read of mixed statements (%XXX*% followed by DNN*)
...
We now check if there is a %XXX*% command inside the line before
considering it a multiline statement.
2015-05-21 16:15:55 -03:00
Paulo Henrique Silva
2fe5f36db2
Fix ADD statement parsing for concatened statements.
...
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-21 15:54:32 -03:00
Paulo Henrique Silva
d3b19efb48
Add support for PCBmodE generated files.
...
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-20 16:20:02 -03:00
Hamilton Kibbe
8ec3077be9
Add checks to ensure statement unit conversions are idempotent
2015-05-16 09:45:34 -04:00
Paulo Henrique Silva
21d963d244
Allow 3 digits on Excellon tool selection
...
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-27 04:01:48 -03:00
Hamilton Kibbe
e34e1078b6
Refactor primitive unit conversion and add regression coverage to tests
2015-04-26 02:58:12 -04:00
Hamilton Kibbe
390838fc8b
Fix for #25 . Checking was happening at the gerber/excellon file level, but I 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-24 10:54:13 -04:00
Paulo Henrique Silva
0c54a20263
Fix AM statement test
2015-04-14 23:31:15 -03:00
Paulo Henrique Silva
bbfa66eb38
Small change on __str__ for SF Statement
2015-04-07 18:25:44 -03:00
Paulo Henrique Silva
b9b20a9644
Fix Excellon repeat command
2015-04-07 18:17:25 -03:00
Hamilton Kibbe
45372cfff3
fix tests
2015-03-06 17:00:40 -05:00
Hamilton Kibbe
68619d4d5a
Fix parsing for multiline ipc-d-356 records
2015-03-05 22:42:42 -05:00
Paulo Henrique Silva
a13b981c1c
Fix tests for macros with no variables.
...
All AM*Primitive classes now handles float for all but the code
modifiers. This simplifies the reading/parsing.
2015-03-05 14:43:30 -03:00
Paulo Henrique Silva
b8dcc86cb4
Merge pull request #20 from curtacircuitos/ipc-d-356
...
Add IPC-D-356 Netlist Parsing
2015-02-21 02:48:55 -02:00
Hamilton Kibbe
b3e0ceb5c3
Add IPC-D-356 Netlist Parsing
2015-02-20 22:24:34 -05:00
Paulo Henrique Silva
dbe93f77e5
Fix floating point equality test
2015-02-20 14:19:43 -02:00
Paulo Henrique Silva
2ea9b8ad97
Fix size test, board is slight out of origin, so size does change now that we properly handle non-zero origins
2015-02-20 14:06:45 -02:00
Hamilton Kibbe
5966d7830b
Add offset operation
2015-02-18 23:13:23 -05:00
Hamilton Kibbe
e71d7a24b5
Python 3 tests passing
2015-02-18 21:14:30 -05:00
Philipp Klaus
7ace94b023
Make gerber.render a package & fix more relative import statements
2015-02-18 15:44:57 +01:00
Hamilton Kibbe
288ac27084
Get unit conversion working for Gerber/Excellon files
...
Started operations module for file operations/transforms
2015-02-18 04:31:23 -05:00
Hamilton Kibbe
bfe1484160
Add cairo example code, and use example-generated image in readme
2015-02-15 03:29:47 -05:00
Hamilton Kibbe
5cf1fa74b4
Tests and bugfixes
2015-02-15 02:20:02 -05:00
Hamilton Kibbe
5e23d07bcb
Fix rendering for line with rectangular aperture per #12 . Still need to do the same for arcs.
2015-02-13 09:37:27 -05:00
Hamilton Kibbe
8f69c1dfa2
Update line primitive to take aperture parameter
...
This fixes the exception referenced in #12 . Still need to add rendering
code for rectangle aperture lines and arcs.
Rectangle strokes will be drawn as polygons by the rendering backends.
2015-02-12 11:28:50 -05:00
Hamilton Kibbe
41f9475b13
Tests and bugfixes
2015-02-09 17:39:24 -05:00