Commit Graph

209 Commits

Author SHA1 Message Date
Jan Mrázek 3091bb1459 eagle: Change font size calculation
Eagle includes stroke thickness into font size, KiCAD does not. Remove
the hack with scaling down the font, compute size precisely.

CHANGED: Fixed font calculation in Eagle import
2020-06-09 15:30:04 +00:00
Jan Mrázek e34a01dc68 eagle: Make semantics of cutout correct
Eagle cutout polygons only restrict filled copper, they do not limit
tracks, vias and pads inside them. Fix this behavior in the Eagle
import.

CHANGED: Fix semantics of Eagle cutout polygons
2020-06-09 15:30:04 +00:00
Thomas Pointhuber 25eb88636f eagle: handle TRESTRICT, BRESTRICT and VRESTRICT consistently 2020-06-07 00:16:04 +00:00
Thomas Pointhuber 23cc51a53f eagle: add support for tRestrict, bRestrict and vRestrict on circle
Fixes #1869
https://gitlab.com/kicad/code/kicad/-/issues/1869
2020-06-07 00:16:04 +00:00
Thomas Pointhuber 22860b6e7a eagle: add support for tRestrict, bRestrict and vRestrict on polygons
Fixes #2451
https://gitlab.com/kicad/code/kicad/-/issues/2451
2020-06-07 00:16:04 +00:00
Thomas Pointhuber 54decd8afb eagle: add support for tRestrict, bRestrict and vRestrict on rectangles
Fixes #2451
https://gitlab.com/kicad/code/kicad/-/issues/2451
2020-06-07 00:16:04 +00:00
Jeff Young 05855a5a1c Performance enhancements for DRC. 2020-05-18 13:38:17 +01:00
Jeff Young 74ee143d45 Add via annulus minimum. 2020-05-11 22:56:09 +01:00
Jeff Young 0f8c7ffd11 Add pad keepout and footprint keepout areas.
Fixes https://gitlab.com/kicad/code/kicad/issues/2365
2020-05-07 17:51:27 +01:00
Ian McInerney 2148c593d6 Fix some compile warnings 2020-05-06 01:46:09 +01:00
Jeff Young e0da677d4d Add min clearance to DRC; rename Min Via Drill to Min Through Hole.
Also fixes a crash bug when ignoring a DRC violoation with multiple
markers.

Fixes https://gitlab.com/kicad/code/kicad/issues/2528
2020-05-04 22:08:36 +01:00
Jeff Young e39d145d72 Add DRC tests for minimum drill size (based on min via size). 2020-05-04 22:08:36 +01:00
Michael Kavanagh b67f18b394 EAGLE import tKeepout/bKeepout to F_CrtYd/B_CrtYd
Also move Pcbnew import menu to correct sub menu.

Fixes https://gitlab.com/kicad/code/kicad/issues/2347
2020-04-27 19:33:17 +00: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
Ben Dooks 070c6b8ce0 Fix issue with DRC for through hole being applied to SMD pads
Commit d7272b7f5e fixed the use of
the eagle DRC to change the library pad shapes. This was also
applied incorrectly to SMD stacks.

Remove the references to m_rules in packageSMD() and the code
that deals with them. eagle 7.7 does not have any SMD pad options
other than rectangle with rounding.
2020-02-27 16:58:15 +00:00
Jeff Young 129042f8a6 Convert timestamps to UUIDs. 2020-02-20 21:29:52 +00:00
Jeff Young 1e6840ea8f Don't report Eagle errors on the Unrouted layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/3398
2020-02-05 22:21:16 +00:00
Jeff Young 715448611d Fix potential divide-by-zero (from Coverity scan). 2020-01-11 21:29:25 +00: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
Seth Hillbrand 6983c56cf8 Use const references where possible
This avoids copy cost on local vars where we only read.
2019-12-05 14:40:22 -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
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Jeff Young 1c153c55c0 Add default units and precision for new dimension objects.
Fixes: lp:1846376
* https://bugs.launchpad.net/kicad/+bug/1846376
2019-11-05 17:22:51 +00:00
Wayne Stambaugh 4bfb8ef457 Pcbnew: fix Eagle footprint library polygon pad sizes.
Eagle includes the width of the polygon line when generating polygon pad
sizes where KiCad does not.  This simple fix inflates polygon pads half
of the Eagle polygon line width.

Fixes lp:1833687

https://bugs.launchpad.net/kicad/+bug/1833687
2019-09-12 07:35:48 -04:00
Jeff Young e269b5d1b9 Workaround an issue where a throw terminates (even when there's a catch for it).
You can trigger it before this fix by running Cvpcb when a .kicad_mod file is
incorrectly set as "Legacy" in your footprint table.
2019-08-31 15:18:27 +01:00
Seth Hillbrand 8277aeec7d eagle: Set module-relative position of ref/val
We need to set the footprint local coordinates of the footprint
reference and value fields at instantiation separately from the
TEXT_DIVERS elements.

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

(cherry picked from commit a43a228f78)
2019-08-26 09:57:17 -07:00
Thomas Pointhuber 5f438b7a85 Fix handling of filled circle in eagle importer (was only partly fixed)
Partly fixed in 4fc692f04b, but missed
that there is a loadPlain where I need to handle this case as well.
2019-07-26 09:55:06 -04:00
Thomas Pointhuber c68b83e1bb Add support for hatched zones in eagle import 2019-07-26 09:38:26 -04:00
Jeff Young b9749d361b Turn of pad mask layers if Eagle file specifies stop="no"
Fixes: lp:1835930
* https://bugs.launchpad.net/kicad/+bug/1835930
2019-07-17 01:03:34 +01:00
Jeff Young 2c5876ee8c Add more control over how corners are handled when inflating polygons. 2019-07-16 16:41:21 +01:00
Jeff Young 1a7cef2950 Improve performance, commenting and API of some polygon classes. 2019-07-14 10:39:38 +01:00
Jeff Young 37af3adffb Add preference for flip axis.
Fixes: lp:1836267
* https://bugs.launchpad.net/kicad/+bug/1836267
2019-07-14 10:36:48 +01:00
Seth Hillbrand 6a45446496 pcbnew: Remove the last dlist from modules/pcbnew 2019-06-01 20:55:32 -07:00
Seth Hillbrand 9163ac543a pcbnew: Move pads to std::deque 2019-06-01 16:23:54 -07:00
Seth Hillbrand 888c01d11b pcbnew: Move tracks to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand 6bcf1839b7 pcbnew: Add arc approximation setting to board
This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments.  This allows the user to customize their speed vs. accuracy
tradeoff.  The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
2019-05-24 21:21:06 -07:00
Seth Hillbrand 1181b9f9b4 EAGLE: Correct pcb text orientation
Fixes: lp:1829711
* https://bugs.launchpad.net/kicad/+bug/1829711
2019-05-21 14:04:03 -07:00
Seth Hillbrand a62a89eac3 EAGLE: Prevent numeric-only component references
KiCad does not allow references to be numeric only.  This prefixes such
references with "UNK" to note that the reference designator type is
unknown.
2019-05-21 13:49:18 -07:00
Seth Hillbrand 490c805319 Allow squared inflation and inflate Eagle Zones
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.

This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline.  KiCad zones are drawn inside the polygon.  We need to both
increase the zone size and decrease the minimum pen width to account for
this.

Fixes: lp:1817312
* https://bugs.launchpad.net/kicad/+bug/1817312
2019-05-21 13:49:18 -07:00
Seth Hillbrand c80e3e0ffc eagle: Use width on imported lines if available
If not, use the current board design settings for line thickness based
on the board layer.
2019-05-21 13:49:17 -07:00
Seth Hillbrand dbc40096db eagle: Use the "first" tag instead of pin num
Eagle parsing allows pin 1 to be different from the other pins in the
package but this is set by a tag marking the pin as "first" rather than
the actual number of the pin.

Fixes: lp:1829251
* https://bugs.launchpad.net/kicad/+bug/1829251
2019-05-20 06:02:15 -07:00
Wayne Stambaugh 97166a72f5 Pcbnew: fix bug in Eagle footprint plugin.
Some how a board object was required to fetch the line width when a
footprint is being parsed.  The problem is that there is no board
defined when loading Eagle footprint libraries so there was a nullptr
segfault as a result.  When there is no board defined, use the default
KiCad layer line widths.

Fixes lp:1829243

https://bugs.launchpad.net/kicad/+bug/1829243
2019-05-17 08:38:03 -04:00
Seth Hillbrand 44e111b37e pcbnew: Add remaining Eagle pad types
This adds octagon and offset pad types to the Eagle pcb importer.

Fixes: lp:1814498
* https://bugs.launchpad.net/kicad/+bug/1814498
2019-05-15 11:12:16 -07:00
Seth Hillbrand d7272b7f5e eagle: Handle DRC rule-based pad shapes
Circles and Squares are handled correctly.  Octagons are converted to
circles.  Pad 1 is identified by the "1" string in the Eagle name.

Fixes: lp:1784126
* https://bugs.launchpad.net/kicad/+bug/1784126
2019-02-04 07:06:49 +01:00
Thomas Pointhuber 4fc692f04b fix handling of filled circle and default layer width 2019-01-26 07:42:35 -08:00
Seth Hillbrand 1e5ba6f1b1 Replace DIM() macro
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time.  Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
2019-01-06 08:43:12 -08:00
Seth Hillbrand 69fc301bf3 eagle: Prevent 0-width lines in modules
It is very difficult to select 0-width lines and they aren't physical on
the board.  Items with this setting in Eagle should revert to the
default in KiCad.

Fixes: lp:1808584
* https://bugs.launchpad.net/kicad/+bug/1808584
2019-01-05 14:28:08 -08:00