jean-pierre charras
c5f01501c1
PnS, router/router_preview_item: fix incorrect size of SH_RECT shape when drawing it.
...
The width of the rectangle was used instead of the width of outline (usualy 0) to
draw the shape (when dragging the pad for instance)
Fixes #5944
https://gitlab.com/kicad/code/kicad/issues/5944
2020-10-10 10:03:23 +02:00
Jeff Young
b31470012a
Previous check didn't account for router dragging.
2020-10-09 14:30:55 +01:00
Jeff Young
2ca819a627
Don't assume a DRC_CONSTRAINT has a parent rule.
...
It will still have a name, though.
2020-10-09 14:26:09 +01:00
Jeff Young
1cb0cbff2e
Fix crash when router gets notifed but has no current m_placer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5935
2020-10-09 14:26:04 +01:00
Jon Evans
966730710e
Partial fix for routing with no start item
2020-10-08 20:38:08 -04:00
Tomasz Wlostowski
38cef95da9
router: initial support for V6 Design Rules (width/clearance/diff pair width/diff pair gap). Still a lot of work to do!
2020-10-09 00:01:26 +02:00
Tomasz Wlostowski
9bef95418e
router: wip on less intrusive dragged trace optimization
2020-10-09 00:01:26 +02:00
Tomasz Wlostowski
5e4fb46aef
MINOPTMAX: added OptThenMin() method as syntax sugar
2020-10-09 00:01:26 +02:00
Marek Roszko
f5e0754f65
Use the setCursor lambda pattern and fix up the initial cursor states
2020-10-07 23:26:14 -04:00
Mark Roszko
d9485129c8
Implement more context specific cursors using both stock and custom cursors.
2020-10-08 00:50:28 +00:00
Tomasz Wlostowski
eb8287ded8
router: bring back legacy GetEffectivePolygon() for complex pad shapes (more info in comments)
2020-10-07 16:36:37 +02:00
Jeff Young
d23d5510e7
Restore a side-effect that the router appears to depend on.
2020-10-06 00:07:34 +01:00
Jeff Young
35fa857fd8
Make sure router tool passes events it doesn't handle.
...
Fixes undo/redo when router tool is active but not routing.
2020-10-05 23:16:37 +01:00
Jeff Young
18a3c4c1db
Fix some fairly catastrophic bugs in shape collision optimization.
...
I did a little too much copy & paste last time around....
2020-10-05 22:32:07 +01: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
Jeff Young
d063c56971
Move PNS pad solids to COMPOUND_SHAPE.
...
Also fixes plated holes solids to include plating thickness.
2020-10-05 22:32:07 +01:00
Jeff Young
37906511f5
Class renaming.
...
DRAWSEGMENT -> PCB_SHAPE
EDGE_MODULE -> FP_SHAPE
TEXTE_PCB -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Mark Roszko
a28a0e14ba
Fix conversion warnings
2020-10-05 10:41:14 +00:00
Jeff Young
7a4900b8dc
PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
...
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Jeff Young
bb753aaadf
Clean up terminology around active & high contrast layers.
2020-10-03 22:55:34 +01:00
Mikolaj Wielgus
400c15b8eb
Add mils to units, remove useMils variables
2020-10-03 20:06:56 +00:00
Jon Evans
6f54a9982c
Remove PCB_LAYER_WIDGET
2020-09-30 19:12:26 -04:00
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