Commit Graph

235 Commits

Author SHA1 Message Date
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
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
Jeff Young 5507748fa9 Make sure bounding box is not degenerate. 2022-10-12 16:36:54 +01:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Jeff Young 9bed145475 Allow the current sheet a chance to resolve text variables.
Fixes https://gitlab.com/kicad/code/kicad/issues/8692
2022-09-08 14:10:18 +01:00
Jeff Young b80824951e Clean up some of the PDF hypertext stuff, and add opening HTTP[S] urls.
Fixes https://gitlab.com/kicad/code/kicad/issues/12153
2022-09-06 13:59:52 +01:00
Jeff Young 59dc6c8e45 Add wire and bus popups for PDF export.
Fixes https://gitlab.com/kicad/code/kicad/issues/12157
2022-09-06 13:59:52 +01:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
jean-pierre charras 993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jeff Young 45393f228a Promote pin selections to symbols when preference is set.
Also make additional line slop zoom-relative.

Fixes https://gitlab.com/kicad/code/kicad/issues/12034
2022-07-19 10:31:49 +01:00
Jeff Young dbbdc9d2e6 Don't rely on the penWidth already being set when setting the dash style.
Fixes https://gitlab.com/kicad/code/kicad/issues/11908
2022-06-29 07:34:45 -06:00
Jeff Young d5a6452934 Get rid of special default line style for Eeschema.
Fixes https://gitlab.com/kicad/code/kicad/issues/11882
2022-06-27 19:12:45 -06:00
Jeff Young 036d283433 Don't muck with linestyle default when setting it.
Fixes https://gitlab.com/kicad/code/kicad/issues/11520
2022-05-02 17:22:13 +01:00
Miklós Márton 7ebdb4853c Do not open label edit dialog when adding label to an already named wire 2022-05-02 08:42:15 +00:00
Jeff Young 4f62960334 Update message panel from PCB point editor and SCH drawing tools.
Fixes https://gitlab.com/kicad/code/kicad/issues/11186
2022-03-21 10:32:36 +00:00
Jeff Young e68e2e973e Separate Line Properties dialog from Bus/Wire, and handle Junctions in Bus/Wire.
Fixes https://gitlab.com/kicad/code/kicad/issues/9979
2022-03-16 14:56:32 +00:00
Jeff Young 38cde901b0 Don't use last-resolved caches for graphic lines.
Fixes https://gitlab.com/kicad/code/kicad/issues/11127
2022-03-14 00:31:56 +00:00
Mike Williams 5503afc09a Schematic: disallow center rotation, allow both endpoint rotations
Center rotation will often misalign lines to the grid, which is bad
until fix off grid items on the schematic.

We can rotate a connection end into a new connection or to become
collinear with an existing line, so we need to check for this at the end
of rotation.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10565
(cherry picked from commit 7d4cb91f39)
2022-02-28 08:50:12 -08:00
Jeff Young f11b8011cd Separate plotting into background and foreground.
Fixes https://gitlab.com/kicad/code/kicad/issues/10390
2022-02-10 20:33:06 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
Jeff Young f310a5b986 Excise deci-degrees from trigo. 2022-01-18 11:44:55 +00:00