Commit Graph

14980 Commits

Author SHA1 Message Date
Jeff Young bd60f38569 Possible protection from acessing deleted window data.
(Long shot for Sentry KICAD-MM.)
2023-04-03 23:44:40 +01:00
Jeff Young a4e8fa96d4 Nullptr safety.
(This is a long shot for Sentry KICAD-MV, but you never know....)
2023-04-03 23:44:40 +01:00
Jeff Young 9b4627e782 Don't pass a FRAME-based UNITS_PROVIDER to a modeless dialog.
(The dialog may outlive said frame.)
Should fix Sentry KICAD-3A.
2023-04-03 17:18:33 +01:00
Jeff Young 7a24672120 Improve naming. No functional changes. 2023-04-03 14:32:23 +01:00
Jeff Young d9b0577ddd Fix pad flipping. 2023-04-03 14:32:23 +01:00
Jeff Young 7286555529 Fix some issues editing pads via Pad Properties dialog.
The offsets and orientations were being incorrectly handled.
2023-04-03 13:17:52 +01:00
Jeff Young fd07f50c44 Report collisions of items with nets as SHORTING, not CLEARANCE.
Fixes https://gitlab.com/kicad/code/kicad/issues/14312
2023-04-02 21:07:52 +01:00
Jeff Young 77639a540b Add messages for clearance reports on footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/13874
2023-04-02 19:12:19 +01:00
Jeff Young 28028c941e Retire Local/Draw coords distinction from PAD (the last object to have it). 2023-04-02 18:02:41 +01:00
Jeff Young 7252c7471c Use enums for column ids.
(The nickname, in particular, is no longer column 1.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14291
2023-04-02 15:10:06 +01:00
Jeff Young b78e0a55b1 Naming conventions. (No functional changes.) 2023-04-02 11:48:23 +01:00
jean-pierre charras 054de5687c Pcbnew: fix crash when trying to delete a PCB_TEXT. 2023-04-02 12:15:18 +02:00
jean-pierre charras 31354a2d91 PCB_TEXT::TransformTextToPolySet(): fix some issues:
- incorrect rotation for texts with option "Keep Upright"
- missing code for knockout texts.
Fixes #14473
https://gitlab.com/kicad/code/kicad/issues/14473
2023-04-02 09:54:53 +02:00
jean-pierre charras 52315e4f02 specctra_export: fix unit conv PCB iu -> DSN 2023-04-01 17:28:50 +02:00
Jeff Young bf9a42d7e1 Naming conventions and nullptr usage. No functional changes. 2023-04-01 15:41:59 +01:00
Jeff Young 4fbb85aa4f Naming conventions. 2023-04-01 15:40:50 +01:00
Jeff Young a8faa0e615 Add hole clearance to moutning hole keepouts for SPECCTRA.
Fixes https://gitlab.com/kicad/code/kicad/issues/14439
2023-04-01 15:40:43 +01:00
Jeff Young 04cdca837e Remove GUI dialogs from PCB plugin. 2023-04-01 11:37:34 +01:00
Jeff Young b80a9014ff Fix gcc warning. 2023-03-31 23:53:11 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Seth Hillbrand 7695d510d6 Prevent PCB Editor from opening multiple board_setup
ShowBoardSetup can be called multiple times from multiple locations,
resulting in duplicate board setup dialog boxes.  This is confusing and
should be prevented.  We use the established patter from the symbol
picker to ensure that only one copy of the dialog is ever opened at a
time
2023-03-30 15:34:23 -07:00
jean-pierre charras 061e423b1f Pcbnew: fix incorrect position of cached text shapes when moving a footprint.
when moving a footprint, the position of texts living in FP_TEXT_BOX was
not updated when the text shape was cached (non Kicad fonts).
Fixes #14452
https://gitlab.com/kicad/code/kicad/issues/14452
2023-03-30 17:25:25 +02:00
Roberto Fernandez Bautista d5bc223ff2 CADSTAR PCB Importer: Ignore construction layers on outer surfaces
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14443
2023-03-29 23:46:22 +02:00
Roberto Fernandez Bautista aaeb8ca739 CADSTAR PCB importer: Fix loading of rounded rectangle pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14445
2023-03-29 20:53:14 +02:00
Roberto Fernandez Bautista 89441d807d CADSTAR PCB importer: Fix incorrect position of overridden pads 2023-03-29 20:53:14 +02:00
Wayne Stambaugh 28776f5745 Text attributes object improvements.
* Add compare method to COLOR4D object.
* Add unit test to validate COLOR4D comparison method.
* Add missing color test in text attribute comparison method.
* Add unit test for text attribute object.
* Remove unnecessary headers from text attribute header.
* Move text attribute code into separate source file.
2023-03-29 12:53:45 -04:00
jean-pierre charras 683a327200 Footprint editor: always export the currently loaded footprint.
Previously, it was not always the edited footprint, but a footprint
selected from the library tree.
It was especially annoying when the footprint was loaded from the board editor:
The footprint was not the loaded footprint, but its copy from library.
2023-03-29 18:47:39 +02:00
jean-pierre charras 0bd83d3096 Footprint viewer: ensure the footprint is updated after new library selection
Previously, if the first fp of the new lib has the same name as the old
displayed fp, the old fp was not replace by the new fp.
2023-03-29 16:53:49 +02:00
Seth Hillbrand f93fde15b7 Locked shadow needs to be in shadow color
Otherwise, text shadow is stroked by text color
2023-03-28 13:01:08 -07:00
Jeff Young 0f9a4ef7b7 Update local coords after changing footprint item properties.
Fixes https://gitlab.com/kicad/code/kicad/issues/14348
2023-03-27 16:44:00 +01:00
Jon Evans 3f42e6b702 Properties: Hide Net Class from GUI
It is confusing users who want to change the netclass of a net.
2023-03-26 19:46:00 -04:00
Jon Evans 65193487a6 Properties: Rename methods to better reflect their purposes 2023-03-26 19:43:16 -04:00
Jeff Young a214ac0310 Better reporting of copper <--> keepout area clearances.
(Keepout areas can keep-out copper, but they don't have a clearance
to copper.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14375
2023-03-26 20:57:59 +01:00
Jeff Young 9976b9ce8c Only report on clearances where there was one defined.
If it's 0, it's just a straight-up collision.
2023-03-26 20:46:59 +01:00
Jeff Young 0266d03f79 Run SILK_CLEARANCE rules on mask layer when testing silk-to-mask clearance.
This allows custom rules to be authored without firing the auto-generated
rule from Board Setup > Silk Item Clearance (which should be only for silk-
to-silk clearances).

Fixes https://gitlab.com/kicad/code/kicad/issues/14417
2023-03-26 20:42:41 +01:00
Jeff Young 2443bc6e29 Update allow-solder-mask-bridges when updating footprint from library.
Fixes https://gitlab.com/kicad/code/kicad/issues/14422
2023-03-26 16:27:09 +01:00
Jeff Young 04f6f04bed Test silk/mask collisions on the correct layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/14417
2023-03-26 16:27:05 +01:00
Marek Roszko 604a7d69db Move up a layer validity check to prevent crash
Fixes sentry crash KICAD-RF
2023-03-25 17:12:22 -04:00
Jeff Young c5e66361db Allow solder mask bridges between net-tie-group pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/14412
2023-03-25 16:11:07 +00:00
Jeff Young d6dd58fff9 Keep track of single-pad-islands so we can discount spokes to them. 2023-03-25 10:44:46 +00:00
Marek Roszko eb90448247 Fix typo 2023-03-24 19:54:41 -04:00
Marek Roszko 8a8589b9db Fix cli crash due to dialogs buried in the pcb parser...
Fixes sentry KICAD-Q2
2023-03-24 19:52:48 -04:00
Seth Hillbrand 19d0aceda3 Remove superfluous m_status variable
This used to be used to store information for the item similar to
m_state but it has been deprecated and no uses remained
2023-03-24 09:38:39 -07:00
Wayne Stambaugh 244c37298f Fix Doxygen commenting issues. 2023-03-24 11:57:52 -04:00
jean-pierre charras 2e2cbb0594 Pcbnew, APPEARANCE_CONTROLS: do not change objects visibility, when changing
layers visibility using Preset layers widget.
Fixes #13381
https://gitlab.com/kicad/code/kicad/issues/13381
2023-03-24 14:07:29 +01:00
Nimish Telang 8ea357f04d Fix Doxygen directives in numerous headers 2023-03-24 13:02:13 +00:00
Nimish Telang f7bf3011fb Use bundled Find{CURL,ZLIB}.cmake 2023-03-24 12:54:52 +00:00
qu1ck a86aa6fc3e Don't disable reload button in action plugins preferences 2023-03-24 12:49:43 +00:00
jean-pierre charras ac71227e75 Fix compil warnings. 2023-03-23 18:36:59 +01:00
Marek Roszko d49562a7aa 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
2023-03-22 18:39:17 -04:00
Seth Hillbrand 2e2da951a5 Don't double-expand NPTH checks
When filling the zone for the NPTH, the hole should not be considered as
a copper element in terms of clearance.  This prevents close but
different knockout elements from being formed
2023-03-22 15:07:58 -07:00
Seth Hillbrand 914b5a4d21 Simplify test for substantial nubs
Substantial elements following a divot should be at least as far in each
cardinal direction from the origin point in order to be considered
substantial.  This catches cases where the "substantial" element is
actually a straight segment away from the divot

Fixes https://gitlab.com/kicad/code/kicad/issues/14130
2023-03-22 13:01:50 -07:00
jean-pierre charras 65eb84265b Fix a compil warning issue (mingw specific)
also avoid to include wx/wx.h in kicad_cli.cpp, it is compil time consuming.
2023-03-22 08:49:26 +01:00
David Holdeman 79fbde0894 Add option to use drill/place file origin for kicad-cli gerber export 2023-03-21 12:18:14 +00:00
jean-pierre charras 0c26014eaa step exporter: fix missing initialization of a member (m_pcbName)
in EXPORTER_STEP rename m_pcbName to m_pcbBaseName, to avoid using
the same name used also in STEP_PCB_MODEL.
2023-03-21 09:30:11 +01:00
Marek Roszko edf6828cf1 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-20 21:11:28 -04:00
Jeff Young bb2a0f825a Orthogonal dimension are always cardinal, even when their start points are not.
Fixes https://gitlab.com/kicad/code/kicad/issues/13728
2023-03-20 21:22:11 +00:00
Martin Thierer 45b94a4b3e Pcbnew: Fix rotating bitmaps
Fixes rotating bitmaps with "rotate counterclockwise",
"rotate clockwise" and "move exactly" commands.

Only rotation by 0, 90, 180 and 270 degrees is supported
for bitmaps. Other values are rounded to the nearest 90
degree multiple.

There is a different bug that this commit doesn't address,
which is that BITMAP_BASE::Rotate() got its CW/CCW logic
reversed ("m_image->Rotate( false )" should rotate CW, but
does not).

Fixes https://gitlab.com/kicad/code/kicad/issues/14197
2023-03-20 12:36:19 +00:00
Jeff Young 5d55fc41ae Adds Teardrops as separate type in Global Deletions dialog.
Also removes the nag dialog as undo has worked for Global Deletions for
some time now.
2023-03-19 20:43:18 +00:00
Jeff Young 897984aa22 Filter Selected Items... is inclusive, not exclusive.
Fixes https://gitlab.com/kicad/code/kicad/issues/14273
2023-03-19 20:43:18 +00:00
Jeff Young 129ccb891e Use standard paradigm for macro scope limiting. 2023-03-19 20:43:18 +00:00
Alex 10c4b948cb Support canceling initial global library table setup. 2023-03-19 14:30:53 +03:00
jean-pierre charras 5461dc6cd1 BOARD_NETLIST_UPDATER: add missing count of warnings
Fixes #14290
https://gitlab.com/kicad/code/kicad/issues/14290
2023-03-18 17:54:03 +01:00
Jeff Young ad5d3d4eba Clean up items which weren't pasted from clipboard.
Fixes https://gitlab.com/kicad/code/kicad/issues/14335
2023-03-17 23:17:15 +00:00
Jeff Young ee1d9c561c Improve zone & rule area reporting.
Also removes a bunch of "wxEmptyString" where it was degrading readability.

Also fixes a bug where footprint zones were getting sorted incorrectly
due to rotation of coordinates.

Fixes https://gitlab.com/kicad/code/kicad/issues/14322
2023-03-17 13:28:29 +00:00
Jeff Young 967ee2c85b Improved macro protection. 2023-03-17 11:04:58 +00:00
Roberto Fernandez Bautista 55a379f61b Fix build: Add missing header include 2023-03-16 22:07:04 +01:00
Roberto Fernandez Bautista 3d661585dd Fix build errors and warnings from CADSTAR 2023-03-16 21:17:40 +01:00
Roberto Fernandez Bautista 5efec4cd51 CADSTAR PCB: Ensure pads have correct position and footprints at 0,0
Fixes a display issue in the footprint preview where all the pads
were displayed at 0,0
2023-03-16 21:07:09 +01:00
Roberto Fernandez Bautista 2cefabc99a CADSTAR PCB: Fix loading of filled circles (load as polygon for now)
todo: need to detect if what we are drawing is a circle.
2023-03-16 21:07:09 +01:00
Roberto Fernandez Bautista 6f5321c481 ADDED: CADSTAR .cpa footprint libraries 2023-03-16 21:07:08 +01:00
Roberto Fernandez Bautista 8f83f27336 CADSTAR SCH: Refactor loading of symbols out of loading part info 2023-03-16 21:07:06 +01:00
Roberto Fernandez Bautista 738b36cf7d CADSTAR csa / cpa ignore Hierarchy
This node doesn't have any equivalent in KiCad so for now we ignore it. In future, we could parse it in detail, to obtain the tree-structure of symbols/footprints in a cadstar library
2023-03-16 21:07:06 +01:00
Alex 8fe78101db Don't create 0-length tracks when placing via in the middle of a track. 2023-03-16 04:53:26 +03:00
jean-pierre charras 893a362d9e Minor Coverity and compil warnings fix. 2023-03-15 20:09:04 +01:00
Jeff Young e60837ec95 Defenses in depth for ratsnest drawing. 2023-03-14 11:53:16 +00:00
Jeff Young 37b0a5a504 Add quick DRC action for Diff Footprints.
Also makes the strings match the GUI better so people will know where
to find them later.

And fixes a couple of ERC items that referred to Board Setup (oops).
2023-03-14 11:52:23 +00:00
Seth Hillbrand 283770fc45 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
2023-03-13 16:10:39 -07:00
Jeff Young 725834b554 Don't use ViewBBox for zoom-to-fit.
The ViewBBox can include the largest document clearance so that pad
clearance lines get included.  But the largest clearance can be, well,
large.

Fixes https://gitlab.com/kicad/code/kicad/issues/14276
2023-03-13 22:45:37 +00:00
Jeff Young a0adb59437 Update dimension units when opening PCBs in CLI.
Fixes https://gitlab.com/kicad/code/kicad/issues/14170
2023-03-13 20:26:11 +00:00
Seth Hillbrand f0892598a4 Force initialization of board units
Unitialized variables are the devil's playground
2023-03-13 11:38:17 -07:00
Jeff Young b7a3b0967b Commenting. No functional changes. 2023-03-13 18:29:55 +00:00
Jeff Young 0fb1ccff21 Commenting and formatting. No functional changes. 2023-03-13 18:29:55 +00:00
Wayne Stambaugh 664e5629f2 Document board change event listener code. 2023-03-13 13:59:01 -04:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Jeff Young dc78797274 Support SHEET_PATH when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/14233
2023-03-12 22:24:06 +00:00
Jeff Young 5427100539 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:21:15 +00:00
Jeff Young c4ef08bead Exercise more caution with user filenames.
In particular, don't assume "1" is an extension in "Schematic_1.1".

Fixes https://gitlab.com/kicad/code/kicad/issues/14263
2023-03-12 15:52:45 +00:00
jean-pierre charras e6945a85b0 fix compil and Coverity warnings. 2023-03-12 15:19:50 +01:00
Jon Evans 8eaa3cfac9 Do not try to process invalid ratsnest nodes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14254
2023-03-11 16:12:10 -05:00
Jeff Young 74f064d3aa Don't keep smart pointers to wxWindows, particularly modeless ones.
wxWindows have their own lifecycle management.
2023-03-11 19:36:01 +00:00
jean-pierre charras a264608368 drc_test_provider_library_parity.cpp: fix a typo that crashes Pcbnew. 2023-03-11 15:01:26 +01:00
Jeff Young c9351dfd67 Drawing improvements for symbol & footprint diffs.
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
2023-03-11 12:45:16 +00:00
Seth Hillbrand d7a6875b0b 3dviewer: Show footprint board regardless of proj
The settings for the project in terms of visibility should not impact
our ability to preview the 3d model of a footprint

Fixes https://gitlab.com/kicad/code/kicad/issues/14246
2023-03-10 15:18:45 -08:00
Jeff Young 9546a40662 Correct usage of elipses after menu items.
(They should only be used when we collect more info before performing
the command.  If the command is something like showing the simulator,
then there should be no elipsis as we don't collect more info before
showing the window.)

Also improves a few of the menu tooltips.
2023-03-10 21:33:06 +00:00
Mike Williams b32ba16da4 UI: Add Numpad Enter as "Return" equivalent in missing places
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14244
2023-03-10 16:25:17 -05:00
Jeff Young 357427d803 Graphical diff for board vs library footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-10 17:16:40 +00:00
Ian McInerney a6ebd60c3b CMake: Modernize Boost import to use imported targets 2023-03-10 16:38:35 +00:00
jean-pierre charras bb27717dda DIALOG_BOARD_REANNOTATE: fix coding style issues. 2023-03-10 11:49:48 +01:00
jean-pierre charras 6fd79929be DIALOG_BOARD_REANNOTATE: fix some issues, and protect against bad settings.
Fixes #14234
https://gitlab.com/kicad/code/kicad/issues/14234
2023-03-10 10:46:55 +01:00