gerbonara/gerber
jaseg a7a5981e0e Make primitives with unset level polarity inherit from region
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.
2019-02-03 14:37:26 +09:00
..
excellon_report Better detection of plated tools 2016-03-13 14:27:09 +08:00
ncparam Skip over a strange excellon statement 2016-01-16 18:33:40 +08:00
render Make primitives with unset level polarity inherit from region 2019-02-03 14:37:26 +09:00
tests Match full filename instead of the base name 2018-06-26 22:17:45 +02:00
__init__.py Cleanup, rendering fixes. 2016-01-28 12:19:03 -05:00
__main__.py Remove svgwrite backend 2015-11-15 22:31:42 -02:00
am_eval.py Manually mere rendering changes 2016-08-06 09:40:40 +08:00
am_read.py Manually mere rendering changes 2016-08-06 09:40:40 +08:00
am_statements.py Merge upstream changes 2016-11-06 14:44:40 -05:00
cam.py Fix hard requirement of cairo per #83, and add stubs for required subclass methods to GerberContext per #84 2018-06-05 08:57:37 -04:00
common.py Merge upstream changes 2016-11-06 14:44:40 -05:00
excellon.py Fix handling of multi-line strings per #66 2017-07-04 02:11:52 -04:00
excellon_settings.py Parse misc nc drill files 2015-12-19 11:44:12 +08:00
excellon_statements.py Excellon update 2016-11-18 07:55:43 -05:00
excellon_tool.py Excellon update 2016-11-18 07:55:43 -05:00
exceptions.py Add PCB interface 2015-12-22 02:47:23 -05:00
gerber_statements.py Make primitives with unset level polarity inherit from region 2019-02-03 14:37:26 +09:00
ipc356.py IPC356: Do not crash on record type 367 2019-01-26 16:07:45 +01:00
layers.py Match full filename instead of the base name 2018-06-26 22:17:45 +02:00
operations.py Manually mere rendering changes 2016-08-06 09:40:40 +08:00
pcb.py Skip subdirectories during import 2018-06-25 09:43:23 +02:00
primitives.py Make primitives with unset level polarity inherit from region 2019-02-03 14:37:26 +09:00
rs274x.py Merge pull request #67 from jmargeta/python_3_fix 2017-07-04 01:31:32 -04:00
utils.py Implement quickhull to remove scipy dependency 2017-09-16 14:48:44 +02:00