Seth Hillbrand
e808ab7409
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
(cherry picked from commit 59f99d9a6a
)
2024-04-11 14:20:50 +03:00
Seth Hillbrand
fd5d68ca9b
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
(cherry picked from commit 10c1072479
)
2024-04-01 17:55:29 -07:00
Seth Hillbrand
6b5acdea1f
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
(cherry picked from commit 5e850911c5
)
2024-04-01 17:55:29 -07:00
Seth Hillbrand
6c7261a223
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
(cherry picked from commit e4756c811e
)
2024-04-01 17:55:29 -07:00
Seth Hillbrand
4bf35cbed8
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
(cherry picked from commit 10c1072479
)
2024-04-01 17:55:29 -07:00
jean-pierre charras
8bdc62c111
Avoid using a nullptr.
2024-03-20 18:35:26 +01:00
Alex Shvartzkop
89ed09744b
Fix a crash in PNS zone sync when there's more outlines than triangulated polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17351
(cherry picked from commit b56ee20e22
)
2024-03-15 01:17:50 +03:00
Seth Hillbrand
38df918993
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
(cherry picked from commit b2a25cb59e
)
2024-02-28 10:11:20 -08:00
Jeff Young
45910bc7c1
Don't double-add pads to commit.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17087
2024-02-24 23:25:23 +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
Jeff Young
c7facfd4d4
remove unused variables
2023-12-18 18:54:47 +00:00
Jeff Young
1c73d3d967
nullptr safety
2023-12-18 18:36:14 +00:00
Jeff Young
e4baf877c8
performance efficiencies
2023-12-18 18:36:02 +00:00
Jeff Young
3b36307425
Remove shadowed variable.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16363
2023-12-18 14:24:04 +00:00
Alex Shvartzkop
c5ac2337e4
PNS mitering: construct arcs from start, end, angle.
...
Previously, arc endpoint and expected miter endpoint could differ,
causing very small loops later on.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16360
2023-12-17 05:47:07 +03:00
Jeff Young
de070a1d62
Watch out for VVIAs.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16339
2023-12-12 15:45:13 +00:00
Jon Evans
47ab6f8d03
Set default netclass for newly-added no-net PNS items
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16144
2023-12-10 22:59:36 -05:00
Jeff Young
931cec862e
Non-plated slots are effectively edges.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16267
2023-12-09 21:06:40 +00:00