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
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
Jeff Young
c7facfd4d4
remove unused variables
2023-12-18 18:54:47 +00: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
Jeff Young
abda3c0d33
Handle various keepout flags independently.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16037
2023-11-07 11:57:23 +00:00
Wayne Stambaugh
6183a1e4de
Coverity warning fixes.
2023-10-30 09:16:24 -04:00
Wayne Stambaugh
6269453416
Coverity warning fixes.
2023-10-27 16:48:14 -04:00
Wayne Stambaugh
f629898c8b
Coding policy fixes.
2023-10-17 08:07:15 -04:00
Wayne Stambaugh
b5eee9dd7e
Coverity warning fixes.
2023-10-16 17:04:14 -04:00
Jeff Young
93f004ff65
Formatting, and a fix for a shadowed variable.
2023-09-12 13:45:28 +01:00
Jeff Young
f24cf2250e
Make sure we have a BOARD when trying to read nets.
...
Also fixes a nullptr bug when trying to write nets when we don't
have a NODE.
2023-08-29 17:30:00 +01:00
Wayne Stambaugh
e4feb8826b
Coverity issue fixes.
2023-08-28 09:29:56 -04:00
Jeff Young
6040f49272
Don't write opaque data types to PNS log.
2023-08-24 12:12:16 +01:00
Roberto Fernandez Bautista
f4f1ca352a
Fix crash when running PNS Router Dump (pressing 0)
...
Some ITEMs don't have a Parent
2023-08-23 22:19:47 +02:00
Jeff Young
6166a96b8e
Update PSN logger to new NET_HANDLE architecture.
2023-08-23 14:10:03 +01:00
Jeff Young
76cd637895
Make the net identifier opaque to PNS router.
...
This also improves performance as we don't have to look up the
netcodes in a map.
2023-08-22 15:17:02 +00:00
Jeff Young
63daf336b8
Formatting.
2023-07-01 14:23:38 +01:00
Tomasz Wlostowski
a0a68d198c
router: when no collision search context is provided, assume differentNetsOnly is true
2023-06-22 23:52:21 +02:00
Tomasz Wlostowski
bd5954242e
router: provisional fix for 14926
2023-06-22 16:52:34 +02:00
Tomasz Wlostowski
5100345c6e
router: prevent pushout/bogus collision of via with is own hole (or copper) when dragging
...
The root cause was not removing the original (pre-dragging) via from the world, comparing the ITEM::Parent() pointers of the items was only hiding the main issue.
This also fixes the PNSViaCollisions test in the qa/ suite.
2023-05-31 17:06:24 +02:00
Jeff Young
b442d769fd
Don't allow collisions with self.
...
The previous test didn't handle is-self-tests between a hole and
its override in a different NODE. When calculating the pushout
force we don't remove the via (and its hole) from the current
node until after the calculation, so we end up checking for
collisions between the new (cloned) via's hole and the original
hole in the root node.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14795
2023-05-23 14:10:22 +01:00
Marek Roszko
8a7044c3fb
Fix some more warnings
2023-05-20 08:00:16 -04:00
Jon Evans
94130716a5
PNS: Collision search context may be null
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14741
2023-05-14 17:20:59 -04:00
Jon Evans
89aae88e96
PNS: make sure context options are used in collideSimple
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14659
2023-05-11 16:48:15 -04:00
Jeff Young
16e000f2b0
Use Net() accessor uniformly; init hole parent in VIA::Clone()
...
Fixes https://gitlab.com/kicad/code/kicad/issues/14603
2023-04-28 18:32:58 +01:00
Lucas Dumont
b1a4353c34
Update collide for hole
...
As hole don't keep track of the net, update the collide function to keep it working
2023-04-28 10:20:55 +00:00
Jeff Young
26609bbf05
Fix PNS_KICAD_IFACE_BASE::IsFlashedOnLayer() to be able to handle multi-layer queries.
2023-04-14 12:02:36 +01:00
Jeff Young
2f198bdcb2
Further simplify PNS::ITEM::collideSimple().
...
Also brings text_pns_basic's mocks into line with their "real"
counterparts.
2023-04-11 15:51:00 +01:00
Jeff Young
8a0c225efa
Unify most special-case processing to the clearance if-then-else.
...
This also allows us to support hole-to-hole clearance when dragging
a via near another via on the same net.
Fixes https://gitlab.com/kicad/code/kicad/issues/12781
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
1532a83330
router: hole as first-class-object, initial version of rewritten collision check routine
...
Rebased and modified by Jeff Young <jeff@rokeby.ie> 6 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
d961cdce3f
router: further changes to the ownership model
...
- LINEs now own their vias optionally (depending whether a LINE with its VIA belongs to a node)
- get rid of unique_ptr on the internal NODE::Add API (and also made it private)
- make sure stack pointers are not added to the node
- use rvalue reference for NODE::Add/NODE::Replace
Manually rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
bfbda978b8
router: hole as first class objects, wip
...
Rebased by Jeff Young <jeff@rokeby.ie> 5 April 2023
(Also includes a bug-fix for highlighting collisions with edge-cut
items.)
2023-04-11 15:51:00 +01:00
Tomasz Wlostowski
eed05191a9
router: pass collision query options in a structure
...
Selectively cherry-picked by Jeff Young <jeff@rokeby.ie> 4 April 2023
- Jon's user-clearance-epsilon algo kept intact
- Jeff's castellated-pad code kept intact
2023-04-05 11:21:31 +01:00
Tomasz Wlostowski
65507e7186
router: extend dump format to support automatic regressions tests of interactive routing scenarios
2022-10-31 11:17:31 +01:00
Jeff Young
7c83c78afe
Allow free pad usage in router.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11730
2022-09-06 13:59:52 +01:00
Jeff Young
aa2ad3b44c
Move KICAD_T[] to std::initializer_list<KICAD_T>.
2022-08-20 10:28:11 +01:00
Jeff Young
46df421064
ADDED defined pad groups for net-tie footprints
...
Each pad group is allowed to short nets with other pads in its group.
Legacy footprints with the "net tie" keyword hack will get a single
group auto-created with all the footprint's pads in it.
DRC and the router now allow a track to collide with copper graphic items
while entering a net-tie pad as long as the closest point in the collision
is within the pad.
DRC (and the footprint checker) now check for copper items in the
footprint shorting pads which are not in the same pad group.
Fixes https://gitlab.com/kicad/code/kicad/issues/2265
2022-08-19 18:54:20 +01:00
Jeff Young
b8479bf6f1
Handle severity ignore rules in router.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11609
2022-07-09 11:24:47 -06:00
Jeff Young
833dc70bff
Add edge-exclusions to router (for castellated pads).
...
Fixes https://gitlab.com/kicad/code/kicad/issues/1790
2022-06-27 15:16:37 -06:00
Jon Evans
30fb298ed3
PNS: Re-enable hole clearance for non-flashed pads/vias
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11098
2022-06-07 19:49:38 -04:00
Tomasz Wlostowski
54f4f765b9
router: NODE|ITEM::QueryColliding() now can override clearance
...
Needed for clustering algorithm (to be committed later... ;-)
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski
b08280d00c
router: enable Hole Clearance rule only in Mark Obstacles mode
...
(it will be brought back to Walk/Shove modes as soon as all the underlying issues are fixed)
2022-06-03 23:28:40 +02:00
Jeff Young
9547c72e73
Teach router about different keepout rules.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/9786
2021-11-27 00:55:04 +00:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Jeff Young
fc1b0ec11f
Improve feedback when routing in highlight collisions mode.
...
In particular, when Allow DRC violations is NOT turned on and we
bump in to an obstacle.
2021-01-01 17:25:37 +00:00
Jeff Young
ecc0e861d3
Implement hole clearance and hole-to-hole clearance in router.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6882
2021-01-01 00:31:36 +00:00
Jeff Young
7b347d793b
Change gears on no-connect net generation. See bug rpt.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6534
Fixes https://gitlab.com/kicad/code/kicad/issues/6615
2020-12-04 18:25:48 +00:00
Jeff Young
f2ac6fcd44
Treat net 0 items as each being in their own net.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6534
2020-12-02 20:05:47 +00:00
Jeff Young
6d50c9749c
Mark the colliding shape so we know which one to highlight.
...
Also checks the nets when checking for a pad being flashed on a particular
layer (so we don't end up thinking the currently-routing-collided track
is a connection).
2020-10-05 22:32:07 +01:00