Paulo Henrique Silva
c92d2d9ea2
Merge pull request #31 from curtacircuitos/statement_link
...
Add support for tool reordering and drill path optimization example.
2015-07-14 13:32:17 -03: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
Paulo Henrique Silva
1a70064e10
Merge pull request #29 from curtacircuitos/eagle_netlist_fix
...
Fix IPC-D-356 parser. Handle too-long reference designators exported …
2015-06-02 00:29:36 -03: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
9e36d7e21d
G70/G71 are now interpreted as MOParamStmt.
...
Got a bunch of metric files with no MOMM but only G71, this
should be pretty mush harmless.
2015-05-21 17:15:54 -03: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
Paulo Henrique Silva
a518043ae8
Fix indentation after PR #26
2015-04-24 14:00:35 -03:00
Paulo Henrique Silva
80cdaf075e
Merge pull request #26 from curtacircuitos/unit_conversion_fix
...
Fix for #25 . Check units at the primitive level
2015-04-24 13:34:26 -03: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
a3cce62be7
Fix Gerber generation for coord blocks with implicit op code
2015-04-23 13:38:01 -03:00
Paulo Henrique Silva
0c54a20263
Fix AM statement test
2015-04-14 23:31:15 -03:00
Paulo Henrique Silva
51c630ab77
AMStatement are used as is when gerbers are generated
2015-04-14 23:27:11 -03:00
Paulo Henrique Silva
d6bb61eec6
Fix issue where D01 and D03 are implicit.
...
Based on code from @rdprescott.
2015-04-13 16:55:03 -03:00
Paulo Henrique Silva
d7ce97b180
(really) Fix parsing for AM macros with zero modifiers
2015-04-07 18:55:12 -03:00
Paulo Henrique Silva
1ea7e14ba5
Fix CoordStmt with missing i/j offsets
2015-04-07 18:28:03 -03:00
Paulo Henrique Silva
50c01d4635
Fix CommentStmt for multi-line comments
2015-04-07 18:27:31 -03:00
Paulo Henrique Silva
d1c74317c8
Add some deprecated but still found statements
2015-04-07 18:26:33 -03:00
Paulo Henrique Silva
bbfa66eb38
Small change on __str__ for SF Statement
2015-04-07 18:25:44 -03:00
Paulo Henrique Silva
9ab4ec360c
Fix parsing for AM macros with zero modifiers
2015-04-07 18:24:47 -03:00
Paulo Henrique Silva
b93804ed9a
Add unspecified FS D leading zeros format
...
FS D leading zero format (probably form Direct) is an unspecified
coordinate format where all numbers are specified with both leading
and trailing zeros.
2015-04-07 18:22:02 -03:00
Paulo Henrique Silva
b9b20a9644
Fix Excellon repeat command
2015-04-07 18:17:25 -03:00
Paulo Henrique Silva
820d8aa903
Allowance for weird case modifier with no zero after period
2015-04-07 13:25:53 -03:00
Hamilton Kibbe
45372cfff3
fix tests
2015-03-06 17:00:40 -05:00
Hamilton Kibbe
b5ce83beae
add rest of altium-supported ipc-d-356 statements
2015-03-06 16:47:12 -05:00
Paulo Henrique Silva
f6dbe87c03
Add support for unary minus operator on macro parsing
2015-03-06 15:00:16 -03:00
Hamilton Kibbe
68619d4d5a
Fix parsing for multiline ipc-d-356 records
2015-03-05 22:42:42 -05:00
Hamilton Kibbe
c40683b6a2
Merge pull request #23 from curtacircuitos/macro-parse-eval
...
Add aperture macro parsing and evaluation.
2015-03-05 13:33:49 -05:00
Paulo Henrique Silva
21fdb9cb57
More py3 fixes
2015-03-05 15:13:59 -03:00
Paulo Henrique Silva
adc1ff6d72
Fix for py3
2015-03-05 14:58:36 -03: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
670d3fbbd7
Add aperture macro parsing and evaluation.
...
Aperture macros can get complex with arithmetical operations,
variables and variables substitution.
Current pcb-tools code just read each macro block as an independent
unit, this cannot deal with variables that get changed after used.
This patch splits the task in two: first we parse all macro content
and creates a bytecode representation of all operations. This bytecode
representation will be executed when an AD command is issues passing
the required parameters.
Parsing is heavily based on gerbv using a Shunting Yard approach to
math parsing.
Integration with rs274x.py code is not finished as I need to figure out
how to integrate the final macro primitives with the graphical primitives
already in use.
2015-03-03 03:41:55 -03:00
Hamilton Kibbe
c542493b9b
Merge pull request #22 from pklaus/python3
...
Updating gerber/__main__.py for Python3
2015-02-28 10:22:08 -05:00
Philipp Klaus
f74d9fcdf1
sys.stderr.write() instead of print >> sys.stderr, "..."
2015-02-28 15:48:35 +01:00
Paulo Henrique Silva
2590eefc96
Merge pull request #21 from bcho/hotfix/py3k-map-object
...
Convert py3k's map object to tuple explicitly.
2015-02-24 22:51:45 -03:00
hbc
feb5b3d571
Convert py3k's map object to tuple explicitly.
2015-02-25 09:39:53 +08: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
Paulo Henrique Silva
5d764a6890
Fix GerberFile.bounds when board origin is negative
2015-02-20 13:58:08 -02:00
Hamilton Kibbe
d830375c4c
Fix arc width per comment in #12
2015-02-20 10:07:26 -05:00
Hamilton Kibbe
b3e816466c
doc options
2015-02-18 23:28:19 -05:00
Hamilton Kibbe
4db7302485
Doc update
2015-02-18 23:23:53 -05:00