Commit Graph

7754 Commits

Author SHA1 Message Date
Ian McInerney 589951eaea Ensure the environment variables are synced between Pcbnew and Python
This ensures that when the project or an environment variable is changed
in pcbnew, the Python interpreter is updated to reflect that.
This is a backport version of the master-branch commit, and will not
synchronize any changes to the environment variables if they are made
from frames other tna Pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/5071
2020-08-09 20:32:38 +01:00
Ian McInerney 5c3bcb09fa 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 22:55:18 +01:00
jean-pierre charras ba5ab99a03 pcbnew: More about Prevent use of non-connected item in ratsnest
Another static cast was left. changed now to dyn_cast

We need to be careful in the connectivity system to always use
dyn_cast/dynamic_cast and check the return when dealing with board
items.
Fixes https://gitlab.com/kicad/code/kicad/issues/5082
2020-08-08 09:59:54 +02:00
Seth Hillbrand 9bc3028eb7 pcbnew: Prevent use of non-connected item in ratsnest
We need to be careful in the connectivity system to always use
dyn_cast/dynamic_cast and check the return when dealing with board
items.  Getting non-connected items will result in null nets when
propagated.

Fixes https://gitlab.com/kicad/code/kicad/issues/5082

(cherry picked from commit 406de56964)
2020-08-07 14:09:03 -07:00
Ian McInerney 78a7dd3269 Properly dismiss the grid combobox editor when it loses focus
The old way of checking for focus loss caused GTK to be unable to
even open the combobox. This way checks for the event sent when the
list closes and uses that to close the grid editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/4617

(Cherry-picked from af24a5d5a7)
2020-08-06 02:02:32 +01:00
jean-pierre charras a370d69542 Gerber plotter: Better object attributes handling when plotting a zone
- Clear object attributes before and after plotting a zone.
 It avoid using previously defined object attributes when plotting the next
 zone, and using therefore incorrect attributes.
- Add aperture attribute to filled zone solid polygons (regions in Gerber)

From master branch
2020-06-28 13:14:06 +02:00
Frank Severinsen 910605cc7d Fix text rotation after flip
fixes https://gitlab.com/kicad/code/kicad/-/issues/4407

(cherry picked from commit 9cf1e61d8a)
2020-06-27 21:49:15 -04:00
Seth Hillbrand 7194e25bba pcbnew: Allow slow ratsnest to turn off
Depending on where you move the selection, the slow ratsnest might turn
on.  This prevents that setting from being sticky, reverting to smooth
movement.

(cherry picked from commit a893d19d26)

Fixes https://gitlab.com/kicad/code/kicad/issues/1909
2020-06-24 17:27:39 -07:00
Seth Hillbrand 7f287cb8f9 Remove delauney computations from dynamic ratsnest
Avoids additional calculations on movement by using cached ratsnest for
internal nets and keeping bicolored line calc for others.

Fixes https://gitlab.com/kicad/code/kicad/issues/1865

cherry-picked from 104ff29e5f
2020-06-22 20:42:12 -07:00
jean-pierre charras a0ce1491d9 Gerber plot solder mask margin: use new algo from master branch to avoid
merging pad shapes when the min width mask is not 0.

Keeping pad shapes clearly identified in Gerber files is mandatory,
so the initial algo that merged shapes in some cases was not good
from this point of view.
2020-06-21 20:47:58 +02:00
jean-pierre charras 26035d23fe Pcbnew, DIALOG_PLOT_BASE: better warning message about non null solder mask margins. 2020-06-21 20:42:37 +02:00
jean-pierre charras b482deb8b0 Fix a incorrect code after a old other code change. 2020-06-18 12:53:06 +02:00
jean-pierre charras abb45fbe45 Gerber plotter: better choice of aperture attributes in internal layers.
From master branch
2020-06-14 18:18:20 +02:00
jean-pierre charras 567ce48cc1 panel lib tables: avoid crash when deleting the last entry in list.
From master branch
2020-06-14 17:51:27 +02:00
jean-pierre charras c027e72439 Solder mask clearance default value: set default to 0, taking advice from
both Ucamco and Eurocircuits.
Update message in plot dialog about best solder mask clearance value.
Show a warning message in plot dialog if these values are no 0.

From master branch.
2020-06-07 15:52:12 +02:00
Seth Hillbrand 25b8da8e3b PNS: Use segment shape for all oval pads
Instead of calculating a simple polygon for the oval pads that are
rotated, we use a rotated segment.

Fixes https://gitlab.com/kicad/code/kicad/issues/4604
2020-06-04 20:28:59 -07:00
Jeff Young a844c3043c Fix offset issue when pad edited from board instead of modEdit.
(cherry picked from commit 7db4a3f702)
2020-06-03 14:42:13 +01:00
Jeff Young 78d66a9ac3 Don't allow the pad preview canvas to become too large.
Also offset canvas with pad so that hole stays in centre.

Fixes https://gitlab.com/kicad/code/kicad/issues/4185

(cherry picked from commit 3bd4c0c5dc)
2020-06-02 22:57:05 +01:00
Jeff Young bfe4d9f3f4 Cherry pick fix for 4549.
Fixes: lp:4549
* https://gitlab.com/kicad/code/kicad/-/issues/4549
2020-06-01 21:57:16 +01:00
Jeff Young a02ee3719c Update membership grid when a netclass name changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/4596
2020-06-01 21:57:16 +01:00
jean-pierre charras 542f713678 Fix PCBnew crash when show local ratsnest and selecting a footprint with no pads
From master, commit e3c3dae
2020-06-01 09:22:29 +02:00
jean-pierre charras 601633347c Pcbnew: fix a crash when trying to edit a pad in the board editor 2020-05-28 09:51:06 +02:00
Michael Kavanagh 182973c0ee NPTH pads can have the hole offset from centre
Fixes https://gitlab.com/kicad/code/kicad/issues/3671

(cherry picked from commit e800c47406)
2020-05-26 13:35:38 -04:00
jean-pierre charras fde7ae4d19 Pcbnew: fix a crash due to use of invalid pointers after a list modification
from master branch, fix bug #4409
2020-05-13 14:04:20 +02:00
Jeff Young e37e13e700 If more than one text matches by text try layer and then position.
Fixes https://gitlab.com/kicad/code/kicad/issues/4187

(cherry picked from commit 8df5f70c4a)
2020-05-13 00:14:40 +01:00
Jeff Young d22003578e Use standard OK/Cancel paradigm rather than Apply/Cancel.
Apply/Cancel puts the buttons in a different order on some platforms.

Fixes https://gitlab.com/kicad/code/kicad/issues/4332

(cherry picked from commit 52d1c93777)
2020-05-13 00:04:51 +01:00
Jeff Young 37b723d8ae Fix pad name increment to use last edited pad.
Fixes https://gitlab.com/kicad/code/kicad/issues/1882

(cherry picked from commit 56946f4db1)
2020-05-12 22:58:15 +01:00
Jeff Young 36d716bb50 Update toolbars when changing units.
Fixes: lp:4249
* https://bugs.launchpad.net/kicad/+bug/4249
2020-05-12 22:58:15 +01:00
Jeff Young e4bab37b62 Don't try and run drawing tools in ModEdit with no module selected.
Fixes: lp:1836673
* https://bugs.launchpad.net/kicad/+bug/1836673

(cherry picked from commit 02eb1d2c62)
2020-05-09 17:41:56 +01:00
Jeff Young 105c9c71ee Don't let point editor interrupt other operations.
Fixes: lp:1832416
* https://bugs.launchpad.net/kicad/+bug/1832416

(cherry picked from commit ae8daee83c)
2020-05-09 17:41:56 +01:00
Jon Evans e135229ca6 Don't try to draw a zone that has no outline
Fixes #4352

(cherry picked from commit 366673d995)
2020-05-07 17:54:00 -04:00
jean-pierre charras d871a92d1c library viewers: fix a focus issue that prevent using arrow keys in lib or fp lists.
Once the gal canvas hsad the focus, it was not possible to use arrow keys in library
or symbols or fp lists even after clicking on an item.

This focus issue is now fixed.

From the fix in Master
2020-05-03 20:23:41 +02:00
jean-pierre charras a152aa125b Footprint editor: fix a crash when a graphic item is selected and the
measurement tool is active and closing the frame, or selecting a new footprint.
I am guessing it was a use after delete data.

Fixes #4302
https://gitlab.com/kicad/code/kicad/issues/4302
2020-05-03 09:03:32 +02:00
Jeff Young e5da7a4606 Fix via printing.
LAYER_VIAS needs to get set for them to print at all, and GetLOD
needs too look at the view layer visibiilties, not the board layer
visibilities.

Also implements a more pad-like strategy for printing blind/buried
vias when printing one layer per page (where the top/bottom arcs
don't make sense).

Fixes https://gitlab.com/kicad/code/kicad/issues/1938

(cherry picked from commit dce42612d3)
2020-04-20 20:29:05 +01:00
Jeff Young faace3090c Add specific selection updating when adding 3D models.
This keeps us from being at the receiving end of wxWidgets' vagaries.

Fixes https://gitlab.com/kicad/code/kicad/issues/3760
2020-04-19 22:43:32 +01:00
jean-pierre charras d3e2345f94 Dxf import: fix a bug that disable import of data inside blocks 2020-04-19 13:32:59 +02:00
jean-pierre charras a3e087ab51 Pcbnew: Fix crashes when delete footprint text in some cases.
Fixes #4221
https://gitlab.com/kicad/code/kicad/issues/4221
2020-04-18 20:00:26 +02:00
jean-pierre charras 3a614a8ea1 Legacy plugin: fix incorrect number of copper layers after loading a .brd file. 2020-04-18 19:58:45 +02:00
Jeff Young b31af4891d Be smarter about determining if there are modules in the selection list.
The old algorithm would delete modules if another module was in the
list, which was not the intention.

Fixes https://gitlab.com/kicad/code/kicad/issues/4175
2020-04-09 00:07:07 +01:00
Seth Hillbrand e6d49424cf PNS: Don't link unroutable items
The joint map only works for items that are routable, so don't bother
adding unroutable items as this only takes additional time to process

Fixes #3976 | https://gitlab.com/kicad/code/kicad/issues/3976

(cherry picked from commit 9769e1020b)

Fixes https://gitlab.com/kicad/code/kicad/issues/4143
2020-04-01 08:31:57 -07:00
Ian McInerney 7a913844e2 Fix discrepancy between ASCII and CSV fp pos files
(based on 570ea62b64)

Fixes https://gitlab.com/kicad/code/kicad/issues/3897
2020-03-30 10:42:15 +01:00
jean-pierre charras f8be7e1f57 Gerber X2 format: Set default values to Enable X2 format 2020-03-29 15:37:36 +02:00
jean-pierre charras 1057eceb2f Gerber plotter: plot round rectangle pads using a region with arcs.
Previously, the region was a usual polygon with arc approximated by segment.
Using a region with arcs is a better way because it allows CAM tools to
identify this region as a round-rect pad.

Similar to master branch, commit 9cb3333d05.
2020-03-22 08:31:25 +01:00
jean-pierre charras 54be07c17d Pcbnew: Set default solder mask min size to 0.
When the solder mask min size is > 0, pads are no longer flashed or regions items.
Good Gerber files need pads flashed or regions items.

Non 0 solder mask min size is reserved to special cases (home made PCBs for instance)

From master branch.
2020-03-12 20:47:21 +01:00
jean-pierre charras 3cc3c1bbd3 Zones: fix a crash when adding a zone cutout to a zone having already holes
From master branch
2020-03-12 14:49:36 +01:00
Seth Hillbrand a60c339f85 PCAD: Handle mirrored text
Mirrored text rotates clockwise in the mirror, so we need to invert the
sign for aligning mirrored PCAD text

Fixes https://gitlab.com/kicad/code/kicad/issues/3992

(cherry picked from commit 058fb3afa1)
2020-03-05 15:29:47 -08:00
Michael Kavanagh ce2c5d6528 Remove empty choice in Via type dropdown
Fixes https://gitlab.com/kicad/code/kicad/issues/3968

(cherry picked from commit 265c1663f9)
2020-03-03 14:21:21 -08:00
Seth Hillbrand fd81f70355 Drop invalid arcs on footprint load
In the case where the footprint arc has a non-normal angle, we cannot
represent this in pcbnew and it corrupts the gerber output.  Therefore
we drop the invalid arc and continue to load the footprint/board.

Fixes #3918 | https://gitlab.com/kicad/code/kicad/issues/3918

(cherry picked from commit 3e0ff72720)
2020-03-02 15:59:35 -08:00
Seth Hillbrand 100bb7c6ca Set Module Editor flag for tools
The commit takes the module edit flag when resetting the tool.  All
tools should reset this flag when we setup the Module editor.

This is slightly different in master and v5, so  this is a rework of
7bdf71abc

Fixes #3973 | https://gitlab.com/kicad/code/kicad/issues/3973
2020-03-02 12:45:47 -08:00
Ben Dooks fc1f713106 Fix issue with DRC for through hole being applied to SMD pads
Commit d7272b7f5e fixed the use of
the eagle DRC to change the library pad shapes. This was also
applied incorrectly to SMD stacks.

Remove the references to m_rules in packageSMD() and the code
that deals with them. eagle 7.7 does not have any SMD pad options
other than rectangle with rounding.

(cherry picked from commit 070c6b8ce0)
2020-02-27 09:01:42 -08:00