Seth Hillbrand
bf3cb0b1d0
Standardize pad type enums
2020-09-30 08:38:35 -07:00
Jeff Young
d3f8f2b81e
Remove confusion between pad->IsOnLayer and pad->IsPadOnLayer
2020-09-30 11:50:51 +01:00
PJM
258d1a1971
Pcb: Get proper "Break Track" location when invoked from RMB context menu
...
When invoking "Break Track" from the RMB context menu, Pcbnew
gets and uses the current position of the mouse to figure out where to
break the track. The problem is that the mouse has to be moved to select
the "Break Track" menu item, and the mouse position used is wrong. This
can result in the break in the wrong location or not happening at all.
CHANGED: This commit determines if the "Break Track" was invoked from a
context menu or a hotkey. If a hotkey, it uses the current mosue position.
If a context menu, it uses the original postion of the mouse when the menu
was opened.
2020-09-28 16:56:02 +00:00
Jeff Young
f8875bc5a6
Move std::contains to alg::contains.
2020-09-26 14:42:40 +01:00
Jeff Young
d7e80f8008
Add std::contains() to simplify a lot of code.
2020-09-26 12:40:32 +01:00
Ian McInerney
bba29a1036
Always show the track and via menu in the router context menu
2020-09-25 00:17:54 +01:00
Ian McInerney
672756a018
Move the router tools to a TOOL_MENU context menu
...
The previous way of displaying a context menu was being
usurped by the selection tool because it was displaying its
menu before DispatchContextMenu was called, and all other tools
explictly use the TOOL_MENU system.
Fixes https://gitlab.com/kicad/code/kicad/issues/5762
2020-09-24 23:51:34 +01:00
Jon Evans
18e17abd6a
Rename "Keepout" to "Rule Area"
...
These objects can now be used in advanced DRC rules and
not just for keeping things out. Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
2020-09-21 23:55:02 -04:00
Jeff Young
ece2ae9805
Don't capture commands in the router eventloop that it doesn't process.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5692
2020-09-19 12:08:18 +01:00
Seth Hillbrand
f493e270ea
ADDED: Menu option to enable/disable snap to grid
...
You can now enable and disable snap to grid when drawing/editing across
all apps. You can also tie snap to grid to the visibility of the grid
to allow rapid enable/disable via grid display.
2020-09-10 20:09:30 -07:00
Seth Hillbrand
173b4ff588
Add snapping to eeschema
...
This generalizes both the SetPosition() function and ORIGIN_VIEWITEM
class away from the pcbnew-centric.
2020-09-09 10:18:15 -07:00
Tomasz Wlostowski
54ca66be72
router: NODE::AllItemsInNet() can now filter by item type
2020-09-08 01:31:42 +02:00
Tomasz Wlostowski
f2338d9faa
router: fix segfault with NPTH holes in COMPONENT_DRAGGER
2020-09-08 01:31:42 +02:00
Jeff Young
88635ee5b6
Clean up error messages.
...
Convert a lot of nags to InfoBar errors/warnings/messages, and some
that never should have been exposed to wxFAIL_MSGs.
2020-08-31 14:19:57 +01:00
Jon Evans
7a5c99ee0f
Tweak the mouse-based posture solver
...
Add an epsilon to reduce flutter
Add a lock after a certain distance
Forget the old trail when unlocking
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5381
2020-08-30 19:54:09 -04:00
Jeff Young
8b7c0cbe04
Adjust footprint zones while dragging footprint.
2020-08-28 11:05:58 +01:00
Seth Hillbrand
f4e8c194be
Revise restriction on No Copper setting
...
This allows the user to specify a NPTH with "No Copper", allowing a pad
to retain the mask layer without a copper landing.
Fixes https://gitlab.com/kicad/code/kicad/issues/3407
Fixes https://gitlab.com/kicad/code/kicad/issues/5237
2020-08-26 18:09:06 +00:00
Seth Hillbrand
adff7f749b
PNS: Addition layer smarts
...
Edge.Cuts have no parent but cross all layers, so we need to handle the
"all layers" case. Also renames "IsPadOnLayer" to "IsOnLayer".
Fixes https://gitlab.com/kicad/code/kicad/issues/5351
2020-08-25 09:42:50 -07:00
Seth Hillbrand
686af65a9b
Fix issue generating alternate shape
...
Boolean ops need boolean inputs.
2020-08-22 08:04:03 -07:00
Jeff Young
842641308f
Solids don't always have nets (even a defualt one).
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5290
2020-08-21 20:08:12 +01:00
Seth Hillbrand
9a4f92dfd9
Ensure that all pads with holes have alts
...
Alternate shapes for holes that are fallback clearance are needed in
case we have missing copper on any layer
Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-20 21:50:37 -07:00
Seth Hillbrand
dd9f7c8c25
PNS: Add defensive coding to AlternateShape()
...
Adds additional check/warnings about missing alternate shapes when they
are expected.
Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-19 09:02:06 -07: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
Seth Hillbrand
4cc820f550
PNS: skip hulls for layers where the solid isn't
...
If we don't have an object on the required layer and there isn't a
through-hole (m_alternateShape), then we shouldn't return a hull
Fixes https://gitlab.com/kicad/code/kicad/issues/5233
2020-08-18 06:53:03 -07:00
Seth Hillbrand
5c3a1d059e
Fix memory mgmt issue with SOLID shapes
...
We don't delete items from the CTOR but we do need to check if they
exist in the incoming SOLID before cloning
Fixes https://gitlab.com/kicad/code/kicad/issues/5214
2020-08-17 06:16:11 -07:00
Seth Hillbrand
afc94fdec3
PNS: Be better about handling multiple layers
...
Rather than adding pads/vias multiple times for each layer, we introduce
the "alternate shape" idiom to PNS that allows us to optionally place
the collision constraint on the hole instead of the pad for those
vias/pads that have inner layers removed.
Fixes https://gitlab.com/kicad/code/kicad/issues/5158
Fixes https://gitlab.com/kicad/code/kicad/issues/5198
Fixes https://gitlab.com/kicad/code/kicad/issues/5195
2020-08-16 12:39:15 -07:00
Jeff Young
57c3d8e8d8
Make sure preview group gets added to view after a clear.
2020-08-15 21:13:44 +01:00
Jon Evans
bd14f8a82a
ADDED: New appearance control widget for PcbNew
...
Featuring:
- Layer view presets
- Per-type opacity for tracks, vias, pads, zones
- Net and netclass color and visibility controls
CHANGED: Simplified object visibilty controls
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1951
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1981
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2003
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2173
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2254
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4325
2020-08-15 15:24:28 -04:00
Jeff Young
463100d67f
Remove a long-standing hack to keep divots out of adjacent zones.
...
The new algorithm unions any adjacent zones before doing the
chamfer/fillet and then subtracts the other zones back out afterwards.
Fixes https://gitlab.com/kicad/code/kicad/issues/3812
2020-08-12 22:20:08 +01:00
Seth Hillbrand
9a66a5acad
Cleanup code line endings
2020-08-10 03:27:27 +00:00
Seth Hillbrand
5fc6b74c89
ADDED: Remove unused pads
...
This option removes copper layers from pads and vias where they are not
connected to other board elements. This allows the inner layers to be
more closely routed if the via landing pad is not needed.
Fixes https://gitlab.com/kicad/code/kicad/issues/1835
2020-08-10 03:27:26 +00:00
Ian McInerney
90a17427ee
Give the length tuning tool an inital end point that isn't the start point
...
Using the starting point as the end point means that the tool
initializes with 0 length traces and so nothing is visible.
Fixes https://gitlab.com/kicad/code/kicad/issues/1912
2020-08-08 23:41:48 +01:00
Jeff Young
7cd8f710b6
Clean up unused includes.
2020-08-08 16:25:30 +01:00
Seth Hillbrand
c57c168753
PNS: Remove items from all layers
...
subIndices control which layers the items are inserted onto and removed
from. The iterator to remove items needs to be inclusive of the
first/last layers
Fixes https://gitlab.com/kicad/code/kicad/issues/5090
Fixes https://gitlab.com/kicad/code/kicad/issues/5075
Fixes https://gitlab.com/kicad/code/kicad/issues/5034
2020-08-05 19:39:55 -07:00
Jeff Young
73832a9708
Work around an event processing failure.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4273
2020-08-05 19:36:58 +01:00
Jeff Young
e2ec9d9f00
A more fail-safe way to disallow editing while routing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4413
Fixes https://gitlab.com/kicad/code/kicad/issues/5067
2020-08-05 16:51:58 +01:00
Jeff Young
59ba793096
Disable various combinations of router and editing commands.
...
They just confuse each other.
Fixes https://gitlab.com/kicad/code/kicad/issues/5067
2020-08-04 14:32:02 +01:00
Jeff Young
74b9cce682
Try again at dragging module edges.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-03 23:53:45 +01:00
Jeff Young
ef2388b5bb
Fix issue with dragging flipped MODULE.
2020-08-02 17:05:13 +01:00
Jeff Young
d586495c0a
Preview fp edges & text while dragging in router.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5037
2020-08-01 15:40:34 +01:00
Tomasz Wlostowski
89a953e039
Migrated GetEffectiveShape(s) to SHAPE_COMPOUND
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
85aecc15ee
router: fix mistake in 45/free-angle mode selection when dragging corners
2020-07-29 23:14:03 +02:00
Tomasz Wlostowski
c2b9db293f
router: prevent heap crash when initial walkaround line is empty
2020-07-29 23:14:03 +02:00
Seth Hillbrand
1f5fb979b9
Keep PNS item RTree on layer-by-layer
...
Rather than extra splitting of the RTree that we use for collision
detection on types and direction, we limit this to checks on
layer-by-layer basis. This also allows for layer expansion by using
deque of RTrees rather than fixed index
This fixes the missing layernumbers and keeps the layers in a deque to
prevent re-allocation on expansion.
Replaces ad94b6205
2020-07-29 11:21:00 -07:00
jean-pierre charras
f00c59c446
Fix a few Coverity warnings.
2020-07-29 09:26:57 +02:00
Seth Hillbrand
ad94b6205a
Revert "Keep PNS item RTree on layer-by-layer"
...
This reverts commit a34d33c460
.
The commit did not work properly for shove routing. Will revist in
later commit
2020-07-28 21:20:19 -07:00
Seth Hillbrand
a34d33c460
Keep PNS item RTree on layer-by-layer
...
Rather than extra splitting of the RTree that we use for collision
detection on types and direction, we limit this to checks on
layer-by-layer basis. This also allows for layer expansion by using
vector of RTrees rather than fixed index
2020-07-28 10:17:56 -07:00
Jeff Young
46602148dc
Fix overly aggressive assert.
2020-07-28 13:35:37 +01:00
Jeff Young
4153309fba
Add defensive code.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4941
2020-07-25 23:54:04 +01:00
Jeff Young
bf445c1a95
Performance enhancements.
...
1) cache pad polygon outlines
huge improvement in connectivity performance and a decent
improvement in DRC performance
2) don't pre-allocate CONTEXT stack
significant improvement in DRC rule performance
2) don't keep re-encoding strings
decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00