Jeff Young
86273e86b9
Added user and grid origins to Position Relative dialog.
...
Also fixed a refresh bug when doing Position Relative.
Fixes: lp:1792699
* https://bugs.launchpad.net/kicad/+bug/1792699
2018-11-12 23:09:45 +00:00
Jeff Young
6d76097291
When running selectable() recursively, we're really only checking visibility.
...
Fixes: lp:1802949
* https://bugs.launchpad.net/kicad/+bug/1802949
2018-11-12 21:59:43 +00:00
Jeff Young
fdff010199
Fix copy/paste errors in delayedFocusRow stuff.
...
Fixes: lp:1802907
* https://bugs.launchpad.net/kicad/+bug/1802907
2018-11-12 17:08:45 +00:00
Seth Hillbrand
c15c64e991
GRID_HELPER: Don't snap to sub elements being moved
...
Fixes: lp:1802795
* https://bugs.launchpad.net/kicad/+bug/1802795
2018-11-12 06:53:33 -08:00
Jeff Young
62e2fe8bbd
Recurse for more detailed selectability tests.
...
Fixes: lp:1801709
* https://bugs.launchpad.net/kicad/+bug/1801709
2018-11-11 20:26:19 +00:00
Jeff Young
befc504734
Warp cursor back to creation point after new-text dailog.
...
Also fixes same issue for new zones.
Fixes: lp:1802532
* https://bugs.launchpad.net/kicad/+bug/1802532
2018-11-11 20:26:19 +00:00
Jeff Young
6789103961
Save internal values rather than textbox content.
...
Fixes: lp:1802442
* https://bugs.launchpad.net/kicad/+bug/1802442
2018-11-11 20:26:19 +00:00
Jeff Young
295013e4a9
Clarify fp reference filter and add fp id filter.
...
Fixes: lp:
* https://bugs.launchpad.net/kicad/+bug/
2018-11-11 20:26:19 +00:00
Seth Hillbrand
c24f70ba1e
GRID_HELPER: Filter targets based on dragging
...
Filtering based on selection ignores the use case where we are measuring
to a selected item. This utilizes the dragged flag to prevent snapping
based on the current state of the item drag.
Fixes: lp:1801089
* https://bugs.launchpad.net/kicad/+bug/1801089
2018-11-11 11:30:36 -08:00
Seth Hillbrand
cf20b39ddc
GRID HELPER: Consider all snappable items
...
When snapping, we should allow any point identified as a snappable
point. The additional consideration for corners might be used for
alignment in the future.
Fixes: lp:1802741
* https://bugs.launchpad.net/kicad/+bug/1802741
2018-11-11 11:30:36 -08:00
jean-pierre charras
fcafe5362f
NC drill (Excellon) exporter: remove useless M71 / M72 lines.
...
They are probably incorrect in V2 format, and the format is already specified.
2018-11-11 19:57:16 +01:00
jean-pierre charras
0d3637c2ee
Fix a few minor I18n issues.
...
Avoid translation of debug messages.
2018-11-11 10:46:26 +01:00
jean-pierre charras
f7cf40f2f4
Fix a few Coverity warnings.
...
Sometimes a dynamic_cast was used without testing the returned value.
Some are replaced by static_cast, when the dynamic_cast was useless.
2018-11-11 08:28:58 +01:00
jean-pierre charras
acfa13c038
Fix typo
2018-11-09 15:46:09 +01:00
Seth Hillbrand
70e660dfe8
GRID_HELPER: Update target geometry when moving
...
Setting a previously visible item visible is a nop. If the target was
visible, make sure to update the geometry
Fixes: lp:1802405
* https://bugs.launchpad.net/kicad/+bug/1802405
2018-11-09 06:12:31 -08:00
Wayne Stambaugh
f1f4473d8b
Footprint editor: add save view to PNG file.
...
Factor out save current canvas view to image file code from symbol editor
code so it can be used anywhere.
Add ability to save to any image format supported by wxBitmapType. See
https://docs.wxwidgets.org/3.0/gdicmn_8h.html#a90a1eb6d85b5044a99b706fd979f27f5 .
Currently only PNG output is implemented.
Please note that there is a minor bug that appears to be due to the
scroll bars which causes unfilled areas on the right and bottom edges
of the image. This always existed in the save symbol editor view
image but it was not as noticeable because by default the background
color is white. It is very noticeable in the footprint editor with
a black background.
The usual smattering of coding policy and comment fixes.
Fixes lp:1802127
https://bugs.launchpad.net/kicad/+bug/1802127
2018-11-09 08:32:36 -05:00
Jeff Young
5c726744b6
Move Zone Properties dialog to Connect() strategy.
...
If checkboxes don't have individual IDs FormBuilder won't assign
them and the event table ends up connecting each checkbox to all
of the checkbox handlers in the dialog.
Fixes: lp:1801746
* https://bugs.launchpad.net/kicad/+bug/1801746
2018-11-08 21:27:15 +00:00
Seth Hillbrand
4b931aeb57
pcbnew: Force cursor position when snapping
...
This places the crosshairs (confusingly named here) at the snap
position, either one of the snap points or the grid, depending on the
status of the hotkeys SHIFT/ALT.
Fixes: lp:1801373
* https://bugs.launchpad.net/kicad/+bug/1801373
Fixes: lp:1801369
* https://bugs.launchpad.net/kicad/+bug/1801369
2018-11-07 14:36:46 -08:00
Seth Hillbrand
f2ccad39b6
pcbnew: Fix grid snapping for picker
...
Fixes: lp:1801373
* https://bugs.launchpad.net/kicad/+bug/1801373
2018-11-07 09:03:26 -08:00
Jeff Young
5c26b1dabd
Don't use C-style cast when we don't actually know what it is.
2018-11-07 14:24:16 +00:00
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
1f25fcd3d6
pcbnew: Shift zone filler to std::async
2018-11-06 09:28:12 -08:00
Seth Hillbrand
a24bd9baa1
pcbnew: Adjust default update rate to 100ms
...
10ms was too fast to update the progress reporter and actually slowed
the process down for many machines.
2018-11-06 09:28:12 -08:00
jean-pierre charras
238abad004
Gerber job file: fix incorrect GUID.
...
Fixes: lp:1801696
https://bugs.launchpad.net/kicad/+bug/1801696
2018-11-06 08:16:07 +01:00
Maciej Suminski
4ad37bc9ea
Limit 'items on disabled layers' DRC check to copper layers
...
Fixes: lp:1788248
* https://bugs.launchpad.net/kicad/+bug/1788248
2018-11-05 14:00:49 +01:00
Jeff Young
6e9475694c
Fix bug with zone selection when zones are shown filled.
2018-11-04 19:17:53 +00:00
Seth Hillbrand
df562b7ec0
pcbnew: Prevent degenerate values in Eagle import
...
Importing Eagle files allowed for invalid zone values for clearance and
minimum width that triggered asserts in the 3d-viewer.
Fixes: lp:1801188
* https://bugs.launchpad.net/kicad/+bug/1801188
2018-11-04 11:01:08 -08:00
jean-pierre charras
93d3e4ccf8
dialog_footprint_wizard_list_base.cpp: fix a minor wxWidgets alert.
2018-11-04 15:50:29 +01:00
Jeff Young
589e1f6a96
MSW and GTK need a separate dialog for opening/saving directories.
...
Fixes: lp:1801528
* https://bugs.launchpad.net/kicad/+bug/1801528
2018-11-04 12:35:01 +00:00
Jeff Young
68b07d1aff
Add show/hide search tree to modedit, and fix it in libedit.
...
Fixes: lp:1801531
* https://bugs.launchpad.net/kicad/+bug/1801531
2018-11-04 12:35:01 +00:00
Jeff Young
3bfd32cdc5
Inherit grid settings from PCBNew.
...
Fixes: lp:1801428
* https://bugs.launchpad.net/kicad/+bug/1801428
2018-11-04 12:35:01 +00:00
Nick Østergaard
8c1ebc4314
Remove shebang from footprint wizard plugin
...
Fedora packaging errors with ambiguous python shebang since current
rawhide (30).
So we should remove it as the footprint wizards are not to be executed
standalone.
2018-11-04 08:43:20 +01:00
Maciej Suminski
75896d767a
Fix a crash in BOARD::SortedNetnamesList()
...
Variable netBuffer contains all NET_INFO items, whereas max_netcode
value is determined only basing on pad nets. After a netlist update
there still might be a NETINFO_ITEM that is not assigned to any pad and
has a net code higher than calculated max_netcode. Such situation
results in a out-of-bounds access in sortNetsByNodes().
2018-11-03 18:17:48 +01:00
jean-pierre charras
15fa8f8a22
Minor fixes.
2018-11-03 14:30:34 +01:00
Jeff Young
569d4a0f64
More selection logic improvements.
...
Separate out zone edges (which are quite specific, and should
win over most other things) from zone fills (which are pretty
generic and should only be considered when there's nothing else).
Also excludes zone fills when the zones aren't being shown as
filled.
2018-11-02 23:52:00 +00:00
Maciej Suminski
dfccd8c5e4
Added level-of-details threshold for via net name layer
2018-11-03 00:48:03 +01:00
Maciej Suminski
8d73cfef2a
Adjusted level-of-detail thresholds for BOARD_ITEMs visibility
...
Fixes: lp:1801056
* https://bugs.launchpad.net/kicad/+bug/1801056
2018-11-03 00:34:27 +01:00
Jeff Young
69952a7b9f
Improve updating of symbol and footprint trees.
...
In particular, update highlighting when changing footprints.
2018-11-02 19:55:30 +00:00
Maciej Suminski
afda69c9cc
Removed default line width setting from the printing dialog
2018-10-31 19:17:30 +01:00
Maciej Suminski
64da77538f
Fix bitmap scale in printouts
...
Display GALs had an incorrect world unit value set. Now the world unit
value says how many internal units are in an inch, in accord with the comments
in the GAL header. Bitmap drawing code relied on the information about DPI,
so scaling worked differently for display and print GALs.
2018-10-31 19:17:30 +01:00
Maciej Suminski
262a105416
Disable zone outlines and hatched lines rendering in printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
3d15092643
Fixed loading layer visibility setting for printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
90b6156448
Store line width setting for printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
d3ea63e133
Removed a redundant parameter from BOARD_PRINTOUT constructor
2018-10-31 19:17:30 +01:00
Maciej Suminski
ff0909c90c
Fully initialize PCB_RENDER_SETTINGS::m_sketchMode
2018-10-31 19:17:30 +01:00
Maciej Suminski
dea778842b
Grand printing dialogs refactor
...
Patch introduces a generic printing settings window that is customized by pcbnew and gerbview.
2018-10-31 19:17:30 +01:00
Maciej Suminski
e81c3a59a2
Refactored and unified board editor and footprint editor print dialogs
2018-10-31 19:17:30 +01:00
Maciej Suminski
92c5cb288e
Fixed scale in Gerbview printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
8cb464b725
Handle drill mark options in pcbnew printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
698a380827
Clear selection before printing
...
Selected objects are hidden in VIEW, that makes them disappear from
printouts.
2018-10-31 19:17:30 +01:00
Maciej Suminski
59f77e68c9
Removed unused pcbnew printing code
2018-10-31 19:17:30 +01:00
Maciej Suminski
1cce194c8a
Handle layer settings in printouts
2018-10-31 19:17:30 +01:00
Maciej Suminski
5b94f20e6f
Adapted printout controllers to the new printing routines
2018-10-31 19:17:30 +01:00
Jeff Young
74118a2e9d
Don't display all the footprint info when an edge is selected.
...
Fixes: lp:1800556
* https://bugs.launchpad.net/kicad/+bug/1800556
2018-10-30 11:33:49 +00:00
jean-pierre charras
654dbbb44b
Gerber UUID parameter calculation: refinements and more comments
2018-10-29 18:56:26 +01:00
jean-pierre charras
c05ca469ae
Pcbnew, DIALOG_PLOT_BASE: Fix a minor wxWidgets alert.
2018-10-29 17:34:14 +01:00
jean-pierre charras
03f3ff79a5
Pcbnew, Gerber output: fix incorrect UUID format in %TF.ProjectId attribute.
...
Fixes: lp:1800459
https://bugs.launchpad.net/kicad/+bug/1800459
2018-10-29 17:34:14 +01:00
jean-pierre charras
eabae68ab8
PANEL_SETUP_LAYERS_BASE: cosmetic enhancements.
2018-10-29 15:21:03 +01:00
Seth Hillbrand
ed1c8eee9e
async: Ensure threads are started async
...
It is possible for an async thread to simply be deferred if not
specifically set to async. In which case, until the return value is
requested, the loop may simply wait.
2018-10-26 22:30:06 -07:00
Seth Hillbrand
59fb6d8851
Threading: Moving connectivity search to std::async
...
By decoupling from std::thread, we can avoid the wait/sleep cycle in
checking the std::atomic completion variable. The std::future variables
are immediately returning without the additional atomic check cycle.
2018-10-26 18:00:43 -07:00
Thomas Pointhuber
0e0b4d52a2
Add initial support for Phoenix (new wxPython binding)
...
Based on the work of @mmccoo:
https://kicad.mmccoo.com/2017/11/23/learnings-from-moving-kicad-to-wxpython-4-0/
and this additional patchset to remove wxpy_api.h dependency:
http://mmccoo.com/random/0001-Remove-dependence-on-pywx_api.h.patch
Please note CreatePythonShellWindow changed quite a lot. Throughful testing
should be made for the old as well as new wxPython version on all platforms
2018-10-26 13:21:11 +02:00
jean-pierre charras
633bc7f2d5
Pcbnew, DIALOG_TEXT_PROPERTIES_BASE: fix many minor wxASSERTs
2018-10-26 13:09:05 +02:00
Seth Hillbrand
a3bbd32953
Fix minor compile warnings
2018-10-25 17:14:04 -07:00
Seth Hillbrand
2d8f1df293
Threading: Minimize thread usage
...
This minimizes the thread usage, particularly during online actions such
as moving items and routing.
UpdateRatsnest: Minimized the number of atomics by utilizing future
promise. Avoided updating node-less nets. Node-less nets are common in
the dynamic ratsnest because the net vector is created from the board
nets by value but only populated with a subset. So the dynamic ratsnest
calculation always saw every net as dirty and spun up extra threads.
searchConnections: ParallelThreadCount is no longer lower bounded.
Small item counts are handled inline rather than with a separate thread.
2018-10-25 14:19:43 -07:00
Seth Hillbrand
90233e5ec6
SELECTION: Prevent double select/deselect.
...
When processing the selection filter, items were deselected before being
reselected after passing through the filter. This adjusts the logic to
only deselect those items that are filtered out.
2018-10-24 17:17:45 -07:00
Jeff Young
9624ef4f2e
Don't blindly overwrite footprints when doing a Save As.
2018-10-24 22:00:50 +01:00
Jeff Young
244497f514
A board FP is no longer a board FP after a Save As.
2018-10-24 22:00:50 +01:00
Seth Hillbrand
a0e4e23c14
Ratsnest: Keep connectivity data local
...
The dynamic ratsnest did not need to have a smart pointer to the
temporary connectivity data.
2018-10-24 13:43:09 -07:00
Seth Hillbrand
ec38a5cd10
Threading: Replacing sleep with yield for active wait
...
Some windows machines seem prone to sleeping for excessive times. When
called in the main thread, this may prevent the system from responding
to Windows 'Are you alive?' calls.
2018-10-24 10:37:25 -07:00
Jeff Young
a96dbde738
Allow net-ties within footprints.
...
Fixes: lp:1799318
* https://bugs.launchpad.net/kicad/+bug/1799318
2018-10-23 20:54:42 +01:00
Jeff Young
adfe2fc267
Make sure user isn't surprised by Match All setting.
...
If they selected the dialog with a footprint selected, they're
probably not expecting Match All.
2018-10-23 20:54:42 +01:00
Wayne Stambaugh
e43e3a93c0
Revert "cmake: avoid declaring a redundant concurrent _pcbnew.so target"
...
This reverts commit 2e047b45b4
.
2018-10-22 19:12:17 -04:00
Wayne Stambaugh
c99874ca2f
Revert "cmake: rearranged code in the KICAD_SCRIPTING_MODULES section in order to clarify the intent"
...
This reverts commit 71f17a698b
.
2018-10-22 19:11:11 -04:00
Roman Beranek
71f17a698b
cmake: rearranged code in the KICAD_SCRIPTING_MODULES section in order to clarify the intent
2018-10-22 13:59:08 -04:00
Roman Beranek
2e047b45b4
cmake: avoid declaring a redundant concurrent _pcbnew.so target
...
The "renamed _pcbnew.kiface" target should only be declared for MINGW
because for Linux it would have been already declared at line 802.
2018-10-22 13:59:08 -04: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
jean-pierre charras
0f247264f8
Pcbnew: DRC ignores first net of list of nets to test.
...
Fixes: lp:1798985
https://bugs.launchpad.net/kicad/+bug/1798985
2018-10-21 17:01:58 +02:00
Jeff Young
f17c18bcce
Remove AdvanceDepth() hacks in favour of proper layers.
...
Also removes the bounding-box cache since the last big merge
should have sorted out the Update(GEOMETRY) calls.
Fixes: lp:1797271
* https://bugs.launchpad.net/kicad/+bug/1797271
Fixes: lp:1797268
* https://bugs.launchpad.net/kicad/+bug/1797268
Fixes: lp:1797075
* https://bugs.launchpad.net/kicad/+bug/1797075
2018-10-21 15:55:56 +01:00
jean-pierre charras
064b8a8d60
Gerber file generation: remove a optional info in .FileFunction: the layer type.
...
TF.FileFunction,Copper,L1,Top,Signal is now TF.FileFunction,Copper,L1,Top
This param is not useful, and probably never correctly set by users, because is is not used by Pcbnew.
(It is used only for dsn export)
2018-10-19 15:48:18 +02:00
Thomas Pointhuber
e39eeb2f92
Remove debug printf and fix indentation inside of block
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
95e55eb17a
Fix coding style issue (space after if)
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
e09785db1d
Introduce PyStringToWx helper to remove code duplication
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
ce471ec898
Fix braces
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
6ac444f587
Fix style issue
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
9eff4e999f
Quick fix to avoid nameclash with local qrcode python package
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
8bf1954625
NoneType was incorrectly passed to PyString_AsString
...
The implementation relied on the fact that PyString_AsString is returning NULL
for invalid inputs (and causing an error condition), which is then fixed by the
call to FROM_UTF8. Now, we will simply return an empty string if Py_None is
returned by a python fuction, which resemebles the old behaviour of those methods
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
a27e547290
Fix uss39_barcode.py to work with Python3 as well
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
0812f71bd3
Fix builtins import in Python3
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
22e5e52598
Fix warning: 'HAVE_CLOCK_GETTIME' macro redefined
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
7365cb8e52
Get Exception handling working with Python 3
...
The old way to get the full stacktrace was incorrect, and does not work
with Python 3:
https://stackoverflow.com/questions/3702675/how-to-print-the-full-traceback-without-halting-the-program#comment84297600_33723119
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
88d04f3bcb
Get Action Plugins working with Python 3, fix some unicode string errors
2018-10-19 09:59:06 +02:00
Thomas Pointhuber
8805706ccb
Fix incompatibilites between Python 2 and Python 3
2018-10-19 09:59:05 +02:00
Thomas Pointhuber
e9da6811a6
Fix initialisation of the pcbnew python module
2018-10-19 09:59:05 +02:00
Thomas Pointhuber
284904b72c
Rewrite C extensions to also support Python 3
2018-10-19 09:59:05 +02:00
Seth Hillbrand
e1f30a3b38
pcbnew: Fix single-net connectivity
...
Ensure that changes affecting fewer than 4 nets still get updates in the
ratsnest.
2018-10-18 17:11:58 -07:00
Jeff Young
a5c892d9cd
Update line width each time a new object is drawn.
...
Fixes: lp:1797481
* https://bugs.launchpad.net/kicad/+bug/1797481
2018-10-18 15:25:56 +01: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
Jeff Young
ff992f4a64
Keep track of which nets are currently in use.
...
Fixes: lp:1798006
* https://bugs.launchpad.net/kicad/+bug/1798006
2018-10-18 12:14:23 +01:00
Seth Hillbrand
38c5b025c8
Ratsnest: iterate only over dirty nets
...
Rather than forcing each thread to iterate over the full nets list to
find the dirty items, we collect the dirty items first before asking the
threads to address them. This prevents thread spinning. We also
amortize the cost of calculating on an 8-net per thread basis rather
than 2.
2018-10-17 17:07:29 -07:00