Commit Graph

1650 Commits

Author SHA1 Message Date
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Alex Shvartzkop 865e3a9f3c Improvements when working closer to 32-bit integer limits.
- Changes BOX2 size to extended coordinates.
- Adds BOX2ISafe to construct a BOX2I that will fit in int32.
- Adds more checks.
- Safer computations.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17670
2024-04-23 16:34:07 +00:00
Seth Hillbrand 6a73c7ffb3 Remove cover type in link holder 2024-04-21 11:11:48 -07:00
Seth Hillbrand 7dc7268146 output helpful net information in PNS debug 2024-04-21 11:11:21 -07:00
Seth Hillbrand 586fddeec1 Avoid case where whole line is new head
If the whole line shifts, we may have no points of the old tail in the
new line.  In this case, we may not only not find the split point but we
may also have fewer points in the new line than were in the old head.
Clamping to the maximum potential point count prevents creating invalid
lines

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16591
2024-04-19 17:54:29 -07:00
Seth Hillbrand b1dcd7ecf8 Remove Shift as a force-finish modifier
This was originally added to facilitate
https://bugs.launchpad.net/kicad/+bug/1777688 but the concern there was
that the layer kept changing when stopping on a via.  We currently have
double-click as the force-finish option and the layer reverts to the
original layer on which you were routing.  This should handle the
operation concern while still preserving shift as the modifier for grid
options

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15828
2024-04-19 08:53:27 -07:00
Marek Roszko 1607729cf7 Silence deprecation warning about enum * fp type 2024-04-12 22:55:43 -04:00
Seth Hillbrand 59f99d9a6a Re-add routine to remove duplicate points
The router needs to elimitate duplicate points but keep colinear
segments.  This re-creates the partial routine from the old Simplify()
function

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17582
2024-04-10 17:25:58 -07:00
Roberto Fernandez Bautista 6078bc52eb PNS: Fix a few memory leaks 2024-03-31 18:21:02 +02:00
Seth Hillbrand e4756c811e Utilize hash_combine to avoid hash collision
Most of our pointers will share the top 32 or more bits of their pointer
addresses, making cache collisions highly likely.  This uses a hash
combiner to mix the bits more effectively
2024-03-29 15:39:57 -07:00
Seth Hillbrand 10c1072479 Remove duplicated clearanceEpsilon
We already get clearance epsilon in the clearance resolver.  Don't
subtract it twice or we end up getting DRC errors

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16879
2024-03-29 15:39:57 -07:00
Seth Hillbrand 5e850911c5 When dragging a via, we need to get all obstacles
The clearance epsilon should not be used to limit which force elements
we return in the query.  Otherwise, we can drag elements into a
DRC-violating space

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16293
2024-03-29 15:39:57 -07:00
jean-pierre charras 90eed8b4b6 Avoid using a nullptr. 2024-03-20 18:34:18 +01:00
Alex Shvartzkop b56ee20e22 Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17351
2024-03-13 03:09:21 +03:00
Seth Hillbrand b2a25cb59e Correct usage signature for PNS_NODE::Add()
When moving a unique_ptr, you are actually passing the object, not a
reference to the object.  So we either std::move with the bare
unique_ptr parameter or we pass a reference.  But we should never pass
an rvalue reference for this or we'll make a copy without holding the
tracking (because it was moved)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16839
2024-02-27 19:49:13 +00:00
Jeff Young 986dbfd235 Don't double-add pads to commit.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17087
2024-02-25 11:31:04 +00:00
Jeff Young ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00:00
Alex Shvartzkop dd6213051d Pick DP coupled segment closest to start item and baseline. 2024-02-20 22:06:00 +03:00
Tomasz Wlostowski 82312a0fae router: SplitAdjacentSegments() should check if the end segment we are about to split is in the same net that the head segment
Otherwise, the router might add bogus segments to the node. The root of the problem is somewhere in the logic that delivers aEndItem to ROUTER::Move() though - as the end item (in line placement mode at least) should always be an item within the same net as the head and not belonging to the current head...
2024-02-20 03:20:08 +00:00
Alex Shvartzkop 8d76e4e171 Allow DP meanders to (mostly) fit on adjacent segments. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 943c5fea59 Fix length calculations in DP meander placer. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 1a65c0091f Tweak default meander settings. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop 35e73d7dee Restore green router collision color. 2024-02-20 03:20:08 +00:00
Alex Shvartzkop e9a881ed01 Reset placer when routing start fails to prevent crash on next usage.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17008
2024-02-20 03:20:08 +00:00
Roberto Fernandez Bautista ca148fb4d1 pns_debug_tool: Fix "save as" to save log file with new router state 2024-02-12 21:22:57 +01:00
Roberto Fernandez Bautista 3a6d74a3b3 Allow user to select location to save router event log
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16904

Note: no new strings added
"Unable to write '%s'." is from pagelayout_editor/files.cpp(182)
2024-02-11 13:43:55 +01:00
Alex Shvartzkop 2b295f85f5 Fix corner radius for 0 amplitude meanders. 2024-02-10 08:36:50 +03:00
Alex Shvartzkop d4e89543de Length-tuning fixes/improvements:
- Ensure correct amplitude values in tuning patterns.
- Support lower amplitudes in DP length tuning
- Ensure correct minimal inner radius in DP length tuning
2024-02-10 00:44:05 +03:00
Alex Shvartzkop 453e185613 Increase unconstrained tuning length to 1km. 2024-02-09 19:25:46 +03:00
Jeff Young ecbe1df7c1 Update target length/skew to std::optional.
Also fixes a bug in the router where the target length would
get trashed if set to maxLongLongInt.  (We'd add the default
tolerance to it sending it negative.)
2024-02-08 18:14:31 +00:00
Alex Shvartzkop 876449b83d Set DP skew meanders max length to INT32_MAX instead of 100 mm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16860
2024-02-08 19:34:17 +03:00
Roberto Fernandez Bautista e9fbb36538 SHAPE_LINE_CHAIN: Fix and simplify NextShape() + remove PrevShape()
NextShape() function was too complex (trying to go back and forwards).
We only used PrevShape() in one place, so removed that usage.

Added QA tests
2024-01-31 19:17:46 +03:00
Jeff Young b3f94ad46a Cleanup before exit.
Possibly KICAD-5TE.
2024-01-25 15:30:25 +00:00
Alex ed00cb3304 Support arcs in Break Track.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16712
2024-01-24 05:47:50 +03:00
Jeff Young ea7176d466 Don't attempt to update start item from a keyboard event. 2024-01-23 23:07:11 +00:00
Jeff Young a523c58530 Add a m_forceMarkObstaclesMode warning when violating DRC.
Also adds a modifier combination to commit anyway.
2024-01-02 17:02:50 +00:00
Ian McInerney 9db1dd5ec5 Refresh message panel when router mode changes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16497
2024-01-01 19:25:54 +00:00
Jon Evans 81dbb12054 Don't enable the shove when forcing highlight mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16467
2024-01-01 11:48:30 -05:00
Andrea Greco 55429aea6b pcbnew: Show current router mode in status bar 2023-12-31 02:54:59 +00:00
Jeff Young 2e02ca9d14 Make length-tuning rollover layer-specific.
Also don't show target length in diaog when it hasn't been
set.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16379
2023-12-30 20:27:39 +00:00
Jeff Young 69c95acc57 Handle arcs in TOPOLOGY::AssembleDiffPair(). 2023-12-27 13:52:02 +00:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Jeff Young 687389224e Do a more complete search for a coupled net.
In particular, don't bail out if the starting seg is part
of a tuning pattern meander or a user-authored non-coupled
segment to get to a via or something).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16380
2023-12-23 23:43:12 +00:00
Jeff Young ee0fff97f9 Cleanup formatting and remove dead code. 2023-12-21 22:06:59 +00:00
Jon Evans c1eef79119 Fix off-by-one error in setting depth
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16421
2023-12-21 08:31:47 -05:00
Jeff Young d155870275 Sometimes use grid (instead of clearance) for slop radius.
This is particularly important both when very large grids
are in use, and when the router hasn't been initialized
with a net yet (ie: in hover mode) and the board clearance
is set to 0.

https://forum.kicad.info/t/new-track-start-position-problem-on-kicad-7-0-10-rc1/47006
2023-12-21 12:58:58 +00:00
Jon Evans 76d1cc8150 Cleanup 2023-12-19 22:43:15 -05:00
Jon Evans 1c895fe18c Improve rendering of tuning status popup
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16304

Add dedicated UI rendering layers

Switch to screen-space rendering to avoid blurriness

Fix a bug in OpenGL GAL that causes layer
ordering to be broken when using Scale

Fix some issues with VIEW_GROUP layer ordering
2023-12-19 22:38:21 -05:00
Jeff Young 24846d3f44 Repair earlier fix for VVIAs. 2023-12-19 16:48:01 +00:00