Commit Graph

12109 Commits

Author SHA1 Message Date
Johannes Maibaum 542c02046b Write through symlinks for schematics and PCBs 2021-06-07 20:59:59 +00:00
Seth Hillbrand 891e200fc8 Use Python to test for modules (not CPython)
CPython call requires Python 3.8+, so we work around to keep the 3.6
users happy

Fixes https://gitlab.com/kicad/code/kicad/issues/8554
2021-06-07 13:56:31 -07:00
Seth Hillbrand d4edc70f65 Remove magic numbers where possible
Constant scales will be pre-calculated during compilation, so we can
leave the actual formula in place without penalty
2021-06-07 13:56:31 -07:00
Jeff Young 3ff670d2a4 Disable ACTIONS::openPreferences for now.
wxWidgets needs to move the item to the KiCad menu on Mac, and it
can only find it if it has the id wxID_PREFERENCES.
2021-06-07 20:51:45 +01:00
jean-pierre charras 6cfc2755ed Remove a useless "#include wx/wx.h" from wx_html_report_panel.h 2021-06-07 09:26:13 +02:00
Jon Evans 49c5130123 PNS: Implement final cleanup pass for redundant colinear segs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-06 21:52:35 -04:00
Jon Evans 83080b67f5 Fix build on wx 3.0 2021-06-06 20:21:21 -04:00
Jon Evans 3c6b98a0d5 PNS: preserve auto-detected track width when changing via sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8046
2021-06-06 20:18:09 -04:00
Jon Evans 99710aba48 PNS: use slightly less greedy algo to reset the mouse trail 2021-06-06 19:47:52 -04:00
Marek Roszko 0bc0f2265e dialog_board_statistics.h shouldn't leak confirm.h 2021-06-06 19:34:53 -04:00
Jon Evans 6cb8154ec0 PNS: Remove code that broke width changes during placement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8334
2021-06-06 19:21:52 -04:00
Marek Roszko 5bb6f8c5e3 hashtables.h doesn't need eda_item.h 2021-06-06 19:11:35 -04:00
Marek Roszko 33bbf85a3e Use the parent frame GetSettings helper rather than including for Pgm() 2021-06-06 19:05:12 -04:00
Jon Evans 6789dac20b PNS: Keep most recent good placement around for a rainy day
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8562
2021-06-06 18:56:33 -04:00
Jon Evans c9bc45f7ed PNS: Limit the maximum walkaround distance factor
The constant chosen is somewhat arbitrary and may need
further tuning or a more complex algorithm, but in general
this will prevent churning when solutions can't be found or
a solution can be found but it is unrealistic (going around
the entire board)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8558
2021-06-06 16:03:03 -04:00
Jon Evans d32b9c1c25 Use debug group for line placer debug 2021-06-06 15:44:53 -04:00
Jon Evans f5185f6927 Revert part of the anti-churn change, it causes bad side-effects
Further performance tuning could be useful but the part that
remains helps the most when hugging in large designs
2021-06-06 15:44:53 -04:00
Marek Roszko 66640f6144 Try and fix fedora build 2021-06-06 15:30:42 -04:00
Marek Roszko 8377ebb0e1 Fix msvc warnings 2021-06-06 15:30:31 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Marek Roszko e4530fcf0d PCB_MARKER does not need pcb_base_frame 2021-06-06 15:03:42 -04:00
Jon Evans 5349f47f95 PNS: Prevent walkaround churn in unsolvable situations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8558
2021-06-06 14:57:52 -04:00
Jon Evans 3475d0cebd PNS: Grab start item based on clearance if no direct hits found
Fixes annoying "routing start point violates DRC" messages when
entering the router from the hotkey and not directly over a track.
2021-06-06 14:57:52 -04:00
Ian McInerney dc27079b71 cleanup tool event and tool action includes 2021-06-06 18:26:26 +01:00
Jeff Young 0d7e48d5b1 Coverity fix. 2021-06-06 17:57:46 +01:00
Jon Evans 17da050e69 Improve walkaround results when last point is inside the hull
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8563
2021-06-06 12:55:32 -04:00
Jon Evans be61bf29dd Use more accurate hull shapes for round solids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8561
2021-06-06 09:53:51 -04:00
Marek Roszko 581ba21865 Remove wx includes out of cadstar_archive_loader.h 2021-06-06 09:28:02 -04:00
Marek Roszko b610b905fc Cleanup track.h includes 2021-06-06 09:06:55 -04:00
Jon Evans 3b7480c1c1 PNS: Invalidate start/end items after finishing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8555
2021-06-06 08:52:39 -04:00
Marek Roszko 2d584ca5ec board_item.h already included via board_connected_item.h 2021-06-06 08:47:59 -04:00
Marek Roszko 17d680de08 netinfo.h does not need to be in board_connected_item.h 2021-06-06 08:45:38 -04:00
Marek Roszko 4712d7a918 Remove a leaky wx/msgdlg.h include 2021-06-06 08:45:38 -04:00
Marek Roszko e6c09b55a9 Remove unnecessary reporter.h include 2021-06-06 08:45:38 -04:00
Marek Roszko dd9b8a9f73 Remove pcbnew.h includes in headers 2021-06-06 08:25:28 -04:00
Jon Evans c9a660a80c Rework JSON integration to speed up build 2021-06-05 17:08:38 -04:00
Johannes Maibaum 06e967354f Fix symlink read-/write-through code
Use `realpath(3)` instead of `readlink(3)`, which offers support for
relative and absolute symlinks alike, since all symbolic links will be
resolved to the absolute path of the linked-to file.

Fixes #8082
2021-06-05 14:22:50 +00:00
david-beinder 86add3bb85 Fix MSVC C4312 warnings when casting 32bit ints to pointer types on 64bit builds 2021-06-05 02:57:51 +00:00
Jeff Young d32d107923 Fix local ratsnest tooltip to mention "toggle".
Fixes https://gitlab.com/kicad/code/kicad/issues/8415
2021-06-04 23:17:54 +01:00
Tomasz Wlostowski ab04e24f9a router: rhMarkObstacles should return a correct error status
Long story short: a few days ago I fixed error handling in routeStep(), so it actually started to recognize the wrong error status returned
by rhMarkObstacles() and think that the trace is always incorrect.

fixes: https://gitlab.com/kicad/code/kicad/-/issues/8557
2021-06-04 23:58:56 +02:00
Wayne Stambaugh f57ef55cd6 Pcbnew header housekeeping round 3. 2021-06-04 13:50:08 -04:00
Wayne Stambaugh c69c68a558 Pcbnew header housekeeping round 2. 2021-06-04 12:21:48 -04:00
Wayne Stambaugh 2a6c7a7c0f Pcbnew header housekeeping round 1. 2021-06-04 09:08:38 -04:00
Ian McInerney 2533fb22b3 Add the new pcb item container header to the SWIG wrapper 2021-06-04 12:49:11 +01:00
Jon Evans d8499e4914 I fixed the wrong typo in 6e272429, heh 2021-06-03 22:39:14 -04:00
Jon Evans 6e2724294a Fix typo in action description 2021-06-03 21:27:28 -04:00
Ian McInerney 0c879eead3 Cleanup headers in pcbnew pcad importer 2021-06-04 01:28:40 +01:00
Ian McInerney f94816fbd4 Cleanup wx includes in the filter reader 2021-06-04 01:26:58 +01:00
Seth Hillbrand 3d4ce0796e Add Gerber plot for SHAPE_ARC and SHAPE_LINE_CHAIN 2021-06-03 17:12:56 -07:00
Jeff Young 00791e1e37 Fix compile issues on clangd. 2021-06-03 23:41:06 +01:00
Marek Roszko 1c1ba25ffd Use char_str instead of c_str in previous commit 2021-06-03 18:13:35 -04:00
Marek Roszko daf510344f Fix build error due to pns changes 2021-06-03 18:05:48 -04:00
Marek Roszko 4e94b1fe86 Remove the universal sockets include 2021-06-03 17:59:46 -04:00
Jeff Young 6f5cb1f97d Fix printing of hidden refs and/or values.
IsLayerVisible() is patched to always return true when printing
(even when "print according to appearance settings" is checked, and
that's too risky to change at this point.  So we also look to see
if the layer colour is set to the background colour.

Fixes https://gitlab.com/kicad/code/kicad/issues/8548
2021-06-03 22:44:04 +01:00
Tomasz Wlostowski 63fc7a1908 router: support for drag/walkaround/shove for joints between lines of different widths.
fixes: https://gitlab.com/kicad/code/kicad/-/issues/1773
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski af26eab5fb router: even more debug in SHOVE 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski a744857267 router: fix array out-of-bound error in HullIntersection()
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8538
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski 3e98c44636 router: LOGGER now stores UUIDs, not pointers to BOARD_ITEMs.
Caused occasional crashes when saving the debug event log, as some of the BOARD_ITEMS could have been deleted before SaveLog call.
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski e5e588ebba router: temporarily export LINE::Walkaround() debug global variables 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski 70ed5c1ae8 router: introduce concept of 'virtual' vias as a base for shoving/dragging joints of lines of different widths. 2021-06-03 22:44:53 +02:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01:00
Ian McInerney 23f8851409 Remove pcb_group include from board header 2021-06-03 20:03:31 +01:00
Ian McInerney 7bbf1b07b7 Fixup to expose PCB_GROUP in Python 2021-06-03 20:00:45 +01:00
Jean-Samuel Reynaud e2e963d14a Adding PCB_GROUP to python interface 2021-06-03 18:55:46 +00:00
Jeff Young 49d65a0765 Fix some includes. 2021-06-03 18:33:59 +01:00
Wayne Stambaugh 7c14e4e967 Common widget header housekeeping. 2021-06-03 12:02:45 -04:00
Seth Hillbrand f40f696c37 Don't extract dp segment info from minimal-length
segments with 1IU of length are approximately parallel to everything and
the distance projections break down into rounding errors

Fixes https://gitlab.com/kicad/code/kicad/issues/8541
2021-06-03 08:44:17 -07:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko 7faee5eda5 Stop salt the eart with wxhtml.h 2021-06-03 07:49:49 -04:00
Ian McInerney d79dd39be3 Remove redundant headers 2021-06-03 02:19:36 +01:00
Ian McInerney 3ab69939f9 Remove wx.h from many files 2021-06-03 02:19:20 +01:00
Marek Roszko af2707929d Don't leak a wx header via eda_item.h
Turns out this provided the translation header globally :D
2021-06-02 19:18:48 -04:00
Ian McInerney 9a07b03b4c Replace boost::function with std::function 2021-06-02 18:39:43 +01:00
Seth Hillbrand 7f56ff4d42 Minor performance improvement
Don't keep searching the DRC RTree for collisions after we detect a true
(not clearance-based) collision
2021-06-02 08:15:37 -07:00
Jeff Young 00ed75b891 Fix DRC performance with multi-layer keepout zones.
The main issue was a parameter mismatch which caused On^2 behaviour
for zone layers.

But there are several other performance optimizations here, along
with status bar updating for zones while running the dissallow test.

Fixes https://gitlab.com/kicad/code/kicad/issues/8521
2021-06-02 14:11:43 +01:00
Marek Roszko eeb405c196 Cleanup some more excess math/util includes 2021-06-02 00:50:46 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Marek Roszko cfa2b57c68 Use logical OR to quiet static analyzer (no functional change) 2021-06-01 18:44:22 -04:00
Marek Roszko 65fee5b2ec Clear m_out pointer at end of save 2021-06-01 18:44:22 -04:00
Jeff Young d12e5d824e Renaming for clarity and a performance improvement in corner rounding. 2021-06-01 23:11:54 +01:00
Seth Hillbrand 208dd5cbd5 Cleanup string handling in fabmaster import
Avoids round-tripping std::string->c_str->std::string and makes a few
auto references explicit
2021-06-01 13:54:34 -07:00
Seth Hillbrand 63cc7d16b4 Repair board on open
We need to ensure that boards do not have duplicated KIIDs, so we repair
the duplicates when opening an existing file.  This does not change the
file on disk until saved
2021-06-01 13:39:59 -07:00
Seth Hillbrand e050d42658 Re-enable KICAD_SCRIPTING_WXPYTHON
This keeps wxpython behind a build flag for platforms (mingw) that do
not yet support it.
2021-06-01 20:18:24 +00:00
Seth Hillbrand 68a5d5dc01 Fix issue reloading plugins 2021-06-01 20:18:24 +00:00
Seth Hillbrand bbcc840989 Cleanup rebase fns 2021-06-01 20:18:24 +00:00
Seth Hillbrand 88e4b7f7c4 Update Python Helpers 2021-06-01 20:18:24 +00:00
Seth Hillbrand adf885b667 Move pcbnew swig
Separates the python scripts into those using swig and those needed for
other scripting
2021-06-01 20:18:24 +00:00
Seth Hillbrand bf1437899e Add Python Tool to pcbnew 2021-06-01 20:18:24 +00:00
Seth Hillbrand c7d188a8d0 Centralizing SCRIPTING class 2021-06-01 20:18:24 +00:00
Seth Hillbrand 192fbfd5e5 Finalize Python Frame 2021-06-01 20:18:24 +00:00
Seth Hillbrand 81d58bcea9 Working python window 2021-06-01 20:18:24 +00:00
Seth Hillbrand 6fbbba8db3 Adding Python shell KIFACE 2021-06-01 20:18:24 +00:00
Seth Hillbrand f274a00c08 Remove PYTHON_* compile options 2021-06-01 20:18:24 +00:00
Jon Evans 247da631f9 Revert "Fix typo and clean up leftover tracks"
This reverts commit ed66c0f14d.

Revert "Clean up co-linear tracks after finishing routing"

This reverts commit 1a102f03c0.

More complex solution needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8526
2021-06-01 11:18:00 -04:00
jean-pierre charras d7616fdca8 Fix a few compil or coverity warnings. 2021-06-01 09:04:37 +02:00
Jon Evans ed66c0f14d Fix typo and clean up leftover tracks 2021-05-31 22:42:56 -04:00
Jon Evans 1a102f03c0 Clean up co-linear tracks after finishing routing
This involved adding some extra infrastructure to be able
to handle the case where a track that is sitting in the
router's commit waiting to be added to the board actually
needs to be deleted instead.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8419
2021-05-31 17:36:38 -04:00
Jon Evans 6381ffd10a Fix diff pair coupling test when gap constraint is in a different rule
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8519
2021-05-31 10:13:05 -04:00
Jeff Young c4cabb38d5 More worksheet -> drawing sheet cleanup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8516
2021-05-31 12:26:44 +01:00
Jeff Young 0598c82972 Terminology (use present tense for flags). 2021-05-31 12:26:44 +01:00
Marek Roszko 1b94534451 Revert "Use lambdas to fix paste conditions"
This reverts commit 65c7c77c3d.
2021-05-30 21:25:42 -04:00
Marek Roszko 5c543b62c5 Cleanup: Use make_unique for the legacy plugin board deleter 2021-05-30 20:56:44 -04:00
Marek Roszko 65c7c77c3d Use lambdas to fix paste conditions
`SELECTION_CONDITIONS::Idle && ` was evaluating as always true because this was referencing the function pointer
2021-05-30 20:37:16 -04:00
Marek Roszko a7d1ef9927 Fix some more uninitialized warnings
From PVS Studio
2021-05-30 20:05:37 -04:00
Marek Roszko 382dca4e6f Fix uninitialized member warnings
Based on PVS Studio report
2021-05-30 20:01:01 -04:00
Tomasz Wlostowski 67f0bbc6d7 router: fixed crash in HullIntersection() when the path has 0 or 1 points.
fixes: 8515
2021-05-31 00:20:32 +02:00
Tomasz Wlostowski 614787caae router: clear head line geometry if current head routing failed + small improvement to follow-mouse optimization.
Also added a lot of verbosity for the pns-log-viewer tool.

Fixes: 8511
2021-05-31 00:18:42 +02:00
Tomasz Wlostowski dfd80e077c router: fix another corner case in LINE::Walkaround() (duplicated vertex triggered by feeding a closed loop as the input path)
fixes: 1775
2021-05-31 00:17:12 +02:00
Jon Evans 0da85ded2f PNS: Fix diff pair handling of microvias as start items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8514
2021-05-30 15:51:28 -04:00
Jon Evans b7f32d7f53 Clean up some layout of pages in Board Setup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8474
2021-05-30 14:04:00 -04:00
Tomasz Wlostowski fcb89b99a3 router: walkaround algo should not copy the previous via position when the current iteration via placement fails.
fixes: 7827
2021-05-30 00:35:58 +02:00
Tomasz Wlostowski af2e163890 router: annotate source locations of WALKAROUND debug items 2021-05-30 00:35:54 +02:00
Jeff Young 8e2fb1bdb9 Treat Cut like a Delete while in a Move.
Also fixes problem where second action wasn't getting executed because
the event was getting eaten.

Fixes https://gitlab.com/kicad/code/kicad/issues/8072
2021-05-29 22:10:43 +01:00
Jon Evans 3eb5a484e1 PNS: Don't clip tuning paths to pads on other layers
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8504
2021-05-29 15:52:44 -04:00
Jon Evans f6d6b7d263 Harmonize property names for zone/footprint/pad clearance and thermals
Use "override" instead of "local" for better clarity.
2021-05-29 14:12:23 -04:00
Jon Evans 28f17c3ae6 PNS: Prevent wrong clearance being cached for new diff pairs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8377
2021-05-29 13:31:17 -04:00
Jon Evans 85ca85652d Do not add debug items to view if debug flag isn't enabled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8510
2021-05-29 12:40:24 -04:00
Jon Evans bd59da3642 PNS: Local min distance has a minimum points requirement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8510
2021-05-29 12:40:24 -04:00
Jon Evans eff9746f34 CHANGED: Net highlight in PcbNew is now persistent to match Eeschema
CHANGED: Highlight net tool changed to highlight display toggle; moved to left toolbar
CHANGED: Multi-net highlight is now accessible when using the highlight net action
ADDED: Highlight Net and Clear Highlight actions to Net Tools context menu
ADDED: Default hotkey (Ctrl+`) for toggling net highlighting

The current and previous net highlight state are now stored and can be toggled
on or off with an action (no hotkey by default).

Highlight is now treated as a persistent state rather than a tool that is entered,
meaning there is no longer a special tool to enter in order to highlight nets.
Highlighting can be controlled while any other tool is active using the hotkeys
or context menu on a net object.

Tweak the icons for highlight net and layer display mode to better disambiguate them.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8250
2021-05-29 12:40:24 -04:00
jean-pierre charras 81c7fb61f8 Sub-menu "Preferences..." in main menu "Preferences": fix not working accelerator key.
Accelerator keys are disable in our WX_MENUBAR. A common ACTION_MENU is used and
"Preferences..." is now shown in Hotkeys list.
2021-05-29 18:09:49 +02:00
Tomasz Wlostowski ebd957b08e router: rework router's debugging infrastructure to be more compatibile with the 'qa/pns/pns-log-viewer' tool.
The log viewer tool lets you inspect all the intermediate stages of the routing algorithms. This patch:
- Adds source location tracking of the debug calls (need to use the PNS_DBG macro, sorry)
- Moves some wxLogTrace calls to DEBUG_DECORATOR::Message() so that messages can be displayed alongside the corresponding geometric shapes
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 132eb53a40 router: clean some debug clutter 2021-05-29 00:13:24 +02:00
Tomasz Wlostowski b3caa3c4d4 router: fix ordering of colliding hulls in NODE::NearestObstacle()
Replaced the generic SHAPE_LINE_CHAIN::Intersect() with PNS::HullIntersection() which correctly rejects
'non-penetrating' intersections.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski e66bbfd1ec router: improve the feel of the walkaround algorithm
Makes walkaround more 'huggy' - the trace being routed sticks to obstacles
instead of jumping around in uncontrollable way.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 8148b5d81f router: improvements in LINE::Walkaround()
- Fix walk failure if the input path starts on the hull boundary
  (happens very often during tight walkaround)
- Input line can have a loop at the end now. Such condition happens when the routing
  destination point lies inside the hull of a colliding primitive.
2021-05-29 00:13:24 +02:00
Tomasz Wlostowski d2ec3fc4ed router: P&S-specific hull/line interection function that correctly rejects segments/vertices that only touch the hull polygons without penetrating them 2021-05-29 00:13:24 +02:00
Tomasz Wlostowski 8c4361bbc6 router: adapt to new SHAPE_LINE_CHAIN::INTERSECTIONS structure 2021-05-29 00:13:24 +02:00
Seth Hillbrand 752ae4d519 Rename modification flag routines
Differentiates better between the EDA_ITEM IsModified(), referring to
items themselves changing and the EDA_SCREEN IsContentModified(),
referring to whether we have made any unsaved changes.
2021-05-28 12:07:04 -07:00
Seth Hillbrand b1dcf74042 Use standard "Untitled" name for files without names
Also translates to provide useful information regardless of language
2021-05-28 11:51:54 -07:00
Seth Hillbrand d7f219e98f Unify IsSave and IsModify
The flags and calls were used identically, leading to potential
confusion/bugs.  Testing for modification should go through
IsContentModified()
2021-05-28 11:51:54 -07:00
david-beinder 64cd401bdb Delete Tool: Fix missing "Item Locked" popup
Fixes problem identified in https://gitlab.com/kicad/code/kicad/-/issues/8392
Removes same popup from schematic tool because SCH_ITEM can not be locked
2021-05-27 05:38:51 +00:00
Jeff Young 4fb643df93 Update POINT_EDITOR when locking/unlocking via Hotkey/RMB.
Fixes https://gitlab.com/kicad/code/kicad/issues/8489
2021-05-26 16:03:35 +01:00
Seth Hillbrand ba73456d49 Allow point editor to persist
After drawing a graphic, allow the control points to persist when
exiting the tool.

The effect of this is to make the first "Esc" press a
"return-to-select-tool" event without modifying the selection or control
points from within the drawing tools.  The section "Esc" press, when in
the selection tool will clear the selection and the control points
2021-05-25 16:47:54 -07:00
Jeff Young 5c9a73aa5e Correct position for grid even when we're not snapping to a point.
Fixes https://gitlab.com/kicad/code/kicad/issues/8125
2021-05-25 21:57:19 +01:00
Jeff Young 0eed73ea73 Make PCB_POINT_EDITOR honour locked flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/8254
2021-05-25 18:13:24 +01:00
Jeff Young 5f22025611 Don't drop text on Edge.Cuts when plotting.
While -our- user model is that Edge.Cuts is just for edges, it's best
not to dictate a particular model to users.

ADDED a DRC error when text (or a dimension) appears on the Edge.Cuts
layer.

Fixes https://gitlab.com/kicad/code/kicad/issues/8470
2021-05-24 19:54:52 +01:00
Jeff Young 8f3343b9e3 Clear UUID paths of unmatched footprints even when not deleting.
Fixes https://gitlab.com/kicad/code/kicad/issues/8461
2021-05-23 22:50:11 +01:00
Jeff Young ab8428bd68 Naming conventions. 2021-05-23 22:21:34 +01:00
Jeff Young 9554aaee7f Can't use wxDD_MULTIPLE before 3.1.4.
Fixes https://gitlab.com/kicad/code/kicad/issues/8465
2021-05-22 22:19:37 +01:00
Jeff Young ee00d8386f Make sure dir case can handle multiple selection too.
Files case already can.

Fixes https://gitlab.com/kicad/code/kicad/issues/8465
2021-05-22 20:39:26 +01:00
Jeff Young baf868fce7 Add footprint repair tool (currently just for duplicate IDs). 2021-05-21 17:52:11 +01:00
Jeff Young 0d8a9a1091 Make sure that a tool never exits with autopan or capture.
Fixes https://gitlab.com/kicad/code/kicad/issues/8459
2021-05-21 14:53:58 +01:00
Jeff Young 3de60231db Allow clearance debugging of exact items in DRC violation.
ADDED: Run clearance resolution tool... RMB menu item to DRC
clearance errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/8438
2021-05-21 00:00:24 +01:00
Jeff Young e93e9fa3e5 Add rudimentary type checking to rule eval with reporter.
Also cleaned up existing error reporting to not expend CPU cycles
when there was no reporter.

Fixes https://gitlab.com/kicad/code/kicad/issues/8438
2021-05-20 23:06:24 +01:00
Jeff Young 4c3d78dec0 Break out separate holes-co-located violation.
Fixes https://gitlab.com/kicad/code/kicad/issues/8456
2021-05-20 10:36:56 +01:00
jean-pierre charras 60dbda9dd2 Pcbnew: try to fix an issue about frame title.
for Pcbnew, this issue (see bug 8404) is only seen on OSX.
So I am blindly trying to add to Pcbnew a fix made for Eeschema.
2021-05-19 17:28:15 +02:00
jean-pierre charras be3a08bfa7 Pcbnew printing: fix missing zones on non copper layers. 2021-05-19 10:05:49 +02:00
Jeff Young ed2f2257ce Remove footprint locking in the footprint editor.
(It doesn't make any sense there as the position is always {0, 0} in
the editor.)

For discussion see:
https://kicad.zulipchat.com/#narrow/stream/258851-Developer-Chat/topic/Is.20there.20a.20reason.20why.20kicad.20now.20seems.20to.20lock.20pads.3F
2021-05-18 23:14:17 +01:00
Simon Richter 810a717e4e Remove unused NETINFO_MAPPING member
The legacy plugin no longer implements saving, so no net code renumbering
is needed.
2021-05-17 11:54:06 +00:00
jean-pierre charras c33b2cfa8d PANEL_SETUP_MASK_AND_PASTE_BASE: fix another cosmetic issue.
On KDE, a text was truncated, although there is room to display it
2021-05-16 13:22:48 +02:00
Jeff Young 4c69a74505 Force layers visible when routing on them.
Fixes https://gitlab.com/kicad/code/kicad/issues/8432
2021-05-16 11:18:31 +01:00
jean-pierre charras 2354222188 Remove tool tips not related to the objects they are depending on.
Probably due to a too zealous copy/paste.
2021-05-16 10:03:12 +02:00
jean-pierre charras 057e2cd6b7 Pcbnew: fix some cosmetic issues in a few dialogs
Depending of Window managers, some texts were truncated.
Also avoid to write a sentence with the beginning in one widget,
and the end in another widget: it makes the sentence not translatable
2021-05-16 09:13:13 +02:00
Jeff Young 138a4b21c1 Smarten custom-pad-shape test for collapsing solder mask margins.
Fixes https://gitlab.com/kicad/code/kicad/issues/8413
2021-05-16 00:41:19 +01:00
jean-pierre charras d1061b9683 3D viewer: Fix broken handling of text thickness, thus creating erroneous item positions
Especially, texts having a not centered justification were shown with artifacts.
2021-05-15 13:18:06 +02:00
Jeff Young ccaf9e11df Load footprint info when there's no cache available.
Fixes https://gitlab.com/kicad/code/kicad/issues/8371
2021-05-14 22:24:21 +01:00
david-beinder 1642f0d784 Move microwave tools from toolbar to Place menu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8233
2021-05-12 02:34:52 +00:00
david-beinder 75f49ba1b6 Add length tuner settings to toolbar context menu 2021-05-12 02:34:52 +00:00
david-beinder 34145d8170 Add length tuning menu to vertical pcb toolbar 2021-05-12 02:34:52 +00:00
Jeff Young c49af57c2a Don't require a restart to get the current m_Live3DRefresh setting.
Fixes https://gitlab.com/kicad/code/kicad/issues/8349
2021-05-11 15:07:52 +01:00
Jon Evans bc6b9b527a Allow stackup height to be excluded from length calculations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8384
2021-05-10 22:11:58 -04:00
Jon Evans 5157c6c3b9 Use half copper thickness as the thickness of the start and end of vias
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8384
2021-05-10 21:48:50 -04:00
Jon Evans 64c76d8067 Hide unimplemented controls in length tuner settings
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8383
2021-05-10 21:40:52 -04:00
Jon Evans 1201ab5cac Clarify track segment length vs net length in message panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8396
2021-05-10 21:06:17 -04:00
Jon Evans ce01a28aad Don't double-remove nets when netcodes are reused
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8206
2021-05-10 19:52:19 -04:00
Jeff Young 7356f9568d Move grid disable modifier from ALT to CTRL.
Also had to move the H/V/45 disable modifier from CTRL to SHIFT.

Fixes https://gitlab.com/kicad/code/kicad/issues/8124
2021-05-09 20:17:40 +01:00
Ian McInerney 916a15793f Fix some OSX compiler warnings 2021-05-09 12:59:57 +01:00
jean-pierre charras a5ff27cae7 Pcbnew, EDIT_TOOL::GetAndPlace(): fix and issue, and allows execution only if
called inside the board editor.
Fix also a broken behavior: the current action was not cancelled, and if it is
called during a move items (when typing the 'T' key), items were broken.
The actual bug is the fact it is called also in fp editor and footprint wizard frame,
because it is part of EDIT_TOOL action list, common to fp editor, and should not.
But a full change is much more costly than just a filter.
2021-05-09 11:51:57 +02:00
Jeff Young b4b59c3b33 Fix uninitialized variable. 2021-05-08 20:49:51 +01:00
Jon Evans 1a45d9474b Don't show commands that cancel routing when routing is in progress
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8363
2021-05-08 14:55:02 -04:00
Wayne Stambaugh 6e017b475d Warn user before removing invalid rows from library table entries.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8080
2021-05-08 08:58:54 -04:00
jean-pierre charras aaffd0c137 Pcbnew: fix crash due to a not tested null pointer.
Fixes #8369
https://gitlab.com/kicad/code/kicad/issues/8369
2021-05-07 10:35:00 +02:00
Jeff Young e709e77870 Add missing locked setting to zone dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8255
2021-05-06 22:50:03 +01:00
Allan Nordhøy cda70a66c3 Spelling fix vrml->VRML
Closes https://gitlab.com/kicad/code/kicad/-/merge_requests/739
2021-05-06 21:55:36 +01:00
jean-pierre charras 1b9a8564af Pcbnew: fix incorrect PCB_TEXT::TextHitTest( const EDA_RECT& aRect,... ).
It was not taking in account the text rotation in block selection.
Fixes #8366
https://gitlab.com/kicad/code/kicad/issues/8366
2021-05-06 18:48:23 +02:00
Jeff Young 2e3860de6f Naming conventions. 2021-05-05 22:58:40 +01:00
jean-pierre charras 56058314be Fix minor Coverity warnings and minor compil warnings.
(uninitialized or shadowed vars)
2021-05-05 08:58:55 +02:00
Fabien Corona 094dd2e08c pcbnew : rotate relatively to selection center 2021-05-04 09:13:20 +00:00
Wayne Stambaugh 16bb45208a Fix save accelerator key handling when library tree has focus.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8247
2021-05-03 19:41:07 -04:00
Marek Roszko c7345096f8 Use wxFFileInputStream explicitly when loading xml documents
wxFFile (FILE, buffered) is better than wxFile (syscalls)
2021-05-03 19:39:56 -04:00
Tomasz Wlostowski 939b5e1932 PCB_EXPR_EVALUATOR: don't use string comparison to check for undefined enum values 2021-05-03 23:45:54 +02:00
Jeff Young d7e44b5181 Default delete-tracks-inside-pads to false.
Fixes https://gitlab.com/kicad/code/kicad/issues/8326
2021-05-03 19:48:24 +01:00
Roberto Fernandez Bautista f2677340f2 Access the new paste behaviour via a new Paste Special... dialog
ADDED Paste Special... action in pcbnew

CHANGED Additional options for Paste Special... in eeschema, including
"Assign unique reference designators to pasted instance"
2021-05-03 19:38:32 +01:00
Roberto Fernandez Bautista 98c8f43320 eeschema and pcbnew paste: consistent paste behaviour
Duplicates are reannotated on paste in the same way in pcbnew and
eeschema such that when copying and pasting the same block in the
pcb and schematic, the reference designators will match.
2021-05-03 19:38:32 +01:00
Roberto Fernandez Bautista ae009e0758 Ensure clipboard data is available after KiCad closes
Always Flush() after SetData()
2021-05-03 19:38:31 +01:00
Jeff Young 688ee18989 Don't apply margin to "interior" shapes in a shape-set.
Fixes https://gitlab.com/kicad/code/kicad/issues/8345
2021-05-03 12:12:03 +01:00
jean-pierre charras a6ad7a4a70 Python wizards: Fix a compatibility with "old" pythons scripts, after commit 21fde9b6.
Temporary fix until a full python API exists.
2021-05-02 16:06:11 +02:00
Marek Roszko c4801a4dd4 Catch oom for graphics importer
Because DXFs and SVGs could be nasty sized
2021-05-01 14:26:47 -04:00
Marek Roszko d4bb1cbc63 Make drawing sheet loading slightly smarter 2021-05-01 14:11:31 -04:00
jean-pierre charras f6f2284851 Fix missing includes on Linux after commit 0427bda7 2021-05-01 20:05:01 +02:00
jean-pierre charras 0427bda768 Remove useless wx/wx.h include, that create sometimes compil warnings on msys.
wx/wx.h includes all wxWidgets .h files, and sometimes creates collision
names in #define between kicad and windows headers
Moreover, blindly including a lot of useless files is compil time consuming
2021-05-01 19:32:15 +02:00
Marek Roszko 18ff8ea4a0 Try to catch memory allocation errors in pcbnew and eeschema 2021-05-01 13:11:10 -04:00
Marek Roszko 3a9a85b373 Enum class PAD_PROP_T
Renamed such that it does not affect python
2021-05-01 10:58:30 -04:00
Marek Roszko 03cf2b517f Enum class PAD_ATTR_T
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Marek Roszko e20562b09b Some cleanup 2021-05-01 10:37:20 -04:00
Marek Roszko b243c2280d enum class PAD_SHAPE_T 2021-05-01 08:22:35 -04:00
Marek Roszko 21fde9b629 enum class PCB_SHAPE_TYPE_T 2021-04-30 22:36:12 -04:00
Jeff Young 7df9fa0631 Diffpair gap should only override clearance within a coupled diffpair.
Fixes https://gitlab.com/kicad/code/kicad/issues/7975
2021-04-30 18:39:21 +01:00
Marek Roszko 6e874265fa Autosize all of the layer columns to ensure dpi match
Fix #8202
2021-04-29 20:01:07 -04:00
Jeff Young c149ed8905 Allow diffpair gap to override normal netclass clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/7975
2021-04-29 10:23:49 +01:00
Jeff Young 91421f9908 Separate logic for multi-select and click-select when filtering.
Also removes a bunch of old implementations of pad locking and
filtering which are no longer needed.  (They're now handled by the
uniform locking code.)

Also removes some of the auto-promotion logic.  Rotating a footprint
when a pad was selected is going to be surprising whether the pad
is locked or not.

Fixes https://gitlab.com/kicad/code/kicad/issues/8322
2021-04-29 00:07:35 +01:00
Marek Roszko 39a0bc6252 Remove erroneous block check in dxf import added during previous improvements 2021-04-28 18:48:59 -04:00
jean-pierre charras 4d9829ec8b Fix some issues related to python scripts:
- make PadArray.py compatible python2/3
- fix a wxWidgets warning in pcbnew_scripting_helpers.cpp shown in some cases
2021-04-28 14:02:47 +02:00
Seth Hillbrand 78b555afa2 Filter Select All event against hierarchy
Fixes https://gitlab.com/kicad/code/kicad/issues/8316
2021-04-27 16:58:45 -07:00
Tomasz Wlostowski a433451bd8 router: 'root line' tracking in the SHOVE algorithm. See comments for detailed explanation. 2021-04-27 14:13:16 +02:00
Tomasz Wlostowski 3a8744d054 router: introduce concept of a root lines in the OPTIMIZER.
By 'root lines' we mean the oldest traceable ancestor of each track moved by the router
(i.e. after shoving for a while, the root of each shoved line is it's latest non-shoved version).

With this we can teach the OPTIMIZER more tricks, such as the LIMIT_CORNER_COUNT constraint. It ensures
the results of the optimization will not be less cornery than the original line, reducing the feeling
of the optimizer being too intrusive.
2021-04-27 14:13:16 +02:00
Tomasz Wlostowski 76f8861e6e router: revert Seth's arc adjustment in StartDragging().
Fixes picking the last segment instead of the last vertex to drag (when one is requested).
I didn't notice any behaviour change of the dragger wrs to arcs.
2021-04-27 14:13:16 +02:00
jean-pierre charras 524ca442f3 Old python scripts: fix issues due to code change, and make them Python3/3 compatible 2021-04-27 11:55:56 +02:00
jean-pierre charras b63c482347 Fix a link issue with pcbnew_wrap.cxx (MSYS + Windows 64 bits specific)
For some reason the .cxx file generated by SWIG cannot be linked if compiled
with debug options.
It creates a *lot* of not found symbols. So compile it with release mode (MSYS only)
2021-04-27 07:40:34 +02:00
Jeff Young 5bf37a9b24 Don't allow selection crossing a parent/child relationship.
Fixes https://gitlab.com/kicad/code/kicad/issues/8292

Fixes https://gitlab.com/kicad/code/kicad/issues/7255
2021-04-26 18:47:44 +01:00
Jeff Young b65b1f8e9c Revert NPTH commit, and add some comments. 2021-04-26 17:33:49 +01:00
Jon Evans 7afc3f7df9 Rearrange track width button to be more obvious
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8300
2021-04-25 19:58:11 -04:00
david-beinder cbe8b1644a Fix segfault after using group properties dialog
Fixes https://gitlab.com/kicad/code/kicad/issues/8302
2021-04-25 22:15:19 +02:00
Jeff Young d2b6050792 Minor dialog spacing adjustment. 2021-04-25 19:26:05 +01:00
Jeff Young e6bf922a77 Make sure connectivity is locked for zone filling.
See 1e33928b96
for the original addition and rationale.
2021-04-25 18:09:53 +01:00
Jeff Young e3eacafbcb Run hole clearance tests on NPTH pads, but not copper clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/8295
2021-04-25 17:55:43 +01:00
Jeff Young b7279c0bab Don't allow rounding errors to flag DRC violations in hole2hole.
Fixes https://gitlab.com/kicad/code/kicad/issues/8295
2021-04-25 17:55:43 +01:00
Jeff Young 517bcb15b1 Formatting. 2021-04-25 17:55:43 +01:00
Jeff Young 953f579d59 Keep dialog fields in sync with dummyPad values.
Fixes https://gitlab.com/kicad/code/kicad/issues/8294
2021-04-25 14:19:38 +01:00
jean-pierre charras 93d42e9902 Pcbnew: Fix crash when importing a netlist created by a 5.1 Eeschema version.
Fixes #8293
https://gitlab.com/kicad/code/kicad/issues/8293
2021-04-25 15:13:55 +02:00
Jeff Young eb85836234 Make sure we have footprint courtyards before depending on DRC rules.
Fixes https://gitlab.com/kicad/code/kicad/issues/8291
2021-04-25 12:45:06 +01:00
Jeff Young 1e8b23402c Bump board format version for locked syntax fix. 2021-04-24 19:11:17 +01:00
jean-pierre charras e27733587d Fix 2 minor Coverity warnings. 2021-04-23 19:57:36 +02:00
jean-pierre charras 3be17ceb50 PANEL_SETUP_TRACKS_AND_VIAS: fix UI issues.
Fixes #8264
https://gitlab.com/kicad/code/kicad/issues/8264
2021-04-23 10:58:59 +02:00
Jon Evans 7569fc8aad Bring back live move of footprint in 3D view if live refresh is on
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8220
2021-04-22 22:32:41 -04:00
Jon Evans 263e026ac4 Initialize grid visibility in appearance panel constructor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8266
2021-04-22 22:10:55 -04:00
Jonathan Haas 075bd788eb Remove unused OBSTACLE_VISITOR::m_extraClearance 2021-04-23 01:53:09 +00:00
Jon Evans 3e96fb851c Give diff pair toolbutton a menu also
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8233
2021-04-22 21:37:15 -04:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Wayne Stambaugh 54e18f6b1f Pcbnew: remove update schematic option for geographical annotation dialog.
REMOVED: Update schematic option from geographical annotation dialog due
to potential issues with incomplete and/or broken updates.  Use "Update
Schematic from PCB" tool to update reference designation changes.

Forcing the footprint reference designator changes back to the schematic
without checking any other board changes in the schematic could leave the
schematic in a undefined state.  The update schematic from board tool is
the correct method to sync any changes from the board.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8042
2021-04-22 12:45:59 -04:00
Jon Evans cf47d665ea PNS: Dragged line needs to retain width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8246
2021-04-22 09:04:41 -04:00
Jon Evans 9b1890606d PNS: Do not allow resolved optimal values to go below board minimums 2021-04-21 22:43:26 -04:00
Jon Evans ae113ea299 DRC: inDiffPair should return false if the coupled net is missing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8268
2021-04-21 22:41:17 -04:00
Jon Evans e7d3bf29aa Don't save project for legacy board without explicit action
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7368
2021-04-21 21:27:23 -04:00
Jeff Young e5d029af6b Margin layer missing from some edge clearance tests.
Fixes bug reported on KiCad Forums.
2021-04-21 21:58:47 +01:00
Jeff Young 61ce1b35ec R/W dimension lock flags and update format for all lock flags.
Fixes https://gitlab.com/kicad/code/kicad/issues/8255
2021-04-21 19:59:27 +01:00
Jeff Young 3b049b32cf Show if pads, zones, and dimensions are locked in the status bar.
Fixes https://gitlab.com/kicad/code/kicad/issues/8255
2021-04-21 19:58:18 +01:00
Adam Wolf 25e2f35308 Remove no-longer-needed macOS wxPython things. 2021-04-21 12:50:31 +00:00
Adam Wolf a06f0ca908 Clean up macOS Python3 paths 2021-04-21 12:50:31 +00:00
Adam Wolf 7357424efc Update macOS to Python 3, wx 3.1, and Phoenix.
This is a work-in-progress.  It could use testing while I continue to fix
the remaining pieces.

There are some changes that will be needed for signing and notarization.

This currently relies on a Python tool I wrote (dyldstyle) to fixup
KiCad.app correctly. I would like any bundle fixing necessary to use a
built KiCad on macOS to live inside KiCad, rather than in
kicad-mac-builder or elsewhere.  While I was experimenting, I found this
worked, however, and I would love to get extra hands testing.

I added a CMake argument, MACOS_EXTRA_BUNDLE_FIX_DIRS, for devs and
packagers who have extra directories they need to add to
fixup_bundle on KiCad.app.

There's an issue about differing behavior when KiCad is opened via
the command line or via Finder/launchd.
2021-04-21 12:50:31 +00:00
Jon Evans c973a447df Make sure board netinfo list is updated when net inspector renames a net 2021-04-20 21:15:42 -04:00
Jon Evans cbd7d698a9 Fix diff pair error message suffix suggestions
We accept diff pairs that end in N/P, no underscore required
2021-04-20 21:08:34 -04:00
Jon Evans 8792d7288d Net inspector: Fix calculation of via length
We have a function for this in the BOARD_STACKUP now, and it returns
a more correct number (excluding the start and end copper layers)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8256
2021-04-20 20:03:38 -04:00
Jon Evans 2535daf661 PNS: Account for via stack height in diff pair length tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8256
2021-04-20 19:31:10 -04:00
Wayne Stambaugh a7f956581c Pcbnew: fix board file formatting issues.
This does not required a board file version change.  All of the changes
are white space formatting fixes and improvements.
2021-04-20 10:18:31 -04:00
Marek Roszko ce3a84f579 Consolidate wx aui dock art color setting 2021-04-19 21:12:02 -04:00
jean-pierre charras ba3f0d5d07 Fix a wxWidget assert and a minor wxWidgets alert 2021-04-19 15:01:00 +02:00
jean-pierre charras 287b0eea0f TRACK::GetMsgPanelInfo(): For arc, display shape ("TRACK (arc)") and radius.
Also display "TRACK (arc)" in DRC error message, instead of just "Track".
2021-04-19 10:00:46 +02:00
Jon Evans dd828bd964 PNS: Bring back original Highlight Collisions behavior
From discussion with Tom, Jeff, and Wayne, it appears as though
we all agreed that Highlight Collisions should behave like it
did in 5.1, which is to say, always just highlight collisions,
never prevent them.  The Allow DRC Violations checkbox just
controls whether or not you can fix/commit the head line if it
has violations; you are not prevented from moving the head
line to violating positions in any case.

Right now, there does not seem to be much demand for a separate
"Stop at First Obstacle" mode since Walkaround basically does that
but better, but we agreed that if there is demand for it in the
future, it should be implemented as a new router mode rather than
a behavior of Highlight Collisions mode controlled by the Allow
DRC Violations checkbox.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/7828
2021-04-18 21:01:07 -04:00
Tomasz Wlostowski 4538d78828 router: fix via shoving regression. 2021-04-19 00:43:30 +02:00