Commit Graph

1845 Commits

Author SHA1 Message Date
Ian McInerney cc81ccf79a Display unit name in symbol context menu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18285
2024-06-27 19:57:14 +01:00
Jeff Young 26b86b3922 Don't use wxLogMessage/wxLogError for messages not meant for user.
They are particularly damaging when our event loop
gets tied up in knots with the log message window
behind a modal window -- thereby locking up KiCad.
2024-06-24 20:22:29 +01:00
Jeff Young 0b4d0bcb6c Undo for Repeat Pin.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18261
2024-06-24 13:59:05 +01:00
Alex Shvartzkop f6994702aa Fix arc edit points ordering in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18254
2024-06-22 06:17:00 +03:00
Jeff Young c549a214c9 Performance: don't alloc std::vector in critical areas.
For some history, see also aa2ad3b44c
2024-06-21 19:07:46 +01:00
Seth Hillbrand bcf6b620a8 Large rework of BEZIER_POLY
Add direct handling of quadratic beziers to save compute time and number
of points.  Update cubic interpolation to reduce number of points
generated for a given smoothness

Cache data on open and used cached data to avoid multiple re-calcs

Remove minimum line length and number of segments and replace with
standard max error level.  Allows us to specify the tolerance of bezier
interpolation
2024-06-18 17:55:41 -07:00
Mike Williams a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e7122.
2024-06-12 13:30:29 -04:00
Jeff Young 2e38fa84bf Don't allow writing "//" to spice netlist.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18161
2024-06-10 15:36:20 +01:00
Mike Williams 0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
Jeff Young edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
Jeff Young 758974f5aa Performance for large hierarchies: sorting
Cache page numbers during sort.
Don't construct SCH_SHEET_PATH when reference will do.
Don't construct SCH_SHEET_PATH when KIID_PATH will do.
2024-06-06 11:53:01 +01:00
Jeff Young a6e8cfe35f Performance for large hierarchies: avoid sorting
Don't sort SCH_SHEET_LISTs if we're just scanning the doc.
2024-06-06 11:53:01 +01:00
Jeff Young 44c588f122 Performance for large hierarchies: lazy eval
Don't create SCH_SHEET_LISTs until we have to, and then
only create them once.
2024-06-06 11:53:01 +01:00
Jeff Young e543ff0578 Performance for large hierarchies: lookups
Don't bother to sort sheet lists when we're just looking
up a UUID, sheet count, other symbol units, etc.
2024-06-06 11:52:57 +01:00
Mike Williams 7679f40b2b SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 10:03:00 -04:00
Jeff Young e5bad195b6 Fix a bunch of failures to resolve text variables. 2024-06-04 12:46:34 +01:00
Mike Williams 32289ffce7 schematic: fix broken undo of sheets, new and changed
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/11855
2024-06-03 13:45:52 -04:00
Jeff Young ec0fdfffff ADDED: markers for excluded-from-sim items.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15382
2024-06-03 17:12:15 +01:00
Seth Hillbrand a9ae86eefd Cleanup geometry functions
Added Distance(VECTOR2) function that returns a double.  Removed
superfluous EuclideanNorm, GetLineLength, integer constructor for
EDA_ANGLE (this promotes to double in the CTOR), DistanceLinePoint and
HitTestPoints

Also extended the size for arc calculations that get distances to center
points to avoid overflow
2024-05-31 12:26:37 -07:00
Jeff Young d82522304c Improve clarity. 2024-05-29 19:53:20 +01:00
Jeff Young 8204577fba Throw duplicate pin error as it prevents other checks.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14761
2024-05-26 16:18:54 +01:00
John Beard fd4c15517f Eeschema: Fix selection of items inside filled shapes
The selection heuristic broke down when one item was a filled
shape. Because all hit tests would succeed with distance 0 for
these shapes, they would always be considered the closest item
to the exclusion of all else, which made it very hard to
click on a graphic inside a filled shape.

Now, recognise when an item would be "dominating" and
decline to promote it to the "closet" spot. It will still
be selectable if there are no other items nearby, or if
there are multiple shapes.
2024-05-23 12:53:09 +08:00
John Beard d3e03c51bf Bus unfold: snap the entry to the bus, even if the cursor isn't right on the bus
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18011
2024-05-20 12:40:06 +08:00
John Beard 7e02f1254e Remember the bus unfold label orientation between invocations 2024-05-17 09:55:40 +08:00
jean-pierre charras 87d3d38552 Eeschema, Pin helpers: fix wrong label orientation if the symbol is rotated
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18012
2024-05-16 17:15:06 +02:00
Jeff Young d9a6b2aec2 Use display titles for axes in CSV output.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17324
2024-05-13 00:36:18 +01:00
Jeff Young 6cc534182a Simplify rotation code. 2024-05-12 23:22:13 +01:00
Jeff Young 20cde51b43 Fix numerous bugs in schematic item rotation.
(This will probably introduce some new ones too, but
it was so broken it's hard to know where to start.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17921
2024-05-12 20:43:08 +01:00
Jeff Young 29360b1aef Raw spice models don't have pin names. 2024-05-10 20:58:13 +01:00
Jeff Young a99377c1ec The user can cancel the opening of many editors.
Don't play dice with the devil.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17989
2024-05-08 18:21:42 +01:00
Seth Hillbrand 3620887a22 Optionally use electrical type when shown.
We also need to consider electrical type as an exact hit when we are
showing it.  Otherwise, we get the pin added to our consideration list
but not selected without hitting close neighbors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16183
2024-05-06 10:37:23 -07:00
Alex Shvartzkop 5475359d00 More build time optimizations. 2024-05-06 04:39:28 +03:00
Jeff Young 2ad05e34ea Fix symbol editor drawing tool coord system. 2024-05-05 22:21:12 +01:00
John Beard 4dd049ee8f Add action to focus tree searches
The default hotkey is Ctrl+L, as this is not bound by
default in the FP or symbol editor, and it is the hotkey
that is used to focus the address bar in web browsers,
which is a similar kind of action.
2024-05-05 04:18:36 +08:00
Jeff Young 44717f927c Fix rotation of selection in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17921
2024-05-03 21:14:26 +01:00
Seth Hillbrand 2139789c4c Move ERC items to their own directory 2024-05-03 12:06:24 -07:00
Seth Hillbrand b8ccaae403 Respect schematic settings for hidden pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17941
2024-05-03 09:58:33 -07:00
Jon Evans eb0708d48d Fix broken cherry-pick 2024-05-03 11:49:58 -04:00
Jon Evans ac8bd587dc Fix deduplication of already-placed symbols
The comparison function was failing to properly
de-duplicate by LIB_ID, especially for parts
from database libraries, causing the list to grow
with the size of the design.

(cherry picked from commit 2ef18ad4ca)
2024-05-03 11:47:21 -04:00
Seth Hillbrand 416033e8e5 Ignore hidden text fields when cross-probing
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245
2024-05-02 10:57:25 -07:00
Jon Evans d6a54a98b2 Support ortho dragging labels off sheet pins 2024-05-01 21:53:22 -04:00
Jon Evans dffb2c1994 Pin helpers can help sheet pins also
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17923
2024-05-01 21:53:14 -04:00
JamesJ d92db68597 Fix corner editing for schematic rule areas
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17909
2024-04-30 16:58:14 +00:00
Jeff Young e5a17b96a3 Fix more bugs from collapsing LIB_* to SCH_*.
The transform can always be used: it will be the identiy
transform when in the schematic.

Also fixes a bug where textbox borders didn't get
plotted, and a couple others where things were still
expecting an upside-down coordinate system.
2024-04-29 12:19:13 +01:00
Jeff Young b5fb7b7ace Get rid of Export Symbol.
It can be done with the "New Library" button when doing
a Save copy as (which doesn't lead the user down the
wrong path as Export Symbol can).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17840
2024-04-28 22:05:59 +01:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young c59ed0bbb7 Flip symbol editor's Y axis to match other editors. 2024-04-27 13:47:56 +01:00
James J be8744176c Add SCH_RULE_AREA shapes to eeschema
Includes:
 - Fix GAL to draw closed polygons in eeschema
 - Add functionality to eeschema to draw arbitary polygons
 - Update polygon item previews to have customisable edge colour
 - Add new SCH_RULE_AREA class, derived from a poly SCH_SHAPE
 - Add SCH_RULE_AREA to paint and plot methods
 - Add new rule area color preference to themes
2024-04-25 14:24:46 +00:00
Ethan Chien d058e12cb5 Fix: Unable to select other items after syncing hierarchical sheet pins
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17800
2024-04-25 10:49:07 +00:00