Commit Graph

11272 Commits

Author SHA1 Message Date
Seth Hillbrand fb5cd22cd0 Honor locking in cleanup ops
Assume that the user has locked tracks/vias for a reason and would very
much like them to remain in place, regardless of the operation

Fixes https://gitlab.com/kicad/code/kicad/issues/7562
2021-02-16 10:20:45 -08:00
Jeff Young 015c4d5779 Don't force disallow tests to a particular layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/7552
2021-02-16 16:24:37 +00:00
Jon Evans 14cba9723f Allow selection filtering in global Pcbnew edits also 2021-02-15 22:14:28 -05:00
Seth Hillbrand 9212197c26 Grammar 2021-02-15 15:18:13 -08:00
Jeff Young 199ef61cdc A footprint isn't "inside" itself.
Fixes https://gitlab.com/kicad/code/kicad/issues/7549
2021-02-15 22:52:12 +00:00
Seth Hillbrand de7d9ef874 Fix tabs 2021-02-15 08:09:20 -08:00
Jeff Young cf42d692bf Remove some dead code. A little bit of comment cleanup as well. 2021-02-15 14:13:43 +00:00
Jeff Young b08862e445 Fix group undo/redo bugs.
1) Don't remove items from group when the group is being deleted as
well.  We need those pointers for undo/redo.
2) Flip the GROUP/UNGROUP undo status when undoing/redoing group and
ungroup actions.
3) Remove PCB_GROUP_T from the rebuild-netlists section.  Nothing
about an item's group/ungrouped status changes its netlisting.
4) Add PCB_PAD_T to the rebuild-netlists section.  It can probably
only happen in the footprint editor where we don't care about
netlisting, but it's conceptually more correct and who knows what
might change in the future....

Fixes https://gitlab.com/kicad/code/kicad/issues/7540
2021-02-15 14:13:43 +00:00
Jeff Young 6ee5476fba Remove misleading help text for now.
Fixes https://gitlab.com/kicad/code/kicad/issues/7536
2021-02-14 23:51:51 +00:00
Jeff Young b7672d3c92 Respece router Allow DRC Violations in free via placer.
Also don't check for collision on non-copper layers, but do check
for hole clearance violations.

Fixes https://gitlab.com/kicad/code/kicad/issues/7532
2021-02-14 22:32:12 +00:00
Jon Evans 1ab17dd2e7 MSVC: don't set python home when running from build dir
This allows you to specify your python home via the
environment and get a working python setup when running
in-place.
2021-02-14 09:34:25 -05:00
Jeff Young 60d4d5b846 Scale down netnames on tracks so overbars fit.
Also fixes a bug where the overbar ignored the color opacity.

Fixes https://gitlab.com/kicad/code/kicad/issues/7524
2021-02-14 12:15:26 +00:00
Mikolaj Wielgus 379c28340f Pcbnew: Do not disable grid snap in copy to clipboard operation
This simple commit makes the Pcbnew copy to clipboard operation snap the
obtained cursor position to grid before the anchors are calculated. This
is also the way the move operation has been apparently working so far.

To be clear, this will not remove all cases where the copy reference
point is not aligned to the grid (see the linked Gitlab issue for
details about the problem). This will still occur for zone outlines that
are not axis-aligned. But such behavior has been so far also present in
the moving operation, so this may be as designed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7507
2021-02-14 01:44:28 +00:00
Seth Hillbrand 55db1aa5f5 Fix minor Fabmaster issue 2021-02-13 16:32:39 -08:00
Jon Evans d98daad835 Fix updating of preset MRU when overwriting presets
Also fix a few minor things about deleting presets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7473
2021-02-13 11:33:01 -05:00
Jon Evans 00ab36092c Fix margin layer being missing from draw order
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7159
2021-02-13 10:40:09 -05:00
Seth Hillbrand 8c2fe42ef0 More Undo/Redo Cleanup.
Don't need the reference point or container action type.  Clearing this
command signatures to prevent future confusion/use
2021-02-12 11:26:48 -08:00
Seth Hillbrand d244c09680 Cleanup undo/redo
Mirror/Rotate/etc were all just "Change" items in the undo/redo stack.
This removes the old calls
2021-02-12 10:25:14 -08:00
Jon Evans ab34d94f36 Add a less-intrusive validation system to board setup
For some kinds of issues, we want a way to point them out but
we don't need to keep the user from being able to close the
dialog.  A separate Validate button lets the user check for
issues if desired, but these issues are not "fatal" and can
be ignored if the user wishes.
2021-02-11 22:19:46 -05:00
Jon Evans b708fd36ae Add tooltips to netclass setup panel column headers
Change router tooltips to be more straightforward
2021-02-11 20:50:26 -05:00
Seth Hillbrand 10442b98df Unify thickness
The removal of the pcbnew general section was meant for v6 but passed
the deadline.  This removes the duplication of thickness.  We do not
allow the thickness to be different between nominal and stackup, so
keeping separate text fields is unnecesarily confusing to users
2021-02-11 11:28:00 -08:00
Marek Roszko 20ec1fa354 Clear pythonpath and pythonhome vars on msvc like msys2 does 2021-02-10 23:58:58 -05:00
Marek Roszko 39c8922ff6 Block off setting pythonhome and pythonpath wrongly on MSVC 2021-02-10 23:54:35 -05:00
Marek Roszko b21da9672f Adjust py_sethome for the new path 2021-02-10 21:44:33 -05:00
Mikolaj Wielgus 1dc0ef01b3 Fix automatic wire tool in gridless mode
The automatic wire tool was not working in the gridless mode because the
grid snapping on/off logic present in `EE_GRID_HELPER`, based on the
value of `m_enableGrid`, was not taking into account that another check,
but for the global KiCad setting, would be performed in the `Align()`
method, which is inherited from `GRID_HELPER`.

I've modified all tests of `m_enableGrid` value to also take the global
setting into account, and moved checks for it to `Align()` method, as
it's more consistent this way.

I've also removed an override of the `Align()` method in the
`PCB_GRID_HELPER` class, as it was made redundant by my changes.

Fixes https://gitlab.com/kicad/code/kicad/issues/7402
2021-02-10 22:07:49 +00:00
Jeff Young 05ff0fb658 Add flip board view to footprint editor menu.
Fixes https://gitlab.com/kicad/code/kicad/issues/7484
2021-02-10 21:55:14 +00:00
Roberto Fernandez Bautista 19d786852a CADSTAR PCB Archive Loader: Fix loading of zero sized pads
Some CADSTAR designs use zero sized pads because CADSTAR did not allow
arbitrarily assigning pad numbers: they had to be sequential. The
workaround to this was to use zero sized pads. However this causes DRC
errors in KiCad, so we load them just in a mask layer.
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista aabe9c063f CADSTAR PCB Archive Loader: Some fixes to design rules
1. Make sure to convert to KiCad units
2. There are some KiCad rules that have no CADSTAR equivalent.
   Make a guess as to what an appropriate rule could be.
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista 2d66abdc89 CADSTAR PCB Archive Importer: More improvements to loading of zones
Adds a new function Area() to SHAPE_POLY_SET
2021-02-10 18:49:21 +00:00
Roberto Fernandez Bautista 06c420a2a3 CADSTAR PCB Archive Importer: Improve loading of zones
Load fill state and guess zone priorities from fill state
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 80d8974f87 CADSTAR Archive Importer: Fix loading of non-cadstar font text sizes
Non-cadstar fonts use a width of 0.
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista f559e94b00 Non-Kicad Project Importers: Fix the creation of project fp libraries
Adds a new function to PLUGIN GetImportedCachedLibraryFootprints() that
loads the library footprints of the board design that was imported
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7449
2021-02-10 18:49:20 +00:00
Roberto Fernandez Bautista 297ff282f1 CADSTAR Importer: Update copyright years and remove white spaces 2021-02-10 18:49:20 +00:00
Jeff Young 20338c92e8 Move Flip board view to a shared tool (for FP Editor).
Fixes https://gitlab.com/kicad/code/kicad/issues/6687
2021-02-10 17:06:19 +00:00
Jeff Young 4679682fe9 Don't treat success == true as "we got an outline".
It just means the outline wasn't malformed.  It might still be
empty.

[Edit: my fix collided with JP's, so all this really is now is a
couple of slight performance improvements.]
2021-02-10 12:38:06 +00:00
Jeff Young 05d2053ded Put MSW bug fix back in. 2021-02-10 12:37:13 +00:00
jean-pierre charras d738c91dd7 minor fix in DIALOG_SYMBOL_PROPERTIES: make m_cbPreservePads ON the default
Keep Through Hole pads on external layers should be ON by default, because
such a pad does not allow soldering/unsoldering, if this option this option is OFF
Also rename dialog_enum_pads.fbp as dialog_enum_pads_base.fbp, as usual
2021-02-10 12:47:11 +01:00
jean-pierre charras 5079881f3f BuildFootprintPolygonOutlines(): fix incorrect outlines when no pad in the footprint.
It is used in 3D viewer to build a "board" polygonal outlines.
The polygon was empty when no pad and no item on ede cuts found (i.e. logos)
Fixes #7448
https://gitlab.com/kicad/code/kicad/issues/7448
2021-02-10 08:45:17 +01:00
Marek Roszko 872184fe8b Revert "Bump minimum required CMake version to 3.10"
This reverts commit a475f45753.
2021-02-09 18:46:13 -05:00
Seth Hillbrand 09be44a352 Use Jeff's method+font for monospace 2021-02-09 12:14:17 -08:00
Seth Hillbrand 505844f68c Generalize the Ctrl-Q to all frames
Rather than adding our handler to each frame separately, we initialize
the Ctrl-Q quit action at the base frame to be consistent
2021-02-09 11:43:42 -08:00
Jeff Young 65c41cff42 Another way to set fixed-width font (that works on OSX). 2021-02-09 18:46:04 +00:00
Wayne Stambaugh 5ecef204cd Coding policy fixes.
Using "this->" violates coding policy section 2.7.
2021-02-09 11:35:43 -05:00
Jeff Young a49a6c2f52 Refresh zone layers when copper layers change opacity.
Fixes https://gitlab.com/kicad/code/kicad/issues/7468
2021-02-09 12:26:46 +00:00
Jeff Young 618e824b0f Cleanup includes and formatting. 2021-02-09 12:26:46 +00:00
Seth Hillbrand 6f0424d742 Use monospace font for textboxes
Matches the spacing of our stroke font so the tabs are correctly
displayed in WYSIWYG

Fixes https://gitlab.com/kicad/code/kicad/issues/1807
2021-02-08 15:59:58 -08:00
Jeff Young e2f8b1a4b1 Interpreting wxDialog::ShowModal()'s retval as bool is never what you want.
Fixes https://gitlab.com/kicad/code/kicad/issues/7454
2021-02-08 17:40:57 +00:00
Mikolaj Wielgus 5aaedd86ed Add "Limit graphic lines to 45 deg" to line drawing tool context menu
Fixes https://gitlab.com/kicad/code/kicad/issues/7181
2021-02-08 16:20:38 +00:00
Jeff Young 6272b48481 Make sure layer gets passed in to rules evaluation. 2021-02-08 14:53:49 +00:00
Jeff Young 7aa7e3fd43 Push undo/redo blocking down a level in LengthTuner tool.
This way it's active only while tuning a single line, rather than
while the tool is selected.

Fixes https://gitlab.com/kicad/code/kicad/issues/7462
2021-02-08 14:15:46 +00:00
Simon Richter a475f45753 Bump minimum required CMake version to 3.10
This allows us to remove even more workarounds
2021-02-08 12:23:08 +00:00
jean-pierre charras 34d7c3e31f fp shape, ARC: fix incorrect arc end position after flipping/mirroring.
Add also comments in FP_SHAPE::SetAngle() to avoid a similar issue.
2021-02-08 10:11:04 +01:00
Seth Hillbrand 81b83a8f5b Remove unused line width parameter 2021-02-07 17:11:05 -08:00
Seth Hillbrand 792904557e Remember Parent data when routing
Keeps parent information such as UUID and pad removal options for
elements that are just updated in routing rather than created fresh or
fully destroyed.

Fixes https://gitlab.com/kicad/code/kicad/issues/7460
2021-02-07 17:08:43 -08:00
Jeff Young 0ca76571ce Add footprint zones to paste routine.
Fixes https://gitlab.com/kicad/code/kicad/issues/7442
2021-02-07 11:50:59 +00:00
Thomas Pointhuber 088ff5b2bb altiium: set fill version, which allows us to do a copper pour without a line 2021-02-06 23:58:30 +01:00
Michael Kavanagh 7cc28a5a02 Shrink appearance manager bitmap buttons to 16x16
Finish off 38cc2f106b
2021-02-06 22:51:56 +00:00
Thomas Pointhuber 8ee6694c57 altium: Set smaller zone MinThickness by default to better account for missing design rules 2021-02-06 23:45:28 +01:00
Thomas Pointhuber d444ed80a5 altium: parse Regions6 to fill zone on import 2021-02-06 23:06:59 +01:00
Seth Hillbrand 624a231cc0 Remove unused line width option
You had to set the line width in the SVG export dialog in order to
change the displayed line width in the 3d viewer.  The line width did
not affect the SVG export.  Removing in favor of the Board design
settings for line widths
2021-02-06 06:44:53 -08:00
Jeff Young c2dbd28101 Simplify and harmonize symbol editor and footprint editor menus.
Some differences are due to difference between libraries being files
in symbol editor and directories in footprint editor, but this unifies
most of the rest.

It also dispenses with the save-to-library vs save-to-document distinction
in the GUI because it makes for too much variability in the GUI, was
implemented differently between the two editors, and isn't needed as much
anymore now that we have the highly visible infobar.

There was also an issue that the save-to-board icon occupies the same
location and has the same size/shape/colours as the Board Setup icon in
PCBNew.

Fixes https://gitlab.com/kicad/code/kicad/issues/7215
2021-02-06 14:33:16 +00:00
Jeff Young 49a09f4c1c Pad selectability fix.
Physical layer test needs to be board-visible-layers, not pad-layers.

Also cleans up the tests so that LOD factors in.  (When things
disappear due to zoom level they should not be selectable.)

Fixes https://gitlab.com/kicad/code/kicad/issues/7238
2021-02-06 13:57:40 +00:00
jean-pierre charras d2213708eb FOOTPRINT_WIZARD_FRAME: minor fixes.
Fixes #7435
https://gitlab.com/kicad/code/kicad/issues/7435
2021-02-06 08:10:13 +01:00
Seth Hillbrand 016bffc899 Remove some more unneeded atof() calls 2021-02-05 10:18:34 -08:00
qu1ck 5c3ee0443c Make footprint properties accessible from python
Now that footprint properties inherit custom fields from schematic
they are very useful.

Setting custom properties from python will also be handy in plugins
that need to somehow mark their own objects.
2021-02-05 02:31:48 +00:00
Seth Hillbrand 2e67cd2db8 Fix locale issue in Fabmaster import 2021-02-04 16:32:02 -08:00
Seth Hillbrand 55a6013a32 Remove errant printf 2021-02-04 15:58:59 -08:00
Seth Hillbrand aa0db969ca Caching ConvexHull routine
Stores a cache of the convex hull similar to the bounding box.  Modifies
the hull based on actions to allow  complex footprint graphics without delay

Fixes https://gitlab.com/kicad/code/kicad/issues/7341
2021-02-04 15:56:52 -08:00
Jeff Young 78ba87be8f More explicit error message for unconnected items. 2021-02-04 22:47:37 +00:00
Jeff Young 7b9700d871 Convert insideArea test for zones to be "any copper inside".
The test used to be "entire zone inside", but that didn't work when
we use it to implement "copper pour" keepout areas.

Fixes https://gitlab.com/kicad/code/kicad/issues/7420
2021-02-04 13:43:50 +00:00
jean-pierre charras 0de3d48db5 typo 2021-02-04 09:00:35 +01:00
Jon Evans 721bf82603 Handle malformed lines in dragCornerInternal
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7398
2021-02-03 20:55:22 -05:00
Jon Evans f7e21682ec Update model in APPEARANCE_CONTROLS::SetObjectVisible
Don't make the caller remember to do so
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7411
2021-02-03 20:18:13 -05:00
Jeff Young da8d0472f5 Layer must be between 0 and PCB_LAYER_ID_COUNT. 2021-02-04 01:00:20 +00:00
Jon Evans 3ac5fd6342 Get rid of wx popups when opening a read-only project 2021-02-03 19:17:32 -05:00
Jon Evans b314e0828c Don't create project files unconditionally when importing boards
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7368
2021-02-03 19:17:32 -05:00
Jeff Young 065a16b48c Careful that we don't move the wrong end of the arc.
Fixes https://gitlab.com/kicad/code/kicad/issues/7409
2021-02-03 23:53:11 +00:00
Jeff Young 90b3d0c96d Implement TransformShapeWithClearanceToPolygon for DIMENSIONs.
Fixes https://gitlab.com/kicad/code/kicad/issues/6890
2021-02-03 23:34:17 +00:00
Jeff Young e26c912b86 Don't apply electrical clearance to non-copper zones.
Also removes a very old (and somewhat confusing) comment.

Fixes https://gitlab.com/kicad/code/kicad/issues/7404
2021-02-03 11:56:43 +00:00
Jeff Young 6dee7f30fa Whack-a-mole on another case of "module". 2021-02-03 10:53:24 +00:00
Seth Hillbrand 22d78a5827 FABMASTER: Handle flipped custom pads and rounded rects
Adds error messages for more cases and fallback for custom pads to
prevent invalid pad generation
2021-02-02 19:33:18 -08:00
Roberto Fernandez Bautista c25cab0cf8 Fix typo 2021-02-03 01:55:05 +00:00
Roberto Fernandez Bautista 9aedeae5c3 Don't log error messages when using the clipboard
wxClipboard::GetData()and wxClipboard::SetData() both log a "wxLogSysError" error-level message (see for example:  https://github.com/wxWidgets/wxWidgets/blob/v3.1.4/src/msw/clipbrd.cpp#L703 ). This logged message gets displayed as a messagebox to the user.

The logging can be disabled temporarily by creating a wxLogNull object. See https://docs.wxwidgets.org/3.0/classwx_log_null.html

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6956
2021-02-03 01:55:05 +00:00
Jeff Young 46658076bd Minor cleanup. 2021-02-02 22:55:18 +00:00
Jeff Young d7ddc62d7e Fix mouse warping and dialog placement for layer switcher.
Fixes https://gitlab.com/kicad/code/kicad/issues/2607
2021-02-02 17:20:01 +00:00
Jeff Young b8e97bb6b6 Only apply B&W printer fixes when printing.
Fixes https://gitlab.com/kicad/code/kicad/issues/7388
2021-02-02 15:37:30 +00:00
Jeff Young 90519c8324 Allow pads with holes to be selected when hole is visible. 2021-02-02 14:23:29 +00:00
Jeff Young d261fa3792 Make sure items are removed from groups when deleted.
Fixes https://gitlab.com/kicad/code/kicad/issues/7387
2021-02-02 14:23:29 +00:00
jean-pierre charras c98c7cf200 Fix minor wxWidgets alerts 2021-02-02 10:01:19 +01:00
jean-pierre charras e3e03e09d0 detect_file_type(): update detection to handle last change in .kicad_mod files
These files can start now by "(module" or "(footprint".
2021-02-02 09:53:30 +01:00
Marek Roszko 9695717a46 Fix assert in SwapItemData 2021-02-01 19:29:58 -05:00
Marek Roszko ee2c5bb489 Remove memory leak when importing settings for a board 2021-02-01 19:23:23 -05:00
Jeff Young 8f4d2cf33b Fix typo in footprint flip code.
Fixes https://gitlab.com/kicad/code/kicad/issues/7224
2021-02-02 00:07:29 +00:00
Jeff Young 8571687f51 Upgrade place via tool to new DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/7358
2021-02-01 23:00:13 +00:00
Seth Hillbrand 29632e8b6f Include footprint center as snap point
Only when footprint center isn't approximate the footprint origin as
well.  This can help when moving/aligning THT footprints

Fixes https://gitlab.com/kicad/code/kicad/issues/7385
2021-02-01 12:03:26 -08:00
Seth Hillbrand 54f5a47208 Remove confusing GetFirstPad() call
This no longer returns the first pad, just the first by pad sort order
in output.  The call is not used correctly in pcbnew, so removing to
prevent future misuse
2021-02-01 12:03:26 -08:00
Seth Hillbrand 23c6dbff38 Need to check track/track clearance
The misplaced else prevented non-track/track intersection clearances
from being reported

Fixes https://gitlab.com/kicad/code/kicad/issues/7376
2021-02-01 10:08:27 -08:00
Jeff Young 1f27b7e7df Don't render hole walls when no physical layers are visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/7369
2021-02-01 17:14:30 +00:00
Marek Roszko dc4b73fcef Correct m_board check location in PNS_KICAD_IFACE_BASE::SyncWorld 2021-02-01 11:58:22 -05:00
Marek Roszko 9d0b16e814 bool/int type safety 2021-01-31 19:54:32 -05:00