Commit graph

66 commits

Author SHA1 Message Date
Hamilton Kibbe
7ad6c3f6ac Fix handling of multi-line strings per #66 2017-07-04 02:11:52 -04:00
Hamilton Kibbe
41a7b90dff Excellon update 2016-11-18 07:55:43 -05:00
Hamilton Kibbe
422c86bcc6 Merge upstream changes 2016-11-06 14:44:40 -05:00
Hamilton Kibbe
5af19af190 Commit partial merge so I can work on the plane 2016-09-24 02:28:36 +08:00
Hamilton Kibbe
8cd842a41a Manually mere rendering changes 2016-08-06 09:40:40 +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
Garret Fick
7a79d1504e Setup .gitignore for Eclipse. Start creating doc strings 2016-07-16 14:22:38 +08:00
Garret Fick
10c7075ad5 Allow G85 for invalid files 2016-07-11 23:18:15 +08:00
Garret Fick
7e06f3a2f5 Workaround for bad excellon files that don't correctly set the mode 2016-07-10 15:41:31 +08:00
Garret Fick
8f4b439efc Rout mode doesn't need to specify G01 every time 2016-06-06 22:26:06 +08:00
Garret Fick
f1f07d74c4 Offset of drill hit and slots 2016-05-10 23:16:51 +08:00
Garret Fick
2eac1e427c Fix converting values for excellon files. Give error for incremental mode 2016-04-05 22:40:12 +08:00
Garret Fick
288f49955e Actually fix the rout rendering to be correct 2016-03-27 14:24:11 +08:00
Garret Fick
25515b8ec7 Correctly render M15 slot holes 2016-03-26 18:18:16 +08:00
Garret Fick
acde19f205 Support for the G85 slot statement 2016-03-26 15:59:42 +08:00
Garret Fick
7053d320f0 Better detection of plated tools 2016-03-13 14:27:09 +08:00
Garret Fick
e84f131720 Add support for more excellon formats. Dont consider line width when determinging region bounding box 2016-01-31 14:17:35 +08:00
Hamilton Kibbe
5df38c014f Cleanup, rendering fixes.
fixed rendering of tented vias
fixed rendering of semi-transparent layers
fixed file type detection issues
added some examples
2016-01-28 12:19:03 -05:00
Paulo Henrique Silva
b9f1b106c3 Excellon format detection uses ExcelonFile.bounds now
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-25 12:42:12 -02:00
Hamilton Kibbe
5476da8aa3 Fix a bunch of rendering bugs.
- '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-21 03:57:44 -05:00
Garret Fick
60784dfa21 Skip over a strange excellon statement 2016-01-16 18:33:40 +08:00
Garret Fick
2e42d1a470 Support KiCad format statement where FMAT,2 is 2:4 with inch 2015-12-30 16:11:25 +08: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
Garret Fick
4e838df32a Parse misc nc drill files 2015-12-19 11:44:12 +08:00
Garret Fick
206f4c57ab Fix drawing arcs. Dont crash for arcs with rectangular apertures. Fix crash with board size of zero for only one drill 2015-12-16 18:59:25 +08:00
Garret Fick
d69f50e0f6 Make the hit accessible from the drawable Hit, fix crash with cario drawing rect 2015-12-02 12:44:30 +08:00
Paulo Henrique Silva
6e29b9bcae Use Python's universal newlines to open files 2015-11-15 22:28:56 -02:00
Paulo Henrique Silva
cead702f4d Add fix to work with excellon with no tool definition.
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-13 13:18:50 -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
10d9028e1f Python 3 fix 2015-10-10 17:02:45 -04: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
15254a5bb7 Add tool path optimization example
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-07-06 12:13:59 -04:00
Hamilton Kibbe
ec2ca92da6 Python 3 fix
remove dict itervalues() calls
2015-06-11 14:00:40 -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
8ec3077be9 Add checks to ensure statement unit conversions are idempotent 2015-05-16 09:45:34 -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
b9b20a9644 Fix Excellon repeat command 2015-04-07 18:17:25 -03: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
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
939f782728 ...oops 2015-01-25 14:22:27 -05:00
Hamilton Kibbe
b495d51354 Changed zeros/zero suppression conventions to match file format specs 2015-01-25 14:19:48 -05:00
Paulo Henrique Silva
0f36084aad Add Repeat Hole Stmt and fix UnitStmt parsing
* Repeat hole support (with no real parsing, just a copy)
* Fix UnitStmt to works even when a ,TZ or ,LZ information is not provided.
2015-01-15 05:01:40 -02:00
Paulo Henrique Silva
137c73f3e4 Many additions to Excellon parsing/creation.
CAUTION: the original code used zero_suppression flags
         in the opposite sense as Gerber functions. This
         patch changes it to behave just like Gerber code.

* Add metric/inch conversion support
* Add settings context variable to to_gerber just like Gerber code.
* Add some missing Excellon values.

Tests are not entirely updated.
2015-01-14 14:33:00 -02:00
Hamilton Kibbe
254f3e5184 Merge changes from upstream 2014-10-26 17:20:47 -04:00
Hamilton Kibbe
18e3b87625 Test update 2014-10-19 22:23:00 -04:00
Hamilton Kibbe
6d2db67e6d Refactor rendering 2014-10-18 01:44:51 -04:00