Commit Graph

1088 Commits

Author SHA1 Message Date
Roberto Fernandez Bautista 3f73d8c2b5 SHAPE_LINE_CHAIN::Area() should always be positive
The algorithm relied on the assumption that the points were
ordered anti-clockwise. When ordered in a clockwise fashion, the
result was correct but negative.

Refer to https://www.mathopenref.com/coordpolygonarea2.html
for more information.
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista c3051ba48a Refactor SHAPE_LINE_CHAIN to allow two shapes per point
m_shapes now has two possible indices. The first one is populated if
the point is associated with an arc and the second index is populated
if the point is shared between two arcs.
2021-07-03 19:37:50 +00:00
Jon Evans 252bf76452 Fix off-by-one in AssembleTuningPath 2021-07-03 14:37:52 -04:00
Jon Evans 3c59e452d6 PNS: Set tuned path correctly in skew tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8708
2021-07-03 14:06:30 -04:00
Jon Evans 277bf2b719 Add feedback showing current router state to the message panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8265
2021-07-03 13:21:51 -04:00
Jeff Young 400f4ae506 Code cleanup. 2021-07-02 15:54:26 +01:00
Jeff Young 780a8a5154 Fix another place disallowing internal microvias.
Fixes https://gitlab.com/kicad/code/kicad/issues/8716
2021-07-02 15:54:26 +01:00
jean-pierre charras 740b028180 pns_line_placer: do not constraint the 45deg of current segment in free angle mode.
Fixes #8691
https://gitlab.com/kicad/code/kicad/issues/8691
2021-07-01 16:38:31 +02:00
Roberto Fernandez Bautista 04b71f5167 Meander minimum spacing can be equal to track width + minimum clearance
2x track width was too constraining in some scenarios

Also better wording "Min Spacing" to indicate to the user that
the actual spacing could be larger if there are any constraints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8172
2021-06-29 19:30:01 +01:00
Roberto Fernandez Bautista e402563087 Don't recalculate meander spacing. Use constrained value instead.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1776
2021-06-29 19:30:01 +01:00
Jeff Young c159500101 Remove nags and make Sel Layer and add via commands uniform.
Fixes https://gitlab.com/kicad/code/kicad/issues/8686
2021-06-28 19:17:01 +01:00
Jeff Young 0dfb5fcaf9 Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
2021-06-26 22:53:24 +01:00
Jon Evans a7eb611744 Fix leftover vias in shove mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8597
2021-06-23 22:13:35 -04:00
Jeff Young c6606a0582 Hook up delete to undo last segment when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8362
2021-06-19 11:37:20 +01:00
Jeff Young 096e342386 Prefix TRACK, ARC and VIA. 2021-06-11 22:07:02 +01:00
luz paz f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
Marek Roszko d946d6e68f Cleanup some pgm_base.h includes 2021-06-08 21:56:00 -04:00
Marek Roszko 6e01ce84b9 Break out eda_item_flags.h, fix the typedef to std::uint32_t, fix some signed vars 2021-06-08 19:12:30 -04:00
Jon Evans 75ce97e260 Fix the last cause of duplicate segments when completing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-07 20:34:09 -04:00
Seth Hillbrand d4edc70f65 Remove magic numbers where possible
Constant scales will be pre-calculated during compilation, so we can
leave the actual formula in place without penalty
2021-06-07 13:56:31 -07:00
Jon Evans 49c5130123 PNS: Implement final cleanup pass for redundant colinear segs
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6863
2021-06-06 21:52:35 -04:00
Jon Evans 3c6b98a0d5 PNS: preserve auto-detected track width when changing via sizes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8046
2021-06-06 20:18:09 -04:00
Jon Evans 99710aba48 PNS: use slightly less greedy algo to reset the mouse trail 2021-06-06 19:47:52 -04:00
Jon Evans 6cb8154ec0 PNS: Remove code that broke width changes during placement
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8334
2021-06-06 19:21:52 -04:00
Jon Evans 6789dac20b PNS: Keep most recent good placement around for a rainy day
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8562
2021-06-06 18:56:33 -04:00
Jon Evans c9bc45f7ed PNS: Limit the maximum walkaround distance factor
The constant chosen is somewhat arbitrary and may need
further tuning or a more complex algorithm, but in general
this will prevent churning when solutions can't be found or
a solution can be found but it is unrealistic (going around
the entire board)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8558
2021-06-06 16:03:03 -04:00
Jon Evans d32b9c1c25 Use debug group for line placer debug 2021-06-06 15:44:53 -04:00
Jon Evans f5185f6927 Revert part of the anti-churn change, it causes bad side-effects
Further performance tuning could be useful but the part that
remains helps the most when hugging in large designs
2021-06-06 15:44:53 -04:00
Marek Roszko 8377ebb0e1 Fix msvc warnings 2021-06-06 15:30:31 -04:00
Marek Roszko 10e60acf34 Clean up including of board_design_settings.h 2021-06-06 15:03:42 -04:00
Jon Evans 5349f47f95 PNS: Prevent walkaround churn in unsolvable situations
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8558
2021-06-06 14:57:52 -04:00
Jon Evans 3475d0cebd PNS: Grab start item based on clearance if no direct hits found
Fixes annoying "routing start point violates DRC" messages when
entering the router from the hotkey and not directly over a track.
2021-06-06 14:57:52 -04:00
Jon Evans 17da050e69 Improve walkaround results when last point is inside the hull
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8563
2021-06-06 12:55:32 -04:00
Jon Evans be61bf29dd Use more accurate hull shapes for round solids
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8561
2021-06-06 09:53:51 -04:00
Marek Roszko b610b905fc Cleanup track.h includes 2021-06-06 09:06:55 -04:00
Jon Evans 3b7480c1c1 PNS: Invalidate start/end items after finishing a route
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8555
2021-06-06 08:52:39 -04:00
Tomasz Wlostowski ab04e24f9a router: rhMarkObstacles should return a correct error status
Long story short: a few days ago I fixed error handling in routeStep(), so it actually started to recognize the wrong error status returned
by rhMarkObstacles() and think that the trace is always incorrect.

fixes: https://gitlab.com/kicad/code/kicad/-/issues/8557
2021-06-04 23:58:56 +02:00
Jeff Young 00791e1e37 Fix compile issues on clangd. 2021-06-03 23:41:06 +01:00
Marek Roszko 1c1ba25ffd Use char_str instead of c_str in previous commit 2021-06-03 18:13:35 -04:00
Marek Roszko daf510344f Fix build error due to pns changes 2021-06-03 18:05:48 -04:00
Tomasz Wlostowski 63fc7a1908 router: support for drag/walkaround/shove for joints between lines of different widths.
fixes: https://gitlab.com/kicad/code/kicad/-/issues/1773
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski af26eab5fb router: even more debug in SHOVE 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski a744857267 router: fix array out-of-bound error in HullIntersection()
fixes: https://gitlab.com/kicad/code/kicad/-/issues/8538
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski 3e98c44636 router: LOGGER now stores UUIDs, not pointers to BOARD_ITEMs.
Caused occasional crashes when saving the debug event log, as some of the BOARD_ITEMS could have been deleted before SaveLog call.
2021-06-03 22:44:53 +02:00
Tomasz Wlostowski e5e588ebba router: temporarily export LINE::Walkaround() debug global variables 2021-06-03 22:44:53 +02:00
Tomasz Wlostowski 70ed5c1ae8 router: introduce concept of 'virtual' vias as a base for shoving/dragging joints of lines of different widths. 2021-06-03 22:44:53 +02:00
Ian McInerney 4f05262705 Cleanup includes in board.h and footprint.h 2021-06-03 20:19:52 +01:00
Marek Roszko 4df3cb912d Remove another leaky wx/log.h header 2021-06-03 08:11:15 -04:00
Marek Roszko cf2bb5692a Remove the wxLog calls from math/util.h for now
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Jon Evans 247da631f9 Revert "Fix typo and clean up leftover tracks"
This reverts commit ed66c0f14d.

Revert "Clean up co-linear tracks after finishing routing"

This reverts commit 1a102f03c0.

More complex solution needed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8526
2021-06-01 11:18:00 -04:00