Age | Commit message (Collapse) | Author | Files | Lines |
|
|
|
This fixes region rendering with programatically generated primitives
such that clear level polarity works in an intuitive way. This is useful
for e.g. cutouts in regions. Before, the renderer would set level
polarity twice, both when starting the region and then again once for
each region primitive (line or arc). The problem was that the primitives
in a region with "clear" polarity would when constructed with unset
polarity default to "dark". Thus the renderer would emit something like
LPC (clear polarity) -> G36 (start region) -> LPD (dark polarity) ->
{lines...} instead of LPC -> G36 -> {lines...}.
After this commit, Line and Arc will retain None as level polarity when
created with unset level polarity, and region rendering will override
None with the region's polarity. Outside regions, the old dark default
remains unchanged.
Note on verification: Somehow, gEDA gerbv would still render the broken
regions the way one would have intended, but other viewers (KiCAD
gerbview, the online EasyEDA one and whatever JLC uses to make their
silkscreens) would not.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
rendering bugs, especially related to holes in flashed apertures
|
|
output from rendered gerber
|
|
|
|
|
|
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.
|
|
|
|
point was unchanged
|
|
|
|
be flipped). Render AM with outline to gerber
|
|
|
|
- '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
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
FS D leading zero format (probably form Direct) is an unspecified
coordinate format where all numbers are specified with both leading
and trailing zeros.
|
|
All AM*Primitive classes now handles float for all but the code
modifiers. This simplifies the reading/parsing.
|
|
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.
|
|
|
|
|
|
Started operations module for file operations/transforms
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* Add support to convert between metric/impertial
* AM primitives are now properly created and can be
converted between metric/imperial.
(only Outline primitive is supported, no rendering yet)
|
|
* Modify the way we parse parameters to allow more than
one parameter in a single line as in the following example:
%FSLAX55Y55*MOIN*%
%IR0*IPPOS*OFA0.00000B0.00000*MIA0B0*SFA1.00000B1.00000*%
(this is from OrCAD 16 default output)
* Add missing deprecated parameters.
* Change API to use given FileSettings on output. This allows
us to use pcb-tools to convert between FS formats.
|
|
|
|
|
|
|
|
|