Commit Graph

12015 Commits

Author SHA1 Message Date
Jon Evans de4eb1fcef Convert to zone: take dest layer from editor active layer
Show non-copper zone properties if active layer is non-copper

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8646
2021-06-20 15:13:18 -04:00
Jeff Young b72545a432 Implement more aggressive re-entrancy blocking for drawing tools.
A similar strategy was already implemented in Eeschema.

Also adds some safety around clearing of autopan and mouse capture.

Fixes https://gitlab.com/kicad/code/kicad/issues/6909
2021-06-20 11:09:55 +01:00
Jeff Young 89718dd3ba Naming conventions. 2021-06-19 19:36:53 +01:00
Jeff Young c6606a0582 Hook up delete to undo last segment when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8362
2021-06-19 11:37:20 +01:00
Jeff Young d26449cc29 Formatting. 2021-06-19 11:37:20 +01:00
Jon Evans f8e9542004 Fix crash when opening board setup after zone filler exits 2021-06-18 12:23:12 -04:00
Jeff Young 3072422538 Allow caller to specify which library table to add library to.
Fixes https://gitlab.com/kicad/code/kicad/issues/8013
2021-06-18 11:39:18 +01:00
Jeff Young e540752640 Allow all selected footprints/symbols to be changed.
Fixes https://gitlab.com/kicad/code/kicad/issues/7389
2021-06-17 23:34:56 +01:00
Jeff Young 16047b7419 3D preferences bug fixes.
1) Make sure prefs get saved when closing parent frame.
2) Add camera projection mode to settings.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/8626
2021-06-17 12:22:18 +01:00
Jeff Young 1722bc03b0 Consistent terminology and punctuation. 2021-06-17 00:05:17 +01:00
Seth Hillbrand cbd9208d73 Fix missing translation 2021-06-16 12:48:47 -07:00
Seth Hillbrand 7953a5c62b Work around MacOS printf/format issues
MacOS wxWidgets implementation of wxPrintf/Format suffers from some
issues when mixing string types.  We avoid this by manually formatting
the string ourselves.

Fixes https://gitlab.com/kicad/code/kicad/issues/8404
2021-06-16 11:54:55 -07:00
Jeff Young c8444913df Implement lock between zone filler and drc.
Fixes https://gitlab.com/kicad/code/kicad/issues/8621
2021-06-16 16:12:01 +01:00
jean-pierre charras db19ae226a PANEL_PCBNEW_ACTION_PLUGINS: fix not working "open plugins folder" on Linux 2021-06-16 08:15:20 +02:00
Jon Evans 8f9800f760 Fix pad shape for certain legacy circular pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8615
2021-06-15 22:25:55 -04:00
Jeff Young 1a35d8ba5d Setup layer mapping when importing Eagle library.
Fixes https://gitlab.com/kicad/code/kicad/issues/7891
2021-06-15 19:20:17 +01:00
jean-pierre charras 5b8f32acd2 Python script sample: fix compatibility with recent changes in code. 2021-06-15 18:19:58 +02:00
jean-pierre charras 142dd48c99 SCRIPTING_TOOL::showPluginFolder(): fix wxWidgets3.14 compatibility (Linux mainly) 2021-06-15 18:19:58 +02:00
Eeli Kaikkonen 3616a8f0ee Use polygon coordinates relative to the board.
Footprint polygon coordinates are relative to the footprint.
Translate to the board coordinates when doing hittest with
a (selection) rect.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8596
2021-06-15 15:04:11 +00:00
Michal Schulz 38f18d0505 Fixed according to KiCad Style Guide. 2021-06-15 14:59:04 +00:00
Michal Schulz aed0352828 pcbnew: Replace CR inserted on macOS instead of LF when CTRL+Enter is pressed. 2021-06-15 14:59:04 +00:00
Jeff Young 4418707e5e Add a few more overbar syntax conversion calls.
Fixes https://gitlab.com/kicad/code/kicad/issues/8606
2021-06-15 13:09:18 +01:00
jean-pierre charras fbbe723811 Fix board_item.i after recent changes in Pcbnew code.
(some class names changed)
2021-06-15 10:59:52 +02:00
jean-pierre charras 5d9ff0b9b7 Step export dialog: save 2 options in config file.
2 options (overwrite file and replace 3d shapes) were not saved previously.
2021-06-15 09:33:37 +02:00
Wayne Stambaugh fb46cd8bc5 Expunge the use of the word component from Eeschema code.
The only exception to this is the SPICE simulator's use of component
when referring to physical component (R, L, C, etc.) values.
2021-06-14 14:00:21 -04:00
jean-pierre charras 30f3d11355 fix possible incompatibilities of python scripts due to recent code cleaning 2021-06-14 18:57:05 +02:00
Jeff Young 2c1da70181 Write all variables to temp config file and have Kicad2Step use that.
Fixes https://gitlab.com/kicad/code/kicad/issues/7670
2021-06-14 16:54:45 +01:00
jean-pierre charras 0527dc6fe0 Fp editor: fix initialization of default courtyard line thickness.
When no config file found it was initialized to DEFAULT_SILK_LINE_WIDTH,
although it was initialized to DEFAULT_COURTYARD_WIDTH in board editor.
Fixes #8344
https://gitlab.com/kicad/code/kicad/issues/8344
2021-06-14 08:31:55 +02:00
Jon Evans 82f3df4086 Attempt to fix Python qa code after renames 2021-06-13 11:20:19 -04:00
Jeff Young 5bb6b1a3cc Minor cleanup. 2021-06-12 11:39:28 +01:00
Seth Hillbrand 3644224cb6 Build smoothed area at outline
The clearance to board edge will be set by the knockout routine.
Clipping twice can leave small imperfections in the edge that need to
get triangulated
2021-06-11 14:26:38 -07:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
Mikolaj Wielgus ade38f48bc Add conversion from old `~...~` to new `~{...}` notation 2021-06-11 18:40:57 +00:00
Jeff Young 16b0147af8 Prefix DIMENSION types. 2021-06-11 17:59:44 +01:00
Jeff Young 44086ff2b2 Pull 3D preferences into KiCad preferences architecture.
Fixes https://gitlab.com/kicad/code/kicad/issues/5187
2021-06-11 11:19:40 +01:00
jean-pierre charras 5492fafdf4 Pcbnew: allows access Layers context menu when right clicking from below layers list
Fixes #6614
https://gitlab.com/kicad/code/kicad/issues/6614
2021-06-11 09:32:47 +02:00
Seth Hillbrand d8b1e827c7 Check all previous merge events
Typo only continued merge loop when last element was successfully
merged, leaving tracks where multiple segments were colinear

Fixes https://gitlab.com/kicad/code/kicad/issues/5020
2021-06-10 16:59:35 -07:00
Wayne Stambaugh fbc135e69f Rename SCH_COMPONENT to SCH_SYMBOL. 2021-06-10 10:34:49 -04:00
jean-pierre charras 1c3df973d6 Coverity warnings fixes. 2021-06-10 13:45:02 +02:00
luz paz 5f1e9bc8a7 Fix typos in source code 2021-06-10 01:24:15 +00:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
david-beinder 410dbe17de Fix inital predefined track width selection in track properties dialog
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8578
2021-06-09 09:59:25 +00:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko ffa87e69c6 Remove/replace some stdint.h includes 2021-06-08 21:17:57 -04:00
Seth Hillbrand c650d47626 Add warning message on non-unity scaling
When exporting STEP model, warn the user if one of their footprints has
a non-unity scaled model as this compromises the integrity of the STEP
export.

Fixes https://gitlab.com/kicad/code/kicad/issues/1781
2021-06-08 16:38:47 -07:00
Seth Hillbrand b891b5e1e2 Do not blindly substitute model names
Makes model substitution (VRML->STEP in STEP Export) optional.  This can
prevent nasty surprises where the user doesn't see/can't affect the
outcome

Also, when substituting models, do not maintain scale factor.  So a VRML
model with non-unity scaling will not be export as a STEP file (of the
same name) with non-unity scaling.  This is the first step to address
https://gitlab.com/kicad/code/kicad/-/issues/1781
2021-06-08 16:38:47 -07:00
Marek Roszko 6e01ce84b9 Break out eda_item_flags.h, fix the typedef to std::uint32_t, fix some signed vars 2021-06-08 19:12:30 -04:00
Marek Roszko c854811ac4 Parent frame already includes undo_redo_container.h 2021-06-08 19:12:30 -04:00
Jeff Young 2aaec31832 Don't put up "old version" warning for gerbview-generated PCBs.
Fixes https://gitlab.com/kicad/code/kicad/issues/8574
2021-06-08 22:12:44 +01:00
Wayne Stambaugh e6346e3103 Pass objects by reference instead of on the stack part 2. 2021-06-08 13:47:21 -04:00
Jon Evans 75ce97e260 Fix the last cause of duplicate segments when completing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-07 20:34:09 -04:00
Marek Roszko 9268340dcc Kick wx.h out of pcbnew 2021-06-07 18:38:51 -04:00
Jeff Young 97a2c4094b Don't label free pads with connections as '*'.
Fixes https://gitlab.com/kicad/code/kicad/issues/8385
2021-06-07 23:36:37 +01:00
Jeff Young 3d32c096ab Fix some problematic double-quotes. 2021-06-07 23:36:37 +01:00
Marek Roszko 8f2819cfa4 Kill the last of wx/wx.h in headers 2021-06-07 17:59:20 -04:00
Johannes Maibaum 022dd6072c Add utility method to resolve symlinks
The same logic block to resolve possible symlinks exists in 5 different
places now. This change moves this duplicated code to a static member
function of WX_FILENAME instead.
2021-06-07 20:59:59 +00:00
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