Commit Graph

200 Commits

Author SHA1 Message Date
Jeff Young edc05b5d54 Pad properties dialog needs to edit the local value, not the resultant value.
Fixes: lp:1838618
* https://bugs.launchpad.net/kicad/+bug/1838618
2019-08-05 21:38:28 -06:00
jean-pierre charras dd702cd53d Remove pads not on copper layers (just on tech layers) from connectivity calculation.
Pads not on copper layers now do not have a netname, and are no longer taken in account in connectivity.
Especially it avoid creating useless rats-nests for these pads.
2019-07-25 13:08:41 +02: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 f2f2b4bcf9 Explode/Combine in terms of visible elements
When generating a complex pad, this allows the user to combine with a
rotated pad and explode rotated pads without needing to rotate elements
to 0 orientation first.

Fixes: lp:1808137
* https://bugs.launchpad.net/kicad/+bug/1808137
2019-07-12 16:55:41 -07:00
Jeff Young ce1f35a1be Cleanup some left-over vestiages of the legacy canvas architecture. 2019-06-13 15:51:32 +01:00
Seth Hillbrand 9163ac543a pcbnew: Move pads to std::deque 2019-06-01 16:23:54 -07:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
Jeff Young d6e9bdf07b Convert remaining legacy drawing code to print code. 2019-05-31 21:54:22 +01:00
Seth Hillbrand ddc6079ceb Move remaining hard-coded segment counts
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
2019-05-16 08:49:55 -07: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 f7c042a357 pcbnew: Allow curves in custom pads
Updates custom pad functions to permit adding arbitrary curves to the
primitives
2019-05-08 15:54:26 -07:00
Jeff Young fd546da640 Homogenize hit testing and selection return types.
Prep work for sharing SCH_SELECTION_TOOL with LibEdit.
2019-05-05 17:14:30 +01:00
jean-pierre charras d259459a14 Pcbnew: add a new primitive pad shape: chamfered round rect pad.
Allows 0 to 4 chamfered corners, not only one.

A custom shape allow this kind of shape. However because it is a primitive,
it is easier to edit and it support thermal reliefs.
2019-03-11 10:26:15 +01:00
Seth Hillbrand e270b5d266 modedit: Mirror custom pads
Fixes mirror command to correctly handle custom pads.

Fixes: lp:1808135
* https://bugs.launchpad.net/kicad/+bug/1808135
2019-01-17 08:55:59 -08:00
Seth Hillbrand 5433423377 pcbnew: Don't update coords on add
When adding an element to a module, we don't need to update the relative
coordinates.  Doing so can cause changes when writing to file depending
on rotation and position.

Fixes: lp:1810870
* https://bugs.launchpad.net/kicad/+bug/1810870
2019-01-15 12:14:02 -08:00
Seth Hillbrand c92424898c pcbnew: Replace magic number segment counts
Where we set 32 segments per circle, the magic number is replaced by the
same value as the common define ARC_APPROX_SEGMENTS_COUNT_HIGH_DEF
2019-01-03 17:21:10 -08:00
jean-pierre charras 04aeec1223 Remove useless includes 2018-12-12 15:28:59 +01:00
Jeff Young bcc8c64256 Consider edge cuts items to have zero width when filling zones.
Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
2018-11-14 23:45:32 +00:00
Seth Hillbrand 9cafe65e84 pcbnew: Allow user-setting rounded rectangle radius
When designing pads, it can be helpful to not only see the resulting
rounded rectangle radius from a given percentage but also to set it,
constraining the related percentage.  This adjusts the dialog to allow
editing the rounded rectangle corner radius.  It does not change the
file format as the resulting ratio is saved.  Further updates of the pad
size or ratio will modify the radius.

Fixes: lp:1668020
* https://bugs.launchpad.net/kicad/+bug/1668020
2018-09-17 15:59:53 -07:00
Jeff Young 2d4ba56ac0 Promote aperture pads to first-class citizens.
Well, almost anyway.  We can't use a pad attribute for them as
that would change the file format.  So they're currently
defined as a CONN pad with no copper layers.

However, when figuring out of existing pads should be *treated*
as aperture pads, we just check for no copper layers.

Fixes: lp:1781760
* https://bugs.launchpad.net/kicad/+bug/1781760
2018-07-24 14:57:45 +01:00
Jeff Young 4618c64213 Don't number aperture pads.
Fixes: lp:1781760
* https://bugs.launchpad.net/kicad/+bug/1781760
2018-07-24 10:39:30 +01:00
Jeff Young 49ea6e1670 Fix occurrences of "edition" which should be "editing"
Fixes: lp:1778168
* https://bugs.launchpad.net/kicad/+bug/1778168

(cherry picked from commit bcb1220)
2018-07-17 15:12:39 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
jean-pierre charras 93c7f65d96 mask clearance parameters: use clearances only for pads on copper layers, and never for pads on technical layers only. 2018-05-04 14:55:38 +02:00
Tomasz Włostowski f2bb398ae6 pcbnew: fixes in primitives->custom pad tool
Fixes: lp:1753712
* https://bugs.launchpad.net/kicad/+bug/1753712

Fixes: lp:1753711
* https://bugs.launchpad.net/kicad/+bug/1753711
2018-03-06 14:59:15 +01:00
Jeff Young 60a4ce6623 Don't let pads that *should* be NPTHs get lost.
Borrow the hidden text colour so that they can be distinguished
from PTHs and correctly-marked NPTHs.

Fixes: lp:1494738
* https://bugs.launchpad.net/kicad/+bug/1494738
2018-02-08 15:04:23 -05:00
jean-pierre charras 1858852f57 rename files 2018-02-02 21:57:12 +01:00
Tomasz Włostowski a4528988ca pcbnew: fix graphical polygon movement, rotation, flipping and edit points synchronization.
Fixes: lp:1738449
* https://bugs.launchpad.net/kicad/+bug/1738449

Fixes: lp:1738032
* https://bugs.launchpad.net/kicad/+bug/1738032
2017-12-18 18:25:45 +01:00
Tomasz Włostowski 58ce865352 pcbnew: made TransformShapeWithClearanceToPolygon virtual 2017-12-05 14:54:57 +01:00
Marvin Schmidt 69974b73db Remove some extra semicolons 2017-11-09 19:52:18 +01:00
Tomasz Włostowski 0245912c34 refactoring: split BOARD_ITEM::SwapData to use polymorphic per-item methods 2017-11-03 20:02:06 +01:00
jean-pierre charras 8ba11dbd68 Minor fixes and enhancements 2017-10-21 11:00:59 +02:00
jean-pierre charras 87821c1490 Explode pad to shapes command: Fix incorrect conversion of primitive to EDGE_MODULE (missing initialization) 2017-10-21 08:48:26 +02:00
Tomasz Włostowski ac095b6724 pcbnew: tools for converting between custom-shaped pads and graphical shapes 2017-10-19 23:35:18 +02:00
jean-pierre charras 1164eaab72 Make the "No Net" mark color editable (mark for pads having no net name)
Note: this mark is currently drawn only in legacy canvas.
2017-10-05 20:11:55 +02:00
jean-pierre charras a43f3ab1fe replace "BasicShape" by "Primitive" in code, a better name 2017-09-20 12:51:10 +02:00
Maciej Suminski cca63801bf Renamed D_PAD::{Set,Get}PadName() to D_PAD::{Set,Get}Name() 2017-09-19 18:23:50 +02:00
Maciej Suminski 85be485c34 Enable long names for pin numbers and pads
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
2017-09-19 18:19:49 +02:00
jean-pierre charras e2d3fcec02 Add support for custom pad shape. Full support in DRC and PnS.
add option to use shape or convex hull as clearance area in zones.
simplify code to handle clearance area
2017-09-19 09:02:53 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
Oliver Walters a0afcd5a62 HitTest for pads
- Circular pads
2017-05-10 10:57:28 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
jean-pierre charras b365f17e9f First draft of courtyard overlap detection. 2017-03-19 20:27:44 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
jean-pierre charras dd5b024903 Pad export/import settings functions: remove duplicate code. 2017-02-10 20:44:35 +01:00
John Beard 5cc2abaa2b Tidy consts for class D_PAD
Some accessors should be const:

* IsFlipped
* GetRoundRectRadiusRatio

Returning a objects by value as const in these cases is not helpful, as
all it does is prevent the caller moving from the return value, it just
forces a copy.

Some of thse functions come from base class overrides, those haven't
been changed.

* ShapePos
* GetPadName
* GetPackedPadName
2017-01-22 10:42:45 -05:00
Tomasz Włostowski 1c1f4e9a50 Refactoring of VIEW/VIEW_ITEM classes:
- Remove dependency of EDA_ITEM on VIEW
- VIEW_ITEM is now a pure virtual interface
2016-12-12 16:45:52 +01:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
Maciej Suminski 09e0311d4e Replaced Copy() method with operator=. Removed Copy() where default copy ctor was enough. 2016-09-12 11:50:06 +02:00