261 Commits

Author SHA1 Message Date
Seth Hillbrand
173e02eff7 ADDED: Lasso support to Schematic Editor 2025-09-03 06:45:49 -07:00
Jeff Young
bf8809c841 Repair deficiencies in swapData. 2025-08-18 19:20:09 +01:00
Jeff Young
dc0e211e1e Can't add to parent group without a commit.
We allow this only for file import, where we don't
need to handle group membership anyway.
2025-07-11 21:26:19 +01:00
jean-pierre charras
c56ad6fecb Eeschema: ensure a hop over coordinate in entered only once for a given wire
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21164
2025-06-20 10:35:11 +02:00
Jeff Young
2cd6654e81 Hop-over improvements.
1) Move hop-over enablement to Schematic Setup.
2) Make hop-over size user configurable.
3) Prefer hop-overs to hop-unders.
2025-06-18 22:18:59 +01:00
jean-pierre charras
1b29499452 Eeschema, hop over arcs: fix the case of two 45 deg segments intersecting. 2025-06-16 10:24:09 +02:00
jean-pierre charras
57bbc96ab2 Make BuildWireWithHopShape() a member of SCH_LINE
BuildWireWithHopShape(): fix incorrect code, and plot Hop Over shapes
2025-06-15 16:54:54 +02:00
Dhineshkumar S
f650999004 Eeschema: Add option to show unconnected wire crossings as hop-overs. 2025-06-15 16:53:40 +02:00
Jeff Young
65dfee161b Read Altium's showName property for fields.
Also fixes a potential crash bug in schematic
cleanup when breaking lines that are part of a
group.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20985
2025-05-31 22:14:09 +01:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Mike Williams
82043e374a sch groups/lines: correctly handle view lifetime and drawing in group 2025-04-21 09:28:27 -04:00
Mike Williams
7cf699bc9d eeschema: move SwapData to SwapItemData/swapData paradigm
Used by BOARD_ITEM to support groups, which we are adding to the
schematic. Also adds an unused group pointer for now.
2025-03-27 13:16:09 -04:00
Seth Hillbrand
2b557c5497 Revert "Allow a no-connect to connect to a single pin (but not multiple pins)."
This reverts commit ee4a6127c6bed91f0d153983b8dc88da1e3375f1.
2025-03-07 08:10:04 -08:00
Jeff Young
877c6bce89 Printing is not zoom-specific.
(Some of these items don't currently get printed, but
there's no sense in leaving a latent bug around in case
we ever change our minds.)
2025-03-07 13:01:00 +00:00
Jeff Young
ee4a6127c6 Allow a no-connect to connect to a single pin (but not multiple pins).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20222
2025-03-06 10:27:11 +00:00
Jeff Young
f2da0c791f Retire non-cairo printing.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19323
2025-02-24 11:08:29 +00:00
Jeff Young
e21ec0558e DEFAULT no longer a legal LINE_STYLE for graphic lines.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19766
2025-01-27 18:25:39 +00:00
Jeff Young
a9ddcf4287 Fix positions of popup menus when plotting in mirrored mode.
[Resolve conflicts with JP's fix to same.  I'm not sure if we support !m_mirrorIsHorizontal, but
it was in other code, so I left it in just to be
safe....]

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19717
2025-01-23 10:55:11 +00:00
Jeff Young
6b6729284c Remove default line styles from all items except eeschema wires and buses. 2025-01-20 11:30:46 +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
John Beard
520a7cf62c GAL: ViewGetLOD should not be able to change the VIEW
Make the VIEW* parameter const. Since PCB_TEXT does a null-check,
it's not very clear if this can ever be null (and if it is,
why don't the other VIEW_ITEMs check?), so don't make them
all references too at this time.

Also dereference a few pointers a bit earlier to make non-null
promises sooner rather than later.
2025-01-02 22:59:31 +08:00
John Beard
527faddbfd GAL: provide constants for LoD HIDE/SHOW and a scale helper
Saves a mishmash of local HIDE/SHOW defs along with various literals.

Also provide a function that computes the scale at which a given
IU size becomes (notionally) a certain size on screen. While this
is a simple division, it's a bit opaque in terms of meaning.

Also it means the divide by zero case can be more universally
defended-against, which has traditionally been a bug opportunity.
2025-01-02 22:59:31 +08: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
Seth Hillbrand
9dfcb6a362 Cleanup ViewGetLayers()
Old style c-array replaced with vector returns
2024-11-21 13:18:36 -08:00
JamesJCode
6371b15aa4 Implement highlighting style for netclass colors 2024-08-12 21:39:07 +01:00
Jeff Young
16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +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
662a6d24e7 Improve robustness. 2024-05-12 23:30:29 +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
5abc7145da Fold LIB_ITEM into SCH_ITEM. 2024-04-08 10:24:50 +01:00
Jeff Young
1028a76e4a Harmonize print/plot APIs. 2024-04-06 09:34:56 +01:00
Jeff Young
c5ed80af52 Harmonize rotate APIs. 2024-04-06 09:34:56 +01:00
Jeff Young
92910d5d0f Factor common parts of SCH_ & LIB_SYMBOL into SYMBOL. 2024-04-04 13:18:55 +01:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
JamesJ
b01796cb84 Auto-fill new net global / local label names from connectivity
Currently, new global or local net labels are auto-filled with the
net name if the wire is driven by a global or local label. This
currently happens recursively within SCH_LINE. This fix moves this
to determining the driver from the connectivity graph, and removes
the determination from the SCH_LINE code where it does not belong.
2024-03-30 14:33:51 +00:00
Wayne Stambaugh
c5a02fc266 Do not update schematic connectivity for irrelevant property changes.
Prior to this change, the schematic connectivity was updated any time a
change was made to a connectable object.  Now the connectivity is only
updated when an object change actually affects the connectivity.  Other
properties like line width, fill type, custom fonts, etc. will not cause
the connectivity graph to be rebuilt.

The SCH_COMMIT flag SKIP_CONNECTIVITY has been removed.  All schematic
objects can test if they are connectable and if there have been changes
to any connection properties that require a connectivity rebuild.

Remove duplicate rebuild connectivity calls from editor control tool.
This was causing the tangling end test to get called four times on every
undo and redo action because the dangling end test is already called in
the connectivity graph calculation code.

Update connectivity when changing label names which fixes an unreported
connectivity bug.
2024-03-09 08:50:26 -05:00
Yon Uriarte
b7b64d959f Performance UpdateDanglingState
Avoid O(N^2) by spatial sorting, don't run checks if the bounding boxes
don't overlap.
A second copy is ordered by type to help classes that only want to check
a few types having to walk the whole list.
2024-02-23 19:21:44 +00:00
Jeff Young
df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00:00
Jeff Young
f50de028fb Make plotting of PDF property popups optional. 2023-10-21 21:52:51 +01:00
Seth Hillbrand
d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00: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
Jeff Young
5bca002567 Swap non-temp and non-edit flags for SCH_ITEMs.
This is required to keep selected and brightened state across undo.

It's also probably required for things like IS_SHOWN_AS_BITMAP and
possibly ENTERED.  FWIW, most BOARD_ITEMs do a straight swap, including
the temp and edit flags.  But that seems like a risky change....

Also removes SyncView() call from Undo/Redo as that does a MODEL_RELOAD
which clears the selection.
2023-07-08 18:37:47 +01:00
Jon Evans
632e94ef81 Add a few more schematic properties 2023-07-01 22:24:25 -04:00
Jeff Young
e7ee6e1f26 Modified flags are handled by SCH_COMMIT. 2023-06-25 16:01:35 +01:00
Jon Evans
bf2e9f8261 Properties for SCH_LINE
Also rename an incongruous setter
2023-06-24 20:08:42 -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
Jeff Young
7e5cd01079 Improve scoping control of connetion members.
(The real bug here is that CONNECTION_GRAPH::assignNetCodesToBus() was
growing the bus aliases members list because it used a non-const
reference to it as a local storage list.  The const scoping of it will
prevent this type of error in future.)

Fixes https://gitlab.com/kicad/code/kicad/issues/14269
2023-04-04 12:03:06 +01:00
Jeff Young
bc108023b3 ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
2023-02-11 21:11:07 +00:00
Roberto Fernandez Bautista
c4bde9c7e8 Extract SCH_LINE::BreakAt( aP ) from SCH_EDIT_FRAME::BreakSegment 2023-01-15 19:17:40 +01:00