Commit Graph

473 Commits

Author SHA1 Message Date
Jeff Young 3439551543 Implement a work-around for net-ties.
Fixes: lp:1799318
* https://bugs.launchpad.net/kicad/+bug/1799318
2018-11-07 14:24:16 +00:00
Seth Hillbrand 3cc87b4597 PNS: Ensure we don't miss items
Higher candidate levels could override better matches if the layers did
not overlap.
2018-10-21 14:28:33 -07:00
Tomasz Włostowski bdc64ff0b3 router: DP_GATEWAYS::FilterByOrientation() should have exactly opposite filtering condition!
Fixes: lp:1797914
* https://bugs.launchpad.net/kicad/+bug/1797914
2018-10-18 14:29:19 +02:00
Tomasz Włostowski eea949ce0a router: don't cross DP lines when length tuning, fix swap pair polarity bug
Fixes: lp:1798500
* https://bugs.launchpad.net/kicad/+bug/1798500

Fixes: lp:1798221
* https://bugs.launchpad.net/kicad/+bug/1798221
2018-10-18 13:48:43 +02:00
Seth Hillbrand 4f672f0d39 Fixing a number of dynamic_casts
Dynamic casts should only be used when we explicitly check for the
resulting pointer to be NULL.  Where we know the class is castable we
can use static_cast, save on overhead and ensure our resulting pointer
is non-null.
2018-10-11 15:24:12 -07:00
Seth Hillbrand 13997f0050 Revert "pcbnew: Adding copy constructors to PNS items"
This reverts commit 41e4bc4d9f.

This commit requires additional testing before recommitting as it causes
issues with FindJoint().
2018-10-09 14:50:20 -07:00
Seth Hillbrand 1a6f039bb5 pcbnew: Fix minor miscalculation in dp length
The commonParallellProjection had an odd ordering of parameters that was
not followed by callers.  This corrects the ordering to standard for
each.
2018-10-09 05:37:48 -07:00
Seth Hillbrand 41e4bc4d9f pcbnew: Adding copy constructors to PNS items
Adding safe copy constructors to PNS items including assignment check
and copy operations
2018-10-09 05:37:48 -07:00
Jeff Young 46426f1196 Fix segfault when routing.
Fixes: lp:1792037
* https://bugs.launchpad.net/kicad/+bug/1792037
2018-10-09 11:08:56 +01:00
Seth Hillbrand 77eeda4191 pcbnew: fix pad distance calc in gateways
The pad distance was fixed to 0, making the gateway priority set
artificially to 1
2018-10-08 09:53:47 -07:00
Seth Hillbrand 11b45002e1 pcbnew: Code formatting 2018-10-04 08:17:48 -07:00
Seth Hillbrand 57ceec5606 pcbnew: Allow DRC violations when requested in dp 2018-10-02 14:39:53 -07:00
Seth Hillbrand 317ca8e64d pcbnew: Do not allow drag to violate DRC without permission
m_dragstatus is set to true when a valid route is created given the
user's constraints.  We need to check this before committing the route
to the board.

Fixes: lp:1794810
* https://bugs.launchpad.net/kicad/+bug/1794810
2018-09-27 13:08:22 -07:00
Jeff Young 4b493e45eb Don't consider non-tracks when seeing if we can do a router drag.
Fixes: lp:1793979
* https://bugs.launchpad.net/kicad/+bug/1793979
2018-09-23 23:51:13 +01:00
Seth Hillbrand 8c3a82e526 Code cleanup: Fixing assignment operators 2018-09-20 20:15:47 -07:00
Jeff Young ebb74fcc2b Honour diff-pair dimension changes while routing. 2018-09-18 20:37:00 +01:00
Jeff Young 9f068d66a8 Don't use diff-pair gap as a clearance.
Fixes: lp:1789690
* https://bugs.launchpad.net/kicad/+bug/1789690
2018-09-18 17:44:53 +01:00
Jeff Young 9c708c6177 Use DP netclass values when custom or predefined are not selected.
Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670
2018-09-18 17:44:53 +01:00
Seth Hillbrand 9523b26472 pcbnew: Fix dragging snap to items
Snapping while dragging depends on the current net being assigned during
dragging.  This initializes the placer to hold the current net while
performing inline dragging.  The placer is reset along with the dragger
in StopRouting().  This fixes the difference in snap between drag and
create new route.

( cherry-picked from 219695953 )
2018-09-15 20:22:34 -07:00
Jeff Young ba8647f676 Fix compiler warning. 2018-09-12 21:39:41 +01:00
Franck78 009dfa411f Finish track with 'activate router hotkey'
Fixes: lp:1790552
* https://bugs.launchpad.net/kicad/+bug/1790552
2018-09-04 12:08:40 +02:00
Jeff Young c90a3efea2 Change KIDIALOG hashing algorithm to __FILE__ + __LINE__.
Using Title + Message wasn't working for all the dialogs which
did substitutions in the message (which was a lot of them).

Fixes: lp:1789348
* https://bugs.launchpad.net/kicad/+bug/1789348
2018-08-29 23:38:23 +01:00
Seth Hillbrand 2398edda38 pcbnew: Only dp clearance matrix when routing dp
Fixes: lp:1787766
* https://bugs.launchpad.net/kicad/+bug/1787766
2018-08-29 10:26:39 -07:00
Seth Hillbrand dc4125206b GAL: Add a selected item layer
The selected items should be displayed above the rest of the items but
below informational overlays.

Fixes: lp:1789505
* https://bugs.launchpad.net/kicad/+bug/1789505
2018-08-28 15:00:05 -07:00
Jeff Young 6bb75b071a Implement DRC for PCB & module copper items in PNS router.
Fixes: lp:1788699
* https://bugs.launchpad.net/kicad/+bug/1788699
2018-08-27 18:38:56 +01:00
Jeff Young 30bb911154 Bring PICKER_TOOL in line with other tools.
Use standard Magnetize() to handle grid and magnetic pads.

Use the standard menu from PCB_TOOL.  Delegating the menu to
the SELECTION_TOOL just caused grief.

Also brings clients (such as Position Relative To) into line,
and implements better Cancel behaviour.

Also improves visibility of modal status messages:
- moves Select Anchor message from status bar to popup
- moves Select Reference message from dialog to popup

Fixes: lp:1786727
* https://bugs.launchpad.net/kicad/+bug/1786727
2018-08-23 00:58:01 +01:00
Jeff Young c655bffac1 Improve context menu consistency.
Also fixes some interactivity issues in the microwave tools around
single-click tools that have initial properties dialogs.  Those
need to act kind of like a hybrid between single-click and two-click
tools.

Fixes: lp:1751381
* https://bugs.launchpad.net/kicad/+bug/1751381
2018-08-02 11:01:03 +01:00
Jeff Young 95d3336f63 We need the other end of the stick when not yet routing.
Fixes: lp:1781424
* https://bugs.launchpad.net/kicad/+bug/1781424
2018-07-27 14:58:19 +01:00
jean-pierre charras 3c6e8c4a40 More support of DRW_SEGMENT Bezier curve (support in 3D viewer, and PnS router). 2018-07-22 18:39:48 +02:00
Jeff Young 7cce283fea Fix diff pair custom values.
Fixes: lp:1782971
* https://bugs.launchpad.net/kicad/+bug/1782971

(cherry picked from commit 53f35a3)
2018-07-22 11:19:17 +01:00
Jeff Young 99db5cb543 Allow for reduced nagging with wider use of KIDIALOG.
(cherry picked from commit c2dd5df)
2018-07-17 15:13:53 +01:00
Jeff Young d5e88f574f Clean up units infrastructure after g_UserUnit removal.
Fixes: lp:1538239
* https://bugs.launchpad.net/kicad/+bug/1538239

(cherry picked from commit 96d7178)
2018-07-17 15:12:36 +01:00
Jeff Young aab97c8385 Consolidate design rules UI.
Implement new Board Setup paged dialog which includes:
  Layers Setup
  Design Rules
  Solder Mask & Paste
  Text & Drawings

Moves line width and text properties to a layer-class-based
system.  Renames unlocked to upright (which also reverses the
logic).

New Edit Text and Graphic Properties dialog which replaces
Edit Footprint Text and adds layer-class-based editing and the
italic, upright and visibility properties.

Adds Import Settings functionality which allows settings to
be imported from another project at page granularity.

Also UNIT_BINDERizes the dialog and adds editing of pcb text.

Fixes: lp:1731952
* https://bugs.launchpad.net/kicad/+bug/1731952

Fixes: lp:1743464
* https://bugs.launchpad.net/kicad/+bug/1743464

Fixes: lp:1664761
* https://bugs.launchpad.net/kicad/+bug/1664761

Fixes: lp:1753362
* https://bugs.launchpad.net/kicad/+bug/1753362

Fixes: lp:1545427
* https://bugs.launchpad.net/kicad/+bug/1545427

Fixes: lp:1753775
* https://bugs.launchpad.net/kicad/+bug/1753775

Fixes: lp:1777692
* https://bugs.launchpad.net/kicad/+bug/1777692

Fixes: lp:1780670
* https://bugs.launchpad.net/kicad/+bug/1780670

Fixes: lp:1519601
* https://bugs.launchpad.net/kicad/+bug/1519601

(cherry picked from commit 3944a5e)
2018-07-17 15:12:34 +01:00
Jeff Young ff34c7a948 Eradicate g_userUnit from router.
(cherry picked from commit 5e90e6b)
2018-07-17 15:12:26 +01:00
Jeff Young eacaa39aa2 Remove global units usage from GetSelectionText...
... and GetMsgPanelInfo.

Step 4 in the g_UserUnit eradication effort.

Also removes a couple of conversion routines that were close
enough to extinction.

(cherry picked from commit c75da51)
2018-07-17 15:11:09 +01:00
Jeff Young f7861c90ec Use more self-documenting names for conversion routines.
In particular, make sure no one thinks the low-precision ones are
OK for dialogs and/or files.

(cherry picked from commit bc1fcfa)
2018-07-17 15:10:13 +01:00
Seth Hillbrand 101b68b610 pcbnew: Keep dp placer on initial layer
Changing the layer after starting the differential pair placer should
not change the inital track layer.

Fixes: lp:1779800
* https://bugs.launchpad.net/kicad/+bug/1779800
2018-07-03 08:23:16 -07:00
Seth Hillbrand b3db6572e8 pcbnew: diff pair filter bugfix
Added required action on the std::remove_if construct to erase elements
matching the filter
2018-06-29 13:05:44 -07:00
Seth Hillbrand 33075e55a4 pcbnew: Draw the clearance outline first
In Cairo, we don't have z-ordering implemented, so we need to draw the
clearance outline first otherwise it will draw a large, grey overlay
that hides the actual track while routing.

Fixes: lp:1779228
* https://bugs.launchpad.net/kicad/+bug/1779228
2018-06-28 20:28:12 -07:00
Tomasz Wlostowski f6f726acab router: allow placing tracks/diff pairs without continuing routing by Shift+L-Click
Fixes: lp:1777688
* https://bugs.launchpad.net/kicad/+bug/1777688
2018-06-19 19:30:03 +02:00
Seth Hillbrand 44c1f5785b pcbnew: Set dp clearance based on netclass
Minimum differential pair clearance should be limited to the netclass
differential pair spacing.  This also cleans up some unused code that
was left over from previous work on differential pair clearances.

Fixes: lp:1673632
* https://bugs.launchpad.net/kicad/+bug/1673632
2018-06-18 14:23:25 -07:00
Maciej Suminski 583a9c08c0 Remove duplicated PNS TOOL_ACTIONs to display routing settings 2018-06-15 17:12:15 +02:00
Seth Hillbrand 4dd2de9057 pcbnew: Prevent mouse capture after actions
After an action is completed that required the screen to pan when the
cursor reaches the edge of the screen, we should release the cursor to
allow the user to move their mouse without panning.

Fixes: lp:1763860
* https://bugs.launchpad.net/kicad/+bug/1763860
2018-06-13 14:05:32 -07:00
Seth Hillbrand bc7bd107d9 Fix a number of untranslated strings. 2018-06-12 17:05:25 -07:00
Seth Hillbrand 47106b6861 pcbnew: Adding meander hotkeys to assignment
Allows increase/decrease spacing/amplitude hotkeys to be
assigned/changed.

Fixes: lp:94fb13aec
* https://bugs.launchpad.net/kicad/+bug/94fb13aec
2018-06-12 16:08:01 -07:00
Seth Hillbrand aae30cc7c1 pcbnew: Hotkey minor fixes
- Ordering of Hotkey list by function
- Use Hotkey assignment instead of hard-coded hotkey for length tuning
- Adjust default Length Tuning settings hotkey to CTRL-L so that we
don't overlap with "Lock" (overlaps are not editable)
2018-06-12 14:22:46 -07:00
John Beard 0555bbc656 Pass PCB display settings to PNS router tool
This allows the tool to set display options like the clearance.

Fixes: lp:1766836
* https://bugs.launchpad.net/kicad/+bug/1766836
2018-06-11 10:48:05 -07:00
Seth Hillbrand 68f6e3ad44 pcbnew: Differential pairs obey netclass settings
PNS routing options allow trace width to be chosen by the assigned
netclass.  This extends that to differential pair width/gap settings as
well.

Fixes: lp:1672126
* https://bugs.launchpad.net/kicad/+bug/1672126
2018-06-07 08:58:12 -07:00
Jeff Young cdde4c4b40 Fix a bug in how we check for differential pair tuning.
Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-21 13:49:40 +01:00
Jeff Young 63c9e11aae Bug fixes in Length Tuning UI.
1) hide the status popup when the dialog is brought up
2) forward events from the popup to the canvas so hotkeys work
3) make sure diff pair radius is always 100%
4) fix greyed-out Miter style label
5) make L a hotkey so it works before you start dragging

Fixes: lp:1545856
* https://bugs.launchpad.net/kicad/+bug/1545856
2018-05-20 23:48:29 +01:00