Commit Graph

14492 Commits

Author SHA1 Message Date
Jan Mrázek f601c87cea Export UNITS_PROVIDE into SWIG 2022-12-19 17:30:37 +00:00
jean-pierre charras abff7975f1 Python scripting: fix some issues when trying to create a DRC Report:
- avoid aborting the DRC report on a .dru issue without any error message.
- ensure the list of layer names is up to date (contains both canonical
and user layers names, that can be used in DRC tests.
Fixes #11410
https://gitlab.com/kicad/code/kicad/issues/11410
2022-12-19 12:39:20 +01:00
jean-pierre charras 6c73fe05e9 python scripting: better fix for commit 5a79821 (fix crash due to a null pointer):
Try to use a better error message for severity.
Fixes #13160
https://gitlab.com/kicad/code/kicad/issues/13160
2022-12-18 18:31:19 +01:00
Ian McInerney 639626fda4 Include the proper header instead of the entire lockfile function 2022-12-17 23:37:24 +00:00
Ian McInerney 82a11c71af Clean up extra control creator logic in pcbnew save file dialog 2022-12-17 23:37:24 +00:00
Jon Evans 5abf73e3c9 Never call ReCreateMenuBar inside a menu event handler
As of wxWidgets 3.2, the wxWidgets event handler runs code after the
the client event handler that depends on the menu still existing.
Because there are potentially many paths to call ReCreateMenuBar from
within a menu event handler, let's just wrap this action in a CallAfter
to make sure it happens after the wx handler call completes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13149
2022-12-16 16:37:51 -05:00
Jan Mrázek 90fb315113 Add missing text alignment types to SWIG export
Fixes https://gitlab.com/kicad/code/kicad/issues/13174
2022-12-16 18:55:21 +00:00
Jan Mrázek e699c25d98 Add operators for the SWIG wrapper of EDA_ANGLE 2022-12-16 18:55:21 +00:00
Jan Mrázek 66c2462c7e Eliminate angle as double in SWIG wrapper
Fixes https://gitlab.com/kicad/code/kicad/issues/13171
2022-12-16 18:55:21 +00:00
Seth Hillbrand 66e9d5c61c Return reference rather than copy
No need to return a const copy by default in GetItems().  The const
reference will be faster.  Thanks to @GyrosGeier for the suggestion
2022-12-16 10:52:57 -08:00
Jeff Young 12ea3e0822 Fix wxWidgets crankiness. 2022-12-16 00:53:53 +00:00
Jeff Young 7750d2e00e Microvias always use separate uvia netclass properties.
There is no current microvia size/drill.

Fixes https://gitlab.com/kicad/code/kicad/issues/13176
2022-12-16 00:10:03 +00:00
Simon Richter b5cb9eccbf Generate dependency files from Swig
The wrapper is only rebuilt if one of the files that were parsed during
generation has changed.
2022-12-15 23:42:07 +00:00
Seth Hillbrand e91c039ed3 Prevent event stackup when init pages
The paged book initialization (and others) can generate events,
re-laying out the whole dialog multiple times during initialization.
This halts events during the layout period

Fixes https://gitlab.com/kicad/code/kicad/issues/13158
2022-12-15 11:39:03 -08:00
Jeff Young 5327ea5823 Respect selectabiltiy when adding wholy-selected groups.
Fixes https://gitlab.com/kicad/code/kicad/issues/13092
2022-12-15 17:57:58 +00:00
Jeff Young 366cad1f01 Uniformly translate "<no net>" message. 2022-12-15 13:59:25 +00:00
jean-pierre charras 5a7982161d python scripting: fix crash due to a null pointer use.
Fixes #13160
https://gitlab.com/kicad/code/kicad/issues/13160
2022-12-15 14:27:29 +01:00
Ian McInerney 034981ff9d Add tooltip to add existing library button in pcbnew 2022-12-15 02:08:41 +00:00
Jeff Young 93879532f7 More wxTextCtrl minimum widths. 2022-12-14 23:23:41 +00:00
Seth Hillbrand 279edcefdc Don't break tracks without snap
If the user asks to not snap to a track, we should also prevent the
track from snapping to the via

Fixes https://gitlab.com/kicad/code/kicad/issues/13142
2022-12-14 13:51:42 -08:00
Jeff Young 19a5a3ae16 Remove unused member variable. 2022-12-14 13:36:28 +00:00
Marek Roszko 2f8cc84551 Hotglue footprint to svg export
This needs additional work
2022-12-13 22:50:15 -05:00
Mike Williams eb10d7d1d8 PCB Search: fix untranslated string 2022-12-13 16:35:15 -05:00
Mike Williams 5652eaea82 Search Pane: name net 0 as "No Net" with no class
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13148
2022-12-13 15:52:07 -05:00
Jeff Young c0872364d4 Get rid of bloated bitmap buttons on wxWidgets 3.2. 2022-12-13 20:48:02 +00:00
jean-pierre charras 88038907fa Pcbnew, graphic importer: do not import 0 length segments and smaller than 20 nm Bezier curves.
Degenerated Bezier curves (i.e. straight lines) are imported as segments.
They create issues in kicad because they are hard to edit and manage.
2022-12-13 20:23:40 +01:00
Jeff Young d3228dbab2 Differentiate search panel font between Mac and others.
Fixes https://gitlab.com/kicad/code/kicad/issues/13145
2022-12-13 00:47:19 +00:00
Jeff Young f24372bc18 Layout adjustments for wxWidgets 3.2. 2022-12-13 00:47:19 +00:00
Jeff Young 9d13e419c2 Reduce compiler warnings. 2022-12-13 00:47:19 +00:00
Seth Hillbrand 4fe35d0df1 More push/pop tool issues
We need to pop the move tool off when it doesn't find anything to act on
so that the pushed tools under it on the stack can re-activate

Fixes https://gitlab.com/kicad/code/kicad/issues/13114
2022-12-12 12:56:35 -08:00
Seth Hillbrand 2fd500e20b Respect the "report all errors" checkbox
When we have objects spanning multiple layers, the user doesn't need to
see every layer/hole combination violation if they do not request it

(cherry picked from commit c07043e762)
2022-12-12 11:14:38 -08:00
Jeff Young 6d73d9a08e Split another couple of hairs in the never-ending "how big is a font".
Fixes https://gitlab.com/kicad/code/kicad/issues/13009

Fixes https://gitlab.com/kicad/code/kicad/issues/13115
2022-12-12 17:37:17 +00:00
jean-pierre charras 96a9ec4a0c Enhance compatibility with V6.0 for Intersheetrefs fields associated to GLOBAL labels.
In V6.0, the identifier is "Intersheet References" and was not immediately
seen as Intersheetrefs field.
2022-12-12 16:38:04 +01:00
Jeff Young 45eae3e594 Don't Simplify() polys with arcs in them.
Fixes https://gitlab.com/kicad/code/kicad/issues/13134
2022-12-12 12:54:34 +00:00
Alex 5e8227b54a pcbnew: Support dragging arc center in "Keep endpoints" mode. 2022-12-12 13:00:44 +03:00
Alex 3eb31befed Fix a delay when dragging arc endpoints in pcbnew. 2022-12-12 09:39:56 +03:00
Alex da1e5a80a8 Restore removeCorner transition in PCB editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/13133
2022-12-12 07:04:20 +03:00
Marek Roszko 7e53663d5d Add a bulk gerber export that's a wee bit smarter 2022-12-11 20:13:26 -05:00
Jeff Young 65538ccad4 Rename files and classes to match dialog name.
Also a bit of formatting cleanup.
2022-12-11 18:42:57 +00:00
Jeff Young d27fb35780 A few more adjustments to wx 3.2 layout issues. 2022-12-11 14:12:35 +00:00
Jeff Young 4e47b5c25f Fix some layout and selection issues on Mac.
Some of these are due to moving to wxWidgets 3.2, but I'm not sure
all of them are.  In particular, the need for CallAfter() in the
search pane's selection handler is probably just a wxWidgets bug on
Mac (the control lies about the current selection inside the event
handler).

Also sets better column widths in the search pane.
2022-12-11 00:56:46 +00:00
Jeff Young a7df573748 Clear bounding box caches *before* reverting commit.
We're going to re-add items to the view assuming they will have their
current locations, which requires the bounding boxes to be refreshed.

Fixes https://gitlab.com/kicad/code/kicad/issues/13084
2022-12-11 00:56:46 +00:00
jean-pierre charras 75f1067642 GRAPHICS_CLEANER: fix bad detection of short Bezier curves that can be cleaned
eda_shape: small enhancement: when generating a polyline from the Bezier curve,
filter the last point if the last segment is shorter than the given min lenght
2022-12-10 18:19:09 +01:00
Jeff Young 492e6548ff If item is on mask layer then we won't call it again on copper layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/13075
2022-12-10 13:51:00 +00:00
Alex b01d950071 Remove start pt when collinear with neighboring pts in zone/poly draw. 2022-12-10 06:21:54 +03:00
Alexander Dewing 02325130fa Initial arm64 work 2022-12-09 23:48:31 +00:00
Yang sheng aff5245041 Fix enum class DRILL_MARKS no export to python 2022-12-09 18:07:58 +00:00
Alex b4b25a7009 Fix Pack & Move footprints when working with groups. 2022-12-09 20:42:35 +03:00
Alex c1f82d0c80 Canceling Move cancels Pack too in Pack & Move footprints. 2022-12-09 20:41:56 +03:00
Alex 3d2b1aaf90 Improve H/V/45 deg mode when drawing zones and polygons. 2022-12-09 19:11:56 +03:00
Jon Evans ad33515916 Properties: mask visibility for free text 2022-12-08 18:06:14 -05:00
Jon Evans 67df342255 Properties: mask irrelevant NPTH properties
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13087
2022-12-08 18:00:44 -05:00
Jon Evans 72939e8918 Properties: enable in PCB editor for everyone
Leaving the AC flag around for future use in the footprint editor etc

Fixes https://gitlab.com/kicad/code/kicad/-/issues/2039
2022-12-08 17:38:36 -05:00
Mike Williams 0e75bf02fa Selection: refactor modifier checking 2022-12-08 14:12:12 -05:00
Jon Evans 2b0d7f65d0 Properties: sync wxPGGlobalVars map state with editor global state
Thanks to @dsa-t for suggesting this

(maybe)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12297
2022-12-08 07:55:57 -05:00
Jon Evans 435651237c Properties: Support overridden availability functions 2022-12-08 00:09:51 -05:00
Marek Roszko 2fc0cd68ed Avoid crashing due to empty lib tables in cli
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13097
2022-12-07 23:56:03 -05:00
Jon Evans 33d76f63b0 Properties: save and restore splitter position 2022-12-07 21:38:33 -05:00
Alex e03a91c9c7 Reduce static ratsnest opacity when moving items; tweak colors. 2022-12-07 21:01:56 +03:00
Alex 82874daf08 router: Limit the amount of move attempts in ROUTER::Finish
Otherwise auto-finish hangs in some cases.
2022-12-07 19:24:13 +03:00
Marek Roszko aa537fe559 Change bezier curve iteration to be easier to read
Fix #https://gitlab.com/kicad/code/kicad/-/issues/11153 somewhat
2022-12-06 23:25:04 -05:00
qu1ck 25688eb75e Include plotprint_opts.h in swig 2022-12-07 04:02:59 +00:00
Marek Roszko 24ca892afb Update tinysplice to latest
A few years worth of bug fixes
2022-12-06 22:28:23 -05:00
Marek Roszko 61119fbf64 Poke a const to make gcc happy 2022-12-06 22:00:23 -05:00
Marek Roszko c0b5fe58c3 Implement output targeting of symlib/fplib upgrade per request 2022-12-06 21:20:27 -05:00
jean-pierre charras 593dc9e8b6 Some fixes in Gerber job file:
- Ensure colors use a normalized value (normalized name or RnnGnnBnn notation).
- Better code.
2022-12-06 17:01:37 +01:00
Alex 008704fc6f router: Allow highlighting both DP nets when routing. 2022-12-06 05:24:23 +03:00
Jon Evans 38a509e768 Properties: support bitmaps 2022-12-05 18:31:40 -05:00
Jeff Young c771d866f5 Cleanup 3D caches before d'tors run.
Fixes https://gitlab.com/kicad/code/kicad/issues/10973
2022-12-05 22:39:09 +00:00
Seth Hillbrand d8f94962ff Prevent halting the main GUI thread 2022-12-05 11:10:57 -08:00
Alex 0089df8ca4 Update comment in zone filler. 2022-12-05 21:48:12 +03:00
Alex c4aed1d941 Make sure that threads are not running after zone filling. 2022-12-05 21:36:59 +03:00
Alex 6d513e7ecf Expose changing arc edit mode in arc button context menu and Preferences
Ctrl+Space can still be used to cycle through modes.

Fixes https://gitlab.com/kicad/code/kicad/issues/5412
2022-12-05 21:28:16 +03:00
jean-pierre charras c3dddaf41f panel_board_finish: mark board as modified when a finishing parameter is modified.
Fixes #13074
https://gitlab.com/kicad/code/kicad/issues/13074
2022-12-05 18:39:18 +01:00
Jeff Young 295ef6588d Fix uninitialized variable. 2022-12-05 14:42:05 +00:00
Jeff Young b7d41e0e56 Update simulator with NUMERIC_EVAL, decimal separator processing, etc.
Also includes fixes for instance data and resolving of textvar
references.

Also includes virtual d'tors for IBIS parser to get rid of all the
compile warnings on CLang.

Fixes https://gitlab.com/kicad/code/kicad/issues/12357
2022-12-05 12:40:29 +00:00
Alex 4482e9f634 Minor UI fixes. 2022-12-05 00:37:25 +03:00
Seth Hillbrand 47e7cd2e90 Don't allocate/delete a PG_UNIT_EDITOR unless needed
We cannot actually delete the PG_UNIT_EDITOR without substantial issues
from the global variables in wx.
2022-12-04 10:27:38 -08:00
Alex 90ad4dcc05 router: Various bugfixes in length tuning meandering
- When fine-tuning, keep adjust to the original baseline length
- Enforce a minimum amplitude based on settings, DP gap and track width
- Use binary search to fine-tune amplitude if the length is not trivial
- Account for inequalities in balancing
- Don't add the meander if adding it with min. amplitude will make the
  tuning worse
- Keep a distance after meandering end to prevent overlaps in DP

Fixes https://gitlab.com/kicad/code/kicad/issues/9267
Fixes https://gitlab.com/kicad/code/kicad/issues/1776
2022-12-04 16:30:00 +00:00
Graham Keeth ef83d01455 Minor string changes: "eeschema" / "pcbnew" in tooltips, and power port terminology 2022-12-04 14:29:57 +00:00
Jeff Young f6822120b3 Enable tab and return commit in property grid. 2022-12-04 11:51:44 +00:00
Jeff Young f805fd267f Divorce UNIT_BINDER from wxFrame.
This allows us to supply Pcbnew or Eeschema as the unitsProvider when
called from the main frame.

Fixes https://gitlab.com/kicad/code/kicad/issues/13066
2022-12-04 11:51:44 +00:00
Jeff Young 96819f6c01 Better cache invalidation for text objects with references.
Fixes https://gitlab.com/kicad/code/kicad/issues/13059
2022-12-04 11:51:44 +00:00
Jeff Young 8c97a7b8c6 If fps contain complete board-edge holes then exclude those edges from main calc.
Fixes https://gitlab.com/kicad/code/kicad/issues/12921
2022-12-04 11:51:44 +00:00
Seth Hillbrand 92266635cc Add an advanced config value for the minimum sliver
The hard coded value was too small for certain calculations.  Better to
have a configurable value that is initially set to our error level to
allow for deviations that don't meet the visibility test for spikes.
These have become more apparent with Clipper2
2022-12-03 16:03:43 -08:00
Seth Hillbrand b5bd633625 Strict-order points in connection_width
The connection width checker uses morton codes to order elements.  The
sort should be primarily morton-based but needs to be stable in order to
ensure that nextZ/prevZ elements are properly placed as the actual
next/prev elements in the list.  Otherwise, hitting a fracture point
might make us skip in the wrong direction

Fixes https://gitlab.com/kicad/code/kicad/issues/12831
2022-12-03 16:03:43 -08:00
jean-pierre charras 497b368006 Pcbnew menubar: View/Drawing Mode/Sketch Text Items and Skecth Graphic Items:
Handle the Checked/Unchecked bitmap symbols of these 2 submenus.
2022-12-03 11:03:14 +01:00
Jon Evans 4134db3c47 GCC fixes 2022-12-02 22:38:15 -05:00
Jon Evans 050d282c12 Properties: Hide some copper-only properties from non-copper zones 2022-12-02 21:59:17 -05:00
Jon Evans a5f7ecbe00 Properties: support text knockout 2022-12-02 21:46:03 -05:00
Jon Evans 0bc06d506c Properties: reselect after canceled move 2022-12-02 21:40:21 -05:00
Seth Hillbrand f9a36b9c91 Update thread_pool to 3.3
Fixes an issue with `wait_for_tasks()` and adds a lower-overhead
`push_loop` helper.  We replace our usage of `parallelize_loop` with
`push_loop` as we didn't use the multi-future vector return and don't
need the extra overhead.
2022-12-02 12:01:34 -08:00
jean-pierre charras 50d34e232b pcbnew: fix a bug that crashes pcbnew on startup when running under gdb/msys2 2022-12-02 15:14:17 +01:00
Jeff Young bba8a0826e Clear caches before undo operation.
The undo will remove/re-add items to the view in order to update the
RTree.  However, if we only clear caches at the end (in the OnModify
call), then the (stale) bbox caches are still used for the re-add
operation, and they end up at the wrong place in the RTree.

Fixes https://gitlab.com/kicad/code/kicad/issues/13048
2022-12-02 10:59:48 +00:00
jean-pierre charras 93c631af44 drawing_stackup_table_tool: fix incorrect color of dielectric sublayers.
when a dielectric has sublayers, the printed color was always the main layer color.
2022-12-02 10:41:20 +01:00
Jon Evans 73b3f28c25 Properties: mask layer property for items that can't set it 2022-12-01 22:22:29 -05:00
Jon Evans ef3f2a8f1e Properties: ignore shape props for textbox 2022-12-01 21:54:12 -05:00
Jon Evans e0ff8ba09c Fix normalize flags for wx3.1 2022-12-01 18:49:08 -05:00
Alex e56064696b router: Refactor m_padToDieLength out of meander placer base. 2022-12-02 01:03:34 +03:00
Jon Evans 3b25fdc212 Properties: Fix zones stomping on position props for other items 2022-12-01 16:55:12 -05:00