Commit Graph

12251 Commits

Author SHA1 Message Date
Jeff Young 1ec70d30af Cherry-pick some 7.0 Clearance Resolution improvements.
6.0 will be in the field for a long time, and the better the debugging
tools we have available the less costly it will be to maintain.

Fixes https://gitlab.com/kicad/code/kicad/issues/8961
2021-08-15 19:03:58 +01:00
Jeff Young 48521774cd Formatting. 2021-08-14 21:18:11 +01:00
Jeff Young 41619ebbe2 Decouple PROGRESS_REPORTER interface from implementations. 2021-08-14 21:05:49 +01:00
jean-pierre charras 8ac5e318fb Ugly hack to avoid crash on msys2 when running Pcbnew after running Eeschema+its Python console
The main bug still exists, but at least Kicad does not crash.
2021-08-14 21:08:56 +02:00
Jon Evans 8eba0b356b Fix issues calling SaveBoard on board loaded from PcbNew frame
KiCad cannot have more than one board/project open, so disallow
the Python APIs for loading additional boards when the frame is
present.  Inherit the SETTINGS_MANAGER from the frame when present
instead of creating a new one that won't have the loaded project.
2021-08-14 09:18:21 -04:00
Jeff Young bff247b08a Hook up 3D viewer colors to board stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5173
2021-08-14 14:00:17 +01:00
Jeff Young 05fb582304 Expose missing annular ring properties in Track & Via Properties. 2021-08-14 10:49:42 +01:00
jean-pierre charras 3d61c8b0c4 PANEL_SETUP_BOARD_STACKUP: Do not limit the EpsilonR mantissa to 1 or 2 digits.
Fixes #8956
https://gitlab.com/kicad/code/kicad/issues/8956
2021-08-14 09:42:05 +02:00
Jon Evans 80355f04a9 Fix SHAPE_LINE_CHAIN::Replace at end of chain 2021-08-13 16:59:45 -04:00
Jeff Young e5586fb974 Accept legacy hole token as well as new hole_size. 2021-08-13 21:28:11 +01:00
Jeff Young d34e9e8946 Code safety. 2021-08-13 21:28:11 +01:00
Roberto Fernandez Bautista 35d5223825 Keep track of existing/excluded references when re-annotating the PCB
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8211
2021-08-13 19:09:37 +01:00
Roberto Fernandez Bautista aa67abb681 PNS::NODE Use PointCount instead of calculating segment index manually
There is no need to manually calculate the segment index - we know
that the last point that was added is the start point of the segment.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8945
2021-08-13 19:09:33 +01:00
Jeff Young 4c3954aea8 Clearer DRC rule token name for hole_size. 2021-08-13 16:18:56 +01:00
Jeff Young 3b26db745f Use more standard terminology. 2021-08-13 15:18:47 +01:00
Jon Evans 5bfafa5e4c Add rounding epsilon to convert tool polygon search
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8927
2021-08-12 20:17:04 -04:00
Jeff Young 98d0ce00ee Defensive coding.
Fixes https://gitlab.com/kicad/code/kicad/issues/8790
2021-08-12 21:35:05 +01:00
Stefan 02e7d9f809 pcbnew: swap x/y align text to match vertical/horizontal text on right click... 2021-08-12 13:03:52 +00:00
jean-pierre charras f4a7565b9c fix a compil warning 2021-08-11 08:16:26 +02:00
Jeff Young 13fc16b03f Fix uninitialized variable. 2021-08-10 16:51:30 +01:00
Jeff Young c536a4c4f2 Work around annoying wxWidgets assert. 2021-08-10 16:51:30 +01:00
Jeff Young a208dac8d8 Convert hole clearance tests from NPTH holes to all holes. 2021-08-09 22:26:00 +01:00
Roberto Fernandez Bautista 0120c5fa4b PNS Length Tuning: Recover original arc tracks after tuning 2021-08-09 21:10:33 +01:00
jean-pierre charras 69322a18e7 Fix missing call to ClearArcs() 2021-08-09 09:16:04 +02:00
Jon Evans a90656900a Allow creating polygon types from polygons
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7302
2021-08-08 20:29:00 -04:00
Jon Evans e91218b876 PNS: don't mark holes only if there's also a solid violation
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8874
2021-08-08 15:41:39 -04:00
Jon Evans 3beeb52c43 Convert tool: create lines on active layer, not source layer 2021-08-08 15:12:23 -04:00
Jon Evans 2d9b06cbf9 Fix missing flatten step when filling zones with arcs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8923
2021-08-08 15:09:12 -04:00
Jeff Young 54942a1401 Fix typos that would result in fp zone setting written into pads. 2021-08-08 18:12:29 +01:00
Jeff Young e38c366695 Narrow zone dialog a bit. 2021-08-08 18:12:29 +01:00
jean-pierre charras fa82fcb809 Router tool: ensure a internal layer exists when placing a microvia.
Fix also a minor compil warning.
Fixes #8931
https://gitlab.com/kicad/code/kicad/issues/8931
2021-08-07 20:29:49 +02:00
Jeff Young bafa105ed0 Enforce hole clearance on NPTHs in zones.
Fixes https://gitlab.com/kicad/code/kicad/issues/8924
2021-08-06 18:16:38 +01:00
Jeff Young a10f2b284c Unify negative zero and percent handling in UNIT_BINDER.
Some values, such as solder mask margins, are usually negative and it
helps to display zero as "-0.0".
2021-08-06 18:16:38 +01:00
Jeff Young e81b7b4a14 Give a few dialogs a bit of love.
1) improve spacing in copper zone properties.
2) improve spacing and naming in dielectric material properties.
3) clearer naming in board setup > constraints.
4) remove over-exuberant stretching in board setup > mask & paste.
2021-08-06 18:16:38 +01:00
Roberto Fernandez Bautista 6a9a177fa3 Remove zone filler arc collision workaround 2021-08-05 17:45:12 +01:00
Jeff Young 77680eba30 Naming conventions. 2021-08-05 14:31:36 +01:00
Jeff Young 5bf0b99813 Capture errant mouse-up from locked dialog in move tool.
Don't pass it on to other tools where it causes all kinds of mayhem.

Fixes https://gitlab.com/kicad/code/kicad/issues/7255
2021-08-04 17:42:40 +01:00
jean-pierre charras 76bdb423d7 Minor changes: minor code cleanup and fix minor Coverity warning 2021-08-04 16:47:41 +02:00
Jeff Young ae99e627bd Quiet Coverity. 2021-08-04 13:55:42 +01:00
Jeff Young 46bdce2747 Don't allow pads in groups in the board editor.
Bad stuff happens, including crashes.
2021-08-04 13:55:42 +01:00
Jeff Young 65f6e72b4c Improve commenting. 2021-08-04 13:55:42 +01:00
jean-pierre charras ac933d4e83 Fp editor: avoid having nil uuids when editing old footprints.
In Fpeditor, nil uuid has a special meaning and cannot be used as uuid in fp items.
Fixes #8914
https://gitlab.com/kicad/code/kicad/issues/8914
2021-08-04 12:37:52 +02:00
Jeff Young c5e195bdff Cleanup (includes and formatting). 2021-08-03 18:37:23 +01:00
Jeff Young 95b87ba29a Freshen microwave polygon dialog and remove a bunch of dead code. 2021-08-03 01:11:11 +01:00
Jeff Young 43523df843 Measure distance from pad center, not pad hull.
Otherwise we think the wrong end of really short track segments is
connected to the pad, leaving the other end dangling.

Fixes https://gitlab.com/kicad/code/kicad/issues/8909
2021-08-02 22:42:54 +01:00
Jeff Young 8b9161b27d Be more careful with alpha value.
Fixes https://gitlab.com/kicad/code/kicad/issues/8850
2021-08-02 18:24:16 +01:00
Jeff Young 6f1837b300 Formatting. 2021-08-02 01:52:58 +01:00
Jeff Young c51b1dad72 Generalize infobar MESSAGE_TYPE handling and use for DRC errors.
Fixes https://gitlab.com/kicad/code/kicad/issues/8782
2021-08-01 21:51:39 +01:00
Jeff Young 0d539a84a2 Fix bugs in Tracks Cleaner.
1) Implement more robust connection checking so we don't decide very
short segments with both endpoints within a single track are connected
at both ends.

2) Make use of the IS_DELETED flag to perform iteration during dryRun
so that all deletions to be made are flagged.

Fixes https://gitlab.com/kicad/code/kicad/issues/8883
2021-08-01 15:50:01 +01:00
Jeff Young b573712326 Cleanup. 2021-08-01 15:37:12 +01:00
Jeff Young 0f5a8f87d3 Add writing of pad primitive polys with arcs, and fix a bug in reading.
Fixes https://gitlab.com/kicad/code/kicad/issues/8827
2021-08-01 10:47:00 +01:00
Jeff Young faa1ff4ec6 Add false-negative DRC tests (and fix first bug found by them). 2021-07-31 16:41:44 +01:00
qu1ck 7b4dcb6e10 Refactor ExportSpecctraFile to be usable in API
Currently there is pcbnew.ExportSpecctraDSN() but it needs a pcbnew
frame set which makes it unusable outside of the scripting window or a
plugin.

This refactors actual exporting logic into separate helper and adds an
overload to ExportSpecctraDSN(board, filename) that doesn't need pcbnew
window.
2021-07-31 09:55:48 +00:00
Seth Hillbrand 6cd4d68d57 Add drop shadows to MacOS icons
Apple UI guidelines ask for small drop shadows on the icons.  We add
these using ImageMagick when resizing
2021-07-30 20:55:34 -07:00
Seth Hillbrand e7d8b1a975 Resize MacOS icons and script their creation
Creates a script that will fomat the MacOS icons at 80% of the total
size in line with Apple's guidelines.

Script requires Inkscape 1.0 and png2icns (available on Linux boxen)

Fixes https://gitlab.com/kicad/code/kicad/issues/7977
2021-07-30 20:28:14 -07:00
Seth Hillbrand ad8acd328c Expunge some remaining references to kicad-pcb 2021-07-30 20:27:45 -07:00
Jeff Young bceb3794f8 Remove ZONE_FILLER_TOOL since it's not really necessary.
It was causing intermittent failures on GTK.  We'll no doubt want
tools in the QA framework at some point, but probably not necessary
for 6.0....
2021-07-31 01:50:42 +01:00
Jeff Young 8c69a856fc Add zone filler tests.
One test has pads of a bunch of different shapes and provokes some
errors to make sure they're caught.

The others are all past issues with the zone filler to make sure we
don't suffer any regressions.  (They should all just pass with no DRC
errors.)
2021-07-30 17:09:24 +01:00
Jeff Young 8aea2cbd03 When ignoring click events don't ignore synthetic ones.
Fixes https://gitlab.com/kicad/code/kicad/issues/7255
2021-07-29 18:07:04 +01:00
Jeff Young 138a965c2a Remove shadowing member variable.
Perhaps the compiler always gets this right, but it's still confusing
when reading the code.
2021-07-29 16:03:25 +01:00
Jeff Young 9271ac1a4f Don't allow deletion of pads when not in allow-free-pads mode.
Fixes https://gitlab.com/kicad/code/kicad/issues/8884
2021-07-29 16:03:25 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Jeff Young 46338403e7 Unwrap some std::library typedefs. 2021-07-28 22:16:38 +01:00
Ian McInerney befd30a1a1 Switch the board footprint properties window to use the new 3d models panel
This allows it to also get the badge showing errors in the panel.
2021-07-28 20:56:17 +01:00
Ian McInerney 1a4a3400ba Split the footprint 3d model panel into its own class
This allows it to be shared by both the PCB editor properties dialog
and the fpeditor dialog.
2021-07-28 20:56:17 +01:00
Wayne Stambaugh f233f4a0a9 Expunge EDA_FILE_SELECTOR.
EDA_FILE_SELECTOR was just an obfuscation of wxFileSelector().
2021-07-28 14:12:51 -04:00
jean-pierre charras b6e1fe11b6 Fix a collision name (perhaps msys2 specific) 2021-07-28 19:39:50 +02:00
Ian McInerney 36d66085f5 Add a column showing 3D model file loading errors
This adds an icon to the left of the row with an error symbol if the
file can't be found or opened, and shows a tooltip over the icon with
and error string.

Fixes https://gitlab.com/kicad/code/kicad/issues/3815
2021-07-28 16:42:22 +01:00
david-beinder c0f12cf8b0 PCB painter: skip early to polygon algo in outline mode 2021-07-28 10:37:56 +00:00
Wayne Stambaugh 369d813a32 Pass std::string by reference instead of on the stack where applicable. 2021-07-27 13:30:05 -04:00
Jeff Young 1f2e7a94ca Change Move Exactly hotkey to Shift + M to avoid OSX minimize.
Fixes https://gitlab.com/kicad/code/kicad/issues/8864
2021-07-27 18:20:32 +01:00
Jeff Young dd5676f4bc Implement a safer (RAII) tool re-entrancy guard.
Fixes https://gitlab.com/kicad/code/kicad/issues/8873
2021-07-27 16:37:34 +01:00
Jeff Young 886dc2f43e Do-not-show-again section for common prefs & zone fill warning infobar.
Note that the dialogs which have mutliple options were not moved over
as it seems perahps not the right choice to have them save state between
sessions.

Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-27 15:15:49 +01:00
Jeff Young c74148fa88 Add infobar for those who confuse zone filling with display modes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-27 15:15:49 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
qu1ck c946070005 Fix TRACKs not being cast correctly in API 2021-07-26 22:37:22 +00:00
Wayne Stambaugh 8fd83cbb95 Pass wxPoint objects by reference instead of on the stack. 2021-07-26 15:35:33 -04:00
Jeff Young e62969d007 Move zone fracture display mode to AdvancedCfg, and add triangulation.
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-26 18:57:35 +01:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
Seth Hillbrand cb917e4c42 Avoid nonsensical intersections
When two segments are approximately parallel, we shouldn't look to find
their intersection.  It will never be the nearest point and it overflows
the KiROUND call

Fixes https://gitlab.com/kicad/code/kicad/issues/8858
2021-07-26 09:02:54 -07:00
Jeff Young d613292b67 Fix type in group command enablement.
Fixes https://gitlab.com/kicad/code/kicad/issues/8821
2021-07-25 13:31:52 +01:00
Jeff Young 39e938db3e Save the show-page-limits setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/8825
2021-07-25 13:29:16 +01:00
Anton Lazarev 42086a455d fix blind via early return in VRML exporter 2021-07-25 12:22:55 +00:00
Jeff Young 373f0335c8 Convert Altium radial dimensions to leaders.
This is because we don't yet support radial dimensions.

Also fixes a bug where we fail to read an Altium circular track.  We
now convert it to a pair of 180-degree arcs.

Also fixes a bug where we were failing to import prefixes on linear
dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/8789
2021-07-24 14:25:59 +01:00
Jeff Young 531f5480a7 Reduce line-breaks and increase SNR. 2021-07-24 14:25:59 +01:00
Pradeepa Senanayake dd31a5383b Added the double click to footprint editor 2021-07-24 08:53:09 +00:00
jean-pierre charras 31d2b2df8b QA test: fix a wx assert about Locale when running qa_python tests.
Probably happens only when the system locale uses a comma as fp separator.
2021-07-23 11:45:45 +02:00
Jeff Young 04b9b15255 Fix copy/paste error. 2021-07-23 01:11:22 +01:00
Seth Hillbrand 8d1dd1f8b0 Handle pad->custom conversion more closely
When converting pads to custom polygons, avoid padding with the polygon
width and keep the anchor pad within the boundary of the original pad
itself

Fixes https://gitlab.com/kicad/code/kicad/issues/8842
2021-07-22 12:12:42 -07:00
Jeff Young a16b85db67 Read/write group locked state. Show locked state in dialog & statusbar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8796
2021-07-22 12:49:30 +01:00
jean-pierre charras 49e1b5785f PCB_SHAPE::GetFocusPosition(): returns a point on the outline instead of center.
This function is used in DRC to locate a graphic shape. For not filled shapes,
this point must be on the shape outline, not on the center of the shape (the center
shows nothing)
Fixes #8832
https://gitlab.com/kicad/code/kicad/issues/8832
2021-07-22 10:41:50 +02:00
Wayne Stambaugh 1a301d8eea Stop using wxDialog::EndModal() from inside dialogs.
Calling wxDialog::EndModal() directly from inside the dialog is a
potential bug if the dialog is shown in the modeless or window modal
(quasi-modal).  Use the internal button events where possible and
check for the appropriate mode before calling the correct end dialog
function.
2021-07-21 17:38:14 -04:00
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
david-beinder af90d47edc Altium: Fix calculating third arc point from uninitialized memory
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8671
2021-07-20 19:13:32 +00:00
jean-pierre charras 234b414e2c Fix misplaced break after code cleanup. 2021-07-20 17:05:00 +02:00
Wayne Stambaugh cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Jon Evans 75190370dd Convert -> Create from Selection
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8818
2021-07-19 18:45:33 -04:00
jean-pierre charras 6a886e7085 Wizard qrcode_footprint_wizard.py: fix a minor issue and update code. 2021-07-19 18:36:58 +02:00