Commit Graph

1372 Commits

Author SHA1 Message Date
Seth Hillbrand e0b3f6c258 PNS: Handle via-in-pad distances when tuning
Tuning with a via in pad, the via isn't a part of the full line.  But we
still need to account for the line length distance of the
starting/ending vias.  To do this, we simply measure the height from
the ending track to the ending pad and starting track to starting pad

(cherry picked from commit 82e8e38054)
2022-08-01 20:25:17 -07:00
Seth Hillbrand 17fdb7c6a8 Prevent drag index from exceeding full line count
Simplification removes segments, so we might lose our valid index.
Ideally, we would simplify during the assembly or pass the input index
to the simplify routine to maintain the proper value.

Fixes https://gitlab.com/kicad/code/kicad/issues/12137

(cherry picked from commit 6c617d84ca)
2022-08-01 08:58:28 -07:00
Jeff Young f41af10007 Clean up hole shapes for safety (smart pointer) and consistency. 2022-07-22 23:06:07 +01:00
Seth Hillbrand 16e3d40552 ADDED: Display calculated clearance in status bar
In addition to showing resolved clearance, we also show the calculated
clearance in the same method as is used for DRC.  This will allow users
to better examine their system while working.

Fixes https://gitlab.com/kicad/code/kicad/issues/7934
2022-07-21 15:44:48 -07:00
Tomasz Wlostowski e558893851 router: use actual snap point position for routability checks of a segment instead of the segment endpoint(s).
Explanation:
- place a long segment A with something violating the rules close to its endpoint
- try to start routing in the 2/3 of the length of A (on the obstacle side)
- bummer - the router picks the nearest endpoint of A for the collision check (even though we don't care about this collision since we want to route far away from it)
2022-07-21 16:30:28 +02:00
Seth Hillbrand a9a5136c1c Always allow blind/buried/micro vias
Removes a nanny setting that prevented the use of
blind/buried/micro-vias without a checkbox.  If the designer does not
want microvias in their board, they simply do not place microvias.
2022-07-12 19:47:31 -07:00
Mike Williams 3d1d432c5e PCB Editor: re-add missing color to dynamic ratsnest 2022-07-12 19:36:51 -04:00
Jon Evans 664bf1382d PNS: Fix IsLineCorner logic
Handle segment width test in the case of locked segs
Fix logic failure where vias on path cause crash

Fixes https://gitlab.com/kicad/code/kicad/-/issues/11990


(cherry picked from commit 2512375988)
2022-07-12 02:49:24 +00:00
Jeff Young e122dc38bd Add context menu item for clearing net highlighting.
In selection tools, drawing tools, router tool, line_wire_bus tool.

Fixes https://gitlab.com/kicad/code/kicad/issues/11920
2022-07-10 17:15:20 -06: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
Seth Hillbrand 0cb5abd7f7 Fix highlight on route again
Added a clarifying comment that will hopefully keep the required code
block in place
2022-07-08 20:14:46 -07:00
Tomasz Wlostowski 3111b7679d router: bring back the snap-to-hull behaviour in Mark Obstacles mode 2022-07-03 23:59:27 +02:00
Jeff Young f48ed79039 Rely on DRC rules when items might overlap.
Fixes https://gitlab.com/kicad/code/kicad/issues/1790
2022-06-29 13:43:44 -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
Tomasz Wlostowski f5fe1d5462 router: another attempt at improving 'kink' robustness of the hull generator 2022-06-09 20:51:21 +02:00
Tomasz Wlostowski 56df462474 router: fix SegmentHull() corner case when it 'chamfers' more than the clearance permits (corner case for 0-length segments, which we use
for representing holes)
2022-06-09 00:33:08 +02:00
Tomasz Wlostowski 990281a897 router: use either copper or hole clearance, whichever is larger, when checking track -> hole collisions 2022-06-09 00:31:47 +02:00
Tomasz Wlostowski 4192c0a709 router: move IsFlashedOnLayer to the IFACE_BASE class so that it can be used in the debugger tool 2022-06-09 00:30:57 +02:00
Tomasz Wlostowski bcfe12ce47 router: improvements in robustness of SegmentHull()
- ensure the 'chamfer' radius and clearance is rounded before computing the actual hull vertices
- for small, non-45 degree line segments (present in many boards), generate a slightly larger but still axis-aligned 45 degree hull instead of following exactly the segment direction
2022-06-08 14:28:31 +02:00
Tomasz Wlostowski e90ab055b9 router: remove unused LINE::Is45Degree() 2022-06-08 14:28:31 +02: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
Jon Evans 23596812b6 PNS: Implement HoleHull for VIA 2022-06-07 19:49:38 -04:00
jean-pierre charras 9f38fa43cd Fix some minor compil and Coverity warnings. 2022-06-05 11:44:49 +02:00
Jon Evans 3747369aaa PNS: Remove offsets from hull generation
This is likely an old workaround to numerical precision issues
in the DRC system that no longer exist.  Removing this is necessary
for "exact" hull generation to produce walkaround results that
look nice (paths falling exactly on the grid lines)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710

(cherry picked from commit 5d4e2aa595)
2022-06-04 00:04:03 -04:00
Jon Evans 9a2950cca1 PNS: Use exact hulls for walkaround path generation
When we generate hulls, by default we subtract the clearance epsilon
to prevent false collisions in the router that wouldn't be flagged
by DRC.  However, we need to use the actual hull with no epsilon
when generating hulls for pathfinding in the walkaround system.

Without this change, it is possible for the walkaround to generate
a valid-seeming path that results in a DRC violation, for example
when dragging a drag against a board edge.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/10536
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11365
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10710

(cherry picked from commit 2a91ba35c1)
2022-06-04 00:04:03 -04:00
Tomasz Wlostowski c8b93c39b6 router: remove some old cruft from the WALKAROUND class 2022-06-03 23:28:41 +02:00
Tomasz Wlostowski 0bd7f603a3 router: consider mouse drag event a valid route start/end event
L-clicks during routing operation while the mouse is moving (even slightly) were ignored, which was annoying to some users (myself included). Now the router
always fixes the track upon mouse click.
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski eaee610fd9 router: save project settings together with the debug log 2022-06-03 23:28:41 +02:00
Tomasz Wlostowski f73acbb206 router: derive VIA class from LINKED_ITEM interface 2022-06-03 23:28:41 +02:00
Tomasz Wlostowski cab08f859a router: cluster extraction should only consider objects that are touching (instead of checking clearance) 2022-06-03 23:28:41 +02:00
Tomasz Wlostowski 297c60923e router: return routing status from ROUTER::Move() 2022-06-03 23:28:41 +02: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 aca9cce5d5 router: more verbose debug messages for the debugger tool 2022-06-03 23:28:41 +02:00
Tomasz Wlostowski 2a0accd184 router: shove algorithm now considers cases where a small via sits 'inside' a fanout of wide (width > via diameter) segments.
The shove algorithm can't move the loose track ends. It always needs a via. In case of wide segments stitched with
a small via, the collision search finds only colliding segments and does not consider the via. This leads to frequent shove falilures
or 'choppy' behaviour when the head line only slightly overlaps with an end of a thick trace. This patch attempts at improving this behaviour
by considering the 'tiny via in wide segment' case explicitly.
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski 08647bf035 router: temporarily disable via hole clearance check in the shove algorithm.
- needs refinements and additional checks for corner cases.
- disabled also to facilitate debugging of other shove bugs
2022-06-03 23:28:40 +02:00
Tomasz Wlostowski 8cb65a8a13 router: default values for LOGGER::Log() 2022-06-03 23:28:40 +02:00
Tomasz Wlostowski 752ba2ed76 router: log via toggle events 2022-06-03 23:28:40 +02:00
Tomasz Wlostowski a4ad47cd08 router: use SHAPEs and PNS::ITEMs only in the ROUTER_PREVIEW_ITEM 2022-06-03 23:28:40 +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
Jon Evans 40593930d0 PNS: Fix off-by-one in dragCornerInternal
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10919


(cherry picked from commit 8d8f96b094)
2022-06-01 21:13:05 +00:00
Jon Evans 6fd14ac945 [PNS] Fix invalid assumption in IsLineCorner
(cherry picked from commit a4aa447b95)
2022-05-31 20:24:54 -04:00
Jon Evans 9470bd15a1 PNS: Fix skew calculation with pad-to-die specified
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11710

(cherry picked from commit 53dbd3bb02)
2022-05-31 20:24:54 -04:00
Jeff Young f2fc78f380 Don't copy modifiers to prime events.
The modifiers go with the hotkey, not with the action.

Fixes https://gitlab.com/kicad/code/kicad/issues/11618
2022-05-16 13:51:40 +01:00
Jeff Young a54bbfe12b Honour prime-event-location when starting router.
Fixes https://gitlab.com/kicad/code/kicad/issues/11239
2022-03-29 13:44:40 +01:00
Wayne Stambaugh 7b2d9dfc0c Fix some Coverity uninitialized scalar variable issues. 2022-03-24 13:17:07 -04:00
Jeff Young 4225f92573 Slight improvements to via drawing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8717
2022-03-16 14:56:32 +00:00
Jeff Young ec5b7a57ec Consistency in via dimensions terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/11024
2022-03-03 22:40:18 +00:00
Tomasz Wlostowski adace996f4 qa/pns: refactored the P&S debug tool:
- factored out 'business' code from the UI code
- moved to the new DEBUG_DECORATOR interface
- UI-less log file and log player classes as a step towards P&S unit tests
2022-03-03 01:02:00 +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
Seth Hillbrand 4d6c2e4868 Update end item before moving on track/via change
The move even dereferences m_enditem for logging and perhaps other
actions.  We need to ensure that the end item has not been invalidated
before taking this action

Fixes https://gitlab.com/kicad/code/kicad/issues/10732

(cherry picked from commit 901c330478)
2022-03-02 09:23:15 -08:00
Jeff Young 639fdb915a Implement real layer test for visibility. 2022-02-24 21:32:43 +00:00
Jeff Young f076d07e9e Fix asserts. 2022-02-24 18:16:45 +00:00
Jeff Young f18aae679c Use router to update message panel when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/10068
2022-02-20 16:50:30 +00:00
Jeff Young a2ca8cf413 Improve SNR. 2022-02-12 18:38:11 +00:00
Jeff Young 8dcc933fc3 Don't use bounding box cache during insideArea.
For starters we can't rely on it having been updated, but we also
cache the entire result so there's no huge cost-savings anyway.

Fixes https://gitlab.com/kicad/code/kicad/issues/10821
2022-02-12 18:38:11 +00:00
Marek Roszko 0a5ddb8d40 Add some vector reservations 2022-02-05 21:12:29 -05:00
Jeff Young b2e3f03222 More wide-string declarations. 2022-02-05 22:03:04 +00:00
Seth Hillbrand 92dc06ac9d Don't convert KIID on the fly
Converting to string on save prevent unneeded ops

(cherry picked from commit 901685f01b)
2022-02-03 10:35:31 -08:00
Seth Hillbrand 803675195d Be more diligent in preventing drag line errors
They can happen even when there are no collisions, so we need to reset
the 'ok' flag before using the line again.

Fixes https://gitlab.com/kicad/code/kicad/issues/9555

(cherry picked from commit 833ce19221)
2022-01-31 16:13:53 -08:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Seth Hillbrand ad84b62b63 Prevent multiple single-point line solutions
Suggested by @rivimey, we test the case where both lines return singular
point lines and prevent them leaking into our drag solution

Fixes https://gitlab.com/kicad/code/kicad/issues/9555

(cherry picked from commit 38a4894d92)
2022-01-29 07:07:29 -08:00
Seth Hillbrand 7277fd6218 Don't allow degenerate lines in dragger
If walkaround returns an invalid line, don't consider it for a track

Fixes https://gitlab.com/kicad/code/kicad/issues/9555

(cherry picked from commit 8ae304dcca)
2022-01-28 15:19:06 -08:00
Tomasz Wlostowski 441e5fd486 router: don't reject non-45 degree lines in the LINE_PLACER 2022-01-22 00:28:11 +01:00
Tomasz Wlostowski ce28525172 router: include arc approximation tollerance in arc hull clearance calculation
fixes: https://gitlab.com/kicad/code/kicad/-/issues/10470
2022-01-22 00:28:11 +01:00
Jeff Young 14006495d5 Angle cleanup. 2022-01-20 22:35:41 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 1539fa5af2 Move SHAPE_ARC to EDA_ANGLE. 2022-01-16 01:19:45 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jeff Young d485eb2514 Move pads to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
Jon Evans eac1936303 PNS: Do not clear layer pairs when importing new sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10225

(cherry picked from commit 20bbf9b179)
2022-01-13 20:38:08 -05:00
Jon Evans 3011ae1d51 PNS: Do not allow smart pads when in 90-degree mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10386

(cherry picked from commit cf4d46b24d)
2022-01-13 20:38:01 -05:00
Tomasz Wlostowski 79fe0bf456 router: use VIA::PushoutForce() for via push force calculation in the shove algorithm
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10317
2022-01-13 00:43:27 +01:00
Tomasz Wlostowski 4d0a317e3d router: fix via force propagation for vias where hole clearance > copper clearance 2022-01-13 00:42:50 +01:00
Jeff Young eb58d7e44c Text glyph caches and bug fixes.
1) Unify metrics between stroke and outline fonts
2) Unify handling of rotation and mirroring
3) Bug fixes in collision handling
4) Use of VECTOR2I (instead of VECTOR2D) for world-coordinates
5) Generate outline font overbar with rounded ends and fix rotation
bugs
6) Generate wxEVT_CHOICE events from FONT_CHOICE::SetFontSelection
7) Change text-item PNS SOLIDs to use compound shapes
2022-01-08 16:47:45 +00:00
Jeff Young 72340fcee2 Implement router and DRC collisions for outline fonts. 2022-01-08 16:47:45 +00:00
Jon Evans 60c0891c5f Exit router and invoke edit tool when attempting to drag an arc track
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10208

(cherry picked from commit 45182febaf)
2022-01-02 16:10:50 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Ian McInerney f744ddd11d Fix copy-paste error in PNS mouse trail tracer
And also fix indentation of control flow.
2021-12-31 00:04:11 +00:00
Ian McInerney 0e9cfd0af2 Add missing initialization values to variables
Flagged by Coverity.
2021-12-30 23:42:06 +00:00
Jeff Young 5e4a704155 Remove some more duplicated preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/10112
2021-12-26 13:37:28 +00:00
Jeff Young 2538ad16aa Handle router collisions with filled shapes. 2021-12-24 21:10:28 +00:00
Jeff Young ed79f6e511 Clean up some TODOs. 2021-12-24 21:10:28 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Tomasz Wlostowski 57af990066 router: fix layer switch issue when starting a track on via without fixed segments
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9915
2021-12-16 00:55:17 +01:00
Mike Williams 956ac871c3 PCB Editor: changes to track width overrides starting track width
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
2021-12-15 23:32:48 +00:00
Tomasz Wlostowski 97c2627de6 router: added missing case items (fixes regression in component dragging)
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10010
2021-12-15 23:18:55 +01:00
Tomasz Wlostowski 965ab42938 router: when dragging segments, don't snap to other segments on the same layer. Fixes drag flickering for short segments.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9720
2021-12-15 01:48:04 +01:00
Tomasz Wlostowski 2ae3a83b54 router: fix use-after-free crash in single trace shove routing when m_endItem's owning NODE is erased by the springback algorithm.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9994
2021-12-15 01:33:05 +01:00
Jon Evans b291d6c810 Fix success conditions in DP placer
The placer can sometimes generate segments that are not quite parallel.
Use a different tolerance for ApproxParallel to account for this.

Also set a minimum score for placement judging so that any placement
that doesn't violate DRC can be placed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9948
2021-12-12 13:05:38 -05:00
jean-pierre charras 6d0d4e0db9 Pcbnew, router tool: ensure switching layer by + or - works when starting routing.
Fixes #9936
https://gitlab.com/kicad/code/kicad/issues/9936
2021-12-11 09:54:03 +01:00
Seth Hillbrand 77fbb495f2 Highlight net during inline drag
Keep consistent UX between inline drag and drag started in the router
tool itself by highlighting the net being dragged

Fixes https://gitlab.com/kicad/code/kicad/issues/9919
2021-12-09 09:28:43 -08:00
Jeff Young 95087c6de5 Fix clearance outlines for router head.
Fixes https://gitlab.com/kicad/code/kicad/issues/9885
2021-12-06 15:51:53 +00:00
Jon Evans 5ba215c8ea Use actual width when previewing PNS lines 2021-12-05 13:41:39 -05:00
Jon Evans 7de9e48b57 PNS: Fix tuning calculations through locked segments
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9727
2021-12-05 13:35:28 -05:00
Jeff Young 5cb2641142 Fix nullptr dereference in router.
Fixes https://gitlab.com/kicad/code/kicad/issues/9844
2021-12-02 13:20:44 +00:00
Jeff Young a596a1f2e2 ROUTER_TOOL needs to handle pads not handled by router itself.
Fixes https://gitlab.com/kicad/code/kicad/issues/9839
2021-12-01 22:25:02 +00:00
Jeff Young 3c0b10b022 Don't use approximated shapes for router hulls.
We only do 45-degree routing anyway so we might as well build an
octagonal-based hull from the get-go.

Fixes https://gitlab.com/kicad/code/kicad/issues/7672

Fixes https://gitlab.com/kicad/code/kicad/issues/9544

Fixes https://gitlab.com/kicad/code/kicad/issues/9833
2021-12-01 19:44:30 +00:00
Jeff Young 09ed60feb3 Don't make inferences about object type based on shape. 2021-12-01 19:44:30 +00:00
Ian McInerney 63560ecd7b Remove RM_Smart state from router tool
It was never fully implemented and there was no way to switch into this
route mode.
2021-12-01 09:52:37 +00:00
Jon Evans a746d31038 PNS: Fix loop removal outside shove mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9680
2021-11-27 15:21:47 -05:00
Jon Evans 8a0f8c329f PNS: Fix DP gateway generation when pad distance < gap
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9306
2021-11-27 14:03:19 -05:00
Seth Hillbrand 4b226b8172 Unify our breakTracks routines
Fixes https://gitlab.com/kicad/code/kicad/issues/9793
2021-11-27 06:34:47 -08: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
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
Jeff Young 99ec2b1801 Don't hide original object when highlight is only part of it.
Fixes https://gitlab.com/kicad/code/kicad/issues/9772
2021-11-25 23:42:13 +00:00
Jon Evans da458535c4 PNS: Avoid flickering clearances on new items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9773
2021-11-25 15:38:04 -05: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
Jon Evans b4342d813b Fix SHAPE_LINE_CHAIN::Slice when end is an arc followed by a point
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9770
2021-11-25 10:05:33 -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
Jeff Young f9e1429c60 Naming conventions. 2021-11-25 14:54:12 +00:00
Jeff Young 5985a21b74 Offset internal items by drag amount.
Some tools move only preview items while keeping the real items
hidden.  Those tools must use this new offset parameter.

Other tools move the real items.  Those tools can ignore this
parameter (which will default to {0,0}).

Fixes https://gitlab.com/kicad/code/kicad/issues/9391
2021-11-25 14:54:12 +00:00
Jeff Young ba6ae4fa9b Kicad has many plugins. This one is for the pcb. 2021-11-25 12:56:46 +00:00
Jeff Young 1c3e1df3ca Not all holes are round.
We currently only need this to work for vias as we're a long way
from being able to support it for pads, so just check the hole
shape.

Fixes https://gitlab.com/kicad/code/kicad/issues/9735
2021-11-23 14:36:05 +00:00
Tomasz Wlostowski e56e61ffb5 router: fix typo in the DP tuning fix patch 2021-11-23 00:21:38 +01:00
Tomasz Wlostowski 89228e1ebe router: increase parallelity detection threshold for AssembleDiffPair()
Partially fixes the misrecognized diff pairs issue.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8567
2021-11-22 01:35:12 +01:00
Tomasz Wlostowski e60386f028 router: disable 'limit corner count' optimization for via dragging
It seems to be completely preventing optimization instead of preventing over-optimization in case the head is a dragged via.
To be investigated in more details in V7.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8665
2021-11-22 00:05:17 +01:00
Tomasz Wlostowski ccf9a72078 router: fix ghost dots issue in router preview items
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8665
2021-11-22 00:05:17 +01:00
Roberto Fernandez Bautista bbafce6ab3 PNS: Don't clip the line in the middle of an arc - just start again
In shove mode, returning an empty line results in keeping the current
head, which should be okay for now.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9023
2021-11-21 19:53:03 +00:00
Roberto Fernandez Bautista 4e0ad07eb0 PNS::Shove Add margin when generating hulls for arc segments
Partially fixes https://gitlab.com/kicad/code/kicad/-/issues/9023

There is still a case where if the shover does not find a solution,
we try clipping the arc and it still collides.
2021-11-21 17:13:21 +00:00
Jon Evans b1878fcc54 ClipVertexRange: fix fallout of NextShape API change
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9711
2021-11-21 11:03:22 -05:00
jean-pierre charras 302c5ab537 Fix an issue created by commit 9e3362d1.
the issue was the graphic cursor was locked on the first snap point
in route mode, once a snap point is found.
2021-11-21 15:37:03 +01:00
Tomasz Wlostowski c40e921cb3 router: remeber to make a shove lockpoint when placing a lone via
Note to self: works around a possible bug in CommitPlacement()/RewindToLastLockedNode()

fixes: https://gitlab.com/kicad/code/kicad/-/issues/9695
2021-11-21 00:18:20 +01:00
Jeff Young 9e3362d14c Snap mouse point before picking startItem.
Fixes https://gitlab.com/kicad/code/kicad/issues/9700
2021-11-20 13:44:16 +00:00
Jeff Young 1f4858c314 Show holes in router preview items for vias.
Fixes https://gitlab.com/kicad/code/kicad/issues/9658
2021-11-20 12:21:24 +00:00
Jon Evans ed478f5ec0 Revert to ERROR_INSIDE for complex pad shape hulls in PNS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9544
2021-11-15 19:15:05 -05:00
Jon Evans 8ec3ce99ae PNS: Update shover when autocompleting on item
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9598
2021-11-10 18:17:56 -05:00
Jon Evans 59807d8d26 A better solution to discarding pending shove operations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9553
2021-11-09 00:00:54 -05:00
Johannes Pfister 64f77b3596 PNS: Add support for 90-degree corner modes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6902
2021-11-03 02:14:23 +00:00
Jon Evans 153594b9ea PNS: Actually implement the AbortRouting API
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9425
2021-10-31 16:06:57 -04:00
Jon Evans 08700e3522 Router: show corner style in message panel 2021-10-30 09:08:52 -04:00
Jon Evans e6c3027531 Action string typo fixes 2021-10-30 08:47:36 -04:00
jean-pierre charras 63d4d84aaa pcbnew, router: fix a crash and some other issues related to microvias and blind/buried vias
- fix crash when trying to create a microvia from a internal layer (boards with > 4 layers)
- fix a bug that allowed to create a non through hole via on only one layer
- fix a bug that allowed to create a microvia on non adjacent layer pair
- when placing a via and selecting the target layer from dialog, show only allowed layers.
Fixes #9477
https://gitlab.com/kicad/code/kicad/issues/9477
2021-10-29 17:54:04 +02:00
Electro707 4afb59fda0 Added feature to switch between router modes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9414
2021-10-28 22:46:05 +00:00
Jon Evans 4a9b3d9673 PNS: clear leftover vias from previous trace in DP placer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9283
2021-10-27 21:58:42 -04:00
Jeff Young 36d11f745e Update ratsnest while dragging footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/9391
2021-10-25 21:45:30 +01:00
Jon Evans 328d3d0d77 PNS: Fix rule resolution when starting from PTH
Have to use the routing start layer, not the first
layer of the PTH, to get the appropriate sizes
2021-10-23 22:46:31 -04:00
Jon Evans 3b18dce911 Remove vestigal setting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9444
2021-10-23 22:12:25 -04:00
Seth Hillbrand 2a6c73b8df Check for hole before highlighting
Fixes https://gitlab.com/kicad/code/kicad/issues/9423
2021-10-19 11:25:00 -07:00
Seth Hillbrand e9205a0740 Fix mistaken comparison in highlighting
Need to compare between elements colliding

Fixes https://gitlab.com/kicad/code/kicad/issues/9413
2021-10-18 13:38:27 -07:00
Seth Hillbrand faba2b06c2 Lock track width after placing segment
We don't want to allow the full track width to change after placing a
segment when we are in follow-segment mode. This would require either
ripping up and re-solving the existing track or allowing potential DRC
errors.

Fixes https://gitlab.com/kicad/code/kicad/issues/9395
2021-10-14 09:21:14 -07:00
Seth Hillbrand 35e90d0cf4 Allow changing router mode while routing
Keeps shove active even when not using to allow switching modes during
routing.

Fixes https://gitlab.com/kicad/code/kicad/issues/9342
2021-10-12 09:55:34 -07:00
Seth Hillbrand 7f1247a23c Update track width when changed
Tracks starting from pads should change in response to the track width
changing despite having the "follow existing track" width selected.
2021-10-12 09:55:34 -07:00
jean-pierre charras 4d6b1a4e36 pns_diff_pair_placer: fix empty message when a signal of a pair is not found.
Fixes #9334
https://gitlab.com/kicad/code/kicad/issues/9334
2021-10-08 14:57:01 +02:00
Seth Hillbrand a8ec3b58ed Use via's real drill value for hole size
If the via drill is "Default" be sure to get the default value rather
than the placeholder

Fixes https://gitlab.com/kicad/code/kicad/issues/9313
2021-10-06 11:00:58 -07:00
Roberto Fernandez Bautista 2e120528c8 Length Tuner: Allow single meander when it fits on its own 2021-09-28 18:50:31 +01:00
Roberto Fernandez Bautista 71156368c9 Length Tuner: Allow controlling the side of the meander using the cursor
Also fixes an issue that did not allow single meanders to be placed
2021-09-28 18:50:31 +01:00
Mike Williams 726f9ebe3d Pcbnew: Router tool should not block drag selection when idle
The other drawing tools allow drag selection while idle. Also, it makes
it more obvious to the user when accidentally drag selecting while
routing than just doing nothing on a drag with the routing tool selected
and idle.
2021-09-27 16:05:13 +00:00
Jeff Young 5f3c67bd2b Fill in some missing GetMsgPanelItems and make some others consistent.
Also expunges a std::vector<MSG_PANEL_ITEM> cover type.
2021-09-27 00:23:40 +01:00