Commit Graph

88 Commits

Author SHA1 Message Date
Jeff Young 10614a9ebc Implement changes for Sketch Pads to Fab Layers.
Includes adding Fab Layers to default text & graphic settings.

Fixes https://gitlab.com/kicad/code/kicad/issues/1885

Fixes https://gitlab.com/kicad/code/kicad/issues/2274
2020-05-01 18:49:42 +01:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
jean-pierre charras 18150e5769 SVG plotter: fix some issues: incorrect bitmap size and missing lines in header
Fixes #4256
https://gitlab.com/kicad/code/kicad/issues/4256
2020-04-24 17:19:08 +02:00
Jeff Young 7f742ef934 Fix typo. 2020-04-24 14:46:22 +01:00
jean-pierre charras 7e0a1a16ee SVG plotter: use %f instead of %g to print floats.
Looks like scientific notation is not always accepted by Inkscape.
2020-04-23 07:59:41 +02:00
Seth Hillbrand 819f28daf5 Revert part of 9c8941e04
This accidentally changed gerber plotting behavior, resulting in invalid
aperture sizes

Fixes https://gitlab.com/kicad/code/kicad/issues/4232
2020-04-20 15:42:23 -07:00
Johannes Pfister e5042a46ba Add ability to set SVG plot units and precision
ADDED: Ability to set SVG to metric or imperial units
and made it possible to change the size of a step
2020-04-20 22:02:03 +00:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Ian McInerney b8d2802cfe Add missing cases to silence compiler warnings 2020-04-18 00:47:35 +01:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 4990d1e7b2 Variable substitution framework.
This implements editing of variables and moving SCH_FIELDs,
TEXTE_MODULEs, TEXTE_PCB and worksheet items over to the new
framework.
2020-03-30 14:15:59 +01:00
jean-pierre charras 9d2712a824 Fix a few Coverity warnings.
It also fix:

Fixes #4082
https://gitlab.com/kicad/code/kicad/issues/4082
2020-03-29 18:42:24 +02:00
jean-pierre charras de7154e8e9 Gerber plotter: Non horiz or vertical oval pads: better plot output:
These pads were plotted as a segment. This is not the right way.
Pads must be flashed or plotted as regions, not painted.
They are now plotted as Gerber regions round rectangle pads.
These regions are similar to flashed pads.
2020-03-27 10:34:41 +01:00
jean-pierre charras 9cb3333d05 Gerber plotter: plot round rectangle pads using a region with arcs.
Previously, the region was a usual polygon with arc approximated by segment.
Using a region with arcs is a better way because it allows CAM tools to
identify this region as a round-rect pad.

A side effect is a better shape and smaller files, however not really noticeable in fact.
2020-03-20 19:45:05 +01:00
jean-pierre charras 08f0e8d6e8 Pcbnew, Gerber output: always generates Aperture Attributes.
Previously, for historical reasons, they were added only if
Include Netlist Attributes option was on.

But Aperture Attributes have nothing to do with Netlist Attributes, and good
Gerber files must include them.
2020-03-12 16:57:13 +01:00
Jon Evans 643c97a2f4 ADDED: Schematic plotting can use a dedicated color theme
ADDED: PDF, PS, and SVG plots can optionally include the page background color

Fixes #1830
2020-03-06 00:01:02 -05:00
Seth Hillbrand e38ab6c699 Treat 0-length ovals as circles
Some buggy SVG interpreters can't handle 0-length ovals.  In this case,
they are meant to be circles, so we can export as circles in our
plotter.

Fixes https://gitlab.com/kicad/code/kicad/issues/3995
2020-03-04 18:03:20 -06:00
jean-pierre charras 465ffff162 Gerber plots: Add initial G01 command to the header,
to ensure linear interpolation mode.
To avoid issues, an interpolation mode must be set before first D01 command.
2020-02-03 17:55:19 +01:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Jeff Young 5e5edd03f6 Implement super- and subscript printing and plotting for eeschema. 2020-01-10 22:32:49 +00:00
jean-pierre charras d587bd5bca SVG plotter: fix an issue with mirrored texts.
Mirrored texts have a size < 0.
Of course, the actual value for the plotter is the absolute value.
2020-01-09 18:07:56 +01:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Mark Roszko 11ff16be4e Switch to scoped enums 2019-12-20 14:11:39 +00:00
jean-pierre charras 24cd80ef3e Gerber plotter: modify G02 and G03 commands.
They are now in a specific block and no longer combined with an other command.
(combining these commands with an other command (D01 or D02) is deprecated)

Fixes #3677 | https://gitlab.com/kicad/code/kicad/issues/3677
2019-12-18 11:35:28 +01:00
Seth Hillbrand c4d853c1e8 SHAPE_LINE_CHAIN: Remove element access
This is the first step to allowing non-segments in the line chain.
External routines cannot be allowed to change the line chain without
going through the internal routines.  To accomplish this, we remove the
Vertex() and Point() access routines and only leave the const versions.
Transformations are given for both points as well as the chain itself.
2019-12-12 13:54:48 +00:00
Seth Hillbrand fa133f3f5c Plot SVG embedded
ADDED: embedded image support for SVG files

Fixes #3643 | https://gitlab.com/kicad/code/kicad/issues/3643
2019-12-08 08:57:33 -08:00
Seth Hillbrand c6f5df134c Minor speed cleanup
This adjusts iterators to use const reference when only used for
copy.  It also ensures pre-allocation of vectors when size is known
ahead of time.
2019-12-05 14:20:59 -08:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Jeff Young 89ace3b0d0 Apply the overbar fixes from the stroke font to bitmap text.
Fixes: lp:1852037
* https://bugs.launchpad.net/kicad/+bug/1852037
2019-11-18 11:36:30 +00:00
jean-pierre charras 5833392689 FIX: Pcbnew plot BezierCurve: add missing line thickness initialization. 2019-11-09 14:02:41 +01:00
jean-pierre charras 5f3353cad1 Add native Bezier curve plot in SVG plotter. 2019-11-05 14:27:07 +01:00
jean-pierre charras 51ed01d765 GERBER_PLOTTER: small change in code to manage the current selected aperture.
Avoid using an iterator to store this aperture because iterators can be invalided
when modifying a list.
Enhancements in gerber_placefile_writer.
2019-11-04 14:33:10 +01:00
jean-pierre charras 65bf669387 Refinements in gerber placefile writer: allows adding board edge cuts in file.
Use a pad bounding box for footprints having no valid courtyard defined.
Refinement also in Gerber files when plotting oval pads.
2019-11-01 18:12:26 +01:00
jean-pierre charras 8a4ba87fba Gerber output: Fix incorrect zones outline thickness in filled areas.
Fixes: lp:1848929
https://bugs.launchpad.net/kicad/+bug/1848929
2019-10-20 21:15:31 +02:00
jean-pierre charras 846397c692 Fix compil warning 2019-10-19 15:44:40 +02:00
jean-pierre charras f892ebbb49 Fix issues in Gerber attributes 2019-10-19 11:26:29 +02:00
jean-pierre charras b9202e81bc Fix Gerber plot pad oval for pad orientation not n*90 degrees.
Use now a Gerber region that support TO attributes like flashed pads.
2019-10-19 11:26:29 +02:00
jean-pierre charras 47f9c505c5 Gerber plot: better handling of polygonal pad shapes plotting
update GBR_CMP_PNP_METADATA.
2019-10-19 11:26:29 +02:00
jean-pierre charras 4b2d801fec Gerber file export: avoid duplicate corner when creating polygons (regions in Gerber dialect)
Fixes: lp:1847714
https://bugs.launchpad.net/kicad/+bug/1847714
2019-10-11 20:59:23 +02:00
jean-pierre charras ac2373ae16 Gerber plotter: add support of standard aperture regular polygon as flashed shape.
Standard apertures are circle, rect, oblong and polygon (regular polygonal shapes with 3 to 12 vertices)
The support of the standard aperture type polygon was missing in Gerber plotter.
2019-10-02 17:33:06 +02:00
jean-pierre charras a1fe8cfa5a Minor changes: cleanup code and prepare code to add more attributes to Object Attributes (.TO) 2019-09-18 11:48:49 +02:00
jean-pierre charras 64b5e8bee2 Minor fix and enhancement code. 2019-09-15 11:10:53 +02:00
Jeff Young 8dd8740fa3 Performance enhancement for pad drawing.
Fixes: lp:1843065
* https://bugs.launchpad.net/kicad/+bug/1843065
2019-09-09 13:45:06 +01:00
Seth Hillbrand 53989e3bdc SVG: Correct plot fills for arcs/polylines
When plotting in Eeschema, various elements may be filled with either
the foreground or background colors.  The fill mode is rather unique,
requiring un-stroked pie wedges for arcs and both closed and open filled
polylines.

Fixes: lp:1840769
* https://bugs.launchpad.net/kicad/+bug/1840769

(cherry picked from commit 213547f545)
2019-08-20 12:03:56 -07:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Simon Schubert 176fe80425 SVG plot: output invisible text in addition to plotting
Fixes: lp:1544918
* https://bugs.launchpad.net/kicad/+bug/1544918
2019-08-15 13:39:38 -07:00
Ian McInerney ff9d899ae0 pcbnew: Clean up warnings with unit handling in the DXF export 2019-07-10 12:21:01 -04:00
Jeff Young 16cf1a4d09 Output text content as a description of the stroked path.
Fixes: lp:1544918
* https://bugs.launchpad.net/kicad/+bug/1544918
2019-06-28 22:18:30 +01:00