Jeff Young
fe0fb92441
Reduce visual clutter in GAL display options.
2023-09-04 13:06:46 +01:00
Jeff Young
c9fd03202a
Generate an immediate refresh when loading new footprint.
2023-09-04 11:12:34 +01:00
Alex Shvartzkop
2bb457d477
Remove unused variable.
2023-09-04 07:00:23 +03:00
Alex Shvartzkop
ab6a049b90
Add a routine for joining PCB shapes.
2023-09-04 06:46:24 +03:00
Alex Shvartzkop
24e0a9455e
Fix a string in step exporter.
2023-09-04 06:45:25 +03:00
Alex Shvartzkop
b2a0d85c84
Hide std::abs for EDA_ANGLE from Python.
2023-09-04 06:45:12 +03:00
Jeff Young
9bba8e5956
Don't allow duplication of footprint items outside of footprint editor.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15487
2023-09-03 22:04:50 +01:00
Jeff Young
d27413a032
Remove up/down buttons until we implement layer ordering.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14574
2023-09-03 21:31:46 +01:00
Jeff Young
60419f542a
Bug fixes for paste margins on custom-shaped pads.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15125
2023-09-03 20:43:48 +01:00
Jeff Young
a24a8aaca7
Don't start a pack&move when already in an EDIT_TOOL drag or move.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15545
2023-09-03 14:03:52 +01:00
Jeff Young
624203f2e1
Don't start a router drag when already in an EDIT_TOOL drag or move.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15312
2023-09-03 14:03:52 +01:00
Josue Huaroto
a8e18e2d8c
Flip Viewport when Flip board is enabled
2023-09-03 12:30:32 +00:00
aris-kimi
38748cce84
Small order change for three View menu items v2
2023-09-03 12:29:06 +00:00
Jeff Young
43862d767e
Don't return separate shapes from a custom-shaped pad.
...
It just confuses the hull generator.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15553
2023-09-03 13:23:53 +01:00
Jeff Young
61bcf46ffe
Don't show preview for lib-item loaded on to canvas.
2023-09-03 12:07:09 +01:00
Jeff Young
e6b0a6abca
ADDED: lib tree previews.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2418
2023-09-02 23:30:22 +01:00
Jeff Young
891583f616
Fix nullptr error.
2023-09-02 12:08:37 +01:00
Jeff Young
41e274684c
Make sure pads with no net get assigned Default netclass on board open.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15562
2023-09-02 10:11:38 +01:00
Jeff Young
2d762acc7d
Remove accidentally-checked-in debugging code.
2023-09-02 10:11:38 +01:00
Alex Shvartzkop
90eb59cf9f
Fix saving a new footprint library.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15563
2023-09-01 23:30:27 +03:00
Jeff Young
69a1b30b8a
Implement undo/redo around Pad Edit Mode changes.
2023-09-01 18:48:46 +01:00
Jeff Young
aacb85bdab
Make sure enum gets initialized.
2023-09-01 18:48:46 +01:00
Jeff Young
68c839b214
Stop trying to zero-out offset of custom-shaped pads.
...
It causes *way* to many issues.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15555
2023-09-01 18:48:46 +01:00
Marek Roszko
f357e79f77
Add --define-var / -D to the cli opts for some commands
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15437
2023-08-31 21:46:37 -04:00
Marek Roszko
b542539546
Add --drawing-sheet arg for various cli commands for overriding the project sheet
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15438
2023-08-31 19:53:23 -04:00
jean-pierre charras
160ec181ac
dialog_export_svg: add color theme selection.
...
Previously, the Kicad Classic theme was always used.
2023-08-31 20:33:44 +02:00
Jeff Young
5358343023
Make button alignment consistent.
2023-08-31 17:47:28 +01:00
jean-pierre charras
0aaafc92fc
Fix a compil issue with gcc created by commit 21c54f97
(gcc only)
2023-08-31 16:21:40 +02:00
Jeff Young
9a045af81f
Make all debugging statments use netcode (instead of some using netname).
2023-08-31 15:15:57 +01:00
Jeff Young
05135eed66
Extra debugging info for pns regression tests.
2023-08-31 15:15:57 +01:00
Jeff Young
c049e1e90d
Formatting (no functional changes).
2023-08-31 15:15:57 +01:00
Marek Roszko
37717a8281
Fix other stroke types still drawing the border regardless of enable
2023-08-31 07:52:19 -04:00
Marek Roszko
21c54f9721
Add two more border props to props panel
2023-08-31 07:49:15 -04:00
jean-pierre charras
085485717c
Gerber place file: change DCode size of pads others than 1 or A1 to 0.1 mm
...
Previously it was a round shape 0.0 mm (allowed but not visible)
Gerber Format rev 2023-08 changed it to 0.1 mm (still a round shape)
2023-08-31 11:02:50 +02:00
jean-pierre charras
5bf0689ac8
Fix typos in translatable strings.
...
fix also a coding style issue.
2023-08-31 10:27:36 +02:00
Marek Roszko
ffbe0f36da
Tweak the textbox file indentation
...
(layer was previously misaligned as it wasn't intended to be used on a new line
2023-08-30 22:47:10 -04:00
Marek Roszko
2e58f4ea60
Fix three spots it always failed to check if the border was enabled
2023-08-30 22:39:07 -04:00
Marek Roszko
2dcb7caacf
Add an explicit border property to textboxes
...
This means it can remember the last border stroke between enabling/disabling the border
2023-08-30 22:33:55 -04:00
Alex Shvartzkop
e128896ba6
Schematic plugins refactoring, fixes for PCB plugins.
...
- Move PLUGIN_FILE_DESC to common.
- SCH_PLUGIN: rename Load -> LoadSchematicFile, Save -> SaveSchematicFile.
- Use PLUGIN_FILE_DESC and CanRead* in schematic plugins.
- Return none/unknown types from Find/GuessPluginType functions.
- Iterate over file types for file wildcards.
- Clean-up header checking in IO plugins.
- Use PCB plugin list in IO_MGR::GuessPluginTypeFromLibPath.
2023-08-31 05:08:03 +03:00
Jeff Young
cf14b3c233
Fix conversion to netnames in PNS_DBG output.
2023-08-31 00:25:20 +01:00
Mike Williams
b8a61719c3
Grids: make overrides use existing grids (choice box)
2023-08-30 13:33:04 -04:00
Mike Williams
b1a388ca69
Grids: Support X and Y for all grids, add optional names
2023-08-30 11:22:19 -04:00
Jeff Young
d74e9ba040
Support SHORT_NET_NAME(pin_number) and friends on symbols.
...
While it's of debatable use in the schematic, some users want to
author them there so that they're then copied onto the board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15544
2023-08-30 11:43:35 +01:00
jean-pierre charras
67d3528866
fix minor compil warnings
2023-08-30 09:09:54 +02:00
Alex Shvartzkop
f8dac43325
STEP export: add short segments as circles.
...
Because OCC can't connect two arcs together sometimes.
2023-08-29 23:58:25 +03:00
Josue Huaroto
156288bfcf
Extend boundary size of PCB_VIEW
2023-08-29 19:41:36 +00:00
Josue
94e86a69be
Update RECT to RECTANGLE
2023-08-29 11:50:22 -05:00
Josue
ae3a9d05b5
Remove dialog events
2023-08-29 11:50:16 -05:00
Josue
761929c052
Add OnKillFocus Event for Coordinates and Segment, Rectangle properties
2023-08-29 11:50:15 -05:00
Josue
e5316fd1aa
Change name: Truncate -> Round
2023-08-29 11:50:12 -05:00
Josue
54aaec3a57
Add Enter event to coordinates and Segment, Rectangle properties
2023-08-29 11:50:10 -05:00
Josue
8d7255aae3
truncate angle values in Segment properties
2023-08-29 11:50:09 -05:00
Josue
6429051750
change Rectangle property: Length to Height
2023-08-29 11:50:05 -05:00
Josue
c3766bb250
Implement Length and Width for RECT
2023-08-29 11:50:02 -05:00
Josue
f31a524026
add rectangle properties to UI
2023-08-29 11:49:57 -05:00
Josue
5061ca54e7
add length and angle properties to segment
2023-08-29 11:49:55 -05:00
Jeff Young
f24cf2250e
Make sure we have a BOARD when trying to read nets.
...
Also fixes a nullptr bug when trying to write nets when we don't
have a NODE.
2023-08-29 17:30:00 +01:00
Alex Shvartzkop
af62e4276b
Wrap FILE_LINE_READER in try-catch blocks in PCB plugins for CanRead*.
2023-08-29 19:13:55 +03:00
Jeff Young
d161602e92
Don't snap a footprint (or group) to its children.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15535
2023-08-29 13:05:08 +01:00
Alex Shvartzkop
a9a2d4aa7a
Improve error reporting when running Python action plugins.
...
Python error traceback is now logged to stderr.
On Windows, a console window will pop up if wxTheApp gets destroyed,
because message dialogs crash due to hooks that wxWidgets sets up.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15520
2023-08-29 07:06:11 +03:00
Ian McInerney
ba22347904
Move pcb_actions to new constructor
2023-08-29 00:19:19 +01:00
Seth Hillbrand
fa15f8aa0c
Fix compile error
...
wxMkDir's mode is required for linux but not windows (yay)
2023-08-28 14:57:28 -07:00
Roberto Fernandez Bautista
32b6deb8b1
ADDED Migrate libraries button in Footprint Library Table
...
Allows easy migration of legacy and non-KiCad footprint libraries
2023-08-28 22:44:10 +02:00
Roberto Fernandez Bautista
f693366910
CADSTAR PCB: nullptr safety
2023-08-28 22:38:46 +02:00
Jeff Young
0d39cd5e63
Allow for offset custom-shaped pads with no holes.
2023-08-28 18:07:18 +01:00
Wayne Stambaugh
e4feb8826b
Coverity issue fixes.
2023-08-28 09:29:56 -04:00
jean-pierre charras
f4bf3bf611
Do not use the deprecated wxWidgets wxPATH_NORM_ALL flag.
...
Replaced by our equivalent FN_NORMALIZE_FLAGS flag.
Fix also a typo in a string.
2023-08-28 14:37:15 +02:00
Mike Williams
3edcef0229
Grids: remove more uses of old user grid in UI
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15515
2023-08-28 07:27:25 -04:00
Jeff Young
a4d1b29b91
Remember footprint library browsers liblist width.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15500
2023-08-27 21:17:29 +01:00
Jeff Young
676c6e81a4
Custom pads with round anchors in pre-7.0 files get 90 degree spokes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15518
2023-08-27 20:42:59 +01:00
Jeff Young
a470cab7b2
Include description for page settings command.
2023-08-27 19:03:17 +01:00
jean-pierre charras
114ff054d3
STEP exporter: export track segments as thick segments with rounded end using arcs.
...
They are no longer exported as polygons.
Export time is slightly faster and file sizes slightly smaller.
Track arcs are still exported as polygons.
2023-08-27 19:37:41 +02:00
Jeff Young
3f26b29aa2
Minor cleanup and removal of stale comments.
...
Also attempts to fix a focus-loss bug on GTK after zone dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13221
2023-08-27 10:53:03 +01:00
Jeff Young
c48084bbbf
Minor cleanup and removal of stale comments.
2023-08-27 10:53:03 +01:00
Jeff Young
67bd2139ad
Use standard bitmap button.
2023-08-27 10:53:03 +01:00
jean-pierre charras
15f5a14217
Fix minor compil warnings
2023-08-27 11:11:08 +02:00
Jeff Young
bc3c8b19c6
Don't include annotations in boundingbox when not including text.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15411
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15411
2023-08-26 18:50:10 +01:00
Jeff Young
4fefd95e0c
Move grid definitions to Prefs and grid origin to a separate dlg.
...
Grid origin is document-wide, while grid definitions are app-wide.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2262
2023-08-26 13:32:24 +01:00
jean-pierre charras
b3aa8a0c49
Fix a few (minor) compil warnings.
2023-08-26 09:40:09 +02:00
Alex Shvartzkop
331176744c
EAGLE import: fixup previous commit.
2023-08-26 00:45:59 +03:00
Alex Shvartzkop
f071dd1406
Fix a search pane crash when a row isn't in the hit list.
...
Fixes KICAD-Q7
Fixes KICAD-1A6
2023-08-25 23:24:32 +03:00
Alex Shvartzkop
0fcf9e2c7d
EAGLE import: fix crash when loading unknown signal class name.
...
Fixes KICAD-3FA
2023-08-25 23:05:50 +03:00
Alex Shvartzkop
bfb6269f0a
EAGLE import: fix crash when loading a polygon.
...
Fixes KICAD-TW
2023-08-25 23:05:50 +03:00
Jeff Young
83fe3576c6
Handle dimensions and textboxes when plotting contours to DXF.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11901
2023-08-25 18:07:49 +01:00
Jeff Young
2ae36312c4
Don't use DXF-native text for textboxes.
...
It gets the positioning wrong.
2023-08-25 18:07:49 +01:00
Jeff Young
e0cf49e73c
Fix previous fix for honouring pad offset.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494
2023-08-25 13:05:19 +01:00
Marek Roszko
cbc60d90ec
Add missing line style prop to eda_shape
2023-08-24 22:32:12 -04:00
Marek Roszko
6e45be8708
Add a friendly name to textboxes for the prop mgr
2023-08-24 21:33:37 -04:00
Marek Roszko
d32b55f504
Minor cleanup after last commit
2023-08-24 21:19:35 -04:00
Marek Roszko
339684263c
Fix accidental plotting of disabled textbox borders
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15252
2023-08-24 21:03:48 -04:00
Marek Roszko
d193334a10
Add vrml export to cli
...
Roughcut as the vrml exporter needs some loving
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15472
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13952
2023-08-24 20:39:21 -04:00
Alex Shvartzkop
b1b66f66f4
Prevent crash when a python script tries to use pcbnew too early.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15414
2023-08-25 00:09:56 +03:00
Alex Shvartzkop
f842e6ac7a
STEP: export arcs in board contours as curves, not polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13825
2023-08-24 21:53:53 +03:00
Mike Williams
2b78c20a62
PCB: add grid overrides to graphics/router/etc.
2023-08-24 13:58:22 -04:00
Jeff Young
300014177f
Honour pad offset when creating custom pad anchors (and polygons).
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15494
2023-08-24 17:30:22 +01:00
Jeff Young
0f81dd3b5e
Give Grid Settings a more standard KiCad look and feel.
...
Also simplifies the dialog by removing the user grid (now that you
can add as many user grids as you want).
This does mean that you can no longer have an asymmetric grid, but
it gets too complex if we allow everything for everyone.
2023-08-24 16:41:08 +01:00
Mike Williams
9079df85fd
PCB: check ratsnest for nullptr (segfaults)
2023-08-24 10:51:34 -04:00
Mike Williams
d9c2e0ab54
PCB: start of grid overrides
...
Only works for moves.
2023-08-24 10:29:09 -04:00
Mike Williams
0f781f328e
GRID_HELPER: push code to parent class
...
Prep'ing for PCB grid overrides
2023-08-24 10:29:09 -04:00
Alex Shvartzkop
b8ce97b532
STEP export: fix circles.
2023-08-24 14:57:15 +03:00
Alex Shvartzkop
83e9d87cde
STEP export: fix hole cutting counter message.
2023-08-24 14:26:27 +03:00
Jeff Young
7fcce5224d
Fix compiler warnings.
2023-08-24 12:12:16 +01:00
Jeff Young
6040f49272
Don't write opaque data types to PNS log.
2023-08-24 12:12:16 +01:00
jean-pierre charras
eb8c1d2a90
Fix compil issues (and probably a bug). Also display calculation time info.
2023-08-24 13:02:10 +02:00
Alex Shvartzkop
cb54bdfa84
STEP export: add bounding box optimizations for cutting holes.
2023-08-24 05:42:56 +03:00
Alex Shvartzkop
458d5fbeb8
STEP export: use unfractured polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15486
2023-08-24 03:47:55 +03:00
Josue Huaroto
c19804bb95
Replace DisplayError to an infobar for missing footprint library
2023-08-23 22:05:44 +00:00
Seth Hillbrand
db8e15ce88
Require wxWidgets 3.2
...
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Roberto Fernandez Bautista
f4f1ca352a
Fix crash when running PNS Router Dump (pressing 0)
...
Some ITEMs don't have a Parent
2023-08-23 22:19:47 +02:00
jean-pierre charras
196fc67ece
Step exporter: generate oblong pad holes using 2 arcs + 2 segments.
...
Previously, the oblong shapes were polygons.
2023-08-23 18:16:25 +02:00
Jeff Young
6166a96b8e
Update PSN logger to new NET_HANDLE architecture.
2023-08-23 14:10:03 +01:00
Jeff Young
0c37e3c443
Remove realistic-mode (and duplicated settings from preferences).
...
Most of these settings are now available in the appearances panel.
It was concluded in a Zulip discussion that any missing items can
be added back in time if people find they need them (ie: complain).
Also hooks up 3DViewer to the common language framework.
2023-08-23 14:07:58 +01:00
jean-pierre charras
43c7cfec3a
Revert "Record hole knockouts in zone filler earlier"
...
This reverts commit 3030c80de7
.
The commit #3030c80d was a workaround related to a Clipper2 issue.
Updating Clipper2 is a better fix
2023-08-22 18:18:55 +02:00
Jeff Young
76cd637895
Make the net identifier opaque to PNS router.
...
This also improves performance as we don't have to look up the
netcodes in a map.
2023-08-22 15:17:02 +00:00
jean-pierre charras
b59f7fbd9d
DIALOG_TEXT_PROPERTIES_BASE: allows more room in wxTextCtrl for coordinates.
...
Sometimes coordinates in mils can have many digits.
2023-08-22 15:30:19 +02:00
Alex Shvartzkop
10e2e4a12d
Another try at fixing arcs.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Mike Williams
e98dfa2bfc
PCB: swap drill and grid origin icon order for convenience
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11738
2023-08-22 08:47:25 -04:00
Marek Roszko
5eac1840a0
Drop the 3d command in favor of direct
2023-08-21 21:47:56 -04:00
Alex Shvartzkop
cabcf4afe6
Altium: better message when importing unsupported format versions.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15465
2023-08-21 19:22:56 +03:00
Jeff Young
55a7b9e6bf
More consistent naming.
...
(Also better differentiates the PCBEXPR_ classes from PCB_
objects.)
2023-08-21 15:26:33 +01:00
Jeff Young
3cade7fc47
Don't use string compare for A.NetClass == B.NetClass.
...
(or A.NetName == B.NetName, or != of either)
2023-08-21 15:26:33 +01:00
jean-pierre charras
84fa4532b9
DIALOG_EXPORT_STEP: fix some issues:
...
- add missing inits (the zones were never created)
- fix a incorrect tool tip
- minor enhancements (add afew messages during export)
2023-08-21 09:36:25 +02:00
Marek Roszko
b52b05ebbb
Add zone export to step export
...
Mileage may vary on performance, decent enough for my board.
Warning, freecad chokes on boards with zones, but commerical tools are fine
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15234
2023-08-20 22:11:45 -04:00
Jeff Young
cf22d5b99b
Preferences setting for force-show-fields-when-fp-selected.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15215
2023-08-20 18:10:28 +01:00
jean-pierre charras
70c05109a0
PCB_PARSER::parsePCB_TEXTBOX(): fix bug when a TCB_TEXTBOX was rotated:
...
the textbox was rotated, but thai is incorrect: the polygon coordinates
are good, and must be not rotated: only the text angle must be set.
2023-08-20 18:34:57 +02:00
jean-pierre charras
4d1f9f6fb9
Pcbnew: Fix some draw issues in PCB_TEXT and PCB_TEXTBOX:
...
- fix incorrect ViewGetLayers() layer list.
- fix incorrect color of graphic items (BOARD_CONNECTED_ITEM items) on copper layers
- slightly modify how a PCB_TEXTBOX is drawn on LAYER_LOCKED_ITEM_SHADOW.
Fixes #15458
https://gitlab.com/kicad/code/kicad/-/issues/15458
2023-08-20 17:33:11 +02:00
jean-pierre charras
adb1ac8cb8
Fix an incorrect test thact crashes fp editor
...
Fixes #15457
https://gitlab.com/kicad/code/kicad/-/issues/15457
2023-08-20 14:04:50 +02:00
jean-pierre charras
1c11a2c7bd
Capture exceptions thrown by FP_LIB_TABLE::FindRow() in some places.
...
FindRow() exception is unfortunately not captured in all places using it.
The result is the application closes.
2023-08-20 12:27:37 +02:00
Marek Roszko
ea3101587a
Add gltf export to step dialog
2023-08-19 19:01:29 -04:00
Marek Roszko
7ef3252064
Use an indeterminate progress bar for the 3d export log window
2023-08-19 19:01:29 -04:00
Jeff Young
8f1a987044
Fix typos.
2023-08-19 23:20:52 +01:00
Jeff Young
fa060c7c58
Make sure dummy tracks have ROUTER_TRANSIENT flags.
...
Also give them more info that might be queried by custom DRC rules.
This currently just includes positioning info (it already included
nets and principal layer). We *could* also try to figure out all
layers for dummy vias, and/or widths for dummy tracks / arcs....
2023-08-19 20:51:04 +00:00
Marek Roszko
50ac5db8d2
Add binary GLTF export option to kicad-cli
...
Not by any means finished
2023-08-19 16:47:42 -04:00
Marek Roszko
5870b4f373
Mini-refactor step to a generic "3d" cli option (step command still exists for now)
2023-08-19 16:47:41 -04:00
Jeff Young
a2627fec60
Don't snap to footprint-private items.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15447
2023-08-19 21:03:05 +01:00
Jon Evans
0c529411d7
Update SHAPE_POLY_SET API to not hide virtual functions
2023-08-18 21:40:40 -04:00
Jeff Young
6c9ba52f18
Clean up naming.
2023-08-18 22:20:09 +01:00
Jeff Young
ec980e8696
Move "parent" property from PAD to BOARD_ITEM.
2023-08-18 22:20:09 +01:00
Seth Hillbrand
57ba38560c
Optimize library load time for Altium plugin
...
Load times were >20min for moderate sized libraries as EnumFiles
iterated over the entire list for each operation. The update modifies
our third-party lib to allow a return value, stopping the iteration when
we find our desired entry. This also provides a short-circuit for
ASCII-based names, allowing single-level parsing if available
2023-08-18 13:50:15 -07:00
Alex Shvartzkop
5131dae568
Graphics import improvements/fixes:
...
- add support for color
- support non-uniform scale
- add GetImageBBox()
- fix SVG GetImageWidth/Height not being in mm
- fix import offset not being in mm
- add graphics importer for LIB_SYMBOL
2023-08-18 22:52:49 +03:00
Alex Shvartzkop
26a52ecfe9
Move parts of import_gfx to common.
2023-08-18 22:43:54 +03:00
Alex Shvartzkop
1d79952d55
Formatting, update header in io_mgr.h.
2023-08-18 22:41:07 +03:00
Alex Shvartzkop
530f270902
Add cstdint to io_mgr.h
2023-08-18 22:37:48 +03:00
Alex Shvartzkop
a06c1ec826
Remove unused variable in legacy_plugin.cpp
2023-08-18 22:37:48 +03:00
Thomas Pointhuber
f7f8bf5418
fix coding policy violations
2023-08-18 14:51:33 +02:00
Thomas Pointhuber
c2a91caacf
altium: verify that file contains "Compound File Binary Format" magic bytes, as we do not support the ASCII format
2023-08-18 14:47:08 +02:00
Thomas Pointhuber
94c732409b
Fix nullptr SEGFAULT for the case PLUGIN::CanReadBoard() returns false, as no supported PLUGIN was found for the given file.
2023-08-18 14:08:06 +02:00
Jeff Young
1cbc6e33db
Save color settings after modification in Appearances Manager.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15390
2023-08-18 11:05:23 +01:00
Thomas Pointhuber
08003164ce
altium: Add support for Nets (connectivity) on polygons and fills for board items
2023-08-18 11:59:53 +02:00
Jeff Young
6a6e839cc4
Move checking for null parent higher.
...
(Otherwise we set the failure flag without telling the user why.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15415
2023-08-18 10:32:45 +01:00
jean-pierre charras
a7e74bf4bc
Fix a few minor compil and Coverity warnings.
2023-08-17 20:31:40 +02:00
Mike Williams
3cd25f0045
PCB: add ratsnest to search pane
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15338
2023-08-17 10:25:40 -04:00
Jon Evans
1efd75ca79
ADDED: Multi-layer object snapping
...
Default hotkey Shift+S toggles on/off
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6266
2023-08-17 09:25:47 -04:00
Alex Shvartzkop
d02e4f3254
Fix PLUGIN_FILE_DESC copy warning, remove a leftover comment.
2023-08-17 14:43:59 +03:00
jean-pierre charras
53b2fda184
Fix some minor compil and Coverity warnings.
2023-08-17 10:06:17 +02:00
Alex Shvartzkop
953cf0d680
Fix KiCad-only board file dialog filter.
2023-08-17 09:36:47 +03:00
Seth Hillbrand
75f9a5bda8
Add autocomplete for zone connection style property
2023-08-16 11:05:37 -07:00
Jeff Young
25b9a9de7e
Fix incorrect assumption about Eagle spoke rotation.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15428
2023-08-16 17:30:03 +01:00
Jeff Young
a58547dde5
Better fidelity for Eagle thermal spokes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15428
2023-08-16 17:24:59 +01:00
Alex Shvartzkop
ea65a5a80b
Tent vias by default.
2023-08-16 08:28:13 +03:00
Jeff Young
c54d97170b
Fix bone-headed copy/paste.
2023-08-15 23:28:19 +01:00
Jeff Young
750b92b17f
Don't allow selection of footprint dimensions.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15418
2023-08-15 17:06:56 +01:00
Jeff Young
686704bb31
ADDED: plot control over FP text.
...
(Also adds said control to "Follow Plot Settings" in 3D viewer.)
2023-08-15 16:56:46 +01:00
Jeff Young
460e609619
Remove unused variables.
2023-08-15 12:42:19 +01:00
Jeff Young
b986391a04
Remove stale teardrops before rebuilding connectivity.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15398
2023-08-15 12:13:34 +01:00
Alex Shvartzkop
9299d3516c
Re-add legacy KiCad .emp footprint library support.
2023-08-15 05:40:43 +03:00
Roberto Fernandez Bautista
dbfb7880b5
Add IO_MGR::FindPluginTypeFromBoardPath (+QA tests)
2023-08-15 05:26:12 +03:00
Alex Shvartzkop
76e0d5981d
Import system refactor for PCB plugins.
2023-08-15 05:26:12 +03:00
Alex Shvartzkop
a0d96cea9f
Rename Save -> SaveBoard, Load -> LoadBoard in PLUGIN.
2023-08-15 05:26:12 +03:00
Jeff Young
2a3c4d0a03
Fix switch stmt fall-through.
2023-08-14 20:38:17 +01:00
Jeff Young
f45760062b
ADDED: appearances manager for 3D viewer.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12413
2023-08-14 18:08:36 +01:00
Jeff Young
bd8857389a
Add a bit of slop for text-shape hit-testing.
2023-08-14 18:08:14 +01:00
jean-pierre charras
b983ab4ed5
PCB_SHAPE::swapData( BOARD_ITEM* aImage ): add missing swap of m_netinfo member.
...
Fixes #15407
https://gitlab.com/kicad/code/kicad/-/issues/15407
2023-08-14 18:15:05 +02:00
jean-pierre charras
d8ba6c07ac
Pcbnew, DIALOG_PAD_PROPERTIES: ensure the right spoke angle is displayed.
...
Previously it was sometimes the default value, not the initial value when
opening the dialog.
Fixes #15410
https://gitlab.com/kicad/code/kicad/-/issues/15410
2023-08-14 17:56:16 +02:00
Marek Roszko
5d001d4858
ADDED: ERC over cli....mostly
2023-08-13 20:31:19 -04:00
Marek Roszko
061d18cbb0
Support json reports as option in erc/drc dialogs
2023-08-13 19:19:19 -04:00
Marek Roszko
14a0fa435c
ADDED: DRC JSON report
2023-08-13 14:59:10 -04:00
jean-pierre charras
53b732466a
pcbnew, DIALOG_GRAPHIC_ITEM_PROPERTIES: fix issues (perhaps platform dependent)
...
- fix crash when trying to select a layer
- ensure the net selector is always shown when selecting a copper layer.
2023-08-12 11:30:52 +02:00
jean-pierre charras
7fe80abdff
PCB_GRID_HELPER::BestSnapAnchor() fix overflow due to use of int.
...
GRID_HELPER::GetVisibleGrid() needs double, does not work with int (overflow).
Fixes #15389
https://gitlab.com/kicad/code/kicad/-/issues/15389
2023-08-11 17:59:24 +02:00
jean-pierre charras
91b3b296fe
Update python footprints wizards to be compatible with last changes in code.
...
(PCB_TEXT Ctor has changed).
2023-08-11 09:57:45 +02:00
Jon Evans
e9c51f1d12
Preserve logic that assumes footprint shapes can't have nets
2023-08-11 00:01:39 -04:00
Jon Evans
f70b9920cb
Fix some warnings
2023-08-10 22:01:55 -04:00
Jon Evans
a77e630901
ADDED: Connectivity for graphic shapes on copper layers
...
Graphic shapes (excluding text) can now have nets when on
copper layers. Shapes behave like tracks in that they will
pick up nets from connected pads, and follow track opacity
settings.
2023-08-10 21:47:43 -04:00
Marek Roszko
812143ac69
ADDED: Run PCB DRC via cli
2023-08-10 20:20:40 -04:00
Roberto Fernandez Bautista
e2cc35db65
Update preview board to latest version in PCB color settings panel
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15386
2023-08-10 17:25:35 +02:00
Mark Roszko
214c74b89b
Update file zone.cpp
2023-08-10 15:15:37 +00:00
jean-pierre charras
cff2583f15
Minor fixes to help translations:
...
- do not translate a debug message.
- remove useless spaces at end of lines (always annoying for translators).
2023-08-10 10:16:24 +02:00
Mark Roszko
f88148e4e8
Fix printf assert in ZONE::GetMsgPanelInfo
2023-08-10 02:49:09 +00:00
Alex Shvartzkop
9a4ee3f40f
gEDA import: better to auto-position fields instead of reading.
2023-08-10 03:21:15 +03:00
Alex Shvartzkop
dbd3895104
gEDA footprint import: fix arcs/circles.
2023-08-10 03:21:12 +03:00
Roberto Fernandez Bautista
6ba250a4e6
PNS Log Viewer: Refactor loading/saving functions
2023-08-09 22:21:14 +00:00
Alex Shvartzkop
e498f1b9a0
FOOTPRINT: add a method to auto-position Reference and Value.
2023-08-10 00:30:05 +03:00
Jeff Young
da86593625
ADDED: Implement sorting for search panes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12614
2023-08-09 18:31:33 +01:00
Ian McInerney
1dd92b1bb1
Assign focus to the notebook in the ERC/DRC window after running
...
After running the ERC/DRC, the window would not get focus returned to it
on GTK naturally unless the user pressed the arrow key. This prevented
the ESC key from closing the window after the run was complete and
nothing else was clicked/pressed.
Instead of pulling focus to the dataview with the errors in it (which
would cause problems in GTK, such as moving the viewport to the first
marker (https://gitlab.com/kicad/code/kicad/-/issues/11925 ), give focus
to the notebook container instead. This will not select the marker, but
still allow the ESC to propagate into the dialog immediately.
2023-08-08 14:02:54 +01:00
Jeff Young
8bb895373a
Allow GetLayer() to be used with single-layer zones.
...
Also fixes a bug in GetFirstLayer() where we were checking
m_layerSet.size() (which is always 60) rather than
m_layerSet.count() (which is the number of set layers).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15233
2023-08-08 12:43:22 +01:00
Ian McInerney
a3a701a95e
Move preferences to an action instead of a wx event
2023-08-08 00:51:22 +01:00
Jon Evans
8776437f29
PNS: Placement is not valid if via can't be placed
2023-08-07 18:42:44 -04:00
Jon Evans
bb13e8e754
PNS: Use a via to resolve via sizes
2023-08-07 18:31:05 -04:00
Roberto Fernandez Bautista
feb887fe8f
PNS: Prevent re-entry events when saving log to file
2023-08-07 23:48:58 +02:00
Roberto Fernandez Bautista
79a6b0d129
PNS: Re-add debugging of via dragging
2023-08-07 23:48:24 +02:00
Roberto Fernandez Bautista
6ebc2fca15
PNS: Only log events when EnableRouterDump is true
2023-08-07 23:48:24 +02:00
Roberto Fernandez Bautista
3bf9797620
PNS: add new "EnableRouterDump" kicad_advanced setting
2023-08-07 23:43:54 +02:00
Mike Williams
30eae5d896
Fields: preserve field order across sch<->pcb
2023-08-07 09:29:13 -04:00
Jeff Young
f43b90b15f
Lazy context handling for SVG plotting.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15325
2023-08-07 14:01:58 +01:00
Jon Evans
103eb556f7
PNS: Make sure log viewer uses the actual design settings
2023-08-06 16:05:37 -04:00
Jeff Young
b401c214f5
Fix missing variable initialization.
2023-08-06 20:57:42 +01:00
Jeff Young
5e112ca78e
ADDED: parameterize font metrics and allow customization of overbar height.
2023-08-06 20:57:41 +01:00
Jon Evans
5cbe3c5d42
PNS: Fix a few issues with debug logging
...
Hide non-copper layers for clarity
Fix saving of router settings
2023-08-06 15:30:58 -04:00
jean-pierre charras
c594c88492
remove a very old fully outdated debug code that did nothing.
2023-08-06 15:32:41 +02:00
jean-pierre charras
5e04e90fb3
LENGTH_TUNER_TOOL: fix a bug (missing initialization) creating a serious isse.
...
m_inLengthTuner was not initialized, preventing the tool to be started (sometimes)
Fix also a few not initialized members.
2023-08-06 13:20:43 +02:00
Jon Evans
4c4bbdc8f3
Stricter API for LIB_TABLE
...
Prevent nickname map or row parent getting out of sync
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15315
2023-08-06 00:56:51 -04:00
Jon Evans
6f2574d0d2
Manual cherry-pick of 2075a99c
2023-08-05 20:13:15 -04:00
jean-pierre charras
f18feb2a46
kicad-cli, export plot PDF and SVG: add missing option --drill-shape-opt.
...
It allows pad/via holes to ber plotted at actual size, small size, or not.
This option exists in GUI, but was missing in kicad-cli.
2023-08-05 18:18:18 +02:00
Jeff Young
0413270012
ADDED: Move Corner To... and Move Midpoint To...
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5012
2023-08-05 16:43:55 +01:00
Roberto Fernandez Bautista
ab614ef99f
Fix IO_MGR formatting (no functional changes)
2023-08-05 15:57:29 +02:00
Roberto Fernandez Bautista
78ad3b54c3
Fix SOLIDWORKS_PCB / ALTIUM_CIRCUIT_MAKER registration into IO_MGR
2023-08-05 15:57:29 +02:00
jean-pierre charras
86eaa3de35
Pcbnew plot: do not plot via hole on layers where the via does not exist:
...
buried vias are not on all copper layers. their hole is also not on all
copper layer
Fixes #15355
https://gitlab.com/kicad/code/kicad/-/issues/15355
2023-08-05 10:40:35 +02:00
Seth Hillbrand
c38ed7044a
ADDED: DNP flag for position file export
...
Adds ability to exclude footprints with DNP flag from position files in
dialog and cli
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15353
2023-08-04 11:02:54 -07:00
Jeff Young
620b6b7169
Re-entrancy guard for length tuner tool.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15268
2023-08-04 17:37:09 +01:00
jean-pierre charras
9a336eeb87
Pcbnew: Plot tented/not tented vias: fox some issues:
...
Fix mistake in 2 accessors
Fix a checkbox name that was the opposite of its purpose
Add tool-tips ans comments.
Fixes #15352
https://gitlab.com/kicad/code/kicad/-/issues/15352
2023-08-04 18:29:06 +02:00
Jeff Young
1cbef0157d
Avoid edge cases on very wide thermal spokes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15280
2023-08-04 15:38:06 +01:00
Jeff Young
c697a934b2
Update layer names to current terminology.
...
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Jeff Young
29f2afedbd
Fix hidden text painting.
2023-08-04 11:37:46 +01:00
Jan Mrázek
2d010278ad
Fix failure on multiple DRC runs via scripting
2023-08-04 02:32:08 +00:00
Jeff Young
9456fab435
Fix QA gold DRC counts.
...
Also improves the error message when some spokes are ignored because
they're connected to an isolated island.
2023-08-04 00:35:19 +01:00
Seth Hillbrand
7fac72a914
Only deselect existing footprint if currently selected
...
If we have a footprint currently selected and we click on its empty
space again, we deselect the footprint. However, if we click on the
empty space of a different footprint, we will select that footprint
instead.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-03 11:17:31 -07:00
Jeff Young
a9b7b73f10
Make sure pad primitives get normalized before diff'ing.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15208
2023-08-03 18:08:33 +01:00
Jeff Young
297bbca0ea
Finer-grained messages for diff pads.
2023-08-03 18:08:33 +01:00
Seth Hillbrand
a90c9d7c93
Refine the footprint selection logic
...
- Footprints cannot be selected if they do not have items visible on the
screen
- Clicking on empty space in a footprint will select it if the space is
contained in the visible bounding box
- Clicking on a selected footprint a second time will deselect it
- Clicking on a footprint that has pads selected will still select the
footprint
This avoids having the full footprint bounding box considered when
selecting footprints (useful b/c footprint bbox is often much larger and
unexpected). Also allows non-standard footprints (e.g. silk or fab only
footprints) to be logically selected if the layers on which they have
elements are visible.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-03 10:03:15 -07:00
jean-pierre charras
8762859c6d
Fix a display issue in wxStyledTextCtrl widgets in dialogs (Windows specific).
...
It happens when a text is using some esoteric unicode chars.
Fixes #15314
https://gitlab.com/kicad/code/kicad/-/issues/15314
2023-08-03 18:35:49 +02:00
Jeff Young
9e019a1ad1
Don't conclude we're unconnected if only connected to isolated island.
...
Also adds the layer name to the "thermal connection incomplete" DRC
error message.
Also improves zone layer description to not say "X and 1 more" (which
takes as much room as saying "X and Y").
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15279
2023-08-03 16:30:52 +01:00
Roberto Fernandez Bautista
573d2f94de
Fix loading of via drill default sizes and other settings from *.brd kicad files
2023-08-03 15:36:20 +02:00
Roberto Fernandez Bautista
30a63b7b32
Fix loading of legacy zone fills in .brd files + Don't refill after board import
2023-08-03 15:36:19 +02:00
Jeff Young
e2aa3aae8a
Don't delete items out from under undo lists.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15253
2023-08-03 10:48:44 +01:00
Jeff Young
686dfba77a
ADDED autocomplete for value field in Symbol Properties dialog.
2023-08-02 20:45:52 +01:00
Jon Evans
af58281a08
ADDED: Expand selection for graphics in PCB
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12032
2023-08-01 21:14:58 -04:00
Jon Evans
ca4d6e8d1d
Fix msvc being unhappy
2023-08-01 19:59:58 -04:00
Jon Evans
cc7d470f8b
PNS: Improve behavior of dragging vias
...
- Fall back to walkaround when drag fails
- Properly check collisions with holes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15117
2023-08-01 19:03:04 -04:00
Jon Evans
9741d57447
Remove duplicate path for extracting project text variables
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
2023-08-01 17:25:34 -04:00
Jon Evans
2459949d0d
A BOARD may not always have a project
...
For example, if it's the footprint editor model
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15283
2023-08-01 17:19:21 -04:00
Seth Hillbrand
f3d65b5156
Revise method of selecting footprints in contrast
...
When working in high contrast mode, we want to be able to select a
footprint with only elements in, e.g. silk and fab layers.
The previous design for footprint IsOnLayer had one behavior of every
other element and a different behavior for footprints. This leads to
multiple bugs as new features use the overloaded IsOnLayer expecting it
to report if the element exists on a layer or not.
For footprints, we need a different routine to determine whether or not
to select the footprint when clicking on it. IsOnLayer will report if
the footprint has any elements on a specific layer but we don't want to
use the bbox for a hittest because large footprints with through hole
pads will exist on every layer and have an enormous bbox. Instead, we
filter footprints based on the hittest of each element. This behaves in
a more logical fashion, allowing you to select a footprint by clicking
on a visible element of that footprint.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15284
2023-08-01 10:43:13 -07:00
Mike Williams
65450d9b5d
Fields: don't unchanged fields as changed
2023-07-31 15:10:30 -04:00
jean-pierre charras
e188b5f8f4
APPEARANCE_CONTROLS, preset layers: re-allow storing object visibility in
...
a User preset, and use the last defined object visibility when switching to
a builtin preset
Fixes #15282
https://gitlab.com/kicad/code/kicad/-/issues/15282
2023-07-31 18:40:23 +02:00
Mike Williams
744452d092
Sch/PCB: allow back-updating schematic fields from PCB
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15285
2023-07-31 10:38:43 -04:00
Roberto Fernandez Bautista
54f401c72c
Fix import of legacy stroked zone fill + add parsing of segments fills
2023-07-30 20:56:28 +02:00
John Beard
478df24f36
Fix fillets and chamfers when the original lines become zero-length
...
This needs the ITEM_MODIFICATION_ROUTINE to learn to delete items.
Condense the item change handlers into a single injected object
(ITEM_MODIFICATION_ROUTINE::CHANGE_HANDLER) and provide the basic
implementation that just takes some callables.
This simplifies the construction of the routines and also would make
a CHANGE_HANDLER object possible that can be reused between different
tools.
2023-07-30 15:12:28 +01:00
John Beard
da0daffa89
Remove more special-casing for fp-edit commit handling
...
In the EDIT_TOOL::ModifyLines method, there was some
remaining special-casing for FP childen commits.
One bit was put back by mistake (in
0b32ae3f4b
) because I thought I'd
left it out of the refactor. In fact it was removed slightly later in
1218f61d0a
.
THe other bit is omitting Modify commits in the FP-editor (what the
reinstatement of the above code was trying to cause). This shouldn't
be needed any more.
However, something is still incomplete here as the tools still don't
work correctly in the footprint editor. However, I don't think it's
substantially _more_ broken with the special casing removed and at
least it's less confusing.
Related to: https://gitlab.com/kicad/code/kicad/-/issues/15253
2023-07-30 15:10:30 +01:00
jean-pierre charras
abcd753bd3
PANEL_SETUP_BOARD_STACKUP: do not try to init params managed by PANEL_SETUP_BOARD_FINISH
...
Fixes #15288
https://gitlab.com/kicad/code/kicad/-/issues/15288
2023-07-29 09:43:32 +02:00
jean-pierre charras
60806edac0
Gerber export X3: fix an incorrect keyword ("route" must be "rout")
2023-07-27 20:11:04 +02:00
Seth Hillbrand
96a34e5b57
Consolidate Maximum clearance calculation
...
We were calculating the same thing in three locations and we missed
adding the clearance from the footprints in, resulting in bad fills and
missed drc errors (see QA addition)
2023-07-26 12:55:48 -07:00
Seth Hillbrand
812c56bdc7
Clarify NeighboringSegmentFilter
...
This doesn't affect behavior but makes the code more readable
2023-07-25 11:05:56 -07:00
jean-pierre charras
a16ab0aae1
Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
...
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344
about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
Seth Hillbrand
000998ccae
When routing, check for board-level clearances
...
If the board-level clearance exceeds the max pad/track clearance, we end
up missing collisions in the router.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15162
2023-07-24 15:19:21 -07:00
Seth Hillbrand
32ad42a435
Add 3dconnexion driver version check
...
Re-enable 3dconnexion driver by default as we are able to gate the
driver versions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13362
2023-07-24 18:09:52 +00:00
John Beard
0b32ae3f4b
Reinstate fp-editor-specific commit handling in fillet/chamfer tools
...
This check was omitted in the refactor of the fillet tool, and
resulted in a bug when undoing the action: the modified lines would
not be un-modified.
2023-07-23 14:48:31 +01:00
jean-pierre charras
dda9d6c86c
BOARD_NETLIST_UPDATER: Minor fix
2023-07-23 13:06:31 +02:00
Alex Shvartzkop
430da67222
Altium PCB import: support dashed outlines (Region kind 2)
2023-07-22 22:38:05 +05:00
jean-pierre charras
8425e5a0b7
footprint.cpp::GetBoundingBox( bool aIncludeText, bool aIncludeInvisibleText ):
...
Do not include invisible fields when aIncludeInvisibleText is false.
2023-07-22 11:48:17 +02:00
jean-pierre charras
878a67ca65
BOARD_NETLIST_UPDATER: fix incorrect handling of new fields added to a Fp
...
- the new field position/rotation is now the same as its footprint parent.
- it is added to the view.
2023-07-22 10:52:49 +02:00
Alex Shvartzkop
24452f41ad
Improvements to Altium PCB/footprint importer:
...
- Support unicode footprint names
- Set default footprint text size and thickness to match KLC
- Position Reference at the top, Value at the bottom of fp bounding box
2023-07-22 08:55:53 +05:00
John Beard
a61b9f4459
Pad dialog: respect IPC maximum pad radius
...
The IPC-7351C rule (which may be IPC 7352 now), is 25%, or
0.25mm, whichever is smaller. Currently the default ratio is 25%, which
is incorrect for pads with shortest edges over 1mm.
This also means that the "25%" default is applied in one place:
previously sometimes the value came from the default set in PAD,
rather than the value set by this dialog. While the PAD default isn't
changed here, this dialog no longer relies on that value for its
behaviour.
2023-07-22 00:45:36 +01:00
Josue
7f9742791a
Re-word `tent vias` value setting in board_setup and plot
...
Fix: https://gitlab.com/kicad/code/kicad/-/issues/15210
2023-07-21 17:56:46 -05:00
Seth Hillbrand
7fe83993cf
Be smarter about releasing lockfiles
...
If KiCad crashes or exits without deleting the lockfile, don't show the
warning message unless we are not the one who locked it or there are
other KiCad instances running locally.
This should catch 99% of the cases where the message is shown
incorrectly. There may be some corner cases where the lock file is
created on a network drive using two different machines with the same
name and same user but these cases should be (famous last words)
sufficiently rare as to not be observed in practice
2023-07-21 15:40:19 -07:00
Alex Shvartzkop
e7af4b86b8
Altium PCB: support solder/paste mask expansion rules.
...
- Writes expansion values to board design settings
- Imports footprint regions on Cu layers as pads
- Adds support for holes in non-Cu polygons in footprints
2023-07-21 20:03:03 +05:00
Alex Shvartzkop
448de72823
Fix reading legacy zone fills which were based on stroked polygons.
2023-07-21 17:11:09 +05:00
Alex Shvartzkop
ef66fe88ac
Altium PCB import: import holes in non-Cu polygons.
2023-07-21 08:03:03 +05:00
Alex Shvartzkop
eb6cd4cc5d
Altium PCB import: remove more invalid polygons.
2023-07-21 08:03:03 +05:00
Alex Shvartzkop
f29bacbccd
Altium PCB import: some tweaks for font sizes.
2023-07-21 05:08:11 +05:00
Alex Shvartzkop
02652437bf
Altium PCB import: fix garbage symbols in font names.
2023-07-21 05:08:11 +05:00
Seth Hillbrand
6a09cf3551
Refill legacy zone fills on open
...
Previous check only looked for the existence of a new (as of v6) flag
that controlled which strategy we took. Previous versions did not write
this flag and so will not hit the check. This works around a missing
version bump from when the feature was introduced.
2023-07-19 14:29:12 -07:00
jean-pierre charras
f8fcf3852f
revert a change committed my mistake (in commit aa3e2988
)
2023-07-18 17:14:51 +02:00
jean-pierre charras
aa3e298890
Kicad manager: build the PLUGIN_CONTENT_MANAGER only un request, not in
...
KICAD_MANAGER_FRAME Ctor. Two advantages:
- it is built after the splash screen is dismissed.
- if there are issues when creating the PLUGIN_CONTENT_MANAGER, this is more
easy to debug
2023-07-18 11:19:52 +02:00
Jeff Young
29bb51560c
Fix control enablement in global edit dialogs.
2023-07-17 18:30:07 +01:00
Jeff Young
a1de7a77f4
Improve informational hierarchy of PNS Router Settings dialog.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15182
2023-07-17 16:01:15 +01:00
Jeff Young
5e18287ff9
Re-implement some commented-out hole clearance checking in router.
2023-07-17 16:01:15 +01:00
Jeff Young
c3c7f731df
Fix usage of AUI SetAuiPaneSize() hack in FOOTPRINT_EDIT_FRAME.
...
This brings it in line with PCB_EDIT_FRAME, which seems to work
reasonably well.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14297
2023-07-16 22:29:21 +01:00
Jeff Young
c2e7827774
Override FOOTPRINT::GetCenter() to ignore text.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15209
2023-07-16 18:01:45 +01:00
John Beard
ab55684f0b
ADDED: Add step parameter to footprint pad renumbering
...
Also includes persisting settings for next dialog invocation
and use the TransferDataFromWindow function rather than per-field
accessor methods.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10651
2023-07-16 15:37:12 +01:00
Jeff Young
a09a5cb641
More undo cleanup.
...
The symbol editor has few enough items that it will still be performant
if we always send a selected-item-modifed event. (As it turns out we
were doing that anyway as the check for child-modified flags didn't
also check for selected.)
2023-07-16 14:43:29 +01:00
Roberto Fernandez Bautista
cf0b719a4a
Fix some unreachable code msvc warnings
2023-07-16 15:41:05 +02:00
Jeff Young
581cbfc112
Don't treat a rule area as an edge cut in the router.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15200
2023-07-15 18:30:15 +01:00
Jeff Young
0446152d15
(Very) minor performance improvement.
2023-07-15 17:55:12 +01:00
Jeff Young
1218f61d0a
Implement undo/redo for footprint children.
...
Our special-cases to handle the fact that we didn't do this had far
outgrown the code necessary to actually handle it.
2023-07-15 17:37:31 +01:00
Marek Roszko
3233bbe0ba
Make exported date time strings use ISO8601 format
...
Also rename the function to be explicit on its result format
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15185
2023-07-14 23:24:12 -04:00
Jeff Young
c3222b0652
Clear edit flags on footprint children in footprint editor.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15199
2023-07-14 22:16:11 +01:00
Jeff Young
d02e94805a
Store original boardItem (before promoting ent.m_item to parent footprint).
2023-07-14 20:43:13 +01:00
Jeff Young
cbf685ad76
Clear owner of old watcher before resetting std::unique_ptr.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-14 19:32:20 +01:00
Seth Hillbrand
f45883ac3d
Ensure watcher is valid
...
Call ordering appears to allow invalid m_watcher settings for MacOS, so
we need to check if m_watcher has been initialized before clearing
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-14 09:11:08 -07:00
jean-pierre charras
3ac454153e
Pcbnew, footprint editor: fix crash due to a null pointer use
2023-07-14 15:13:17 +02:00
Josue Huaroto
4cad021ef4
Add Open preferences folder button in Preferences Dialog
2023-07-13 14:10:31 +00:00
Jeff Young
cf8294b5c2
Remove a bunch of blind (and a few redundant) static_casts.
2023-07-13 14:14:45 +01:00
Ian McInerney
ae60b57c3d
Add default parameter to PCB image placement action
2023-07-13 13:15:19 +01:00
jean-pierre charras
7ac0ca9c14
Pcbnew, undo_redo: Do not cast to BOARD_ITEM items that are only EDA_ITEM
...
A BOARD_ITEM is derived from EDA_ITEM, so the cast is not possible
Fixes #15177
https://gitlab.com/kicad/code/kicad/-/issues/15177
2023-07-13 10:53:50 +02:00
Ian McInerney
e82a58a12e
Changed: Allow filling/unfilling individual zones with no selection
...
The draft fill and single zone unfill would only work if something was
selected first, this allows them to call the selection operation to
request what is under the cursor. Also properly gate the operation to
not cause crashes/issues when the selection contains non-zone items.
2023-07-12 23:00:13 +01:00
Seth Hillbrand
dde017cdc2
Force remove tree watcher when setting
...
The lib watch on Mac may not actually remove the tree on DTOR, so we
need to force the removal. This also adds some additional debug flags
if the issue continues
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15173
2023-07-12 14:29:06 -07:00
Ian McInerney
a8f628d0df
Add virtual destructor for base class
2023-07-12 19:39:15 +01:00
John Beard
09c0f713cd
Add fillet and chamfer icons
2023-07-12 19:21:47 +01:00
John Beard
a72ab9f351
Put fillet, chamfer and extend in a submenu
2023-07-12 19:21:47 +01:00
John Beard
046d978ba7
ADDED: Pcbnew chamfer and extend tools
...
Using the new ITEM_MODIFICATION_ROUTINE system, drop in two new
tools: chamfer and line extend. These are two geometric operations
that are relatively common when editing footprints in particular.
Chamfer delegates the geometric calculations to a dedicated unit
in kimath/geometry.
2023-07-12 19:21:37 +01:00
John Beard
8e0e9ce752
Generalise fillet tool
...
Describe the actions of the fillet tools is a generic way, so that the
same general pattern can be used for other tools that modify shapes on
the BOARD.
Basically, an "ITEM_MODIFICATION_ROUTINE" is defined, which is
configured and called multiple times, calling back to the EDIT_TOOL when
it modifies or creates an item.
The motivation here is to make it easier to slot in new line-based
tools like chamfer, extend and so on without having to redo the
complicated item, selection and commit handling each time, and keep the
core "routines" simple and decoupled from the EDIT_TOOL's
internals.
This also resolves #15094 because the new commit handling does the right
thing when items were "conjured up" for the fillet (e.g. when a
rectangle is decomposed into lines).
Fixes : #15094
2023-07-12 19:21:26 +01:00
Seth Hillbrand
3030c80de7
Record hole knockouts in zone filler earlier
...
Spokes are placed across an entire pad when filling, so the hole
knockouts need to knocked out prior to deflating
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15160
2023-07-12 11:17:57 -07:00
Jeff Young
8f754c7c3e
A more performant and slighty more aggressive blob trimmer.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14462
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14107
2023-07-12 17:30:42 +01:00
Jeff Young
56752e9bad
Move some MRU paths from app to project.
...
Also augments Save As path updating to handle these newly-moved paths,
and to handle absolute paths that point into the project directory.
2023-07-12 17:30:42 +01:00
jean-pierre charras
2e7db309bd
Fix typo
2023-07-12 17:24:03 +02:00
jean-pierre charras
b47f172e57
PCB_VIA::SetLayerSet( LSET aLayerSet ): fix bug: it must consider only copper layers.
...
Its purpose is to initialize the top and the bottom copper layers connected
by this via. So only copper layers in LSET must be analyzed.
2023-07-12 13:02:05 +02:00
Jeff Young
be63e1824e
Create filled polygons when centerline is chosen.
2023-07-12 10:41:46 +01:00
jean-pierre charras
2cb23bd43a
VIA on solder mask: fix incorrect size (radius) of displayed mask
2023-07-11 17:35:30 +02:00
jean-pierre charras
74c5f5a054
Ensure a layer exists before using it.
...
Fixes #15170
https://gitlab.com/kicad/code/kicad/-/issues/15170
2023-07-11 16:19:46 +02:00
Jeff Young
c3d10084b9
ADDED footprint associations dialog.
2023-07-11 14:52:05 +01:00
Mike Williams
3a7de82243
PCB: respect styling settings when inserting footprint from editor
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15155
2023-07-11 08:16:48 -04:00
jean-pierre charras
ab4535f01b
Pcbnew, show solder mask on VIAS: refinement: take in account the mask expansion.
2023-07-11 11:07:50 +02:00
Jeff Young
879e6c302d
Redraw via mask layers when switching Tented Vias on/off.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-10 23:29:54 +01:00
Ian McInerney
aab8d2b036
Give autocomplete routing a default parameter
...
Fixes KICAD-2M4
2023-07-10 19:41:03 +01:00
Jeff Young
8f5b7569d1
Split StyleFootprints into separate bools for fields vs text & graphics.
...
Also moves the settings from Board Setup to Preferences > PCB Editor.
Also collapses Track Drag Mode from radio buttons to a choice menu to
save space and allow it to be with the other editing action modes.
2023-07-10 17:15:57 +01:00
Jeff Young
db61fe03b3
Prefer MRU path to LastImportExportPath for importing footprints.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15102
2023-07-09 22:28:26 +01:00
Jeff Young
df63ca0189
Save a bit of space in FP 3D preview by moving board thickness to dlg.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896
2023-07-09 20:36:55 +01:00
jean-pierre charras
bdaad32dc8
Pcbnew: fix crash when trying to delete a DIMENSION living in a footprint
...
Fixes #15156
https://gitlab.com/kicad/code/kicad/-/issues/15156
2023-07-09 20:02:56 +02:00
Jeff Young
a66360525a
Broaden "Style footprint fields" to cover graphics as well.
...
Also cleans up the layout of the symbol & fp properties dialogs.
Also fixes the background colour of the link textEdit controls on Mac.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8161
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Mike Williams
cc7798745e
Board Settings: control styling of footprint fields
...
Can use library values or board default settings. Defaults to board
default settings.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8161
2023-07-08 19:58:11 -04:00
Jeff Young
1d0a5ca34b
No point in having a RATSNEST_VIEW_ITEM in FP editor, viewer, etc.
2023-07-08 22:54:14 +01:00
Jeff Young
5bf257cdf6
Don't blindly cast to PCBNEW_SETTING: we may be in CVPCB....
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15153
2023-07-08 22:50:22 +01:00
Mike Williams
bfc3dcbe26
Footprint Editor: don't override field text sizes in editor
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15134
2023-07-08 16:50:15 -04:00
StuartTylerRelytDesigns
d26aa7dc20
Pcbnew moveIndividually ctrl-M mangles 2+ tracks
...
CHANGED: moveIndividually ctrl-M not mangle tracks and add grid snapping
Fixes https://gitlab.com/kicad/code/kicad/issues/15124
2023-07-08 09:11:53 +00:00
Jeff Young
dc838bc50f
Formatting.
2023-07-07 23:41:58 +01:00
Jeff Young
9d9344a815
Save, clear, and restore selection around a footprint reload.
...
Also fixes a bug with the footprint's UUIDs getting reset.
2023-07-07 23:41:58 +01:00
Seth Hillbrand
954b265839
Check for zone-zone overlap
...
Instead of just checking for the zone outline, we adjust to check the
full fill area of the zones for intersection and overlaps
2023-07-07 11:52:25 -07:00
jean-pierre charras
27072e52f7
Fix a compil and Coverity warnings
2023-07-07 10:28:01 +02:00
jean-pierre charras
4f7e9bead5
Fix a typo than can create a crash
...
Fixes #15126
https://gitlab.com/kicad/code/kicad/-/issues/15126
2023-07-07 10:17:02 +02:00
John Beard
ef8cf2d12b
Avoid inheriting for POSITIONING_TOOLS_MENU
...
This only uses the public interface of CONDITIONAL_MENU,
so we can just make on of those and save declaring a wrapper
type.
2023-07-06 21:11:51 +01:00
Mike Williams
efb452df37
PCB: selectionCursor can optionally take a filter list
...
Make sure we pass a default nullptr parameter if we want everything.
2023-07-06 11:25:53 -04:00
Mike Williams
a1f42b823f
PCB: drop unused lockable items list
...
Unused by any code, and list is incorrect anyway.
2023-07-06 11:25:41 -04:00
Kuba Sunderland-Ober
3b261256e7
Use static casts between related classes.
2023-07-05 10:20:18 +00:00
Ian McInerney
50e0a3a500
Move layer ID to action mapping to PCB_ACTIONS
...
This mapping function is better suited for a method of the actions
itself rather than just a helper function in one file.
2023-07-05 11:09:34 +01:00
Alex Shvartzkop
a80ac8286d
EAGLE PCB import: fix footprint text alignment.
2023-07-05 02:56:06 +03:00
jean-pierre charras
33e489c4a8
Pcbnew, PlotInteractiveLayer(): do not print useless info in a PDF plot.
...
It makes this ifo more easily readable.
- Remove duplicate properties
- Do not plot empty properties
- do not plot lib descr and keywords, useless in a pdf plot.
2023-07-04 20:02:28 +02:00
Alex Shvartzkop
e892405738
Altium PCB import: read and apply TrueType font names to text.
2023-07-04 13:29:42 +03:00
Alex Shvartzkop
536744d37a
Altium PCB import: fix text positioning when not bottom-left aligned.
2023-07-04 13:16:25 +03:00
Alex Shvartzkop
847f538192
Altium PCB import: turn off Keep upright for footprint texts.
...
Looks like it was set to true by mistake.
2023-07-04 13:11:43 +03:00
Alex Shvartzkop
b09ab2daab
Don't duplicate footprint bookmarks when plotting multiple PCB layers.
2023-07-04 08:08:52 +03:00
Jeff Young
67c9d3932b
Another attempt to fix qa error.
2023-07-03 16:26:20 +01:00
Jeff Young
def1a9f39c
Add SHORT_NET_NAME processing to footprint variable resolution.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15095
2023-07-02 10:58:10 +01:00
Jeff Young
bcfb6e4888
Fix diagrams of meander dimensions.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10073
2023-07-01 17:06:00 +01:00
Jeff Young
6da71e5d24
Allow routing to a free pad (even if it has a hole).
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15093
2023-07-01 14:23:38 +01:00
Jeff Young
63daf336b8
Formatting.
2023-07-01 14:23:38 +01:00
jean-pierre charras
2c068ab86d
Fix incorrect comment. No code change.
2023-07-01 14:17:57 +02:00
Jeff Young
9af065684b
Show Properties Manager menu entry for FP Editor.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15088
2023-07-01 12:01:35 +01:00
Jeff Young
9ff33e5ec6
Remove BOARD_COMMIT( TOOL_MANAGER ).
...
It initializes both m_isFootprintEditor and m_isBoardEditor to false,
causing all sorts of trouble.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15072
2023-07-01 11:52:46 +01:00
jean-pierre charras
011a8f29a3
Pcbnew, Update footprint: fix broken initialization of fields (especially ref and value)
...
- Revert commit 86e0e1cc
, broken
- add comments to avoid a similar mistake
- ensure Reference and Value are correctly handled.
Fixes #15091
https://gitlab.com/kicad/code/kicad/-/issues/15091
2023-07-01 12:29:02 +02:00
Jeff Young
eb8994fde5
Disable locked in the FP Editor.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15089
2023-06-30 20:51:18 +01:00
Jeff Young
7ed5963b4f
Disable positioning tools when a move is in progress.
...
Also fixes a typo in EDIT_TOOL::doMoveSelection().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15090
2023-06-30 20:37:03 +01:00
Jeff Young
773e1a1ab6
Actions with a COMMIT must be run synchronously.
...
Note that "immediate" doesn't mean quite the same thing: while it will
enter the tool immediately, it won't necessarily finish the tool during
the call if the tool has an event loop. So for something like Rotate
"immediate" and "synchronous" have the same behaviour, but for something
like Move they do not.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15085
2023-06-30 18:57:37 +01:00
jean-pierre charras
8d46ed3c72
PCad importer: fix segfault in PCAD2KICAD::PCAD_ARC::AddToBoard
...
Fixes #15086
https://gitlab.com/kicad/code/kicad/-/issues/15086
2023-06-30 17:51:03 +02:00
Jeff Young
dd83217062
Add DRC testing for copper graphic to zone fill collisions.
2023-06-30 14:04:20 +01:00
Ian McInerney
533d7531a1
Via routing actions need to use int flags
...
The actions the router uses for via placement can be a combination of
enum values, so the actions must use an int parameter instead of the
enum type.
Fixes KICAD-2DS
2023-06-29 23:21:15 +01:00
qu1ck
ec94439df4
Footprints swig API: access shown text in fields
2023-06-29 20:36:27 +00:00
jean-pierre charras
5b42348834
Pcbnew: shows the UUID of a footprint in DIALOG_FOOTPRINT_PROPERTIES.
...
This is an important property of a footprint, but it is never shown to
a user, although it is used in a lot of cases.
2023-06-29 12:36:20 +02:00
Ian McInerney
30f20a694d
Give default parameter to net highlight/selection events
...
Fixes KICAD-2C7
Fixes KICAD-2C3
2023-06-29 00:17:12 +01:00
Ian McInerney
0de6fb03ba
Give updateLocalRatsnest action a default parameter
...
Fixes KICAD-2BX
2023-06-29 00:17:12 +01:00
Ian McInerney
459e6e192a
Give placeFootprint action a default nullptr parameter
...
Fixes KICAD-2BT
2023-06-29 00:17:12 +01:00
Ian McInerney
d923b871d7
Remove group reference when exporting individual footprints
2023-06-29 00:17:12 +01:00
Jeff Young
1411b09178
Remove EDIT_TOOL's quasi-global BOARD_COMMIT.
...
It had several encapsulation leakage issues, as well as poorly-defined
behaviour of undo for chained-actions (append-to-board, and then rotate
while moving, for instance).
2023-06-27 17:04:18 +01:00
jean-pierre charras
af71308184
pcb_parser and pcb_plugin: fix incorrect handling of rotation of PCB_TEXTs
...
in footprints when the text angle is 0 but the fp orientation is not 0.
It was due to the fact angle 0 is not written in file and use the default
value of the created PCB_TEXT in footprint, that is not always 0
Now the angle is always written in file.
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-27 08:53:04 +02:00
Seth Hillbrand
f3122184df
Remove existing footprint when force-reloading
...
Needs to clear the existing footprint in ReloadFootprint prior to
loading the new one.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15040
2023-06-26 17:04:03 -07:00
Ian McInerney
2fb6f19a84
Separate immediate and delayed action dispatch
...
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Jeff Young
3bdc66d3ed
Save project to disk whenever we save the board to disk.
...
This prevents data loss in the event of a subsequent crash.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14991
2023-06-26 16:59:47 +01:00
jean-pierre charras
7e8070b700
pcb_parser: fix incorrect handling of rotation of PCB_TEXTs in footprints.
...
Fixes #15054
https://gitlab.com/kicad/code/kicad/-/issues/15054
2023-06-26 11:27:20 +02:00
jean-pierre charras
44810e8c09
footprint reader: fix broken handling of "Keep Upright" option.
...
texts inside footprints must have this option ON by default.
When disable, the keyword "unlocked" must be in field description.
2023-06-25 12:44:33 +02:00
Jeff Young
493828cc6b
Eradicate a bunch of calls to dyn_cast.
...
Also deletes PAD::GetParent() which fails to look for parent footprint
through groups.
2023-06-25 11:10:07 +01:00
Jeff Young
300a60e88e
Eradicate a bunch of calls to dyn_cast.
2023-06-25 11:10:05 +01:00
jean-pierre charras
994459fd47
fp editor: fix a crash due to a null pointer when reading a .kicad_mod file
...
It happens if the footprint has some non mandatory fields (user fields).
2023-06-25 10:16:23 +02:00
jean-pierre charras
1094cc5331
Fix issues related to the splash screen when no config file found:
...
- do not show it before the application is actually started.
- hide the splash screen before displaying dialogs.
Fixes #15047
https://gitlab.com/kicad/code/kicad/-/issues/15047
2023-06-24 18:09:43 +02:00
Jeff Young
b3d7aea4df
dyn_cast<PCB_TEXT*> won't find PCB_FIELDs.
...
We really should get rid of dyn_cast entirely....
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15052
2023-06-24 15:48:57 +01:00
Ian McInerney
b8e9544828
Remove temporary footprint from pcb group before deletion
...
Bounding box computation uses a temporary footprint, but the clone
operation keeps the group information. We can't delete a footprint if it
has group information, so just delete the group information.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14909
2023-06-24 00:04:06 +01:00
jean-pierre charras
f56ea370be
PCB_FIELD::GetCanonicalName() must return the canonical name (not a translation)
2023-06-23 18:48:11 +02:00
jean-pierre charras
d8034b9c15
Revert "PCB Fields: save untranslated names"
...
This reverts commit b47fcac666
.
The root issue was a bug in SCH_FIELD::GetCanonicalName(), now fixed.
2023-06-23 17:48:19 +02:00
Mike Williams
b47fcac666
PCB Fields: save untranslated names
2023-06-23 09:18:55 -04:00
Tomasz Wlostowski
61391e3984
router: take holes into account when building the restricted items set for collision search
2023-06-23 14:52:45 +02:00
Jon Evans
7804c2177c
Do not force focus on dataview in RC dialogs
...
On GTK, this causes the first item to be selected, firing the
selection handler and causing unwanted side effects.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11925
2023-06-23 08:09:53 -04:00
Jon Evans
504e02192c
Relax handling of duplicate netclasses in Altium parser
...
There are some "good" boards that have this for some reason
2023-06-23 08:09:53 -04:00
Jon Evans
3a0f8214fa
ADDED: Properties panel for schematic editor
...
Initial infrastructure work; follow-ons will add more
properties for schematic items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6351
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14105
2023-06-22 22:32:24 -04:00
Jon Evans
39073642a7
Properties: disable pad y-size when circular
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15038
2023-06-22 19:19:33 -04:00
Tomasz Wlostowski
a0a68d198c
router: when no collision search context is provided, assume differentNetsOnly is true
2023-06-22 23:52:21 +02:00
Tomasz Wlostowski
bd5954242e
router: provisional fix for 14926
2023-06-22 16:52:34 +02:00
Wayne Stambaugh
a5411218a2
Fix minor board file white space formatting issue.
2023-06-21 13:42:24 -04:00
Jeff Young
0fde88eefc
Protect custom rule function caches from transient items.
2023-06-21 18:14:41 +01:00
Jeff Young
94a23971cc
Performance improvements.
2023-06-21 17:00:32 +01:00
Kuba Sunderland-Ober
b60f7d4136
Make comparison operators const.
2023-06-21 08:49:26 +00:00
Mike Williams
fa84575510
FP Text Grid: avoid ambiguous fallthrough
...
Works, but bug-prone and suspicious looking.
2023-06-20 19:23:29 -04:00
Ian McInerney
f14feafc6b
Convert selection vector to EDA_ITEMS for base tool call
...
The base tool expects a generic EDA_ITEMS, but the existing vector
doesn't easily cast, so add a temporary one.
2023-06-20 21:52:50 +01:00
Ian McInerney
f899d9676f
Remove unneeded parameter from tool call
2023-06-20 21:52:50 +01:00
Ian McInerney
0a3b6c2d23
Fix call to properties when editing newly placed dimension
...
The edit is intended to be on the newly placed dimension, but the actual
properties tool doesn't take an item, so it was always looking up the
item to edit using the current selection/cursor position. Make this more
robust by just calling the edit properties directly on the item.
2023-06-20 21:52:50 +01:00
Ian McInerney
3c24ddd8cc
Fix passing CLIENT_SELECTION_FILTER through the tool framework
2023-06-20 21:52:50 +01:00
Ian McInerney
480223f67c
More RunAction specialization
2023-06-20 21:52:50 +01:00
Ian McInerney
3718ecfcd8
Simplify forcing action parameters to have a specific type
2023-06-20 21:52:50 +01:00
Ian McInerney
07cc85e76c
Fix more places where casts into RunAction were happening
2023-06-20 21:52:50 +01:00
Ian McInerney
8f3d159905
Update the net highlight action to properly use the action parameters
2023-06-20 21:52:50 +01:00
Ian McInerney
8b833211b5
Add parameter to repair board action
...
The tool checks for a boolean action, so default to giving false (which
makes it run in interactive mode).
2023-06-20 21:52:50 +01:00
Ian McInerney
b04e54dbea
Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
...
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Mike Williams
1d26b454f4
SCH -> PCB Fields: bump file versions
2023-06-20 18:34:52 +00:00
Mike Williams
86e0e1cccb
PCB, Change Footprint: actually update text attributes
2023-06-20 18:34:52 +00:00
Mike Williams
a24c55affe
PCB Fields: fix up python, API
...
Remove SetFields from both symbol and footprint, it doesn't handle
mandatory fields and is unlikely to ever be safe.
2023-06-20 18:34:52 +00:00
Mike Williams
85c633eb00
QA: PCB Fields bug fixes
2023-06-20 18:34:52 +00:00
Mike Williams
85f889bc19
Fields: Description now mandatory
...
Propagate from symbols to footprints, footprints keep a library
description, too. (GetLibDescription())
2023-06-20 18:34:52 +00:00
Mike Williams
636db607c1
Footprints: upgrade Sheetpath and Sheetfile to tagged items in file
...
Rather than loose kv properties.
2023-06-20 18:34:52 +00:00
Mike Williams
993bb84240
PCB_FIELD: bug fixes
2023-06-20 18:34:52 +00:00
Mike Williams
b81fcaeaf7
PCB Fields: use validators in dialogs, restrict editing of footprint
2023-06-20 18:34:52 +00:00
Mike Williams
ad7d9ec956
PCB: footprint properties dialog fields fixes
2023-06-20 18:34:52 +00:00
Mike Williams
74606cda9c
PCB: text properties dialog should indicate "Offset X/Y:" properly
2023-06-20 18:34:52 +00:00
Mike Williams
78f1040f33
PCB Fields: register with properties manager
2023-06-20 18:34:52 +00:00
Mike Williams
00f6f5011c
PCB Fields: add saving / reading support to PCB files
...
Use common text effects parsing with PCB_TEXT
2023-06-20 18:34:52 +00:00
Mike Williams
6d93950dcc
PCB: abolish TEXT_TYPE::TEXT_is_*
...
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00:00
Mike Williams
37837dc392
PCB: introduce PCB_FIELD_T
2023-06-20 18:34:52 +00:00
Mike Williams
a859b25d2c
PCB: convert footprints to use PCB_FIELDs for fields from schematics
2023-06-20 18:34:52 +00:00
Mike Williams
968785382e
PCB_FIELD: add new field item similar to SCH_FIELD
2023-06-20 18:34:52 +00:00
Mike Williams
8e13f2d535
Netlist/Footprints: parse fields out of netlist into footprint
...
The properties section duplicates all of these fields, but also contains
a large amount of other cruft.
2023-06-20 18:34:52 +00:00
Mike Williams
bd5d3533d8
Footprints: rename Fabrication Attributes to just Attributes
...
Makes it consistent with the Symbol attributes that are often
synchronized.
2023-06-20 18:34:52 +00:00
Mike Williams
028f500cd9
Footprints: rename properties to fields for consistency with symbols
2023-06-20 18:34:52 +00:00
Jeff Young
40abb013ec
Don't consider a group to be on a copper layer.
...
Its members can be on copper layers, but the group itself isn't on any
layer.
Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes. (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)
Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15021
2023-06-20 18:13:21 +01:00
jean-pierre charras
21f2f98270
drc_test_provider_connection_width: fix crash due to a null pointer.
...
Fix a crash (tested on W10 - MSYS2) when running DRC on the board
attached to issue #15005
Fixes #15005
https://gitlab.com/kicad/code/kicad/-/issues/15005
2023-06-20 16:32:07 +02:00
Jeff Young
4473ebb02d
Clear arcs before deflating area outline.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15007
2023-06-20 14:19:21 +01:00
Jeff Young
8c29091001
Add a "hyperzoom" mode for debugging "up close".
2023-06-20 14:19:21 +01:00
Jon Evans
7d6cb4e77b
DRC markers should not be considered inactive layers
2023-06-19 21:58:08 -04:00
Jeff Young
b1cdcca9e6
Use hypertext link for Edit Ingored Tests in both ERC and DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15010
2023-06-19 23:53:42 +01:00
Jeff Young
30336b2fe3
Unify go-back-one-step processing for drawing tools (and router).
...
Also warps mouse on all go-back-one-step operations for better feedback.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9985
2023-06-19 17:14:32 +01:00
Jeff Young
252769d53e
ADDED "clear color" command to Appearance/Nets context menu.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14451
2023-06-19 17:14:32 +01:00
Jon Evans
55c00f1845
ADDED: Initial support for importing Solidworks PCB files
2023-06-19 11:57:33 -04:00
jean-pierre charras
9537fd4e45
Pcbnew, graphic importer: convert arc with large radius to segment.
...
Arcs having a too large radius cannot be safely handled.
The criteria (not perfect) is radius < INT_MAX/2 to use arcs
Fixes #14210
https://gitlab.com/kicad/code/kicad/-/issues/14210
2023-06-19 10:43:30 +02:00
Jeff Young
ecb2fcd559
Don't trip over null strings.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14989
2023-06-18 20:28:11 +01:00
Jon Evans
b424dc11e1
Hotkey feedback for inactive layer display mode
2023-06-17 23:47:26 -04:00
Jeff Young
fb40c202a1
Refine track dangling test.
...
Turns out Clean Up Tracks and Vias wants a different answer from DRC.
2023-06-17 22:56:57 +01:00
Jeff Young
4e3730f653
Track not dangling if entirely covered by pad.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14211
2023-06-17 21:13:30 +01:00
Jeff Young
3b8cc3a3ac
Tab-order fix provided by aris-kimi.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9406
2023-06-17 18:41:17 +01:00
Jeff Young
1c7971c4dc
Cleanup.
2023-06-17 18:12:13 +01:00
Jeff Young
9fbaa238a2
Don't create 22.5-degree gateways if we're not cardinal or diagonal.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14984
2023-06-17 16:05:35 +01:00
Jeff Young
cf4f0723f8
Select first unassigned symbol when running CvPCB.
...
Also cleans up some dead code, and makes more use of sharing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9938
2023-06-17 12:44:59 +01:00
Jeff Young
ef6866757e
Treat undo as backspace and/or escape when drawing. Ignore redo.
...
Undo == backspace when drawing a polygon or chained lines. Otherwise
it's an escape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14961
2023-06-16 22:08:21 +01:00
Alex Shvartzkop
d3be62f644
Adapt panels to PAGED_DIALOG sizing algorithm.
...
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03:00
Alex Shvartzkop
f5da58e17d
PAGED_DIALOG: allow setting initial size in ctor.
2023-06-16 18:53:00 +03:00
Jeff Young
da558f57d4
Don't leave selection lying around when swapping out footprints.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14971
2023-06-16 16:29:52 +01:00
Wayne Stambaugh
285f8a0e59
Command line PCB gerber export fix and improvement.
...
The --board-plot-params argument was never parsed so it was always ignored.
[ADDED] A '--no-protel-ext' option to allow plotting gerbers with the KiCad
file extension (gbr) instead of the Protel gerber file extensions.
(cherry picked from commit 4e79d1ecdd
)
2023-06-16 07:17:39 -04:00
jean-pierre charras
c37332bdb3
Plot Solder mask layer: do not add items on edge_cut, but not on mask layer
...
it happened only when creating a solder mask plot with a minimum thickness.
This was a legacy option, incorrect now.
Fixes #14960
https://gitlab.com/kicad/code/kicad/-/issues/14960
2023-06-16 09:47:58 +02:00
Ian McInerney
63e91366e2
Add variable initializations
2023-06-15 23:49:24 +01:00
Ian McInerney
b73cc7db4a
Fix a few accidental copies in loop iterators
2023-06-15 22:57:05 +01:00
Ian McInerney
753cc6679b
Remove temp items from its group before deleting them
...
The 1st level items being copied don't have their group information
copied, and we assert that it has been removed from the group on
deleting it, so we just reset the group membership to prevent the
assert.
Fixes sentry KICAD-22S
2023-06-14 23:33:41 +01:00
Ian McInerney
137640ac28
Remove group association before plotting board outline in drill map
...
The plotter doesn't care about the grouping, and we expect the item to
have no group on deletion, so temporary items like this shouldn't be
part of one.
(Sentry issue KICAD-24Y)
2023-06-14 00:26:46 +01:00
Yang Hongbo
fe1b1becef
Check visibility when switching layer in router tool
...
When routing and using layerNext (hotkey '+') to switch to next layer,
it will skip invisible layer, when click BUT_LEFT, the new line should
be in the same layer (visible layer)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14480
2023-06-13 09:46:12 -07:00
Jeff Young
9ed2458f00
Reset session drawing props after Board Setup.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14932
2023-06-13 11:06:10 +01:00
Marek Roszko
a87fada9e5
Minor tweaks to support wx3.3
2023-06-12 20:52:47 -04:00
Ian McInerney
1c138b4f3e
Rename function in Footprint wizard to prevent impoper override
...
The ReloadFootprint function now exists in the base class with 1
argument, but this frame already had a similar function with no
arguments. Rename this one to RegenerateFootprint to prevent warnings.
2023-06-12 23:14:56 +01:00
Jeff Young
782c73300b
Move drawing sheet datastructures to EDA_IU_SCALE.
...
Or mostly, at least. Plotters still define their own mils-to-iu scale.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14934
2023-06-12 22:34:25 +01:00
Jeff Young
b7f0aae006
Nullptr safety for UI Conditions.
...
We don't really control when these are called, so best not to assume
we've finished initialization of the frame/screen/document/whatever.
Possible fix for KICAD-KY.
2023-06-12 12:38:50 +01:00
Jeff Young
aa8a903940
Cleanup.
2023-06-12 11:14:27 +01:00
Jeff Young
a3754785df
BoardDesignSettings are owned by FOOTPRINT_EDITOR_SETTINGS in the FP Editor.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14925
2023-06-12 10:08:41 +01:00
CraftedNightmare
aa667bea0f
eeschema: Fix Search pane not remembering docking sizes and positions
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120 for eeschema
Fixes that Show Search Panel Checkbox can get out of sync when restarting
eeschema while the search pane is active
2023-06-11 20:23:24 +00:00
CraftedNightmare
d94e9b31b1
Fix Search pane not remembering docking sizes and positions
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14120
2023-06-11 20:23:24 +00:00
Jeff Young
93789e75b9
Re-create missing exclusion markers if DRC was cancelled.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14919
2023-06-11 12:14:27 +01:00
Jeff Young
3159391e28
Make sure infobar gets created earlier.
...
(restoreLastFootprint() might want it.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14922
2023-06-11 11:40:51 +01:00
Jeff Young
4fc6047f91
Make sure infobar gets created earlier.
...
restoreLastFootprint() might want it.
2023-06-11 11:02:56 +01:00
Roberto Fernandez Bautista
3d1b96d6ca
Cleanup jobs handlers (+Fix build)
2023-06-11 00:12:53 +02:00
Roberto Fernandez Bautista
3f758711fd
Use external REPORTER for EESCHEMA_JOBS_HANDLER / PCB_JOBS_HANDLER
2023-06-10 23:35:32 +02:00
Jeff Young
fcb156c323
Make sure opposite-corner rects test the same.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14907
2023-06-10 22:30:04 +01:00
Jeff Young
96a221ceba
Refresh delete immediately; don't wait for next mouse motion.
2023-06-10 21:11:05 +01:00
Jeff Young
111d0a2c14
Check for proxy references and values in Selectable().
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14911
2023-06-10 17:47:29 +01:00
Jeff Young
f66b9f75a3
Allow EDA_COMBINED_MATCHER use in KiCad find architecture.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12532
2023-06-10 14:50:06 +01:00
Jeff Young
d18b0c62f6
Make FOOTPRINT_PREVIEW_PANEL a FPHOLDER.
...
Also makes sure it get its user_units set up.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14913
2023-06-10 13:36:17 +01:00
Roberto Fernandez Bautista
0159be8ddd
Fix build (broken in 90ff331c
)
2023-06-10 14:21:10 +02:00
Roberto Fernandez Bautista
90ff331c58
Refactor: Move static to be inside ZONE_SETTINGS
2023-06-10 12:03:41 +02:00
Alex
2450435131
Support --mirror option in "kicad-cli pcb export pdf"
2023-06-10 04:54:11 +03:00
Jeff Young
e698156975
Upgrade many editing actions to SCHEMATIC_COMMIT.
2023-06-09 22:41:47 +01:00
Jon Evans
3a2cc8f56f
Net Inspector: clear sort ordering during rebuild
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14697
2023-06-09 09:06:11 -04:00
jean-pierre charras
639da0eb5a
Fix a wxWidgets alert when deleting the last entry in a lib table.
2023-06-09 08:09:22 +02:00
jean-pierre charras
14c10d2a37
PANEL_FP_PROPERTIES_3D_MODEL: fix a wxWidgets alert.
...
Happens when there is no 3D model in 3D grid list, and when trying to add
a new 3D model, but canceling the 3D dialog file selector.
2023-06-08 17:46:38 +02:00
Tomasz Wlostowski
3667e4f6b2
router: correctly assign owner via/pad to its hole when committing the world state
...
fixes #14852
2023-06-08 11:57:23 +02:00
Jeff Young
d5b5a3eaf4
Add action info to Undo/Redo menus.
...
Note that this only works where a BOARD_COMMIT or SCHEMATIC_COMMIT is used.
(BOARD_COMMIT is used almost universally in PCBNew, but SCHEMATIC_COMMIT
has very little adoption in EEschema so far.)
2023-06-07 14:37:34 +01:00
Nils VAN ZUIJLEN
518741c52a
cli: add an option to the pcb exports for plotting negative svg and pdf
...
ADDED: The -n or --negative option for exporting negative svg or pdf plots
from kicad-cli. Example usage: kicad-cli pcb export svg -n -l B.Cu board.kicad_pcb
2023-06-07 13:28:52 +00:00
jean-pierre charras
f92271af2c
DIALOG_GEN_FOOTPRINT_POSITION: replace "Gerber (experimental)" by "Gerber X3"
...
Gerber position file is now not experimental, and is accepted by some board houses.
2023-06-07 11:43:30 +02:00
Jeff Young
9a757e8e44
Restore over-aggressive CLion cleanup.
2023-06-06 15:49:41 +01:00
Jeff Young
9fe00bb808
Cleanup. No (intentional) functional changes.
2023-06-06 12:30:35 +01:00
Jeff Young
c5e7d800a4
Back out earlier diamond-to-rectangle fix for one that's more targeted.
...
(And doesn't fail qa_pcbnew.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14828
2023-06-05 21:26:37 +01:00
Jeff Young
4ea41174c3
Variable names and minor performance fixes.
2023-06-05 21:26:37 +01:00
jean-pierre charras
6eda60e503
Pcbnew: UI change: move layer selector from main toolbar to auxiliary toolbar
2023-06-05 20:31:18 +02:00
Jeff Young
aafbbb4c63
Clean up includes.
2023-06-05 11:01:10 +01:00
Jeff Young
7a3a8b67c1
Exclude redraws during closing (particularly of RATSNEST_VIEW_ITEM).
2023-06-05 11:01:10 +01:00
Jeff Young
29aabcf77e
Naming clarity. No functional changes.
2023-06-05 11:01:10 +01:00
Jeff Young
f3d3ade1dc
Increased mutex safety.
...
Don't even query the size() without having at least a shared_lock.
*May* prevent KICAD-4S, but seems unlikely.
2023-06-05 11:01:10 +01:00
Marek Roszko
b41606ecf7
Use the correct printf format for the move individually status text
...
Fixes sentry KICAD-1ZT
2023-06-04 21:08:13 -04:00
Jeff Young
0091b9f897
Prevent Sentry KICAD-MM crash.
...
It'd be nicer to know what happens, but we don't have a reproducible
case, so this "fix" will at least prevent that particular crash.
2023-06-04 23:00:44 +01:00
Jeff Young
1528f4700c
Treat canvas item as current when tree view contains no selection.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12702
2023-06-04 20:52:12 +01:00
Seth Hillbrand
e4fe27993e
Fix wxCHECK_MSG in DRC
...
The layers check needs to look for testing against technical layers for
those vias that pass the outer layers
2023-06-03 20:25:35 -07:00
Jeff Young
5875f89531
Centralize text size clamping.
...
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Wayne Stambaugh
bdee545841
Coverity warning fixes.
2023-06-03 07:28:17 -04:00
Seth Hillbrand
7f5d790610
Ensure we aren't trying to access a closed board
2023-06-02 15:47:46 -07:00
Jeff Young
97cf7c874e
Handle Altium dimension angles and non-unit suffixes.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13751
2023-06-02 18:30:16 +01:00
Jeff Young
3c8d2bfca5
Assertion checking for hole/parent ownership mismatch.
...
(This mismatch is the root of the problem in issue #14852.)
2023-06-02 18:30:16 +01:00
jean-pierre charras
9a47b34499
Replace PAD_SHAPE::RECT by PAD_SHAPE::RECTANGLE to avoid a collision NAME with a windows header on MSYS2, creating many compil warnings. No actual code change.
2023-06-02 12:18:24 +02:00
Tomasz Włostowski
3c3517cc36
router: can't add a clone of a VIA's hole when adding the via to INDEX - this will result in bogus colliding objects
...
This commit partially reverts deb3cbf8
. VIA and SOLID operator='s introduced in it do a good job but the cloning of holes in addHole() causes bogus collisions.
2023-06-01 22:47:02 +02:00
jean-pierre charras
db3cf4274b
Modify the order of an include to avoid a collision name with a windows
...
header that prevent Kicad build (msys2 specific)
2023-06-01 16:26:19 +02:00
Jeff Young
deb3cbf89b
Prevent use-after-free crashes by not fighting over who owns a HOLE.
...
The diff-pair placer creates DIFF_PAIRs on the stack, which have
VIAs in them, which have HOLEs in them. The HOLEs get put in the
NODE's index, and we then crash later when doing a collision after
the stack variable has gone out of scope.
The stack variable is also copied while doing a search for "best",
and without the operator= definitions the "best" and the "original"
both think they own the HOLE.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14852
2023-06-01 15:07:29 +01:00
Seth Hillbrand
c7758999af
Handle LOCKFILE logistics for ro
...
We need to check if a lockfile is valid to determine if we should
override the lock. Valid() is true if the lockfile couldn't be created
b/c of permissions or if the lockfile could be created and acquired.
2023-05-31 17:04:32 -07:00
Seth Hillbrand
aacf8f50bf
Remove unneeded headers from pcbnew_scripting_helpers.h
2023-05-31 15:54:46 -07:00
Jeff Young
ddd2cb005b
Don't allow setting a pad width or height of 0.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14278
2023-05-31 23:41:43 +01:00
Tomasz Wlostowski
7966126040
router: invalidate items freed by PNS::NODE in the clearance cache
...
This was causing intermittent shove hiccups/freezes as RULE_RESOLVER::GetClearance() could return a bogus clearance value, taking
a cached value for an item that does not exist anymore. If the allocator/stack accidentally reclaimed such item's address - we were getting
very nasty and difficult to reproduce misbehaviours of the shove algorithm. Hopefully this patch fixes this. More info in the comments.
Note to self - I'm still not fully convinced I want PNS::ITEM pointers as the cache key, probably a unique counter would be better here.
2023-06-01 00:01:15 +02:00
Seth Hillbrand
14f6e32c74
ADDED: Change watcher for libraries
...
When editing or viewing library symbols, the files are watched for
underlying changes. If any occur, the user is either prompted to reload
(if reloading would overwrite their current edits) or the file is
silently updated to the current version on disk.
This also sets a custom assertion handler to avoid unneeded crashes when
recieving invalid SAMBA packets and turns off assertions entirely when
running in release (non-debug) mode
2023-05-31 13:46:00 -07:00
Tomasz Wlostowski
15db42d9c8
router: fix use-after-free crash in drag walkaround mode
2023-05-31 22:20:28 +02:00
Tomasz Wlostowski
5100345c6e
router: prevent pushout/bogus collision of via with is own hole (or copper) when dragging
...
The root cause was not removing the original (pre-dragging) via from the world, comparing the ITEM::Parent() pointers of the items was only hiding the main issue.
This also fixes the PNSViaCollisions test in the qa/ suite.
2023-05-31 17:06:24 +02:00
Jeff Young
8baf2a832f
Make pad flipping work both from parent footprint *and* individually.
...
The last fix was for individual pads, but it broke when the whole
footprint was flipped for rotated footprints.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14829
2023-05-31 11:13:35 +01:00
Jon Evans
3783fc8f5a
Remove unused line
2023-05-30 20:06:18 -04:00
Jeff Young
4874537c40
Push/pop router tool for inline drag.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14832
2023-05-30 18:02:12 +01:00
Jeff Young
c36b0fcda7
Make sure 3D file browser is treated as modal by quit.
...
(Otherwise we crash when freeing it during the quit.)
2023-05-30 14:58:46 +01:00
jean-pierre charras
6b845b9054
Fix compil warnings and a wxWidgets alert.
2023-05-30 09:00:46 +02:00
Jon Evans
141cc85ff3
PNS: Work around collision checking issues in shove mode
...
Need to special-case shove mode since 942ee13c
introduced
collision checking in all modes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14836
2023-05-29 18:19:47 -04:00
Roberto Fernandez Bautista
bb90aa24b7
Add basic QA test to CADSTAR PCB footprint import
2023-05-29 23:29:28 +02:00
Roberto Fernandez Bautista
3b56b7bf68
Fix assert in PROPERTY_ENUM (ENUM_MAP<PCB_LAYER_ID> was not initialised)
2023-05-29 23:29:28 +02:00
Jeff Young
f5791f5dc6
Left some fixes out of previous commit.
2023-05-29 16:22:24 +01:00
Roberto Fernandez Bautista
9633c8af22
CADSTAR PCB: Fix regression in loading of thermal pads
...
Due to removal of SetPos0 in 28028c94
, we now don't need to compensate
for the position of the footprint while importing.
2023-05-29 16:41:47 +02:00
Jeff Young
65e53b8ecd
Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation.
...
1) Also reorders parameters to make sure the compiler helps out.
2) This also makes it harder to mess up the discrepency between
BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.
3) Also fixes a couple of bugs where the corner strategy was passed
in as a segCount.
4) Also fixes a couple of bugs where the error wasn't forced to the
outside to match the ERROR_LOCATION.
5) Also fixes a couple of bugs where the seg count was specified
without regard to an already passed-in max deviation
2023-05-29 15:29:03 +01:00
jean-pierre charras
ef4dded915
PCB_TEXT::TransformTextToPolySet(): fix incorrect param when calling Inflate()
...
This incorrect value created hang when clicking on a pcb text.
2023-05-29 14:21:10 +02:00
Roberto Fernandez Bautista
dfebe516c5
CADSTAR PCB: Fix memory leak
2023-05-28 23:56:43 +02:00
Roberto Fernandez Bautista
a119bd604d
Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID
2023-05-28 23:56:41 +02:00
Jeff Young
c71cf21e2f
Use rendered text to generate bounding box for knockout text.
...
Don't open-code knockout text shape generation in several different
places.
Make sure triangulated knockout text gets clearance added when
specified.
Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).
2023-05-28 17:20:11 +01:00
Jeff Young
95a09f686b
Revert attempt to use drawing code to generate text bounding boxes.
2023-05-27 22:11:34 +01:00
Jeff Young
cb53a18ee3
Bug fixes for handling boolean flags in DRC rules.
2023-05-26 18:44:33 +01:00
Jeff Young
768fbf5af2
Give up on trying to calculate text bounding boxes.
...
It results in too many hacks strewn through the code. Just draw the
text and measure it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14803
2023-05-26 18:44:33 +01:00
Jon Evans
942ee13cd1
PNS: Allow width-caused DRC violations at start of route
...
Also fix an issue where DRC violations introduced by the
width change action could be committed in walk/shove mode.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14805
2023-05-25 23:10:00 -04:00
Jeff Young
50da4e483e
Tailor inspector text properties for dimension objects.
2023-05-25 16:18:37 +01:00
Jeff Young
05fef51d81
Push rendering portion of text cache generation down into CALLBACK_GAL.
2023-05-25 11:25:32 +01:00
Jeff Young
1518ddde74
Push much of text var autocomplete down into SCINTILLA_TRICKS.
...
Shared code == fewer bugs. Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Jeff Young
14f004d2a5
Hook up text variable auto-complete for PCBNew.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00
Seth Hillbrand
48ecd742eb
Maintain file permissions when renaming
...
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files. This updates the
permissions to match the existing values where possible
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
2023-05-24 17:09:38 -07:00
Seth Hillbrand
122be418bb
Upgrade file locking
...
wxSingleInstanceChecker is meant for running programs, not file locking.
This implements an RAII class for file locking that stores the lock
files next to the file being locked, allowing it to be easily found and
removed. Also includes the ability to override the lock, with
information about the original owner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14734
2023-05-24 13:51:54 -07:00
jean-pierre charras
76d66571e4
Pcbnew: fix crash when trying to save a board with a text with overbar and
...
using a non Kicad font
PCB_PLUGIN::formatRenderCache() was considering all shapes in cache are polygons,
but this is not true: some items can be stroke shapes.
Fixes #14804
https://gitlab.com/kicad/code/kicad/-/issues/14804
2023-05-24 18:21:50 +02:00
Jeff Young
2ac3f4cc9e
Undo strategy based on being in a footprint, not footprint editor.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14799
2023-05-23 17:56:12 +01:00
Jeff Young
56853a6209
Change teardrop edge shape to a checkbox.
2023-05-23 17:45:26 +01:00
Jeff Young
b442d769fd
Don't allow collisions with self.
...
The previous test didn't handle is-self-tests between a hole and
its override in a different NODE. When calculating the pushout
force we don't remove the via (and its hole) from the current
node until after the calculation, so we end up checking for
collisions between the new (cloned) via's hole and the original
hole in the root node.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14795
2023-05-23 14:10:22 +01:00
Wayne Stambaugh
5b539958a2
Fix track and via properties dialog radio buttons on GTK.
2023-05-22 13:54:13 -04:00
Jeff Young
00986484e0
Attempt to fix teardrop radio buttons on GTK.
2023-05-22 14:48:53 +01:00
Wayne Stambaugh
a13a49f45a
Fix clipped combobox entry in board editor text box dialog.
...
The layer combobox color swatch was clipped when the combobox was
closed when the dialog was launched. Setting the minimum width
resolved the issue. This may have been a GTK only issue.
2023-05-22 08:54:48 -04:00
Jeff Young
df763eaf88
Reconcile PNS router with DRC.
...
Hole-to-hole is only for drilled holes.
NPTH slots also get EDGE_CLEARANCE applied.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14771
2023-05-21 19:58:00 +01:00
Jeff Young
7e51077992
STL is your friend... until it's not.
...
Operator[] was creating an empty entry in the connectivity map,
fooling us into thinking the item had already been added.
Worryingly, this bug has been in there since 2017; a recent
change in teardrops just happened to expose it.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14781
2023-05-21 17:56:43 +01:00
Jeff Young
ff9a5b8373
Remove change from teardrop merge that wasn't needed for final impl.
2023-05-21 16:39:18 +01:00
Jeff Young
502da2d03c
Performance improvements.
2023-05-21 11:23:56 +01:00
Jeff Young
08a9d4b26f
ADDED preference for ratsnest thickness.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14708
2023-05-21 00:07:08 +01:00
Jeff Young
80aef37cc4
Don't consider shorted items when opitmizing ratsnest.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14715
2023-05-20 22:54:44 +01:00
Jeff Young
ea341289de
Fix uninitialized variable (Coverity report).
2023-05-20 21:10:09 +01:00
Marek Roszko
8a7044c3fb
Fix some more warnings
2023-05-20 08:00:16 -04:00
Alex
9d452a6097
Fix opening boards with deprecated features.
2023-05-20 07:39:01 +03:00
Jeff Young
4c59365867
Blind attempt to fix pns-debug-tool linking issue.
2023-05-19 19:26:03 +01:00
Jeff Young
8b1fd62d35
Make pad & via teardrops 1st-class citizens (props of the pad/via)
...
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.
Add updating of teardrops on BOARD_COMMIT::Push().
Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
jean-pierre charras
86c75cf261
Fix a compil issue.
2023-05-19 09:24:49 +02:00
Marek Roszko
3bf2fb2c0e
Fix more C5266 warnings
2023-05-18 22:08:50 -04:00