Commit Graph

13067 Commits

Author SHA1 Message Date
Jeff Young 3a8ad7165b Clear point editor before recombining pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/11731

(cherry picked from commit bd51b33f65)
2022-06-08 15:58:52 +01:00
Jeff Young 4a5f74422c Take pad angle into account when generating spokes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11765
2022-06-08 15:46:56 +01:00
Jon Evans 7053981835 Don't wipe out visibility state when changing layer count 2022-06-07 23:00:32 -04:00
Jon Evans 895314b639 PNS: Fixup hole clearance to use exact hulls for walkaround
(partially cherry picked from commit 30fb298ed3)
2022-06-07 22:34:16 -04:00
Jon Evans 6253b878a0 PNS: Implement HoleHull for VIA
(cherry picked from commit 23596812b6)
2022-06-08 02:05:25 +00:00
Jon Evans 5d4e2aa595 PNS: Remove offsets from hull generation
This is likely an old workaround to numerical precision issues
in the DRC system that no longer exist.  Removing this is necessary
for "exact" hull generation to produce walkaround results that
look nice (paths falling exactly on the grid lines)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710
2022-06-03 17:39:22 -04:00
Jon Evans 2a91ba35c1 PNS: Use exact hulls for walkaround path generation
When we generate hulls, by default we subtract the clearance epsilon
to prevent false collisions in the router that wouldn't be flagged
by DRC.  However, we need to use the actual hull with no epsilon
when generating hulls for pathfinding in the walkaround system.

Without this change, it is possible for the walkaround to generate
a valid-seeming path that results in a DRC violation, for example
when dragging a drag against a board edge.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10536
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11365
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710
2022-06-03 17:39:22 -04:00
Jon Evans 8d8f96b094 PNS: Fix off-by-one in dragCornerInternal
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10919
2022-06-01 17:11:03 -04:00
Jon Evans a4aa447b95 [PNS] Fix invalid assumption in IsLineCorner 2022-05-31 20:19:20 -04:00
Jon Evans 53dbd3bb02 PNS: Fix skew calculation with pad-to-die specified
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11710
2022-05-31 20:19:19 -04:00
Jeff Young 781e98acbc Eagle octagonal pads are regular (~29% chamfered).
Also cleans up setting of KeepTopBottom (which is ignored unless
we're doing optional flahing -- which we're not for Eagle imports).

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

(cherry picked from commit 4afca58ce7)
2022-05-31 23:21:43 +01:00
Jeff Young ab70124b68 Make use of board stackup data when exporting VRML.
Specifically layer colors and board thickness.

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

(cherry picked from commit deeb7d4d6d)
2022-05-31 23:21:43 +01:00
Jeff Young aac4f30b7d Fix zone merge intersection algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/11492

(cherry picked from commit 5f10c15a87)
2022-05-31 23:21:43 +01:00
Seth Hillbrand a2e9c0ea73 Text BB is already rotated, don't re-do
EDA_TEXT::TransformBoundingBoxWithClearanceToPolygon already accounts
for text rotation, so we don't need to apply that twice

Fixes https://gitlab.com/kicad/code/kicad/issues/11714
2022-05-31 13:46:16 -07:00
Seth Hillbrand 0f4eefc9fc Fix PCAD silk layer for solder-side fp
The layer should be flipped based on the footprint mirror value rather
than the text mirror value (which is independent)

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

(cherry picked from commit 6c0856c384)
2022-05-31 13:03:53 -07:00
Seth Hillbrand 2d092437f4 Make PCAD import case-insensitive
According to the PCAD specification, all tags are case insensitive.
Most exporters honor the defaults but there is always an outlier or two

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

(cherry picked from commit 35b79c2ec9)
2022-05-27 10:10:47 -07:00
Alex 6b2bb4d808 Allow sheet recursion, fix sheet paths in "Highlight on PCB".
"Highlight on PCB" and "Select" - "Items in Same Hierarchical Sheet"
actions were extended to select items on subsheets too.

"Highlight on PCB" now uses a proper full sheet path, allowing it to
work in subsheets.

Fixes https://gitlab.com/kicad/code/kicad/issues/11493
2022-05-25 23:38:52 +00:00
Seth Hillbrand 0d93be0af2 Make sure that we have a visible layer
Before setting the active layer to our visible sequence, make sure that
the sequence is not empty (leads to invalid layer id->crash)

Fixes https://gitlab.com/kicad/code/kicad/issues/11629
2022-05-16 15:24:22 -07:00
jean-pierre charras bda1f684fc gerber_placefile_writer: fix angle rotation for flipped footprints.
According to latest Gerber documents (rev 2022.02), the previous angle was
missing a +180 rotation
Fixes #11621
https://gitlab.com/kicad/code/kicad/issues/11621
2022-05-16 10:27:17 +02:00
Jeff Young 71ea56dea4 Remove special-case processing of ${REFERENCE} and ${VALUE}.
Fixes https://gitlab.com/kicad/code/kicad/issues/11476

(cherry picked from commit 6b557d8631)
2022-05-09 12:05:51 +01:00
Jeff Young 058f6e0a9b All via pad layers need checking for copper.
Fixes https://gitlab.com/kicad/code/kicad/issues/11429

(cherry picked from commit e7f5deedb8)
2022-05-09 00:36:27 +01:00
Jeff Young e3eaa50600 Add on-the-fly i18n update for m_inactiveLayersLabel.
Fixes https://gitlab.com/kicad/code/kicad/issues/11435

(cherry picked from commit 3304ad75ca)
2022-05-09 00:36:27 +01:00
Jeff Young c04a183141 Hand cherry-pick of fix from master.
Fixes https://gitlab.com/kicad/code/kicad/issues/11261
2022-05-09 00:36:27 +01:00
Jeff Young 2dcff109df Update Selection Filter title bar with language changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/11421

(cherry picked from commit 4ab2c93070)
2022-05-09 00:36:27 +01:00
Jeff Young 936040fe8b Remove extra test.
Fixes https://gitlab.com/kicad/code/kicad/issues/10364

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

(cherry picked from commit c78a47c3fb)
2022-05-09 00:36:27 +01:00
Seth Hillbrand 485e89f7a5 Finally found the intermittant QA crash
When loading footprints/zones in parallel, we cannot reference a static
vector that gets cleared by other threads.

It is unclear why this element was ever static to begin with (premature
optimization?) but it has been this way for a long time.  We never
noticed until we threaded load cycles, which gave the hatch a chance to
override itself and cause crashes

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

(cherry picked from commit 8218f9ab44)
2022-05-06 11:53:49 -07:00
Seth Hillbrand 611311697e Revert "Fix another static variable instance"
This reverts commit 5bd3a9cca8.

Reverted in favor of cherry-picking the more complete fix
from 8218f9ab44
2022-05-06 11:53:21 -07:00
Seth Hillbrand 5bd3a9cca8 Fix another static variable instance
Premature optimization appears to be the issue.  When we threaded zone
handling and added multiple layers, we started overwriting the
pointbuffer variable, which was declared static for unknown reasons

Fixes https://gitlab.com/kicad/code/kicad/issues/9888
2022-05-06 11:49:57 -07:00
jean-pierre charras 6971e409bf Pcbnew: fix lost of focus after clicking on a wxChoice in toolbar.
After changing track width, via size, grid or zoom from the toolbar, the
canvas has no longer the focus on Windows. So we force the focus after clicking
on these widgets.
From Master branch
Fixes #11103
https://gitlab.com/kicad/code/kicad/issues/11103
2022-05-05 11:54:47 +02:00
jean-pierre charras fbc6c8f8f4 pcad importer: fix a truncation when converting mils to IU.
The value in mils is a double, but the function to convert in IU uses int.
From master branch.
Fixes #11380 https://gitlab.com/kicad/code/kicad/issues/11380
2022-05-04 17:37:11 +02:00
Seth Hillbrand bfa1661edf Sync via/pad flashing for null boards
Pads return true by default and so should vias
2022-04-15 11:39:18 -07:00
Jeff Young 110663d214 Fix crash bug when selecting marker. 2022-04-15 13:40:19 +01:00
jean-pierre charras 2de1bd7a4a Ensure "Open Recent" and "Clear files" menu titles are updated after language change.
From Master branch.
2022-04-14 15:06:17 +02:00
Jeff Young 6818eff90e Improvements to Eagle dimension importing.
1) Import leaders
2) Drop radius and angle dimensions
3) Import dimension text sizes
4) Correctly interpret which side dimension offset is on
5) Correclty handle offsets for non-cardinal dimensions

Fixes https://gitlab.com/kicad/code/kicad/issues/10763
2022-04-12 13:24:34 +01:00
Jeff Young a60e7e27b6 A better blob vs web detector.
Since we're in a deflated state, a long web *could* still have a very
small area.  So check max extents instead.

(cherry picked from commit 1dae5eb7c4)
2022-04-12 13:24:34 +01:00
Jeff Young 601995c759 Apply the min-width-by-min-width test to islands after pruning.
We're looking for minimum *web* width.  A blob does not a web make.

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

(cherry picked from commit 1a2e0d8226)
2022-04-12 13:24:14 +01:00
Marek Roszko fe11bc8330 Change the behavior of ACTION_MENU::Add to require clones if required outside the function 2022-04-11 20:39:08 -04:00
Seth Hillbrand d0796399a2 DP tolerance needs to be 1IU on each axis
ApproximatelyParallel will only check for parallel within 1 IU, so a 1x1
SEG will always be parallel and the projection is invalid
2022-04-11 16:55:54 -07:00
Seth Hillbrand c2d72180f8 Revert "Change the behavior of ACTION_MENU::Add to require clones if required outside the function"
This reverts commit 651f50a26d.
2022-04-11 11:03:19 -07:00
Marek Roszko 651f50a26d Change the behavior of ACTION_MENU::Add to require clones if required outside the function
Fix https://gitlab.com/kicad/code/kicad/-/issues/10994
2022-04-10 22:40:58 -04:00
Jeff Young 529048dac1 Better error reporting for DP uncoupled length.
Fixes https://gitlab.com/kicad/code/kicad/issues/10087

(cherry picked from commit 722b2588f4)
2022-04-09 23:09:10 +01:00
Jeff Young 43929781a2 On-the-fly translations for pin electrical types.
Also add on-the-fly translation for editor title bars.

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

(cherry picked from commit 68ca385e07)
2022-04-09 21:22:50 +01:00
Seth Hillbrand 821fe6ea42 Don't set the dirty bit when running DRC
Dirty bit is set in the zone filler separately, there is no action in
the DRC that needs to be saved

Fixes https://gitlab.com/kicad/code/kicad/issues/11344
2022-04-06 17:03:01 -07:00
Jeff Young f8c92e355b Plating thickness appears on both sides of hole wall. 2022-04-04 21:51:30 +01:00
dsa-t fdfe5a813e Clamp cursor to limits of coordinates representation
Also improves large distance handling.

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

(cherry picked from commit 68655540eb)
2022-04-04 13:38:50 -07:00
aris-kimi 636d009860 Added footprint rule area anchors
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10461

(cherry picked from commit 47c0672ff3)
2022-04-04 13:38:00 -07:00
Seth Hillbrand 7d96d5940d UNDEFINED_LAYER is always flashed
This is already true for vias and should be true for pads as well

Fixes https://gitlab.com/kicad/code/kicad/issues/11335
2022-04-04 12:25:55 -07:00
jean-pierre charras 604871518f Export VRML: fix some (minor) issues, from Master branch. 2022-04-04 14:46:55 +02:00
jean-pierre charras 5a68077f60 VRML exporter: make export faster by using SHAPE_POLY_SET::PM_FAST. 2022-04-04 12:28:54 +02:00
Jeff Young 8054f1a948 Apply a more sophisticated test for ignoring isInCoupledDiffPair.
The basic problem is that the DRC engine does length testing and skew
testing by collecting all the diff pair constituent parts and pairing them
itself.  Since each part is collected on its own, we need to ignore the
'B' unit when evaluating any conditional expressions.  However, doing this
in general means that when evaluating "OwnClearance()" we also ignore the
'B' unit and return the diff pair CLEARANCE_CONSTRAINT when we shouldn't.

This implements a more discerning test which know what the current requested
constraint is when evaluating expressions.

See also https://forum.kicad.info/t/solved-custom-differencing-rule-not-working-drc/34034/6

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

(cherry picked from commit f7cdc7af75)
2022-04-03 18:23:41 +01:00
Jeff Young e21f0ec9fb Honour prime-event-location when starting router.
Fixes https://gitlab.com/kicad/code/kicad/issues/11239

(cherry picked from commit a54bbfe12b)
2022-04-03 18:21:00 +01:00
Jeff Young 1adfca8f2d Don't re-fetch selection when running select-in-same-sheet.
Fixes https://gitlab.com/kicad/code/kicad/issues/11110

(cherry picked from commit a35ae8cdce)
2022-04-03 18:20:32 +01:00
Jeff Young e98e9f72df Only write Allow DRC Violations if enabled.
Fixes https://gitlab.com/kicad/code/kicad/issues/11177

(cherry picked from commit b78a260326)
2022-04-03 18:13:04 +01:00
Jeff Young f8ff9705ff Fix issues with importing NPTH pads from CircuitStudio.
Fixes https://gitlab.com/kicad/code/kicad/issues/10493

(cherry picked from commit 118a37f19f)
2022-04-03 15:51:33 +01:00
Jeff Young 6de8b99cf2 Don't default to Annotate All just because the selection is empty.
Fixes https://gitlab.com/kicad/code/kicad/issues/11181

(cherry picked from commit 6fa8cab188)
2022-04-03 15:51:33 +01:00
Jeff Young c9829cf9a8 Enable bb and/or uvias when encountering them on Altium import.
Fixes https://gitlab.com/kicad/code/kicad/issues/10044

(cherry picked from commit 1d66925f5f)
2022-04-03 15:51:33 +01:00
Jeff Young 0fc4ccf8d9 Clean up pad handling in 3D viewer.
Most importantly, create F_Cu/B_Cu layers if they're otherwise empty
but we have plated pads to render on them.

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

(cherry picked from commit 0dc857b5ab)
2022-04-03 15:51:33 +01:00
Marek Roszko 455ec428f2 Free memory in dxf import sooner on bad_alloc
(cherry picked from commit b18e441a88)
2022-04-02 13:58:35 +00:00
Marek Roszko d5de4bb5c7 Catch memory exhaustion trying to import large DXFs
See https://gitlab.com/kicad/code/kicad/-/issues/11308


(cherry picked from commit 9f8c0a8185)
2022-04-02 03:15:33 +00:00
Seth Hillbrand 6706a5c462 Skip zero-size elements when converting
Also fixes an assertion when converting to polygon from the board editor

Fixes https://gitlab.com/kicad/code/kicad/issues/11313
2022-04-01 13:22:08 -07:00
Seth Hillbrand c23679d9bd Consistently handle env/prj variables
User-defined variables cannot be used for internally-reserved variables

Fixes https://gitlab.com/kicad/code/kicad/issues/11232
2022-03-31 17:05:25 -07:00
jean-pierre charras bf8c7d7697 GERBER_JOBFILE_WRITER: fix a crash due to use of a null pointer.
Can happens when it is created from a Python script.
From Master branch
Fixes #11227
https://gitlab.com/kicad/code/kicad/issues/11227
2022-03-24 18:01:24 +01:00
Seth Hillbrand 4e98ce87c7 All triangular trapezoid pads
A triangular trapezoid will have the deltaX/deltaY of the same size as
the length of that axis.  This creates a three-point polygon, which is
perfectly valid for our use
2022-03-22 13:38:36 -07:00
Jeff Young eeee5afdfd Zero out parent rule when overridden by local property.
Fixes https://gitlab.com/kicad/code/kicad/issues/11197

(cherry picked from commit b679a21651)
2022-03-21 20:56:00 +00:00
Jeff Young 790b810621 A little bit of nullptr safety.
Fixes https://gitlab.com/kicad/code/kicad/issues/11077

(cherry picked from commit b3ae0fdca5)
2022-03-21 20:54:28 +00:00
Seth Hillbrand e33bf78d96 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

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

(cherry picked from commit 442aae19d9)
2022-03-21 08:37:53 -07:00
jean-pierre charras 1b108afd0b Specctra import/export: fix some issues (tested only with FreeRouter):
- Handling of locked tracks
- Locked tracks are now exported with attribute "fix".
- Incorrect view cleaning
- Fix memory leak.
From master branch.
2022-03-20 19:05:23 +01:00
jean-pierre charras a8384beb6f Python, board.i: fix incorrect order of an include.
The result was ignoring PCB_SHAPE in pcb_text.i.
2022-03-20 18:47:14 +01:00
Seth Hillbrand c44d31fcfb Fix expand variables for built-in
Allow falling back to the alternate variable definitions if the built-in
text block variables are not set.

Also push the project into variable resolution when plotting

Fixes https://gitlab.com/kicad/code/kicad/issues/11168
2022-03-18 16:46:36 -07:00
Frank Zeeman 4a1abd239a Append True to Python 3 AddPrimitivePoly() call
Fixes https://gitlab.com/kicad/code/kicad/issues/11012

(cherry picked from commit b3a319b77e)
2022-03-18 13:01:56 -07:00
Jeff Young f69ebe55ad Improved performance for Cleanup Tracks & Vias.
(cherry picked from commit 14378812be)
2022-03-18 12:50:09 -07:00
Jeff Young ff604cc6a3 Pull some fixes back from master.
Mostly wxT(), but also some performance, and some for better response
to Cancel button.

(cherry picked from commit 5c63df28e4)
2022-03-18 12:49:54 -07:00
Seth Hillbrand b0f8055377 Revert "Pull some fixes back from master."
This reverts commit 5c63df28e4.
2022-03-17 16:21:37 -07:00
Seth Hillbrand 33f4fc9873 Revert "Improved performance for Cleanup Tracks & Vias."
This reverts commit 14378812be.
2022-03-17 16:21:34 -07:00
Jeff Young d34faf30cc Save pointer to markers provider.
Fixes https://gitlab.com/kicad/code/kicad/issues/11136

(cherry picked from commit a81c8d4922)
2022-03-16 16:23:10 +00:00
Jeff Young 47de9f8f04 Fix typo which leads to catastrophic performance on boards with tons of zones.
(cherry picked from commit 392a3ec131)
2022-03-16 15:16:11 +00:00
Jeff Young 14378812be Improved performance for Cleanup Tracks & Vias. 2022-03-16 15:15:20 +00:00
Jeff Young 5c63df28e4 Pull some fixes back from master.
Mostly wxT(), but also some performance, and some for better response
to Cancel button.
2022-03-16 15:15:09 +00:00
Jeff Young e5ea37507c Exclude hidden text from selection in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11111

(cherry picked from commit 06c1bccccd)
2022-03-16 15:15:01 +00:00
Jeff Young 53bd87d792 Performance fixes for the board from hell....
(cherry picked from commit e4b56ab7f1)
2022-03-16 15:14:51 +00:00
Jeff Young b9d7a0565f Hand cherry-pick fixes from master.
0a8718cd1d
7fb4a2c0a5
2022-03-15 13:19:12 +00:00
jean-pierre charras ad2486b09f Fix a incorrect filename in a copy command (MSW specific).
Also fix a regression and respect the KICAD_BUILD_QA_TESTS build option.
2022-03-14 21:14:04 -04:00
Marek Roszko 40462012ee Don't pre-scale the line width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11122


(cherry picked from commit d74a0cdaa3)
2022-03-14 03:09:23 +00:00
Marek Roszko 43aa0bfdc3 Tweak the "pyd" extension if for windows to be completely inclusive 2022-03-12 15:47:48 -05:00
Jeff Young c241032a3b Redraw pads when mask or paste layer is visible after board setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/11079
2022-03-10 17:54:38 +00:00
Seth Hillbrand 0cf1a67e29 Cache read arc data for stability
Arcs can be altered by the process of changing from on-disk
representation to in-memory representation.  Saving back to disk without
modifying the arc should not modify the calculated values.

This stores a copy of the on-disk representation that is only used to
save back to disk in the event that the arc is not modified during
editing.

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

(cherry picked from commit cd7141fd10)
2022-03-08 10:33:49 -08:00
Seth Hillbrand f4cdb97141 Normalize `IsInsideCourtyard`
(cherry picked from commit c18d9b9baf)
2022-03-08 10:07:59 -08:00
Seth Hillbrand 0cfa88ca9a Move temp save files to temporary directory
Avoid excess writes to the project directory to dodge issues with remote
file systems not fully writing data.

wxRename works across disk boundaries (in theory) and falls back to
wxCopy/wxRemove when it fails

Fixes https://gitlab.com/kicad/code/kicad/issues/10747
2022-03-08 10:05:04 -08:00
jean-pierre charras c75c7d084a plot_board_layers.cpp: Add missing layers (USer_x) in list
Fixes #11072
https://gitlab.com/kicad/code/kicad/issues/11072
2022-03-08 14:44:53 +01:00
jean-pierre charras dd154c155f pcbnew: Fix Bezier "Add Primitive" in Pad Creation Dialog (From master branch) 2022-03-08 14:44:05 +01:00
Jon Evans 1394509734 Settings: allow multiple project access from Python standalone
We can't handle this in the UI, but we can externally, so allow
it for Python scripting and eventually we'll use this in the UI
also...

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10540
2022-03-05 12:50:45 -05:00
Jeff Young 1ffe0da204 Improvements for pads/vias in zones which knockout other zones.
1) Drop tiny islands which might cause connection problems.
2) Cleanup some dead code in filler
3) Don't estabilish a connection to an island that is fully covered
by whatever its connecting to.

Fixes https://gitlab.com/kicad/code/kicad/issues/11036
2022-03-05 15:40:30 +00:00
Jeff Young 46d423a164 Must clear arcs before calling Clipper. 2022-03-05 15:40:30 +00:00
Seth Hillbrand c1dcfdffb1 Remove unneeded condition to rotate
The condition that the board must have elements on it before allowing
the rotate command is invalid as we allow rotating new elements before
placement

Fixes https://gitlab.com/kicad/code/kicad/issues/10581
2022-03-03 15:44:50 -08:00
Jeff Young 191558e2d7 Reimplementation of 513486b0ec.
(For https://gitlab.com/kicad/code/kicad/-/issues/11020.)
2022-03-03 23:29:22 +00:00
Seth Hillbrand 8f75841c85 Check for additional connections between tracks
Prevents removal when a track is connected not just to other tracks but
also other connected items

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

(cherry picked from commit 9d927f3135)
2022-03-03 13:08:37 -08:00
jean-pierre charras c3f8d8b5a1 FP_TEXT::ViewGetLOD() fix incorrect test (LAYER_MOD_VALUES color has no matter)
Fixes #11026
https://gitlab.com/kicad/code/kicad/issues/11026
Fixes #11028
2022-03-03 11:59:03 +01:00
Seth Hillbrand 23479821e3 Fix issue with 9396735733
Need to select unconditionally target layer if not on copper
2022-03-02 10:46:59 -08:00
Seth Hillbrand 9396735733 Select the copper layer before processing
If we are converting to tracks, the copper layer needs to be selected
before any other elements are processed, otherwise, we end up with the
default undefined layer

Fixes https://gitlab.com/kicad/code/kicad/issues/11025
2022-03-02 10:17:16 -08:00
Seth Hillbrand 901c330478 Update end item before moving on track/via change
The move even dereferences m_enditem for logging and perhaps other
actions.  We need to ensure that the end item has not been invalidated
before taking this action

Fixes https://gitlab.com/kicad/code/kicad/issues/10732
2022-03-02 09:21:52 -08:00
Jeff Young 354c320329 Make sure Cleanup handles shapes other than segments.
Fixes https://gitlab.com/kicad/code/kicad/issues/10955
2022-03-02 15:26:02 +00:00
Jeff Young 0ea559e3b8 Reconcile two different printing bug fixes.
a9f092b370
6f5cb1f97d

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

(cherry picked from commit c4143b0ff6)
2022-03-02 12:07:43 +00:00
Jeff Young d20c2fe5c5 High-contrast mode: don't render vias that don't cross high-contrast layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/8740

(cherry picked from commit bbfbfc2cd2)
2022-03-02 12:07:43 +00:00
Seth Hillbrand 0b98acfe12 Freeze TEDIT in place
Avoids updating the TEDIT field, preventing merge conflicts and unneeded
VCS cruft
2022-03-01 15:53:07 -08:00
jean-pierre charras e5a85b107f Gerber plotter: fix broken plot of SHAPE_LINE_CHAIN with arcs.
Also simplify SHAPE_T::POLY plot.
From Master branch.
2022-02-28 18:26:26 +01:00
jean-pierre charras e2982a0e47 svg importer: fix a crash when importing some files with no graphic item 2022-02-28 18:26:24 +01:00
Jeff Young 1c6f3f8f0d Drop a knee between tracks to a single item when dragging.
This prevents the disambiguation menu from coming up when we don't
really care which element we start the drag on.

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

(cherry picked from commit ae85f57577)
2022-02-27 18:20:25 +00:00
Jeff Young 6341548939 Infobar warning if symbol loading was cancelled.
Also makes sure the progress dialog is closed when we're done reading
symbols (it used to stay up for much of the symbol editor initialization).

Also makes sure that any cancel in the preLoad step is honoured in the
sync step.  (The preload is done because it is multi-threaded and therefore
faster than the single-threaded sync.)

Also makes sure that individual threads pay attention to the cancellation,
not just the GUI thread.

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

(cherry picked from commit 1f16092e29)
2022-02-27 18:20:25 +00:00
jean-pierre charras a91dd68444 FP editor: fix crash when trying to export a footprint to the board editor.
From Master branch.
2022-02-27 08:41:36 +01:00
Jeff Young a8175f49a6 Repair tab order in Footprint Properties dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/10978

(cherry picked from commit 2c6a2c3479)
2022-02-26 17:42:02 +00:00
jean-pierre charras 05110b7bdc DIALOG_BOARD_STATISTICS: Reset the drill count list before recalculations.
Fixes #10984
https://gitlab.com/kicad/code/kicad/issues/10984
2022-02-26 17:11:45 +01:00
jean-pierre charras aadcc43dbb APPEARANCE_CONTROLS: fix missing update when toggling a layer view.
Fixes #10977
https://gitlab.com/kicad/code/kicad/issues/10977
2022-02-26 10:40:47 +01:00
Seth Hillbrand ff6f398607 Handle list double-click without shortcuts
The LIST_DCLICK event can be fired by spacebar or enter in GTK.  This
conflicts with using the spacebar to reset local coordinates.  Instead,
we capture the double-click event manually to add the footprint to the
board

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

Fixes https://gitlab.com/kicad/code/kicad/issues/10633
2022-02-25 16:53:03 -08:00
Seth Hillbrand a30ad0b54a Honor modifier keys in diambiguation
Needs to be reset for the new action before selecting elements at a
point.

Fixes https://gitlab.com/kicad/code/kicad/issues/9712
2022-02-25 16:15:56 -08:00
Steffen Mauch ab835937a7 Fixing Eagle refs that do not work with KiCad
KiCad has stricter requirements for what consititutes an annotated
symbol.  This checks for and corrects annotations that begin with '#',
do not begin with a non-numeric character or do not end with a number

(cherry picked from commit 78620347c8)

Fixes https://gitlab.com/kicad/code/kicad/issues/10760
2022-02-25 15:45:30 -08:00
Jeff Young b17eb3a584 Connectivity rebuild must be done after commit push.
Fixes https://gitlab.com/kicad/code/kicad/issues/10608
2022-02-25 23:15:44 +00:00
Jeff Young 96bd27ef0f Initial focus for Get and Place Footprint.
Fixes https://gitlab.com/kicad/code/kicad/issues/10230

(cherry picked from commit 714c65275c)
2022-02-25 22:02:43 +00:00
Seth Hillbrand 54f621c570 Use board polygon instead of bbox for size
Board BBox uses the visible size of the board, which includes edge cut
thickness.  This is not appropriate for the Board characteristics.
Using the outline polygon gives accurate results and falls back to a
bounding box in the case where the outline is invalid

Fixes https://gitlab.com/kicad/code/kicad/issues/10972
2022-02-25 11:13:01 -08:00
jean-pierre charras 0f497d1b7a Fix incorrect conversion from lines to rect in fp editor.
Fixes #10965
https://gitlab.com/kicad/code/kicad/issues/10965
2022-02-25 13:50:57 +01:00
Jeff Young 5f1976f341 fixup! Better DRC checking when placing vias. 2022-02-25 10:40:05 +00:00
Jeff Young 6036331b25 Debounce layer visibility buttons and fix issues with FP Editor.
(cherry picked from commit cb16ad7557)
2022-02-25 10:40:05 +00:00
Jeff Young 5129143bcb Layer visibilities aren't stored in project for footprint editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10953

(cherry picked from commit 5c54f40eae)
2022-02-25 10:40:05 +00:00
Jeff Young d7d31e4b76 Implement multi-layer stitching via logic.
(cherry picked from commit d65f9ad2d8)
2022-02-25 10:40:05 +00:00
Jeff Young b00f855c26 Better DRC checking when placing vias.
(cherry picked from commit 369f53bb19)
2022-02-25 10:40:05 +00:00
Jeff Young 4b0177c8fe Handle hidden layers in FP Editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/10946

(cherry picked from commit 08df5c0b01)
2022-02-25 10:40:05 +00:00
Jeff Young b11ec85706 Copy Pad_Master when copying BOARD_DESIGN_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/10932

(cherry picked from commit d2069e1548)
2022-02-25 10:40:05 +00:00
Greg Davill 55bdef9bd2 action_plugin: Remove duplicated entry in UndoList
(cherry picked from commit 429c311ec3)
2022-02-24 14:46:13 -08:00
Jeff Young 6ccaf5e27d Flip all layers of a zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/10621
2022-02-21 22:02:19 +00:00
Jeff Young a24912d01d A bit of safety. 2022-02-21 22:02:19 +00:00
Jeff Young 2498655cc5 Respect ERROR_OUTSIDE when inflating polygons.
Fixes https://gitlab.com/kicad/code/kicad/issues/10896

(cherry picked from commit e6c617b74d)
2022-02-21 17:32:25 +00:00
Jeff Young a5305aa235 A more discerning un-flashed-connectivity test.
(cherry picked from commit aa2c8e9b0c)
2022-02-21 11:20:48 +00:00
Tomasz Wlostowski 680163f8a8 Cherry-pick commits from Master and about SVG import:
*Fixes in the SVG import polygon postprocessing:
- don't drop subsequent polys when a non-filled primitive is imported 'in between'
- fix missing holes (also related to the interleaving of stroke and filled shapes, depending on the software that wrote the SVG file)

*GRAPHICS_IMPORTER_BUFFER: forgot to store the indices of the paths belonging to a compound shape

*pcbnew: GRAPHICS_IMPORTER can now recognize multi-path shapes (and postprocess polygons with holes into Kicad-compatible fractured polysets)

*SHAPE_POLY_SET: polysets can now be built from a bunch of arbitraily ordered oriented outlines.
Used by the SVG hole support

*SVG_IMPORT_PLUGIN: enable postprocessing of polygons with degeneracy and holes

*pcbnew: SVG importer support for even-odd fill rule
2022-02-21 10:50:05 +01:00
Jeff Young f8d15a641a Use only a physical connection to determine flashing of pads.
Checking for proper nets just confuses things when the nets are set
wrongly for some reason.  This way we generate clearer DRC errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/10645
2022-02-20 20:52:39 +00:00
Jeff Young d56e488f2d Remove unnecessary validations.
Not sure if this will fix the bug or not as I can't reproduce it, but
I'd say odds are pretty good.

Fixes https://gitlab.com/kicad/code/kicad/issues/10467
2022-02-20 20:52:39 +00:00
jean-pierre charras d5ca09dffc Optimize DIALOG_GLOBAL_EDIT_TRACKS_AND_VIAS: a time consuming call (OnModify())
was made for each item change.
It is now made only once.
Fixes #10905
https://gitlab.com/kicad/code/kicad/issues/10905
2022-02-20 20:12:36 +01:00
Jeff Young b24f51908b Fix nullptr error (no router tool in footprint editor).
(cherry picked from commit df3291c59d)
2022-02-20 16:57:54 +00:00
Jeff Young 246b6fcdd6 Use router to update message panel when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10068
2022-02-20 13:54:01 +00:00
Jeff Young 2b7c79541b While flags are in prefs, actual clearance values are in board setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/10852

(cherry picked from commit 7ddd3137a3)
2022-02-20 01:03:08 +00:00
Jeff Young 7f40cac4b0 Fix collapsing name column in Net Inspector.
(cherry picked from commit 4966e2ebc2)
2022-02-20 01:03:08 +00:00
Jeff Young 7978c8c291 Allow Rule Areas on all physical layers.
Required to do things like modify silk_clearance rules.

(cherry picked from commit 8f670552a6)
2022-02-20 01:03:08 +00:00
Jeff Young fc6ec23ac1 On-the-fly language updating for appearance panel & selection filter.
Fixes https://gitlab.com/kicad/code/kicad/issues/10040

(cherry picked from commit 6ce63d66e8)
2022-02-20 01:03:08 +00:00
Jeff Young 02ec87b036 Cancel or commit pad edit mode when switching footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/10209

(cherry picked from commit 85805b95ba)
2022-02-20 01:03:08 +00:00
Jeff Young 762258203c Add zone margin when subtracting other graphics and zones.
It was already added for pads and tracks, but not the other objects.

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

(cherry picked from commit 81bed9ab96)
2022-02-20 01:03:08 +00:00
Seth Hillbrand f0d7a09af9 Remove broken call to normalize outlines
We should never be editing the user's outlines for them.  This creates
broken zones that are hard to repair.  In this case, there was also a
secondary zone with no outline that would crash the system

Fixes https://gitlab.com/kicad/code/kicad/issues/10904
2022-02-18 09:30:26 -08:00
jean-pierre charras 7be3a6b3c5 pcbnew: fix incorrect calculation of the board thickness from board stackup.
dielectric sub layers were not taken in account.
Fixes #10899
https://gitlab.com/kicad/code/kicad/issues/10899
2022-02-18 18:10:49 +01:00
Seth Hillbrand ed2148d634 Prevent merging tracks across pads
When merging co-linear tracks, we should maintain the existing break if
it exists on pads, vias and other connection points

(cherry picked from commit 3a29d94c0a)
2022-02-17 19:44:33 -08:00
Seth Hillbrand 8e9d44942f Maintain connectivity while cleaning tracks/vias
When merging segments that loop back on each other, we need to merge
them in such a way to to keep the resulting endpoints connected to the
original adjoining endpoints

Fixes https://gitlab.com/kicad/code/kicad/issues/10780
2022-02-17 15:24:23 -08:00
qu1ck 8b1f1c0296 Fix double loading plugins and sys.path entires multiplying
(cherry picked from commit b53b68c686)
2022-02-17 10:59:52 -08:00
Tomasz Wlostowski 4eb9440a42 router: include arc approximation tollerance in arc hull clearance calculation
fixes: https://gitlab.com/kicad/code/kicad/-/issues/10470
(cherry picked from commit ce28525172)
2022-02-17 09:22:19 -08:00
jean-pierre charras 7cf7270738 GERBER_JOBFILE_WRITER: allows all *_User layers to be listed in *gbrjob file. 2022-02-17 15:35:49 +01:00