Commit Graph

13878 Commits

Author SHA1 Message Date
Jeff Young d5cf7828fa ADDED footprint checks for SMD pad consistency.
Fixes https://gitlab.com/kicad/code/kicad/issues/11736
2022-09-04 10:34:32 +01:00
Roberto Fernandez Bautista 2d203bc975 Don't move items inside a group: move the whole group instead 2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista fa5dc23797 CADSTAR PCB: Fix regression when loading pads in footprints
Zero sized pads can be valid - e.g. a through hole pad
2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista 9abf3438b8 CADSTAR PCB: Invert logic for guessing which layer is top / bottom
Ensures correct automatic layer mapping is applied to the design in
https://gitlab.com/kicad/code/kicad/-/issues/12349
2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista c961624d43 CADSTAR PCB: Load 2-point polygons as line segments
Fixes asserts when loading design from https://gitlab.com/kicad/code/kicad/-/issues/12349
2022-09-04 00:59:57 +02:00
Roberto Fernandez Bautista 21b3753e9b CADSTAR PCB: Parse Teardrops
Todo: We need to figure out how we will load teardrops. For now
just drop them on import.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12349
2022-09-04 00:59:56 +02:00
Jeff Young efae2bbb4c Better feedback for netclass assignment patterns. 2022-09-03 21:33:56 +01:00
Jeff Young c30a557810 ADDED netclass assignment from PCB canvas.
Fixes https://gitlab.com/kicad/code/kicad/issues/5975
2022-09-03 19:29:59 +01:00
jean-pierre charras b791fff963 DIALOG_UNUSED_PAD_LAYERS: minor enhancement: pads and vias can be handled all at once 2022-09-03 10:41:14 +02:00
Roberto Fernandez Bautista c15a13963b Fix Build error: AddLine doesn't exist anymore 2022-09-02 11:17:28 +02:00
Roberto Fernandez Bautista 22f96bfd11 Re-route m_last_head after routing fails
This should ensure the shove state gets reverted

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9023
2022-09-02 09:41:15 +02:00
Jeff Young 854acd4c77 Null-ptr safety for diff-pair-coupling test.
Fixes https://gitlab.com/kicad/code/kicad/issues/12329
2022-09-02 00:49:33 +01:00
Jeff Young 09773e3e2e Make sure dirty flag gets set, and leave save enabled regardless.
Fixes https://gitlab.com/kicad/code/kicad/issues/11824
2022-09-01 14:27:16 +01:00
Jeff Young 9188838e50 RIP EDA_RECT. 2022-08-31 23:57:24 +01:00
Jeff Young b4492e0bd2 More EDA_RECE yeetage. 2022-08-31 17:19:50 +01:00
Jeff Young ebe9617e77 More EDA_RECT expungification, and an attempt to fix the python test. 2022-08-31 17:19:48 +01:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Jeff Young c7036ae076 Beef up BOX2's API so it can replace EDA_RECT. 2022-08-31 00:44:33 +01:00
Jeff Young 0c8787cbb9 Some more wxPoint/EDA_RECT yeeting. 2022-08-31 00:44:33 +01:00
Seth Hillbrand b736460e71 Move optional access from value() to *operator
`value()` throws.  Where we check for existence, we don't need to use
the throwing version and should just use the unprotected variant
2022-08-30 13:59:39 -07:00
Mike Williams a176bf383e Properties: pick up single selections
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12302
2022-08-30 13:59:37 -04:00
Seth Hillbrand 91fbb5c957 Don't prevent immediate actions while router active
Immediate actions that can take place are useful.  We should only be
preventing immediate actions while actively routing or dragging

Fixes https://gitlab.com/kicad/code/kicad/issues/12311
2022-08-30 10:31:29 -07:00
Jeff Young 63386ba64d Pointer safety for ERC/DRC dialogs.
Also makes the "Edit ingored violations" easier to find.

Fixes https://gitlab.com/kicad/code/kicad/issues/12308
2022-08-30 12:07:19 +01:00
Marek Roszko 03aa63bd50 Move 5 helpers to EDA_UNIT_UTILS since they aren't iu specific 2022-08-29 20:11:03 -04:00
Roberto Fernandez Bautista 238c21ed0b Properties: Special case PCB_SHAPE "Layer" property
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12304
2022-08-29 23:13:46 +02:00
Stefan Hamminga 2ff6a6aee1 Implement and enable option to not shove vias during push & shove routing 2022-08-29 17:32:39 +00:00
Jeff Young 2d68cdff94 Better reporting of hole-to-hole clearances and clearance resolutions. 2022-08-29 17:37:49 +01:00
Jeff Young e0f6a6e475 Run hole-to-hole checks on Edge_Cuts layer.
Also makes the flashing logic inside PAD::GetEffectiveShape() easier
to understand.

Fixes https://gitlab.com/kicad/code/kicad/issues/12296
2022-08-29 17:37:49 +01:00
Marek Roszko f0956e48f2 Make EDA_TEXT common
Since EDA_TEXT is a base class, we can just force the child classes to pass the correct iu scaled size

ALLOW_BOLD_THICKNESS removed because it's a pre-custom font holdover
2022-08-29 07:31:03 -04:00
Jeff Young 48f77973da Another try at getting the Link combobox working on MSW. 2022-08-28 23:25:01 +01:00
Jeff Young b886ec728e Copy shape data when converting PCB TEXTBOX to FP.
Fixes https://gitlab.com/kicad/code/kicad/issues/12298
2022-08-28 21:34:13 +01:00
Jeff Young 77c79b6f6a Apply searchArea architecture to courtyard functions. 2022-08-28 21:20:03 +01:00
Jeff Young 667a54ad86 Retire insideArea in favour of intersectsArea and enclosedByArea. 2022-08-28 18:02:41 +01:00
Jeff Young 122a6d7f46 Move hypertext linking to user-page-numbers.
Also moves most navigation code to SCH_NAVIGATION_TOOL.
Also changes page number href to anchor syntax ('#foo').
Also adds hypertext processing to SCH_TEXTBOXes.
Also adds combobox with schematic pages to text properties dialog.
2022-08-27 19:17:43 +01:00
Roberto Fernandez Bautista 840bcffefb ADDED: Hyperlinks on text items in Schematic Editor 2022-08-27 19:17:42 +01:00
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04:00
Roberto Fernandez Bautista 029cc65b34 EDA_SHAPE: Remove m_upsideDownCoords hack (Fixes hitTest routine) 2022-08-27 12:51:32 +01:00
jean-pierre charras 3b4c5f0dc4 French translation update 2022-08-27 09:10:02 +02:00
Jon Evans 300d92438c Allow hiding symbol library tables from symbol chooser
Hidden but loaded libraries are useful when using database libraries
2022-08-26 20:18:40 -04:00
Marek Roszko 161775fdbc Fix another type warning 2022-08-26 20:15:01 -04:00
Jeff Young 09511d176c Quiet Coverity. 2022-08-26 17:05:25 +01:00
Seth Hillbrand 146495672e Utilize our combine_hash routine for multiple hash
We should be using the one routine every time we want to build a hash
from indepedent values rather than rebuilding it differently in multiple
places
2022-08-26 08:45:13 -07:00
Seth Hillbrand 06786c34d7 Blacklist hashes for 2d integer elements
The hash table for integer hashes is extremely limited and places most
elements in the same buckets.  This leads to a linear search time for
structures built on this.

This blocks hashes, directing the coder to utilize std::set or std::map
structures instead of hash tables for implementing integer-based
lookups.
2022-08-26 08:43:37 -07:00
Jeff Young 1a672aba56 Fix a couple of DRC bugs where the bbox wasn't inflated for largestClearance.
Also removes a case of double-testing a pad with a non-plated hole.
2022-08-26 13:22:57 +01:00
Jeff Young 909358e643 Make sure pair caches are layer-specific where they need to be. 2022-08-26 13:22:57 +01:00
Jeff Young 86944c4f9f Marginal performance improvements. 2022-08-26 13:22:57 +01:00
Jeff Young f99761e5bd entirelyInsideArea() prototype. 2022-08-26 13:22:57 +01:00
Jeff Young 7baa56528a Make sure via-gap-same-as-trace-gap gets turned off for board settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/12236
2022-08-26 13:22:57 +01:00
jean-pierre charras d351d0c839 BOARD_NETLIST_UPDATER: disable auto refill zones if new footprints are loaded and waiting for placement.
Auto refill creates a crash when these footprints are moved, probably due to a partial
connectivity rebuild due to refilling when the connectivity data is not yet finalized.
Fixes #11830
https://gitlab.com/kicad/code/kicad/issues/11830
2022-08-26 10:38:36 +02:00
Seth Hillbrand f1261e71d4 Replace boost::optional with std::optional 2022-08-25 15:50:47 -07:00
jean-pierre charras a306246558 Fix a few (minor) compil and Coverity warnings. 2022-08-25 20:21:00 +02:00
Seth Hillbrand fb74bdb059 Don't consider rule area zones in priority calc 2022-08-25 10:12:58 -07:00
Seth Hillbrand e661545ecf Choose the first unused priority value for zones
Default the new zone priority value to the lowest available unused
priority.  Ensures that, by default, a new zone has a unique priority
level preventing zones from unintenionally shorting
2022-08-25 10:05:30 -07:00
Seth Hillbrand ee95224517 Ensure that teardrops always get filled first
Teardrops are, by definition, higher priority than standard zones, so
ensure that they cannot be overriden
2022-08-25 08:54:34 -07:00
Seth Hillbrand 418df36790 Avoid teardrops in priority calculation
When choosing a new priority value, don't look at teardrops (which have
high priority)
2022-08-25 08:41:14 -07:00
Seth Hillbrand 3e4cfab254 Set new zone priority to unique number
Previously new zones' priorities were all set to 0.  This is almost
always wrong and can lead to unintended conflicts.  The new zone default
value is now set to one higher than the largest number on the board.
This is a better default value because it will not conflict with
existing values.
2022-08-24 16:37:57 -07:00
Jeff Young ae86c6f3a7 Don't include text in locked-item-shadow-calc for footprints.
And make shadow margins consistent for all objects.

Fixes https://gitlab.com/kicad/code/kicad/issues/11545
2022-08-24 10:30:20 +01:00
Marek Roszko fc99b3ba95 Don't link gdiplus everywhere anymore
Tested on msys2 which is the only place it would have been buggy
CMake seems to share the gdiplus linkage with the other dependencies automatically now
2022-08-23 23:51:35 -04:00
Marek Roszko e0f28fc4e1 Replace wxFindReplaceData with our own container
By dropping the flags, we can be strict with options.
Also it makes future usage of search functionality a little more "UI" framework independent
2022-08-23 22:16:51 -04:00
Jeff Young ec51955dad Remove vestiges of old pad locking system.
We now use a session preference (Allow free pads) in the board editor,
and we never supported pad locking in the footprint editor.
2022-08-23 18:02:16 +01:00
Seth Hillbrand e4bb1560c5 Set locale in python save routine
Fixes https://gitlab.com/kicad/code/kicad/issues/11006

(cherry picked from commit c3496d61eb)
2022-08-23 09:53:18 -07:00
Jeff Young 1871812f2b Consolidate on a more widely used sub-type architecture. 2022-08-23 12:57:55 +01:00
Marek Roszko 3e451ca516 Add RemoveAllListeners function for future addons 2022-08-22 23:29:04 -04:00
Jon Evans cfb6fcf31a Do not create panel if disabled 2022-08-22 21:32:33 -04:00
Roberto Fernandez Bautista 940a15c547 Todo: Properties system doesn't like const wxString& getters
Comment out for now
2022-08-22 21:32:33 -04:00
Roberto Fernandez Bautista 4108099641 Properties Panel: Correctly limit layers for connectable items to copper layers 2022-08-22 21:32:33 -04:00
Roberto Fernandez Bautista fe7e665236 Properties: NetName and NetClass should have a space + don't translate "Net" 2022-08-22 21:32:33 -04:00
Roberto Fernandez Bautista f5a75a4001 Minor nullptr fixes 2022-08-22 21:32:33 -04:00
Jon Evans f5597238fb Properties: add color swatch to layer enum 2022-08-22 21:32:33 -04:00
Jon Evans 3c6e8aea0f Properties panel: post-rebase fixes and hide by default
Remove layer widget re-added by Orson's rebase
2022-08-22 21:32:33 -04:00
Maciej Suminski af71d42307 Renamed PROPERTY_TYPE enum names to avoid a conflict on MSYS2 2022-08-22 21:32:32 -04:00
Maciej Suminski c37c429c75 Rename PROPERTY_PANEL::Update() to PROPERTY_PANEL::UpdateData()
The base class (wxPanel) already provides Update() method,
which should not be overridden.
2022-08-22 21:32:32 -04:00
Maciej Suminski 7f00efe6cf Properties: Fixed conditional properties using enum values in the conditions
When wxAny holds an enum, it cannot be compared with an integer due to a
missing conversion function. In such case, conditional properties
compare a raw value rather than wxAny.
2022-08-22 21:32:32 -04:00
Maciej Suminski f6f6ebd5f9 WIP: Properties GUI 2022-08-22 21:32:32 -04:00
Maciej Suminski 95fd58b25a Properties meta-data for pcbnew classes 2022-08-22 21:32:00 -04:00
Maciej Suminski 745c94b0a1 Properties (introspection)
Introduces classes:
- INSPECTED: base class for types taking advantage of
  generic properties system.
- PROPERTY*: meta-data storing information about properties
- PROPERTY_MANAGER: singleton class to get properties data
2022-08-22 21:32:00 -04:00
Jeff Young 1e68c353f1 Account for groups in undo of Position Relative To.
Also fixes a bug were pads weren't correctly being found for anchoring
the selection before the Position Relative To.

Fixes https://gitlab.com/kicad/code/kicad/issues/11793
2022-08-22 22:33:38 +01:00
Seth Hillbrand 4b63c7012d Silence some clang warnings 2022-08-22 12:54:00 -07:00
Alex 3a76d42630 Cross-probing/selection for multiple items (PCB -> SCH)
Fixes https://gitlab.com/kicad/code/kicad/issues/10469
2022-08-22 19:33:39 +00:00
Jeff Young f42b66bc1c Regularize ellipsization of menu and status text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12257
2022-08-22 17:52:58 +01:00
Wayne Stambaugh c72457482c Fix Eagle plugin footprint QA test issue.
Apparently mapping Eagle footprint layers to the KiCad Dwg_User
that were previously mapped to UNDEFINED_LAYER breaks the QA test
and causes the footprint editor to crash when opening Eagle
footprints.  This means that the potential data loss issue when
loading Eagle footprints is still in play.
2022-08-22 09:11:30 -04:00
Jeff Young 792d7babe3 Performance (std::map -> std::unordered_map) and commenting. 2022-08-22 12:43:57 +01:00
Jeff Young 03454684fa Commenting. 2022-08-22 12:43:57 +01:00
Jeff Young 4f0136db3b Attempt to fix std::initializer_list lifetime issue. 2022-08-21 20:54:41 +01:00
Wayne Stambaugh 0bc1188897 Fix Eagle plugin board layer mapping issue.
The Eagle plugin layers have to be mapped differently depending on
whether a board is being imported or a footprint library is being
cached.  Footprint libraries can bypass the manual layer remapping
step that happens when importing a board.

Please note that when loading footprints in the footprint editor
and viewer, all layers that do not directly map to KiCad layers are
put on the Dwg_User layer so that there is data loss.  Users will
have to manually remap objects to the correct layer as required.
This is less than ideal but until the footprint library table parser
supports prompting users to remap unknown layers, it will have to do.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11839
2022-08-21 14:56:04 -04:00
Seth Hillbrand af34835fdf Restore removed data
Functions and definitions used in Python scripting should not be
removed.  Comments in header files should never be removed (only
updated/corrected)
2022-08-20 08:40:08 -07:00
Jeff Young eac3d33266 Keep Footprint Checker info between runs. 2022-08-20 12:28:34 +01:00
Jeff Young 28f7221cc3 Allow selection of Footprint Checker markers.
(And do a cross-probe to the Footprint Checker dialog.)
2022-08-20 11:30:25 +01:00
Jeff Young 8b0efa8ac4 A bit of cleanup from last commit. 2022-08-20 11:14:44 +01:00
Jeff Young aa2ad3b44c Move KICAD_T[] to std::initializer_list<KICAD_T>. 2022-08-20 10:28:11 +01:00
Jeff Young 46df421064 ADDED defined pad groups for net-tie footprints
Each pad group is allowed to short nets with other pads in its group.

Legacy footprints with the "net tie" keyword hack will get a single
group auto-created with all the footprint's pads in it.

DRC and the router now allow a track to collide with copper graphic items
while entering a net-tie pad as long as the closest point in the collision
is within the pad.

DRC (and the footprint checker) now check for copper items in the
footprint shorting pads which are not in the same pad group.

Fixes https://gitlab.com/kicad/code/kicad/issues/2265
2022-08-19 18:54:20 +01:00
Jeff Young 508df402f6 Cleanup. 2022-08-19 18:54:19 +01:00
jean-pierre charras a60053c800 selectAllItemsOnSheet(): fix a typo that prevent selection of items in root sheet. 2022-08-19 11:12:16 +02:00
jean-pierre charras e0fbe2542f Fix a few compil and Coverity warnings. 2022-08-19 10:53:29 +02:00
Marek Roszko 3a718385cf Just match the type to the comparison type on second thought 2022-08-18 22:22:04 -04:00
Marek Roszko 675938375b Use a larger data type for min_dist
Squared norms are massive and can logically exceed 32-bit ints
2022-08-18 22:19:36 -04:00
Seth Hillbrand b9461f2ba7 Re-enable tests for zones
Avoid invalid substantial checks triggered by signed floating point
zeros.  Adds a QA check to ensure zone-self checks are maintained
2022-08-18 17:06:29 -07:00
Seth Hillbrand 97d7ee1f30 Remove `/` from our forbidden LIB_ID list
It is still forbidden from footprint file names but that is handled
separately and it should not be forbidden in symbol files at all
2022-08-18 12:49:40 -07:00