Commit Graph

22 Commits

Author SHA1 Message Date
Tomasz Wlostowski 7f593d3999 router: rework ITEM ownership model.
- prerequisite for holes as first class objects code
- introduced the OWNABLE_ITEM interface that defines the owning container (NODE/other ITEM/ITEM_SET)
- simplified the ITEM_SET interface
- constified a lot of APIs (ownership/JOINT management) as a side effect

Rebased and cleaned up by Jeff Young <jeff@rokeby.ie> 5 April 2023
- some STL cover types removed

(cherry picked from commit 1283c4713f)
2023-04-14 00:09:49 +01:00
Tomasz Wlostowski 3a6a6097a7 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

(cherry picked from commit eed05191a9)
2023-04-14 00:07:47 +01:00
Tomasz Wlostowski 45f7cf9571 router: rework the DEBUG_DECORATOR a bit:
- support for dumping complete PNS::ITEMs and generic SHAPEs
- support for log nesting levels
- wxT-ized strings
- more verbose output where needed
2022-03-03 01:02:00 +01:00
Jeff Young b2e3f03222 More wide-string declarations. 2022-02-05 22:03:04 +00:00
Jeff Young 6652e5acf4 Draw pad holes when dragging.
Most of the time they're under the pad, but the provide needed
info when the hole is larger than the pad.

Fixes https://gitlab.com/kicad/code/kicad/issues/9786
2021-11-27 00:55:09 +00:00
Jon Evans 63718323bc PNS: Holes need to be moved with solids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9773
2021-11-25 15:31:18 -05:00
Jeff Young ade8fe4333 When dragging footprints pads with holes also need to be taken along.
Otherwise (aside from not colliding with their dragged location) we
won't update their locations and then if they happen to be the first
pad in the footprint we'll try to update the footprint's location post-
drag with the pad offset (which will be {0,0}.

This is easily reproducible with the test document in the bug in the
"fixes" statement.

Fixes https://gitlab.com/kicad/code/kicad/issues/9391
2021-11-25 14:54:12 +00:00
Wayne Stambaugh 65c7958293 Coverity issue fixes.
Issues #331869, #331875, #332203, #332159, #332171, #332180, and #332648.
2021-07-08 08:33:08 -04:00
Jon Evans e0146f73b9 PNS: Pick up complete lines between pads when dragging components
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7614
2021-07-03 20:00:54 -04:00
Jon Evans 91ea4a0569 PNS: Pick up segments directly between pads when dragging components
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7601
2021-07-03 19:50:04 -04:00
Tomasz Wlostowski ebd957b08e router: rework router's debugging infrastructure to be more compatibile with the 'qa/pns/pns-log-viewer' tool.
The log viewer tool lets you inspect all the intermediate stages of the routing algorithms. This patch:
- Adds source location tracking of the debug calls (need to use the PNS_DBG macro, sorry)
- Moves some wxLogTrace calls to DEBUG_DECORATOR::Message() so that messages can be displayed alongside the corresponding geometric shapes
2021-05-29 00:13:24 +02:00
Ian McInerney ecd9bf696e Be consistent about using nullptr instead of 0
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Jeff Young dc0cf3b802 Clean up a confusing API.
AllowDRCViolations is kept in any mode as a *setting*, but only
controls router behaviour when the mode is mark obstacles.

Fixes https://gitlab.com/kicad/code/kicad/issues/7795
2021-04-10 11:08:02 +01:00
Jeff Young 8be213e36f Trim includes (and use consistent terminology in error messages). 2021-03-21 20:15:47 +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
Jon Evans 912657dd23 Component dragger: make relaxed segment pickup work for PTH pads 2020-12-22 22:43:44 -05:00
Jon Evans 70c6314c67 Component dragger: be more generous about picking up tracks
We now pick up tracks that end anywhere in the pad, not just
at the pad anchor.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5945
2020-12-22 22:28:24 -05:00
Tomasz Wlostowski f2338d9faa router: fix segfault with NPTH holes in COMPONENT_DRAGGER 2020-09-08 01:31:42 +02:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Tomasz Wlostowski fd07e94760 router: abstract segment links into a LINK_HOLDER interface. DIFF_PAIRS are now also linkable 2020-07-22 17:04:42 +02:00
jean-pierre charras 6e47f147aa A few Coverity fixes. 2020-03-30 09:50:26 +02:00
Tomasz Wlostowski 44905e1b0a router: initial support for dragging components with traces attached 2020-02-28 23:17:15 +01:00