Commit Graph

15140 Commits

Author SHA1 Message Date
Jeff Young ccf6e78cd5 It is legal to have nullptr zones in the m_CopperZoneRTreeCache.
(Though we might want to re-think this strategy....)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15853
2023-10-14 22:35:06 +01:00
Jeff Young 4156587abe Don't assume an error location for PAD::GetEffectivePolygon().
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.

Also reverts part of the change to always use polygons for PNS::SOLIDs.  A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).

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

(cherry picked from commit 62d959ed0e)
2023-10-14 15:33:00 +01:00
Jon Evans 629eccaf09 PNS: Allow for approximation error in hull clearance
Also revert to using exact hulls for non-compound shapes

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

(cherry picked from commit 96f9f2c658)
2023-10-14 15:33:00 +01:00
Jeff Young da12746a3a Clear selection before deleting board layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15866

(cherry picked from commit 8d3047d6eb)
2023-10-14 15:33:00 +01:00
Jeff Young b023019b0d Include solder mask in STEP export stackup height.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15632

(cherry picked from commit b4986030da)
2023-10-14 15:33:00 +01:00
Jeff Young 1fdaa1083e Honour custom layer names for Layer_Top and Layer_Bottom.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15835

(cherry picked from commit da5f5536c8)
2023-10-14 15:33:00 +01:00
Jeff Young 2f8e846b9e Adjust colours in appropriate direction depending on background.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15841

(cherry picked from commit 3f0067cbaa)
2023-10-14 15:33:00 +01:00
Alex Shvartzkop e42db52d14 Fix a crash when using length tuning tools.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15874

(cherry picked from commit 61bdee027b)
2023-10-14 16:54:16 +03:00
Alex Shvartzkop d4ec455ce0 Fix loading thru-hole pads when drill token is missing.
(cherry picked from commit f7ed9cc5c7)
2023-10-14 15:52:57 +03:00
jean-pierre charras 8432fb4fea Pcbnew: when adding layers, do not change via layers.
Via layers are not defined by a LSET, and the code that used the new LSET
broke the Via start and/or end layers (for blind/buried vias)
From master branch
Fixes #15856
https://gitlab.com/kicad/code/kicad/-/issues/15856
2023-10-14 08:56:19 +02:00
jean-pierre charras 00bf2ca36f Pcbnew: rename ZONE* m_SolderMask to m_SolderMaskBridges
(It is a container to build bridges on solder mask layers by DRC, not real zone)
Disable also this special zone selection by adding it in
PCB_SELECTION_TOOL::itemPassesFilter
Do not display the outlines of this very special zone used by DRC
to show layer mask bridges created by DRC to show these bridges.
From Master branch
Fixes #15847
https://gitlab.com/kicad/code/kicad/-/issues/15847
2023-10-13 17:15:37 +02:00
Alex Shvartzkop 9159f5a004 Restore fill polygons on proper layers when flipping zones.
(cherry picked from commit 0ea85ec9f5)
2023-10-12 02:45:05 +03:00
jean-pierre charras 87c8688f70 genDrillMapFile: reduce the pen width used to plot oval shapes (better look)
From master branch
2023-10-06 09:33:57 +02:00
Alex Shvartzkop d13179f9e4 EAGLE PCB: fix a regression causing polygons not being imported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15829

(cherry picked from commit bf29b25190)
2023-10-06 01:16:43 +03:00
Jeff Young 239f8e0905 Pull fixes back from master.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15813
2023-10-04 19:25:28 +01:00
Jeff Young fd98188ee4 Use netclass values when reaching netclass entry.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15774

(cherry picked from commit 904bdc3c66)
2023-10-04 18:49:03 +01:00
Jeff Young 0e6ad13db8 Fix missing part of cherry-pick. 2023-09-30 14:12:54 +01:00
Jeff Young 0d725fcc2c Fix errors in calculating tuning length.
Fix mismatched parameter passing in TOPOLOGY::followTrivialPath()
and TOPOLOGY::AssembleTrivialPath().
Fix logic error in PNS::JOINT::IsLineCorner().
Handle VVIAs in PNS::JOINT::IsNonFanoutVia().

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

(cherry picked from commit be532e96d6)
2023-09-30 13:37:00 +01:00
Jeff Young f1376396c2 Use original event position if it's available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15623

(cherry picked from commit e962615407)
2023-09-30 13:35:48 +01:00
Jeff Young 4eb9281f4d Tidy up shutdown of APPEARANCE_CONTROLS.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15024

(cherry picked from commit c2c71facb1)
2023-09-30 13:35:22 +01:00
Jeff Young 78a6c1a909 Smarten the UpdateAllItemsConditionally() tests in SetActiveLayer().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15329

(cherry picked from commit 5842e9c57e)
2023-09-30 13:26:18 +01:00
Jeff Young 2e0cdebb0c Do full high-contrast update of vias & pads if netnames are shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15657

(cherry picked from commit c7f69503c0)
2023-09-30 13:22:17 +01:00
Jeff Young a5f8955d78 Don't import Altium objects to disabled layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15586

(cherry picked from commit 962f79334f)
2023-09-30 13:21:16 +01:00
Jeff Young 33da35db04 Fix typo in arguments list to EvalRules().
Also fixes a bug where we weren't clearing the previous tabs from
the notebook.

(cherry picked from commit 31e30a5f56)
2023-09-30 13:16:39 +01:00
John Beard 1d6caa9a35 Fix winding of FP_SHAPE arcs
Implement "0" versions of some arc calculations and fix some
initialisation bugs in the handling of FP_SHAPE arcs. Also
set m_endsSwapped.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15694
2023-09-30 12:11:50 +00:00
Mark Roszko c74b0943f3 StartPlot can fail and leave a broken file handle
Related #15782
2023-09-29 23:54:49 +00:00
Marek Roszko bb579294a0 Don't search when board is null (during board changes)
(cherry picked from commit 98685b37ff)
2023-09-29 23:53:02 +00:00
Josue Huaroto ad9f5f4dd7 Extend boundary size of PCB_VIEW
(cherry picked from commit 156288bfcf)
2023-09-29 12:12:03 -07:00
Seth Hillbrand bd57957df7 Revise method of selecting footprints in contrast
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.

The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints.  This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.

For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it.  IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox.  Instead, we
filter footprints based on the hittest of each element.  This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.

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

(cherry picked from commit f3d65b5156)
2023-09-29 12:09:11 -07:00
Josue Huaroto 909d199379 Save flip board status in custom preset
(cherry picked from commit 2d54bc42cb)
2023-09-29 11:07:49 -07:00
Seth Hillbrand a38327a39c Ensure that layer names are unique when importing
Altium allows duplicate layer names but KiCad prefers to have unique
names for each layer.  This enforces a unique name for each layer when
importing

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

(cherry picked from commit c772d116b2)
2023-09-29 11:03:21 -07:00
Seth Hillbrand 686048dcce Be smarter about releasing lockfiles
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.

This should catch 99% of the cases where the message is shown
incorrectly.  There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice

(cherry picked from commit 7fe83993cf)
2023-09-29 11:02:42 -07:00
jean-pierre charras a74cffac39 PANEL_SETUP_BOARD_STACKUP: save the m_HasDielectricConstrains BOARD_STACKUP member.
This member was not saved in the board stackup data.
From master branch.
Fixes #15690
https://gitlab.com/kicad/code/kicad/-/issues/15690
2023-09-19 18:05:42 +02:00
jean-pierre charras 6eeca9aa90 Pcbnew: fix some issues with very small arcs (size a few internal units)
these very small arcs do not allow to calculate a reliable center position,
and therefore a reliable radius.
So handle them as a very small segments to fix plotting/drawing issues.
From master branch.
Fixes #15639
https://gitlab.com/kicad/code/kicad/-/issues/15639
2023-09-15 17:47:21 +02:00
Alex Shvartzkop 86beb339b7 Improve error reporting when running Python action plugins.
Python error traceback is now logged to stderr.
On Windows, a console window will pop up if wxTheApp gets destroyed,
because message dialogs crash due to hooks that wxWidgets sets up.

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

(cherry picked from commit a9a2d4aa7a)
2023-09-15 13:33:28 +03:00
Roberto Fernandez Bautista 88f65f4e47 Fix loading of legacy zone fills in .brd files + Don't refill after board import
(cherry picked from commit 30a63b7b32)
2023-09-14 01:06:34 +03:00
Roberto Fernandez Bautista af5b6b0eba Fix import of legacy stroked zone fill + add parsing of segments fills
From master: 54f401c72c
2023-09-14 01:06:34 +03:00
Alex Shvartzkop 72737b20cd Fix reading legacy zone fills which were based on stroked polygons.
Ported from 448de72823
with InflateWithLinkedHoles
2023-09-13 03:40:23 +03:00
Jeff Young d05093e6f7 Don't throw the number box baby out with the bathwater.... 2023-09-12 17:39:34 +01:00
Jeff Young a7e6928f4e Don't go through a middle man when reading pad shape primitives.
They're both PCB_SHAPEs.

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

(cherry picked from commit 9f5a268f15)
2023-09-11 22:20:33 +01:00
John Beard c7a4ea97c3 Fix oval pad snapping
Previously the snap points computed for oval pads didn't get all the
points correct. This breaks out the "find snap points for ovals"
into a function, reworks the logic, adds some tests.

Also adds "extremum points" when the oval isn't exactly H/V.

(cherry picked from commit 78c8de9b08)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15594
2023-09-10 00:49:03 +01:00
John Beard 81ebb1030a Add forward declarations in pcb_grid_helper.h
(cherry pick of part of commit 0f781f328e)
2023-09-10 00:45:32 +01:00
Alex Shvartzkop 86ec36d183 Fix reading/writing thermal spoke angles for custom pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15518
2023-09-10 17:32:22 +03:00
jean-pierre charras 207f2e568b drc_test_provider_text_dims.cpp: ensure glyphs to test are OUTLINE_GLYPH.
For non Kicad font texts with a overbar, the overbar is not a OUTLINE_GLYPH.
From Master branch.
Fixes #15604
https://gitlab.com/kicad/code/kicad/-/issues/15604
2023-09-09 10:37:58 +02:00
Alex Shvartzkop 19753719cb SVG import: skip shapes that are not stroked and not filled.
(cherry picked from commit bc846f5fca)
2023-09-08 14:49:08 +03:00
Alex Shvartzkop 5f025dcd73 SVG import: skip invisible shapes. 2023-09-08 14:49:08 +03:00
Josue Huaroto 0d9d8c28f1 Flip Viewport when Flip board is enabled
(cherry picked from commit a8e18e2d8c)
2023-09-06 16:56:01 +01:00
Jeff Young 123ff326d4 Don't include plating thickness when drawing hole clearance lines.
We don't include it in the router, and the code didn't
differentiate between plated and non-plated holes, and it confuses
users.

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

(cherry picked from commit 0cde8cff1d)
2023-09-06 16:31:46 +01:00
Alex Shvartzkop 9c87a52b6e Altium PCB import: Polygon Cutout only cuts copper fill.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15587

(cherry picked from commit 4f303a8dc2)
2023-09-06 09:26:48 +03:00
Marek Roszko 32c2135047 Flip the RegisterSettings order to avoid legacy import crashes 2023-09-04 23:22:39 -04:00