Commit Graph

16604 Commits

Author SHA1 Message Date
Seth Hillbrand 07b5fd342a Ensure that we are not calculating self-collision
Ratsnest may have connections from a zone to two different items.  This
should be avoided as we never want to draw the ratsnest line with the
same element as start and finish

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17763

(cherry picked from commit 8760519a87)
2024-04-14 13:50:44 -07:00
Seth Hillbrand a155dd32e8 Do not set optional defaults
In the file format, the 'mirror' tag is optional (not written unless on)
so we cannot default the new text to 'mirror' on just because the
footprint is on the back layer as it won't be turned off by the
footprint loader.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17546

(cherry picked from commit d0fe2e06aa)
2024-04-11 09:43:55 -07:00
Seth Hillbrand e808ab7409 Re-add routine to remove duplicate points
The router needs to elimitate duplicate points but keep colinear
segments.  This re-creates the partial routine from the old Simplify()
function

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17582

(cherry picked from commit 59f99d9a6a)
2024-04-11 14:20:50 +03:00
Jon Evans 8b5c292397 Fix SWIG wrapper for AddPrimitive
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17676


(cherry picked from commit c1e7668d80)
2024-04-05 03:09:35 +00:00
Jon Evans 53c2543474 Fix parsing of legacy text hide token 2024-04-02 18:26:30 -04:00
Mike Williams ce2ea3f3ae PCB: update footprint field when changing footprints
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/17598
2024-04-02 08:18:23 -04:00
Seth Hillbrand c0d38de280 Add some corrections to IPC2581 export syntax
Outline fonts need lineDesc
Padstack def need the location for the pad relative to the padstack

(cherry picked from commit 2123e2ca9c)
2024-04-01 22:59:40 -07:00
Seth Hillbrand fd5d68ca9b Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16879

(cherry picked from commit 10c1072479)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 6b5acdea1f When dragging a via, we need to get all obstacles
The clearance epsilon should not be used to limit which force elements
we return in the query.  Otherwise, we can drag elements into a
DRC-violating space

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16293

(cherry picked from commit 5e850911c5)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 6c7261a223 Utilize hash_combine to avoid hash collision
Most of our pointers will share the top 32 or more bits of their pointer
addresses, making cache collisions highly likely.  This uses a hash
combiner to mix the bits more effectively

(cherry picked from commit e4756c811e)
2024-04-01 17:55:29 -07:00
Seth Hillbrand ae11213622 Handle small holes in DRC Connection width test
If there is a small hole (smaller than the conn width), we can loop
around in a circle checking all points and not move past the mimimum
distance.

To avoid this, if we detect a loop, we exit the substantial checker.
This should return with true because a large hole will return true and
we are only checking to see if there is a minimum amount of copper
between two open areas

(cherry picked from commit c841d0df6d)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 4bf35cbed8 Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16879

(cherry picked from commit 10c1072479)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 7916e56963 Avoid crashing on missing tracks in CADSTAR
We can't assume that the ignored connection exists when trying to set
the junction size.  We use int_max for the default instead of 0 so that
later, we don't try to create a minor track with 0 width in loadNets()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17523

(cherry picked from commit 00d108498f)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 9be4bf0d14 Fix slow selection time when calculating clearance
The clearance between two zones could be rather slow.  This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine.  The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327

(cherry picked from commit 3cc1617f5a)
2024-04-01 17:55:29 -07:00
Seth Hillbrand b1677d5f47 Clean and standardize cross-probing action
Between schematic and pcb editors, we want the following actions:

- Single click on ERC/DRC item should show the item in the ERC/DRC
  window.  But if the window is not visible, it should only update the
  status bar
- Double click on ERC/DRC item should show and raid the ERC/DRC window
  as well as select the line item

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17383

(cherry picked from commit 0f57d76ecd)
2024-04-01 17:55:29 -07:00
JamesJ 18990587b9 Only delete grouped / generated BOARD_ITEMS from the root item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17527

This is required as during an undo / redo operation, rebuilding
the previous selection can result in a group / generator being
selected as well as all of their contained items. This prunes
the contained items to remove the possibility of a double-delete.

(cherry picked from commit 6c73f1feef28925bf26fcc3669cb6333aad5f1d3)
2024-03-30 14:20:58 +00:00
Marek Roszko b9a6f47929 Fix DRC slowdown due to UI yields
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17434


(cherry picked from commit fd501b4bc8)
2024-03-30 03:34:27 +00:00
Jeff Young 09985988e7 Fix footprint undo for new UUID caches.
The footprint's children get swapped by the parent's std::swap
call, so they need to get removed/added to their parent around
the swap.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17592

(cherry picked from commit 2c21ef1ed0)
2024-03-29 17:48:12 +00:00
Jeff Young ccd052cc99 Attempt to prevent KICAD-YP.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17560

(cherry picked from commit a53bc9e026)
2024-03-29 17:46:04 +00:00
Jeff Young 4bea619855 Make sure users don't run into min text size.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17543

(cherry picked from commit fc572bfbc6)
2024-03-29 17:45:13 +00:00
Jeff Young 1238c081c6 Expose groups to property manager.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17496

(cherry picked from commit 82c851a4a7)
2024-03-29 17:44:14 +00:00
Seth Hillbrand 40f938dc75 Sort netnames in properties panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15590

(cherry picked from commit c3a5b92ed0)
2024-03-28 13:06:18 -07:00
JamesJ 30dbafaf7c Use bulk BOARD_LISTENER calls following undo or redo operations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17561
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17420

(cherry picked from commit f51e775f26)
2024-03-24 19:39:25 +00:00
JamesJ cc3e57b52f Don't re-highlight nets on every bulk segment change in net inspector
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17068
2024-03-23 15:35:21 +00:00
wh201906 869f30e291 Add toggleHV45Mode item to the measure tool's context menu
The behavior of the measure tool is influenced by the
horizontal/vertical/45-degree mode, but the context menu of the measure
tool lacks an option to toggle this mode. In contrast, the drawing
tools are also affected by this mode, and their context menu has the
item to toggle this mode.


(cherry picked from commit 806daecf85)
2024-03-23 13:33:32 +00:00
Jeff Young 4c78652690 Ignore graphic shapes that implement netties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17223


(cherry picked from commit 88c1fa3e26)
2024-03-23 13:19:37 +00:00
jean-pierre charras afcda88ee3 GERBER_JOBFILE_WRITER: use UTF8 encoding according to current specif.
Since 2020, non ASCII7 chars are encoded using UTF8 encoding.
A old but incorrect encoding was previously used.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17534
2024-03-22 10:09:47 +01:00
jean-pierre charras dfe6cb7afa Do not run DRAWING_TOOL::PlaceTuningPattern() inside the footprint editor
The footprint editor cannot run the router.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17522
2024-03-21 15:22:13 +01:00
jean-pierre charras 8bdc62c111 Avoid using a nullptr. 2024-03-20 18:35:26 +01:00
Alex Shvartzkop 350687f355 STEP export: add location info to edge add failures.
(cherry picked from commit 800ff9ffb1)
2024-03-19 23:11:20 +03:00
Alex Shvartzkop 3a5a911012 STEP export: handle small segments connecting two arcs better.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17499

(cherry picked from commit 75037dd1d1)
2024-03-19 22:55:17 +03:00
jean-pierre charras 3e4ca3a1c7 Step exporter: workaround to fix issue for boards with main round outline
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17446
2024-03-19 16:13:13 +01:00
Mark Roszko 663918107e Add missing text var override to cli gerbers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17283

(cherry picked from commit d904535a15)
2024-03-19 14:35:30 +00:00
Jeff Young 81f55dfc9c Fix layer swapping for multi-layer items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17371

(cherry picked from commit 44c14b1935)
2024-03-17 12:40:58 +00:00
Jeff Young 8275176792 Report location of FUTURE_FORMAT_ERRORs when reading footprints. 2024-03-15 22:47:00 +00:00
Jeff Young 8589bd3773 Correctly handle locked token for PCB_TEXTBOX and PCB_TABLECELL.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17439

(cherry picked from commit d17151ac1b)
2024-03-15 22:24:53 +00:00
Yon Uriarte 6ebccdecc6 Responsive: Avoid excessive repaints when toggling a netclass' rastnest visibility.
Toggling netclasses visibility toggles the member nets' visibility one by one. Defer redrawing until all toggling is done.

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

(cherry picked from commit 4e8e14ae3a)
2024-03-15 09:45:09 -04:00
Yon Uriarte 8b281b4d1c Performance: Cache BOARD::GetMaxClearanceValue
(cherry picked from commit fe1c73ed7c)

1b35a512  Performance
2024-03-15 13:34:19 +00:00
Wayne Stambaugh 8ce12fb1af Fix Eagle footprint library QA test failure.
Unfortunately the KiCad library I/O does not unescape file names so do not
escape them in the Eagle board plugin.

(cherry picked from commit cf97432833)
2024-03-15 07:59:20 -04:00
Wayne Stambaugh 9e4efe5d72 Fix Eagle board import when footprint library versions exist.
This was a crude hack that appends the library URN ordinal to the name of
the footprint so that it can be correctly looked up by the "element" node.
The Eagle XML DTD does not make it clear how the URN "ASSET_ID" and
"VERSION" are used to look up the appropriate "ASSET_TYPE" so this is a
best guess and seems to work correctly.

The inferred edge clearance dialog had to be disabled when importing third
party boards because on GTK (and possibly other platforms) the dialog would
completely hang KiCad preventing the imported board and possible schematic
from being saved.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12897

(cherry picked from commit 34ec57958d)
2024-03-15 07:59:20 -04:00
Alex Shvartzkop 89ed09744b Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17351

(cherry picked from commit b56ee20e22)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 6df17bba99 Fix rendering/plotting of arcs with tiny angle and huge radius.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17343

(cherry picked from commit 4d66a8ebdb)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop ed89827908 Fix zone cross-probing from DRC dialog.
(cherry picked from commit aa68a3817a)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop b61f6c35c7 Fabmaster (CADENCE ASCII): import dimensions graphics.
See https://gitlab.com/kicad/code/kicad/-/issues/17239

(cherry picked from commit a4da829ccc)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop f9253485da Fabmaster (CADENCE ASCII) import: fix position and orientation of footprint graphics.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17239

(cherry picked from commit cb4ace5561)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 7dc554ec34 EasyEDA Std: fix importing footprints from footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17264

(cherry picked from commit 30573beb48)
2024-03-15 01:17:50 +03:00
Alex Shvartzkop 4ac848f18a EasyEDA Std PCB: fix crash when Name/Prefix type text is not in a footprint.
(cherry picked from commit 951c550c1e)
2024-03-15 01:17:49 +03:00
Alex Shvartzkop e196f71d58 Support Altium Schematic ASCII import
(cherry picked from commit defcb49ac8)
2024-03-15 01:17:49 +03:00
Jon Evans b9d3b571bc Allow specifying a minimum for a via_count constraint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17234


(cherry picked from commit 3a3ceb8ffc)
2024-03-14 21:01:30 +00:00
Jeff Young 4dca966c5d Don't test non-overlapping non-through-hole vias.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17426

(cherry picked from commit a091767551)
2024-03-14 18:07:28 +00:00