Wykres commitów

55 Commity (5a5ba2b709f01b2100cd767a25a41737541ad53c)

Autor SHA1 Wiadomość Data
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
Hamilton Kibbe c2ed707b52 Fix bounding box calculation for Slot primitives per #77 2017-11-14 09:15:06 -05:00
Hamilton Kibbe e12a04fc16 Fix error in slot rendering from #77 2017-11-01 16:09:06 -04:00
Hamilton Kibbe a7f1f6ef0f Finish adding square hole support, fix some primitive calculations, etc. 2016-11-18 08:05:57 -05:00
Hamilton Kibbe 422c86bcc6 Merge upstream changes 2016-11-06 14:44:40 -05:00
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 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 ccb6eb7a76 Add support for polygon apertures 2016-06-25 16:46:44 +08:00
Garret Fick 265aec83f6 Offsetting amgroup was doubly offseting 2016-06-19 12:06:19 +08:00
Garret Fick 5a20b2b92d Fix converting amgroup units 2016-05-28 14:14:49 +08:00
Garret Fick c9c1313d59 Fix units statement. Keep track of original macro statement in the AMGroup 2016-05-28 12:36:31 +08:00
Garret Fick acde19f205 Support for the G85 slot statement 2016-03-26 15:59:42 +08:00
Garret Fick 97924d188b More robust writing, even for bad files. Remove accidentally added imports 2016-03-05 16:26:30 +08:00
Garret Fick 5cb60d6385 AM group hasn't implemented offset 2016-03-05 11:44:20 +08:00
Garret Fick 7f47aea332 Write polygons to macros 2016-03-05 10:04:58 +08:00
Garret Fick 20a9af279a More rendering of AMGroup to statements 2016-03-01 00:06:14 +08:00
Garret Fick 223a010831 Fix critical issue with rotatin points (when the angle is zero the y would be flipped). Render AM with outline to gerber 2016-02-27 18:18:04 +08:00
Garret Fick 29c0d82bf5 RS274X backend for rendering. Incompelte still 2016-02-27 15:24:36 +08:00
Garret Fick 5b93db47cd Draw thermal aperture macros (as approximation) 2016-02-02 00:11:55 +08:00
Garret Fick 96bdd0f59d Keep track of quadrant mode so we can draw full circles 2016-01-31 15:24:57 +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
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 f61eee807f Render polygon flashes 2015-12-30 18:44:07 +08:00
Garret Fick 96692b2221 Render primitives for some aperture macros 2015-12-30 15:32:44 +08:00
Garret Fick 4a815bf25d First time any macro renders 2015-12-30 14:05:00 +08:00
Garret Fick cd0ed5aed0 Identify flashes and bounding box without aperture 2015-12-25 14:43:44 +08: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
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 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
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
Hamilton Kibbe 68619d4d5a Fix parsing for multiline ipc-d-356 records 2015-03-05 22:42:42 -05:00
Hamilton Kibbe 5966d7830b Add offset operation 2015-02-18 23:13:23 -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 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 1cc20b351c tests 2015-02-02 11:42:47 -05:00
Hamilton Kibbe d98d23f8b5 More tests and bugfixes 2015-02-02 00:43:08 -05:00
Hamilton Kibbe 360eddc3c4 Added primitives and tests 2015-02-01 13:40:08 -05:00