Commit Graph

37273 Commits

Author SHA1 Message Date
Seth Hillbrand 53eb39e033 Avoid NaNs when applying fillets
Segments that are inline with each other will create NaNs when
filleting.  This double check prevents NaN points from being added to
the polygon

(cherry picked from commit b72c6e5cb0)
2023-05-03 11:50:47 -07:00
Mark Roszko 57ae43890c Update 5 files
- /eeschema/CMakeLists.txt
- /eeschema/eeschema.cpp
- /pcbnew/pcbnew.cpp
- /qa/qa_utils/pcb_test_frame.cpp
- /qa/unittests/eeschema/test_module.cpp
2023-05-03 17:32:55 +00:00
jean-pierre charras 1c59574cbf FOOTPRINT_EDIT_FRAME: do not delete settings when closing the frame.
They now are read when starting kicad, and must be not deleted.


(cherry picked from commit 0c544f1f45)
2023-05-03 17:27:28 +00:00
Seth Hillbrand 7ddef03aba Initialize settings for SINGLE_TOP
(cherry picked from commit 82ba67db82)
2023-05-03 17:26:57 +00:00
Seth Hillbrand 4258738b89 Remove extraneous symbol editor settings
(cherry picked from commit 2cd861dbd5)
2023-05-03 17:26:26 +00:00
Seth Hillbrand 594864e117 Remove extraneous includes
(cherry picked from commit 892e4536b0)
2023-05-03 17:26:13 +00:00
Seth Hillbrand a5698ce480 Remove locks from settings
Settings should be initialized on start-up.  This removes the option of
lazily loading the settings from file and instead requires all settings
needed to be loaded on KiFACE start before requesting data from the
settings object


(cherry picked from commit e6ab9a88ce)
2023-05-03 17:25:17 +00:00
Seth Hillbrand 1a2c9011e6 Rework Copper Sliver check
Adds QA checks to copper sliver tests.  Adds the following checks:
- Dot product between two arms (quickly avoids checks for >90°)
- Checks the sliver is convex (area test)
- Eliminates minor slivers with angles that are approximately 0 and ones
  with the opposite side width beneath a configurable level
- Updates Clipper2 to fix a couple of jagged edges on inflate
- Adds simplify during zone fill inflation to limit jaggies

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

(cherry picked from commit f7f52d77e4)
2023-05-03 10:22:49 -07:00
Jeff Young 600ac72a3d Add missing property to footprint texts table.
Fixes https://gitlab.com/kicad/code/kicad/issues/14357
2023-05-03 17:58:29 +01:00
jean-pierre charras 1118eed080 Use operator at() instead of [] to access a std::array item
It helps debug.
From Master branch
2023-05-03 17:21:36 +02:00
jean-pierre charras e42c66bd0e Pcbnew: fix crash when loading a file having vias on connected layers only.
It was due to an access out of bounds in a std::array
Fixes #14668
https://gitlab.com/kicad/code/kicad/issues/14668
2023-05-03 17:18:28 +02:00
Jeff Young ff8fae377c Pass aEvent by value.
It will have changed by the time CallAfter() is executed.

Fixes https://gitlab.com/kicad/code/kicad/issues/12475
2023-05-03 12:27:45 +01:00
Jeff Young 6931252ed9 Pull back more sheetPath fixes from master. 2023-05-03 12:04:46 +01:00
Mike Williams ef8e549d86 PCB Search Pane: show Board Setup / Net Classes on net activation
(cherry picked from commit bc8f81b14d)
2023-05-03 11:55:50 +01:00
Mike Williams a5470029a8 PCB Search Pane: activate item opens properties dialog
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12475
(cherry picked from commit 71b687622b)
2023-05-03 11:55:14 +01:00
Mike Williams 13fb23d59d Search Pane: add Activation (enter/double click) event support
(cherry picked from commit d915cb780e)
2023-05-03 11:54:49 +01:00
Jeff Young a3197578d6 Tighten lifecycle management of CN_ANCHOR/CN_ITEM.
In particular, when a CN_ITEM is freed set all its anchor's
item pointers to NULL.  (The anchors have a separate
lifecycle due to being std::shared_ptrs.)

Hopefully fixes Sentry KICAD-KV.

(cherry picked from commit 0eac5c6748)
2023-05-03 10:51:20 +01:00
Jeff Young ebc14b35f5 Commenting and formatting. 2023-05-02 14:14:05 +01:00
jean-pierre charras b0235a2805 3D viewer: use the right color theme (the one used in the board editor)
From Master branch
Fixes #14616
https://gitlab.com/kicad/code/kicad/issues/14616
2023-05-01 17:00:09 +02:00
jean-pierre charras d0069e0e1d specctra_export: fix unit conv PCB iu -> DSN
From Master branch, commit 28028c941e
Fixes #14656
https://gitlab.com/kicad/code/kicad/issues/14656
2023-04-30 20:58:12 +02:00
Jeff Young 878f136951 Extend Mac colour picker cursor fix to GTK.
(cherry picked from commit a3b741a126)
2023-04-30 18:12:04 +01:00
Jeff Young bf364bf74c Go back to winner-takes-all lib-tree scoring algorithm.
(Because we sort alphabetically there's no way to see
what the second-highest scored item was.)
2023-04-30 12:32:19 +01:00
Jeff Young 03c2850c59 Record parent rule for DRC assertions.
(Particularly important if the rule specified a severity.)

Also fixes a bug looking up LSET layer names in the
GetStandardLayerNames array (which aren't the same).

https://forum.kicad.info/t/a-few-questions-about-custom-rules-syntax/40068/7
2023-04-29 21:17:56 +01:00
Jeff Young 4eddc7131d Add Grid Settings to PL_EDITOR.
Fixes https://gitlab.com/kicad/code/kicad/issues/14612
2023-04-29 18:16:51 +01:00
Jeff Young 14be1935e8 Formatting and cleanup. 2023-04-29 18:14:24 +01:00
Jeff Young f08029354a Use wxFileName to resolve . and .. in documentation paths.
Fixes https://gitlab.com/kicad/code/kicad/issues/14564

(cherry picked from commit 08c773a0bf)
2023-04-29 17:52:54 +01:00
Jeff Young c18600b67f Don't reset alpha when specified in hex value.
Also fixes a bug with colour picker cursor drawing on Mac.

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

(cherry picked from commit a817b4c1ff)
2023-04-29 17:52:50 +01:00
Jeff Young 2acc0a6844 Use Net() accessor uniformly; init hole parent in VIA::Clone()
Fixes https://gitlab.com/kicad/code/kicad/issues/14603

(cherry picked from commit 16e000f2b0)
2023-04-28 18:33:27 +01:00
Lucas Dumont 8ffba3a52f Update collide for hole
As hole don't keep track of the net, update the collide function to keep it working

(cherry picked from commit b1a4353c34)
2023-04-28 16:20:31 +01:00
Jeff Young 0fb2f35b10 Fix sheetPath handling in SPICE model generation.
(cherry picked from commit d5cb100f72)
2023-04-28 16:20:03 +01:00
Jeff Young f8270b9cec Tighten ownership model of PNS::ITEM.
In particular, ownership must be explicitly set.  It is
no longer inherited through copy/clone/etc.
2023-04-28 11:03:24 +01:00
Jeff Young d3311ee231 Implement better sheet-path awareness for label text var resolution.
(cherry picked from commit 4b0027a5d7)
2023-04-28 01:02:58 +01:00
Jeff Young 21eb2c8dad Simplify PNS::VIA construction.
(cherry picked from commit 9646e3c1c0)
2023-04-28 00:33:27 +01:00
Jeff Young a11fd7a792 Set currentSheet when exporting netlist.
Patch courtesy of Fernando Gomez.

(cherry picked from commit 5e21e94478)
2023-04-26 18:20:34 +01:00
Seth Hillbrand a2ad9f8b10 Handle multiple holes in footprints
Our basic logic for whether we have a hole or an outline in a footprint
checks if there is copper pads outside of the closed edge.  This misses
the case where the footprint is used to align multiple holes but has no
copper.  Since we do not support multiple outlines in a board, we can
safely assume that multiple, closed edges in a footprint represent holes
and not outlines

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

(cherry picked from commit 4b91c0c8ee)
2023-04-26 09:37:08 -07:00
Lucas Dumont 9a0e2f3395 Fix typo in QueryConstraint switch
(cherry picked from commit 2992d7c68b)
2023-04-26 14:21:38 +01:00
Jeff Young cd9196ddb9 Use fileds from flattened lib symbol when updating.
Fixes https://gitlab.com/kicad/code/kicad/issues/14577

(cherry picked from commit d816fb071f)
2023-04-26 13:04:05 +01:00
Jeff Young c10fe673a2 Don't let add-row processing intercept OK processing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14579

(cherry picked from commit 5b56cb6bdb)
2023-04-26 13:04:05 +01:00
Wayne Stambaugh 105f8a1720 Do not close ERC dialog when first error is on a different sheet.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14538
2023-04-26 07:51:32 -04:00
Seth Hillbrand 050f47daf1 Bug Fixes for new incremental connectivity
- Ensure that critical paths (ERC/netlister) are fully-rechecked
- Handle symbol/pin distinction in change markers
- Fully connect hierarchical pins in one pass descending

(cherry picked from commit 6e8a5acc66)
2023-04-25 11:32:59 -07:00
Seth Hillbrand 683abd2029 Add ability to update subgraphs based on changeset
Previously, almost all connectivity updates were full updates, meaning
that the entire connectivity graph would be rebuilt each time a change
was made to the schematic.  This update modifies the update to only
correct the subgraphs that are directly affected by the change.

It uses the existing connection graph to find all affected subgraphs as
well as connections to the changes based on the visible schematic.
These elements are removed from the existing connectivity graph and
marked dirty.  They then have a new connectivity graph built only around
their changes.  The resulting graph is merged into the original.

Currently, this ability is behind an advanced config flag
`IncrementalConnectivity` while testing.

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

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

(cherry picked from commit a154571438)
2023-04-25 11:32:04 -07:00
Seth Hillbrand d08f937932 Move Spacemouse to advanced config
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used.  This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes

(cherry picked from commit 2cd854af14)
2023-04-25 11:30:36 -07:00
jean-pierre charras 2f51742311 netlist exporter: export only the field value, even if field name is shown.
Previously, when the field name was visible, the exported field value was
prefixed by the field name, and this is incorrect.
From master branch
Fixes #14611
https://gitlab.com/kicad/code/kicad/issues/14611
2023-04-25 15:17:05 +02:00
Lucas Dumont b926d2f0bd Don't override clearance when routing
The default `m_overrideClearance = -1` used here was changed to 1.
Reseting it to -1 to solve linked issue

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

(cherry picked from commit e2e901de1d)
2023-04-25 10:21:13 +01:00
Jeff Young 89d1d36e79 Don't try to keep track of a HOLE's net.
Keep track of it's parentPadVia instead.

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

(cherry picked from commit 676a15df65)
2023-04-24 18:32:48 +01:00
Jeff Young 999cd8cd11 Simulator fixes.
1) Don't read libraries multiple times
2) VDMOS default is nchan if not specified
3) In the absence of a workbook default to LTSpice compatability
4) Don't attempt to write out a model line for a subckt; it never has
a baseModel
2023-04-24 13:55:34 +01:00
Jeff Young fd8b281731 Formatting. 2023-04-24 13:55:15 +01:00
Jeff Young d8481b4528 More robust file reading for simulator files. 2023-04-24 13:53:22 +01:00
jean-pierre charras 6d93fa046c pcb_calculator: add missing code to save Regulator Panel settings.
From master branch.
2023-04-24 09:14:31 +02:00
jean-pierre charras c75672fd44 OPENGL_GAL: draw BITMAP_BASE: fix incorrect rendering of mirrored bitmaps
The vertical mirror was not working.
2023-04-23 16:12:14 +02:00