79 Commits

Author SHA1 Message Date
Seth Hillbrand
0a767acb3a Wrap net_selector widget for properties
Provides consistent interface to modify/filter nets in property panel
and dialogs

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17643
2025-08-26 11:50:12 -07:00
Jeff Young
c758a2fbaf Don't sequence layers when order doesn't matter. 2025-07-14 19:12:44 +01:00
Jon Evans
7e24210b1e API: Use net names, not codes, and allow creating new nets
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21027


(cherry picked from commit 0ff77bd33292b80ab9f5d686c5e7d9ce06be715f)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2025-05-30 22:13:44 -04:00
Seth Hillbrand
85a78c4530 Check for valid board before query
New items may not have a board set and will return nullptr

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20893

(cherry picked from commit cd3fea196cad5d6b73c4b2c5e70730e5431b6746)
2025-05-09 13:45:40 -07:00
JamesJCode
83f03b10ff Further netclass name method cleanup 2025-01-14 21:16:43 +00:00
JamesJCode
c80a71f64a Make netclass name methods clearer, and improve doc strings
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:

GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)

Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
2025-01-14 20:44:09 +00:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
James J
7ce00e511b Multi-netclass support 2024-07-26 20:49:29 +00:00
Seth Hillbrand
17b0dabec3 Remove the now unused curve-point count
With the refactor of the bezier lib, we no longer base the curve on the
number of points but rather on the error allowed.  The parameter was
vestigal and had no effect on output
2024-07-10 11:19:09 -07:00
Seth Hillbrand
cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Seth Hillbrand
293075426b Clean up some LSEQ functions
We are derived from std::vector now.  We don't need our own prima donna
increment and dereference overload as these just create bloat and
non-standard coding practices
2024-07-08 20:59:46 -07:00
Jeff Young
694a7db457 Performance improvements.
Don't construct a wxString or a LSEQ when you don't
have to.  They're both more expensive than you might
think.
2024-06-12 11:06:10 +01:00
Jeff Young
d865bda4f2 Cache display netnames.
Also changes the redraw behaviour to not try and redraw
only when things entered the view (this didn't work
because it may be the netname that's entering the view,
not the whole track).  Instead we only process a finite
number of tracks on each idle event (in order to avoid
#12436).

Note that we don't need the timer at all anymore as the
netnames are in fixed locations on the track and never
make the track look like it's being dragged.

Also improves performance by avoiding sqrt.
2024-06-11 16:30:52 +01:00
Graham Keeth
4f36f669dc Use Title Case for property names 2023-11-29 01:23:35 +00:00
Jon Evans
2b27337778 Clamp ratio properties
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16153
2023-11-25 18:40:14 -05:00
Jeff Young
67d8b13b02 And Font to properties manager for EDA_TEXT items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16004
2023-11-01 00:39:42 +00: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
Jon Evans
3f42e6b702 Properties: Hide Net Class from GUI
It is confusing users who want to change the netclass of a net.
2023-03-26 19:46:00 -04:00
Jon Evans
65193487a6 Properties: Rename methods to better reflect their purposes 2023-03-26 19:43:16 -04:00
Jon Evans
f7d59f2e89 Enable properties panel in footprint editor 2023-02-17 20:35:56 -05:00
Alex
13ce2ebf46 15% rendering optimization in PCB_TRACK::ViewGetLOD. 2023-01-27 18:37:43 +03:00
Jon Evans
1ff1571849 Bring back deprecated net properties to rules system 2023-01-11 22:14:52 -05:00
Jon Evans
308576b78d Properties: Use parent footprint references instead of UUIDs
Also remove redundant Net Name property (Net is used)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12334
2022-11-24 22:40:45 -05:00
Jon Evans
88495e5be1 Properties: Fix masking of layers for non-copper items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12884
2022-11-24 20:34:40 -05:00
jean-pierre charras
035031d902 BOARD_CONNECTED_ITEM::GetShortNetname(): protect against nullptr.
m_netinfo was not tested against nullptr in this method, although it is
tested in all other places.
2022-11-19 11:16:47 +01:00
Roberto Fernandez Bautista
4108099641 Properties Panel: Correctly limit layers for connectable items to copper layers 2022-08-22 21:32:33 -04:00
Roberto Fernandez Bautista
fe7e665236 Properties: NetName and NetClass should have a space + don't translate "Net" 2022-08-22 21:32:33 -04:00
Jeff Young
a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Jeff Young
7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young
c5e195bdff Cleanup (includes and formatting). 2021-08-03 18:37:23 +01:00
Jeff Young
6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
cf00319c85 More NULL expunging. 2021-07-20 07:27:18 -04:00
Marek Roszko
10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Marek Roszko
17d680de08 netinfo.h does not need to be in board_connected_item.h 2021-06-06 08:45:38 -04:00
Jeff Young
83d07dc7f7 Comments. 2021-03-01 11:12:51 +00:00
Jeff Young
6272b48481 Make sure layer gets passed in to rules evaluation. 2021-02-08 14:53:49 +00:00
Jeff Young
b1f0bf7334 More consistent naming. 2020-12-08 13:05:39 +00:00
Jeff Young
7bd31d5237 Naming conventions. 2020-11-14 18:26:03 +00:00
Jeff Young
84dd5108ba Remove some "class_" prefixes from files. 2020-11-13 15:16:23 +00:00
Jeff Young
e4870ee87e Better nullptr safety for m_netinfo.
Fixes https://gitlab.com/kicad/code/kicad/issues/6347
2020-11-11 11:25:46 +00:00
Jeff Young
ae9afdd169 SNR. (Mostly for progammers, but a little for user messages.) 2020-11-02 16:20:00 +00:00
Jeff Young
ebc8e2c921 Move property manager tokens to HKI macro.
This leaves them untranslated internally but makes sure their
translation strings exist so they can be dynamically translated
at the GUI level.

Fixes https://gitlab.com/kicad/code/kicad/issues/6020
2020-10-16 16:59:52 +01:00
Marek Roszko
52a12c6ccd Remove kicad_string.h from footprint_info.h 2020-10-15 18:39:43 -04:00
Jeff Young
70c3c5c514 Retire the two-item version of BOARD_CONNECTED_ITEM::GetClearance(). 2020-10-12 18:40:03 +01:00
jean-pierre charras
87a220b8e2 more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
Jeff Young
0ca09abbd3 Don't assume colour theme preview board will have a DRCEngine.
Fixes https://gitlab.com/kicad/code/kicad/issues/5650
2020-09-16 10:42:25 +01:00
Jeff Young
e2e229da96 Finish exorcising the old DRC system.
This moves the various BOARD_ITEM calls to the new system, and make
the DRC_ENGINE long-lived so that it can field those queries.
2020-09-15 20:15:46 +01:00
Jeff Young
665212341d Cleanup (consistent naming, 100-char line width, message precision). 2020-09-15 12:07:31 +01:00
Jeff Young
8420fcc33b Cleanup. 2020-09-13 17:08:24 +01:00
Jeff Young
cc86630f11 Start pulling new DRC engine into Kicad. 2020-09-11 16:04:11 +01:00