Commit Graph

14899 Commits

Author SHA1 Message Date
Jeff Young fbef9ea600 Keep track of single-pad-islands so we can discount spokes to them.
(cherry picked from commit d6dd58fff9)
2023-03-25 15:37:57 +00:00
Marek Roszko 0688491e1b Fix typo
(cherry picked from commit eb90448247)
2023-03-24 23:55:24 +00:00
Marek Roszko 434161687e Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2


(cherry picked from commit 8a8589b9db)
2023-03-24 23:53:15 +00:00
Seth Hillbrand edf23c4c18 Revert "Clean up various simplify steps"
This reverts commit 798e13f70d.
2023-03-24 12:30:06 -07:00
Jon Evans b0b9e66fad Move to requiring explicit action to save project settings
(cherry picked from commit 610e787ada)

Fixes https://gitlab.com/kicad/code/kicad/issues/14414
2023-03-24 11:49:50 -07:00
Seth Hillbrand 798e13f70d Clean up various simplify steps
Adds the option to simplify the output of Clipper ops that remove minor
detours from the output lines.  These detours are not substantive, so
removing them speeds up the rest of the system by removing unimportant
vertices.  This also prevents the introduction of inadvertant concave
points when unioning two, closely-sized rounded shapes
2023-03-24 09:42:01 -07:00
jean-pierre charras 0f40894317 Pcbnew, APPEARANCE_CONTROLS: do not change objects visibility, when changing
layers visibility using Preset layers widget.
Fixes #14381
https://gitlab.com/kicad/code/kicad/issues/14381
2023-03-24 15:06:06 +01:00
jean-pierre charras c5caa23a63 Manager teardrops on arcs. From master branch. 2023-03-24 11:46:11 +01:00
Marek Roszko 5dc683c968 Fix crash editing footprint editor defaults
Missing one level of GetParent()....use a dynamic_cast to sanity check it in debug

Fixes sentry crash KICAD-R4


(cherry picked from commit d49562a7aa)
2023-03-22 22:41:57 +00:00
jean-pierre charras 30dbfc33a4 step exporter: fix missing initialization of a member (m_pcbBaseName)
EXPORTER_STEP: rename m_pcbName to m_pcbBaseName.
From master.
2023-03-21 09:52:41 +01:00
Mark Roszko b3de5aa08e Put the project name back into the step pcb label.
Software like Solidworks and other CAD treat STEP labels as unique entries.
When you import multi STEP files into the same project, it'll start deduplicating your design by those name.
So two completely unrelated PCBs with the same "PCB" name will result in one being replaced by another.
2023-03-21 01:18:33 +00:00
Jeff Young ba4773e448 Orthogonal dimension are always cardinal, even when their start points are not.
Fixes https://gitlab.com/kicad/code/kicad/issues/13728

(cherry picked from commit bb2a0f825a)
2023-03-20 21:32:06 +00:00
Jeff Young 121ea14fe4 Filter Selected Items... is inclusive, not exclusive.
Fixes https://gitlab.com/kicad/code/kicad/issues/14273

(cherry picked from commit 897984aa22)
2023-03-19 21:31:08 +00:00
Jeff Young befd836ab4 Clean up items which weren't pasted from clipboard.
Fixes https://gitlab.com/kicad/code/kicad/issues/14335

(cherry picked from commit ad5d3d4eba)
2023-03-18 23:38:09 +00:00
jean-pierre charras 94fd0df2e2 BOARD_NETLIST_UPDATER: add missing count of warnings
From master branch
Fixes #14290
https://gitlab.com/kicad/code/kicad/issues/14290
2023-03-18 17:57:07 +01:00
Salvador E. Tropea e5087ca3db Load the global fp-lib-table before running the Python DRC
Without this we get parity errors for all the KiCad footprints
2023-03-17 21:00:41 +00:00
jean-pierre charras 819a9da599 Pcbnew: fix crash when loading a library with a ft containing a dimension.
(crash due to the use of a null pointer during loading)

(cherry picked from commit 5735a57504)
2023-03-17 16:00:34 +00:00
Jeff Young c41b1e2f06 Manual cherry-pick of bug fix part of ee1d9c561c. 2023-03-17 13:35:23 +00:00
Wayne Stambaugh d28cf632e4 Coverity fixes and code cleaning.
(cherry picked from commit a1fb8e1b1d)
2023-03-16 10:59:05 -04:00
Alex 1c06f4cf06 Don't create 0-length tracks when placing via in the middle of a track.
(cherry picked from commit 8fe78101db)
2023-03-16 02:49:54 +00:00
Jeff Young 10a27156c2 Defenses in depth for ratsnest drawing.
(cherry picked from commit e60837ec95)
2023-03-14 12:00:03 +00:00
Jeff Young 94057886a3 Support SHEET_PATH when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14233

(cherry picked from commit dc78797274)
2023-03-14 11:56:33 +00:00
Jeff Young 249bcd9e1a Update dimension units when opening PCBs in CLI.
Fixes https://gitlab.com/kicad/code/kicad/issues/14170

(cherry picked from commit a0adb59437)
2023-03-14 11:56:33 +00:00
Seth Hillbrand 9995b8714b Check for dirtied items in the cluster
When drawing the ratsnest, we need to be careful to avoid accessing
CONN_ITEMs that have been changed by the underlying model.  Checking for
dirty items instead of valid items will prevent us looking at data that
are out of date

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

(cherry picked from commit 283770fc45)
2023-03-13 16:11:27 -07:00
jean-pierre charras 7b4dd2f7f5 DIALOG_BOARD_REANNOTATE: ensure indexes are not out of bound. 2023-03-13 20:25:54 +01:00
Seth Hillbrand cc6b01cf88 Force initialization of board units
Unitialized variables are the devil's playground

(cherry picked from commit f0892598a4)
2023-03-13 12:15:51 -07:00
Jeff Young 74da0043b4 Move automatic dimension processing inside PCB_DIMENSION_BASE.
Also move dimension precision to an enum so it can get a proper dropdown
in the properties inspector.

(cherry picked from commit 461def2719)
2023-03-12 21:04:09 +00:00
Jeff Young c0ddca12df Add Property Inspector support for dimension objects.
Includes changing the class hierarchy so that dimension objects inherit
from PCB_TEXT rather than containing a PCB_TEXT member variable.

(cherry picked from commit 23accffc6d)
2023-03-12 21:03:58 +00:00
Jeff Young bf55e610b9 Handle plotting of text on solder mask layer.
Admittedly this is an odd thing to do, but we should still be internally
consistent, and it has come up in customers' files.

Fixes https://gitlab.com/kicad/code/kicad/issues/14226
2023-03-12 21:00:19 +00:00
Jon Evans 9f7b31b5c5 Do not try to process invalid ratsnest nodes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254


(cherry picked from commit 8eaa3cfac9)
2023-03-11 21:12:33 +00:00
Wayne Stambaugh 9e1fd16329 Coverity fixes and code cleaning.
(cherry picked from commit 4e99812145)
2023-03-10 11:21:19 -05:00
Seth Hillbrand 51dc2b109e Handle fully-nested zones
The logic to handle divots needs to account for fully nested, same net
zones.  The process of subtracting led to us considering the inner zone
to be a zone knock-out (negative polygon).  To avoid this, we need to
check if the inner, higher priority zone has any connection to the outer
zone.  If it does not, then we can treat it as an isolated zone without
worrying about divots to the outer zone.

(cherry picked from commit 9146e38af4)
2023-03-09 09:25:20 -08:00
mitxela 2358ff6f07 Helper function to allow net.GetNetClassName()
(cherry picked from commit 734d3667a8)
2023-03-09 14:03:02 +00:00
mitxela 11788d2f39 Expose shared_ptr to swig
Possibly not the right way to go about it but technically works


(cherry picked from commit 182abd4652)
2023-03-09 14:02:48 +00:00
mitxela 541f7467c6 Fix python GetAllNetClasses
(cherry picked from commit 716328e511)
2023-03-09 14:02:34 +00:00
jean-pierre charras 411c9707ee specctra export: fix handling of multi-layer zones.
(from master branch)
2023-03-07 15:45:28 +01:00
Jon Evans ee0ba17c03 Improve HiDPI handling of appearance/layer controls
(cherry picked from commit 43d3a18b86)
2023-03-07 08:49:06 -05:00
Jon Evans 64bc850d8f Fix layer widget in HiDPI situations
(cherry picked from commit 89ef6b36f4)
2023-03-07 08:49:06 -05:00
Jeff Young 154f64dae3 Edge connectors shouldn't trigger edge clearance violations.
Fixes https://gitlab.com/kicad/code/kicad/issues/14199

(cherry picked from commit 33e7c78533)
2023-03-07 12:23:56 +00:00
Seth Hillbrand b62a8fe65a 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

(cherry picked from commit ffcc0e50b7)
2023-03-06 16:21:13 -08:00
Seth Hillbrand a5d85e3281 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

(cherry picked from commit 1b8b216ac8)
2023-03-06 16:20:44 -08:00
Seth Hillbrand e699bcf5a3 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

(cherry picked from commit af10878954)
2023-03-06 16:18:51 -08:00
Seth Hillbrand 7ef5e079fd Smarten connection width checker looking for splits
Fractured polygons are always fractured along the x-axis, so when
checking to see if a segment is a fracture point, we check if the y
coordinate is equal.  This avoids situations where there are multiple
fracture points between two inflection points

Additionally, we add a second check to ensure we don't hit spurious
blobs (all kinks should be symmetric and therefore be substantial in
each direction)

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

(cherry picked from commit 7653a2bf99)
2023-03-06 16:14:56 -08:00
qu1ck d610486c1e Add vector3 to swig
Fixes regression in 7.0 making fp 3d model offsets not accessible in
python

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

(cherry picked from commit 88062c5fc3)
2023-03-06 11:23:09 -08:00
Jeff Young 7dbd920912 Don't allow footprint editor pad tools to run outside footprint editor.
(They can get called if a user re-assigns hotkeys to them.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14166
2023-03-06 14:43:20 +00:00
Wayne Stambaugh 2c7f44f78d Coverity fixes and code cleaning.
(cherry picked from commit 789bf6455a)
2023-03-04 13:14:59 -05:00
Jeff Young e17dc25bba Add support for non-cardianlly-rotated text boxes.
Also fixes a couple of bugs in text boxes in flipped footprints.

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

(cherry picked from commit 7638e23ff1)
2023-03-02 14:58:44 +00:00
Salvador E. Tropea d311915f9d Fix the CONNECTIVITY_DATA::GetNetItems Python API
- The C++ member now uses std::vector<KICAD_T>
- The Python side can use a single value or a list,
  like in v6.

The std::vector translation is based on the v6 KICAD_T[]
translation.
2023-03-01 18:49:12 +00:00
jean-pierre charras dcc1009162 plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
From master, commit 51d46c0e73
2023-03-01 10:45:23 +01:00
jean-pierre charras d61e01ff4f Plot Gerber format: ensure all attributes are added to polygon items.
Especially, TA.AperFunction,EtchedComponent for net tie footprints using polygons.
From master, commit ece34e1a0c
2023-03-01 09:39:15 +01:00
Seth Hillbrand 51b9d8e7ad Allow for rounding error in connection width checker
We perform checks using squared distance but this loses the integer
rounding in the standard norm.  To correct for this, we allow a single
IU in the restriction, allowing fractionally smaller connection widths
before calculating the squared limit

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

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

(cherry picked from commit a0f99ea8ba)
2023-02-28 15:26:49 -08:00
qu1ck 90eb5e9c31 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

(cherry picked from commit 2975f53647)
2023-02-28 16:48:28 -05:00
Seth Hillbrand fb798a4150 Export footprint pad holes to STEP regardless
Footprint pad holes form a part of the board outline regardless of
whether the footprint is in the BOM or not

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

(cherry picked from commit daf70f9b6a)
2023-02-28 12:02:40 -08:00
Jeff Young 8a34f91172 Fix for overwriting non-specified constraints.
Fixes https://gitlab.com/kicad/code/kicad/issues/14070
2023-02-28 18:29:43 +00:00
jean-pierre charras ea0dcc8ebd Fixes in build board outlines as polygon and convert_shape_list_to_polygon:
- Ensure Bezier curves have their polygon build before use it.
- When building board outlines as polygon the same chaining epsilon value
for DRC, export step and 3D view (default 0.01mm).
Fixes #14115
https://gitlab.com/kicad/code/kicad/issues/14115
Fixes #14009
https://gitlab.com/kicad/code/kicad/issues/14009
2023-02-28 17:26:28 +01:00
jean-pierre charras 3f5db9f7f9 EXPORTER_STEP: handle sub-layers in dielectric layer.
A dielectric layer (between 2 copper layers) can be made by more than one
layer (composite dielectric).  Not frequent, but possible.
sub-layers where previously ignored.
2023-02-28 17:25:40 +01:00
Jeff Young a6a0bba1b7 Stage group children when staging group.
Many operations such as move, rotate, etc. are applied directly to the
group's children, so it's the children that need staging.

Fixes https://gitlab.com/kicad/code/kicad/issues/13999
2023-02-28 14:21:12 +00:00
Johannes Pfister 33f835a437 When importing legacy PCB dimension: Use automatic dimension when Unit couldn't be determined
(cherry picked from commit a87550a2c6)
2023-02-28 14:21:12 +00:00
Roberto Fernandez Bautista a1a3f810f0 Add missing line from commit b03366c9e8
(cherry picked from commit bb8a3a7fdc)
2023-02-27 23:13:44 +00:00
Roberto Fernandez Bautista c96f0f2396 Fix CADSTAR importer memory leaks
We were leaking the xml tree when throwing exceptions


(cherry picked from commit b03366c9e8)
2023-02-27 22:58:41 +00:00
qu1ck 1eb8191519 Treat dimensions in fp as text for bbox calculations
(cherry picked from commit 1ff021bb927e9a146f57277554f370f97c07041c)
2023-02-26 17:59:22 +00:00
qu1ck 396bda5611 Sync pcbnew selection with selected items after plugin is run
(cherry picked from commit 9f10c142c4)
2023-02-26 17:58:57 +00:00
Jon Evans cb334be8c4 PNS: Diff pairs can have different hole-to-hole size
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993


(cherry picked from commit f12f2b8420)
2023-02-26 17:57:47 +00:00
Jon Evans 8845cc0556 PNS: Safety for evaluating item nets for rules
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13993


(cherry picked from commit 459473ccc3)
2023-02-26 17:57:33 +00:00
Jon Evans e34800ad49 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


(cherry picked from commit b176881d49)
2023-02-26 17:45:46 +00:00
qu1ck 5b574901b3 Fix swig mappings for PCB_BITMAP
From Master branch.
2023-02-26 10:28:59 +01:00
jean-pierre charras 8a9ac4f01f 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:08:29 +01:00
Jon Evans 39df5f3b15 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


(cherry picked from commit 8440d7258b)
2023-02-25 03:56:27 +00:00
jean-pierre charras c1f5ae1c5a Plot footprint texts: add code to plot Knockout texts.
Fixes #14068
https://gitlab.com/kicad/code/kicad/issues/14068
2023-02-24 08:49:56 +01:00
Jon Evans 009211c740 Fix some PCB_SHAPE properties
Hide irrelevant position/start/end properties
for shape classes that don't use them.


(cherry picked from commit 1651b44ab1)
2023-02-24 01:24:41 +00:00
Alex 1a208a1612 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.


(cherry picked from commit 9d96edc44f)
2023-02-23 20:30:39 +00:00
Alex b867e51c6c pcbnew: Fix pads losing nets after Undo.
Wasn't fixed in all places after being broken in
13f5c78e89


(cherry picked from commit f31e5ea783)
2023-02-23 20:30:20 +00:00
qu1ck 7693b93c50 Fix plugins in pcbnew breaking by opening fp editor
From master branch.
2023-02-23 15:31:00 +01:00
Marek Roszko 9f5e50f25e Fix typo in appearance_controls.cpp
(cherry picked from commit c2a4dd93e8)
2023-02-23 01:36:52 +00:00
Jon Evans a091ab76d7 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.


(cherry picked from commit d8f4d04093)
2023-02-23 01:16:21 +00:00
Marek Roszko 6b38927123 Fix crash parsing cadstar
Fixes sentry KICAD-B2
2023-02-19 08:11:33 -05:00
Marek Roszko 5d793193e0 Fix crash by using a shared_mutex to read/write lock the nickIndex
Fixes sentry kicad-ax
2023-02-18 13:02:25 -05:00
Alex 7949c09183 Prevent ghost image after canceling bitmap placement.
(cherry picked from commit ecb28ddf1c)
2023-02-17 01:49:47 +00:00
Jeff Young f23c6b0c2f Clear dirty flags after a move.
Fixes https://gitlab.com/kicad/code/kicad/issues/11362

(cherry picked from commit 40e1296a8b)
2023-02-16 18:10:26 +00:00
Jeff Young 6d22b8c6ed Negative clearance means test won't run, not rule won't match.
Fixes https://gitlab.com/kicad/code/kicad/issues/13947
2023-02-16 18:10:26 +00:00
jean-pierre charras 8467e2d376 Pcbnew: Do not change visibility objects when changing Visibility layers
Fixes #13836
https://gitlab.com/kicad/code/kicad/issues/13836
2023-02-16 12:42:25 +01:00
jean-pierre charras 2529918d5f 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-16 12:41:35 +01:00
Jon Evans 3dfc502814 Router: Do not collide items within a net tie footprint
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13909

(cherry picked from commit 2d7c5c5c0f)
2023-02-14 21:10:42 -05:00
Jon Evans 1909ce9220 Properties: fix rebuilding when availability changes
(cherry picked from commit 61dd4b7043)
2023-02-14 21:10:42 -05:00
Jon Evans 15bef82e1e Properties: add some validators for PAD
(cherry picked from commit 0b3928d38f)
2023-02-14 21:10:42 -05:00
Jon Evans 60a45241e6 Properties: introduce validators; re-enable zone hatch settings
(cherry picked from commit eb240fda9a)
2023-02-14 21:10:42 -05:00
Jon Evans d403e92315 Properties: introduce method chaining for initialization
(cherry picked from commit 254168c788)
2023-02-14 21:10:42 -05:00
Jon Evans d20f49b58b Fix handling of PPI when loading embedded images
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13884


(cherry picked from commit 473979d686)
2023-02-15 00:42:30 +00:00
Wayne Stambaugh 0f7fbc411a 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

(cherry picked from commit eb83f76bff)
2023-02-14 09:53:16 -05:00
Seth Hillbrand f56fcb0a14 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

(cherry picked from commit e7fe69b97f)
2023-02-13 11:23:14 -08:00
Jeff Young 7816652078 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:07:42 +00:00
Jeff Young 94963b5b3a Remove DRC exclusions that no longer have items.
Fixes https://gitlab.com/kicad/code/kicad/issues/13802

(cherry picked from commit 13391176ae)
2023-02-13 10:55:07 +00: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
jean-pierre charras 8ce0a84ca7 Fix compatibility with older wxWidgets versions.
Fix also a compil warning
2023-02-03 08:24:38 +01:00
Wayne Stambaugh e20c86ad5e Minor dialog layout improvements. 2023-02-02 16:54:52 -05:00
Seth Hillbrand e60152e351 Fix island removal when copper->edge clearance is 0
Just testing a single point to find copper that is outside the board works
until the arc->segment conversion moves the board outline just enough to
have the filled copper slightly (few IU) outside of the converted outline.

Instead, we do an expensive check of comparing the size of the
intersection between the island and the island's intersection with the
board.  If the intersection is at least half as large as the original
island, we can say with certainty that the island is inside.  The margin
could be much smaller than half but this preserves the intent without
picking an arbitrary number that might be violated

Fixes https://gitlab.com/kicad/code/kicad/issues/13717
2023-02-02 19:19:26 +00:00
jean-pierre charras fcefb5f86d Re-allows selection of bitmaps not owned by a footprint.
It was broken by my commit f8051d95
Fixes #13747
https://gitlab.com/kicad/code/kicad/issues/13747
2023-02-02 18:09:37 +01:00
Jon Evans 200bf696af Fix importing of legacy netclasses
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13746
2023-02-02 08:29:43 -05:00
jean-pierre charras 737318a24d struct ZONE_DESC: ensure ENUM_MAP<PCB_LAYER_ID> is initialized before use it.
ENUM_MAP<PCB_LAYER_ID> is tested initialized in some other XXX_DESC,
but not in ZONE_DESC
Fixes #13699
https://gitlab.com/kicad/code/kicad/issues/13699
2023-02-02 09:11:27 +01:00
Jon Evans 26b9d2f5ac DRC: Allow disabling DP constraints in specific areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13743
2023-02-01 23:11:39 -05:00
Jeff Young 7874735810 Add doc link to custom rules syntax help.
Fixes https://gitlab.com/kicad/code/kicad/issues/13727
2023-02-01 23:40:53 +00:00
Alex 6543d23d9f router: Re-add electrical path lines drawing for length tuning. 2023-02-01 20:36:52 +03:00
Alex 7d6218acb4 Unify checkbox borders in Interactive Router Settings. 2023-02-01 07:46:42 +03:00
Alex 1c2345776e Remove unused variable. 2023-02-01 07:28:55 +03:00
Jon Evans 48e4005111 Fix diff pair router checking of min clearance
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13720
2023-01-31 19:53:35 -05:00
Kliment 68eac74458 pcbnew: Fix strokeWidth truncation to integer mm in SVG polygons import
The polygon conversion algorithm mistakenly stored the stroke width of
filled polygons in an integer variable. As a result, all stroke widths
were rounded down to the next smaller integer mm size. This commit changes
the types in the relevant functions and variables from int to double.
2023-01-31 20:34:25 +00:00
Seth Hillbrand f34aa947d3 Allow on-outline zones to be considered inside
Also ensure that calculated areas for island removal are absolute.

The on-outline zone can happen when the clearance to the edge is
particularly small.

Fixes https://gitlab.com/kicad/code/kicad/issues/13717
2023-01-31 12:32:23 -08:00
jean-pierre charras f8051d954a Better handling of PCB_BITMAP items in a footprint.
- Ensure they can be erased in the FP editor
- Ensure they cannot be selected in the PCB editor (they are not show)
Fixes #13714
https://gitlab.com/kicad/code/kicad/issues/
2023-01-31 11:16:38 +01:00
Roberto Fernandez Bautista 44cfb1ea43 CADSTAR PCB: Don't create zero sized text items
Partially addresses https://gitlab.com/kicad/code/kicad/-/issues/13693
2023-01-30 19:56:22 +00:00
Roberto Fernandez Bautista 963e82ee7f CADSTAR PCB: Correctly handle anticlockwise arcs
Also add some qa tests for EDA_SHAPE::SetAngleAndEnd

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13626
2023-01-30 19:56:22 +00:00
Jeff Young 50e9685490 Check for tented vias before expanding solder mask.
Fixes https://gitlab.com/kicad/code/kicad/issues/13705
2023-01-30 17:56:35 +00:00
Chris Morgan ce06171561 Convert additional sprintf to snprintf 2023-01-30 16:22:03 +00:00
Marek Roszko e928d72c3b Fix relative step file export
Forgot to set the project relative path, and the library search path

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13696
2023-01-29 22:19:37 -05:00
vinsfortunato 5bdaf20af6 eagle: determine and use the minimum copper layer stackup count
Fixes: https://gitlab.com/kicad/code/kicad/issues/13484
2023-01-29 21:13:41 +00:00
Jon Evans 971abcfc1a Fix DP meander placer when tuning from an uncoupled section
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12212
2023-01-28 22:25:46 -05:00
Wayne Stambaugh 68decdd4f2 Fix static event table derived object definitions. 2023-01-28 14:10:06 -05:00
Marek Roszko d4a5e2caad Fix crash when .kicad_pcb is renamed to .kicad_mod and load library attempted
Pick a random error message used elsewhere
2023-01-28 10:42:46 -05:00
Jon Evans d04cda35c5 Handle hidden attribute in fp-lib-table
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13689
2023-01-28 09:23:25 -05:00
Jeff Young b1018e8eeb Relax no-zone-commands constraint on interactive placer tools.
These tools are initialized with an item (via/pad/microwave) so there's
no way to tell between during-placement and idle.  Besides, they don't
update the ratsnest so they probably won't fall afoul of the original bug
(https://gitlab.com/kicad/code/kicad/-/issues/12736).

Fixes https://gitlab.com/kicad/code/kicad/issues/13686
2023-01-28 10:42:24 +00:00
Marek Roszko 4d811ba975 Enable layer arg for fp export svg 2023-01-27 23:45:42 -05:00
Jon Evans b4994a7fa1 Locked shadows should not be on overlay
These are supposed to render under the component
and do not need to be pulled to the front for overlay.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12486
2023-01-27 22:09:42 -05:00
Ian McInerney 51c8f2c119 Fix library sort order in library viewers
The lib table returns a properly sorted list of libraries already, which
we just iterate through. A std::set is a sorted collection, but uses a
different sorting function than the lib table, so appending to a
std::set breaks the initial sorting that was done already.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13530
2023-01-27 23:39:50 +00:00
Kliment f6dc48ead7 Pcbnew: Make "Substitute similarly named models" on by default in STEP export. 2023-01-27 23:32:23 +00:00
kliment a3e3231605 Pcbnew: Increase the default size of the board setup dialog 2023-01-27 22:00:39 +00:00