Commit Graph

14830 Commits

Author SHA1 Message Date
jean-pierre charras ece34e1a0c Plot Gerber format: ensure all attributes are added to polygon items.
Especially, TA.AperFunction,EtchedComponent for net tie footprints using polygons.
2023-02-25 19:06:46 +01:00
mitxela 734d3667a8 Helper function to allow net.GetNetClassName() 2023-02-25 13:14:55 +00:00
mitxela 182abd4652 Expose shared_ptr to swig
Possibly not the right way to go about it but technically works
2023-02-25 13:14:55 +00:00
mitxela 716328e511 Fix python GetAllNetClasses 2023-02-25 13:14:55 +00:00
jean-pierre charras bb62c21abc python wizard: fix compatibility with current code 2023-02-25 11:06:01 +01:00
jean-pierre charras d3c5f25be6 Pcbnew: optimize netname and num text size and position display on pad.
Sizes where a bit too big. Fix also a difference between Cairo and OpenGL.
Fixes #13872
https://gitlab.com/kicad/code/kicad/issues/13872
2023-02-25 11:05:21 +01:00
Jon Evans 8440d7258b Do not invalidate board caches during DRC
Footprints now modify their parent container when destroyed due to
26542796, and a temporary footprint is created during DRC
in some situations.  This can lead to board caches being messed
with during DRC which can cause unpredictable bad effects due to
multithreading.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13844
2023-02-24 22:55:32 -05:00
Jon Evans b176881d49 Allow shorting copper zones through negative clearance
This brings the zone filler in line with other places where
we use negative clearance rules to disable constraints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14069
2023-02-24 20:36:39 -05:00
Jeff Young d9a77e6a64 Add DRCEpsilon to net-tie-exclusion testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14008
2023-02-24 12:44:55 +00:00
jean-pierre charras 4fb104b238 Plot footprint texts: add code to plot Knockout texts.
Fixes #14068
https://gitlab.com/kicad/code/kicad/issues/14068
2023-02-24 08:45:47 +01:00
Jon Evans 1651b44ab1 Fix some PCB_SHAPE properties
Hide irrelevant position/start/end properties
for shape classes that don't use them.
2023-02-23 20:23:44 -05:00
Seth Hillbrand ffcc0e50b7 Handle excessively large values when hatching
While unusual, ensure that hatched zones don't break KiCad if they are
close to the integer limit

Fixes https://gitlab.com/kicad/code/kicad/issues/14066
2023-02-23 14:40:57 -08:00
Seth Hillbrand 1b8b216ac8 Bitmaps are not actually copper
We report bitmaps as being 'on' a copper layer because they are
associated with it but they are not actually physical parts so should
not be included in the DRC checks

Additionally, Bitmaps effective shape starts are the top left corner
rather than the center (unclear why that was there in the first place)

Fixes https://gitlab.com/kicad/code/kicad/issues/14065
2023-02-23 14:16:28 -08:00
Alex 9d96edc44f Print original netnames properly when reconnecting zones/vias.
Using GetNetname() after SetNet() isn't a good idea to get the original
name when updating PCB from Schematic.
2023-02-23 22:09:53 +03:00
Alex f31e5ea783 pcbnew: Fix pads losing nets after Undo.
Wasn't fixed in all places after being broken in
13f5c78e89
2023-02-23 22:06:39 +03:00
qu1ck f0dd32c3a7 Fix plugins in pcbnew breaking by opening fp editor 2023-02-23 14:20:03 +00:00
Marek Roszko c2a4dd93e8 Fix typo in appearance_controls.cpp 2023-02-22 20:35:36 -05:00
Jon Evans d8f4d04093 Disable auto-refill zones
We need a more advanced dirtying system for this to work out for
many users, it turns out.  Right now too many changes cause full
zone refills which interrupt workflow.
2023-02-22 20:13:55 -05:00
Seth Hillbrand af10878954 Use Chamfer lines when deflating
Rounded line ends when deflating leads to microscopic jags in the
outline that are not visible but add substantial computation time and
minor error when computing polygon offsets.

Instead, the chamfer deflate method prevents these jagged lines by
clipping angles < 90° by the error level.  This does not impact deflate
calls where we explicitly require the angles to be maintained
2023-02-22 16:24:26 -08:00
Seth Hillbrand da61d31f44 Remove superfluous Simplify() call 2023-02-22 16:24:26 -08:00
aris-kimi 22bca5c2a0 Disable link maps by default and fix compile issue with lld linker
The link maps were actually disabled by default before
912f1d5cec, and required KICAD_MAKE_LINK_MAPS
to be provided to enable them. So switch back to disabling them by
default.

Also, The lld linker is unable to accept a single dash cref option, while
ld and gold can. Instead, use the double dash version that is supported
by all three.

xref: https://github.com/llvm/llvm-project/issues/60932

Co-authored-by: aris-kimi <aris_kimi@hotmail.com>
Co-authored-by: Ian McInerney <ian.s.mcinerney@ieee.org>
2023-02-22 23:18:36 +00:00
Jon Evans 43d3a18b86 Improve HiDPI handling of appearance/layer controls 2023-02-22 09:20:36 -05:00
Jon Evans 89ef6b36f4 Fix layer widget in HiDPI situations 2023-02-22 09:20:30 -05:00
Ian McInerney c6e417c19c Fix missing override statements 2023-02-22 01:44:06 +00:00
Ian McInerney 912f1d5cec Modernize setting link map linker flags 2023-02-22 01:44:06 +00:00
Ian McInerney bcb93e9aa7 Modernize setting of compiler definitions in CMake
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
jean-pierre charras e30e510354 gen drill map: fix duplicate suffix in map filenames if gbr drill fmt is selected
Fixes #14026
https://gitlab.com/kicad/code/kicad/issues/14026
2023-02-21 14:22:50 +01:00
jean-pierre charras db66419f02 Teardrops: fix incorrect shape in some cases. 2023-02-20 09:06:21 +01:00
jean-pierre charras 3a11d90d92 Teardrops: handle arcs in tracks.
Fixes #13858
https://gitlab.com/kicad/code/kicad/issues/13858
2023-02-19 14:44:37 +01:00
Marek Roszko 30a49462fe Fix crash parsing cadstar
Fixes sentry KICAD-B2
2023-02-19 08:06:35 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Mike Williams bc8f81b14d PCB Search Pane: show Board Setup / Net Classes on net activation 2023-02-18 15:41:26 -05:00
Marek Roszko dffd2da8c8 Fix the shared_lock added and micro-opt the reindex 2023-02-18 11:28:19 -05:00
qu1ck c7bb6f5778 Treat dimensions in fp as text for bbox calculations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13976
2023-02-18 13:04:12 +00:00
Jon Evans cad607ae84 Hide parent property in footprint editor 2023-02-17 20:40:09 -05:00
Jon Evans f7d59f2e89 Enable properties panel in footprint editor 2023-02-17 20:35:56 -05:00
Jon Evans f12f2b8420 PNS: Diff pairs can have different hole-to-hole size
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
Jon Evans 459473ccc3 PNS: Safety for evaluating item nets for rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993
2023-02-17 19:56:02 -05:00
qu1ck 2975f53647 PCM: auto reload global libs after dialog is run
This adds Reset() method to KIFACE to reload global libs stored in
global static vars.
Also refactors some lib reload code in various frames to have
common MAIL_RELOAD_LIB handler.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12500
2023-02-17 17:24:32 +00:00
Alex ecb28ddf1c Prevent ghost image after canceling bitmap placement. 2023-02-17 03:53:44 +03:00
Jeff Young 5b0f1376c0 Simplify code now that we no longer drop out on first rule fired. 2023-02-16 17:55:33 +00:00
Jeff Young 978c2b074e Negative clearance means test will be ignored, not rule. 2023-02-16 17:39:47 +00:00
Jeff Young 407cdd63fb Translatable strings. 2023-02-16 17:28:06 +00:00
jean-pierre charras 911e013850 Pcbnew: Do not change visibility objects when changing Visibility layers
Fixes #13836
https://gitlab.com/kicad/code/kicad/issues/13836
2023-02-16 12:39:15 +01:00
qu1ck 9f10c142c4 Sync pcbnew selection with selected items after plugin is run 2023-02-16 02:29:06 +00:00
Seth Hillbrand 9d3f4bef6a DRC: Verify overlapping layers in physical clearance
When checking the physical clearance on a layer, it is critical to check
that the via hole exists on that layer.  Blind/buried and micro vias may
not overlap, so should be excluded from this check when they don't exist
on a particular layer

Similarly, we should only be reporting a single physical clearance error
for each item pair even though they may have multiple errors across
multiple layers in the case of via-via clearance
2023-02-15 11:35:24 -08:00
jean-pierre charras 2032b8af59 Pcbnew: fix incorrect rotation of thermal spoke for rotated footprints.
If the footprint rotation is not a multiple of 90°, the thermal spokes
were not correctly rotated.
Fixes #13919
https://gitlab.com/kicad/code/kicad/issues/13919
2023-02-15 18:19:34 +01:00
Jeff Young 40e1296a8b Clear dirty flags after a move.
Fixes https://gitlab.com/kicad/code/kicad/issues/11362
2023-02-15 14:50:31 +00:00
Jon Evans 2d7c5c5c0f Router: Do not collide items within a net tie footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13909
2023-02-14 21:08:36 -05:00
Jon Evans 473979d686 Fix handling of PPI when loading embedded images
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13884
2023-02-14 19:42:06 -05:00
Wayne Stambaugh eb83f76bff Allow plotting of multiple board layers per plot in Python.
Since the always plot the edge cuts layer  option was deprecate,
the ability to plot multiple board layers was exposed through the
PLOT_CONTROLLER object.

Added the interactive plot information which was overlooked during
version 7 development.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13841
2023-02-14 09:49:20 -05:00
Mike Williams 4b07e3e413 Common Actions: Find Previous
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8968
2023-02-14 08:21:37 -05:00
Mike Williams 3e715c99c8 Swap: take S key now that it's available 2023-02-14 07:42:06 -05:00
Seth Hillbrand e7fe69b97f Better handling of vertex sorting
Nominally, the zcode of a vertex is unique.  This is not 100% true,
however, as we must interlace two 32-bit numbers into a single 32-bit
number.  Sorting needs to account for the possibility that the zcode
will be the same while other elements of the vertex are different.  This
commit fixes the broken boolean logic to more clearly handle these cases

Fixes https://gitlab.com/kicad/code/kicad/issues/13867
2023-02-13 11:21:04 -08:00
Jeff Young 8bab429c7d Account for border when calculating text margin for text boxes.
Also fixes some unnoticed issues with the textbox dialogs (probably
dating from the move to wxWidgets 3.2).

Fixes https://gitlab.com/kicad/code/kicad/issues/13877
2023-02-13 17:08:29 +00:00
Mike Williams 71b687622b PCB Search Pane: activate item opens properties dialog
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12475
2023-02-13 10:57:05 -05:00
jean-pierre charras 17059971e8 DIALOG_UNUSED_PAD_LAYERS: do not use TransferDataFromWindow for any button.
TransferDataFromWindow is called only when closing by a wxID_OK button
Fixes #13865
https://gitlab.com/kicad/code/kicad/issues/13865
2023-02-13 10:26:46 +01:00
Jeff Young 499b58f505 ADDED: user-specified gap and linewidth for bounding hull creation. 2023-02-12 23:16:45 +00:00
Marek Roszko f409837d26 Fix a stray ternary hidden under #if 2023-02-12 16:46:34 -05:00
Jeff Young 837ba323fb Add doc link to custom rules syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/13727
2023-02-12 21:34:35 +00:00
Marek Roszko 4665823089 Turn on and fix MSVC compliance mode issues
We want /permissive- to enable debug performance improvements in MSVC 17.5+.
This flag is also default under C++20 so we'll have to deal with these compile issues anyway at some point in the future.

In particular, MSVC becomes pedantic about ternary types.
See https://learn.microsoft.com/en-us/cpp/build/reference/permissive-standards-conformance?view=msvc-170#ambiguous-conditional-operator-arguments

MSFT cites https://cplusplus.github.io/CWG/issues/1805.html
2023-02-12 16:30:37 -05:00
Jeff Young 2a5bb71fbd ADDED operating point text variables for labels and symbols.
ADDED formatting for cursors and operationg points

Also fixes a bunch of bugs to make the new cursors work with .ac sims.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/6965
2023-02-11 21:11:07 +00:00
Jeff Young e73366db5c Add 3D viewer to toolbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/13559
2023-02-11 21:11:07 +00:00
Jeff Young aab237852b Flatten Reannotation dialog. 2023-02-11 21:11:07 +00:00
Jeff Young 0dcc34ddc8 Simplify Remove Unused Pads dialog. 2023-02-11 21:11:07 +00:00
Jeff Young 362d85ef50 Special selection mode when in high-contrast with courtyard layer active.
Fixes https://gitlab.com/kicad/code/kicad/issues/13521
2023-02-11 21:11:07 +00:00
Jeff Young 95fb3825bd Fix some strings from V7's string freeze. 2023-02-11 21:11:07 +00:00
Jon Evans 61dd4b7043 Properties: fix rebuilding when availability changes 2023-02-11 15:50:51 -05:00
Jon Evans 0b3928d38f Properties: add some validators for PAD 2023-02-11 15:50:51 -05:00
Jeff Young 13391176ae Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802
2023-02-11 20:43:00 +00:00
Marek Roszko 4d6e06d349 Add grid reset to place menubar. 2023-02-11 13:20:35 -05:00
Jon Evans eb240fda9a Properties: introduce validators; re-enable zone hatch settings 2023-02-11 11:44:58 -05:00
Jon Evans 254168c788 Properties: introduce method chaining for initialization 2023-02-11 11:44:58 -05:00
Jon Evans 6948a0bebd Expose new netclass storage to SWIG
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13337
2023-02-11 09:50:24 -05:00
Alex b5191c8c22 Fail-safety in spreadRectangles. 2023-02-11 16:42:27 +03:00
Jon Evans b888714ed5 Don't discard temporary item being placed if placement is rejected
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13697
2023-02-11 08:40:33 -05:00
Jon Evans e066454c61 Zones: use metric defaults and limits instead of mixed units
Update testcases to reflect new defaults
2023-02-11 07:39:29 -05:00
Seth Hillbrand fda3feaf3f Revert "Add doc link to custom rules syntax help."
This reverts commit 7874735810.
2023-02-10 15:33:03 -08:00
Seth Hillbrand 90a388571e Fix copy-pasta
testing 'othervia' for dynamic_cast success needs to use `othervia`
rather than `via` which might still be null

Fixes Sentry issue KICAD-5K
2023-02-10 13:33:21 -08:00
Seth Hillbrand 6fb9d190ac Use the common subset of nets for local update
When adding new data, we may have differing sizes of the dynamic
ratsnest and our local copy, so ensure that we are only referencing
elements that exist in both
2023-02-10 12:50:29 -08:00
Alex 89429996da Fix a crash in rectpack2D when unable to pack footprints. 2023-02-10 22:45:07 +03:00
Seth Hillbrand f4825cdd8f Allow same-net, same-priority zone filling
When two zones with the same net and same priority overlap, they should
both be filled, matching the behavior of v6.  If you would like an
explicit override of one or the other, you need to set the zone priority
higher.  Relying on the UUID as a tie breaker is good for zones with
different nets but creates unexpected changes from v6 when applying it
to zones of the same net
2023-02-10 11:07:08 -08:00
Jon Evans e2353a2849 PANEL_BOARD_STACKUP: Ensure UI is re-linked to storage when importing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13835
2023-02-10 12:58:04 -05:00
jean-pierre charras 538ee12188 Pcb editor: fix crash when trying to activate the "place anchor" tool.
"place anchor" tool exists only in the Fp editor. However, the hotkey
to activate this tool was also active in the board editor. Now disabled.
2023-02-09 16:29:33 +01:00
Jon Evans 92a61b187f Properties: Hide zone fill type settings for now
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13811
2023-02-08 21:56:15 -05:00
Alex b71fa91bc4 Don't write outside of overrides array on pad zone_layer_connections.
Use std::array to catch future errors in Debug.

Fixes https://gitlab.com/kicad/code/kicad/issues/13803
2023-02-08 01:32:52 +03:00
jean-pierre charras a493a2c822 kicad-cli, pcbnew pàlot: honor the color options when ploting pdf files
--black-and-white and -t were shown in help, but not handled
Fixes #13805
https://gitlab.com/kicad/code/kicad/issues/13805
2023-02-07 20:20:45 +01:00
jean-pierre charras 82d9176782 FOOTPRINT::Flip(): add missing PCB_BITMAP_T.
Fixes #13785
https://gitlab.com/kicad/code/kicad/issues/13785
2023-02-05 18:41:58 +01:00
Jeff Young f2f54fe926 Improve zone-layer-connections terminology and comments.
This makes it clearer that the overrides are not inverses of each
other -- one overrides the flashing state and the other overrides
the connection state (to other zones, not to everything).

Also fixes a bug where we were failing to check the force-no-connect
for pads.
2023-02-05 17:39:42 +00:00
Alex c122fd0e36 Remove unused cache_optionally_flashed_connections. 2023-02-05 17:39:42 +00:00
Alex f6fd85af85 CHANGED: Try to determine via/pad flashing state before filling zones.
If removing unused via annular ring option is enabled on a layer, then the via will have the ring if both:
- Via center is not inside a rule area with "Keep out copper fill" flag set
- Highest-priority zone the via hole intersects with has the same net

Pads will be flashed if:
- Pad center is not inside a rule area with "Keep out copper fill" flag set
- Highest-priority zone at the pad center has the same net

Fixes https://gitlab.com/kicad/code/kicad/issues/12964
2023-02-05 17:39:42 +00:00
Alex bf1a8f2582 router: Fix clamp in meander corner radius calculation.
Fixes https://gitlab.com/kicad/code/kicad/issues/13781
2023-02-05 07:22:38 +03:00
Jeff Young a59c1afa53 Fix two bugs in RTree polygon collions special case.
1) Special case doesn't work for polygons with holes
2) Fix special case to handle intersecting lines where neither end is
   in the polygon.

Note that only (1) is required for the bug below.  (2) was just
discovered while implementing (1).

Fixes https://gitlab.com/kicad/code/kicad/issues/13779
2023-02-04 13:46:40 +00:00
jean-pierre charras 6b5eeeb861 Preferences dialog: try to reduce its width, in non English languages.
Remove some useless spacers, and do not force some widgets to have a to
large size (by removing empty areas).
Work in progress: one panel is still too big.
2023-02-04 14:36:14 +01:00
Seth Hillbrand 887c740c2e Limit the number of potential netnames
Don't set text if outside of the clipbox.  Text is non-cached so will
get redrawn on zoom

Fixes https://gitlab.com/kicad/code/kicad/issues/13572
2023-02-04 11:17:09 +01:00
Jeff Young 8ecf64b6c5 Don't run DRC rules on non-existant layers.
Fixes https://gitlab.com/kicad/code/kicad/issues/13753
2023-02-03 15:08:31 +00:00
Jeff Young 235925d62c Clearer reporting of negative clearances. 2023-02-03 15:08:31 +00:00
Jeff Young 0d083d0230 AllCuMask() and AllTechMask() are static, they do NOT modify "this". 2023-02-03 15:08:31 +00:00
Seth Hillbrand b427ad80f6 Don't make unneeded copies of std::pairs 2023-02-03 15:28:53 +01:00
Seth Hillbrand dde336ee40 Split connectivity mutex locking
Internal routines have no need for locking the mutex they already own.
While external routines that want to recalculate the Ratsnest do need an
exclusive lock before being allowed access

Fixes https://gitlab.com/kicad/code/kicad/issues/13011
2023-02-03 15:26:19 +01:00