Commit Graph

17065 Commits

Author SHA1 Message Date
Jeff Young 10abc6097f Cleanup, commenting, etc. 2019-11-10 14:52:01 +00:00
Jeff Young c29a0b1966 Fix geometry error in connectivity algorithm.
For custom pad shapes were were calculating cardinal points off
of the bounding box.  However, the bounding box must be rotated
around the pad's position, rather than its shapePos -- which is
an issue since any thermal spokes will be rotated around the
shapePos.

Of course we don't really need to sort that out because we're
doing an intersection of the pad's boundary polygon with a vector
from the shapePos out to the cardianl point -- so we really just
need the cardinal point to be "out there".  So I've changed it
to use use INT_MAX / 2.

Fixes: lp:1851703
* https://bugs.launchpad.net/kicad/+bug/1851703
2019-11-10 14:52:01 +00:00
Jeff Young fd8154d085 Remove comment which is no longer necessary.
We no longer use UTF8 mode on Mac, so wxStrings are now
thread-safe.
2019-11-10 14:52:01 +00:00
jean-pierre charras 80df7a7443 Gerber job file: remove info "core/prepreg" in "Notes" and "Name".
They were intended to be just a comment.
However they can generate not wanted constraints for board fabrication.
2019-11-10 13:46:58 +01:00
Jeff Young 65e5adcd19 Update tests to match 2-space indenting.
(The indenting was changed from 4 spaces per level to 2 in order
to better match eeschema's netlist output and pcbnew's board file
output.)
2019-11-10 11:43:52 +00:00
jean-pierre charras 4b5d29e253 Remove unused include 2019-11-10 10:23:51 +01:00
jean-pierre charras 4de6ed6206 Fix issues created by Adds Save As... to the Kicad manger.
Mainly replacing std::string by wxString to manage filenames.
On Windows, a sdt::string cannot manage a filename, unless using
in many places TO_UTF8 and FROM_UTF8.
So the best way is to use a wxString for filenames and error messages.
2019-11-10 09:37:39 +01:00
Jeff Young b5904b0401 Installment one of project Save As... feature.
ADD: Adds Save As... to the File menu for the project window.

Fixes: lp:594051
* https://bugs.launchpad.net/kicad/+bug/594051
2019-11-09 20:22:44 +00:00
Jeff Young d6e0ec2f24 Fix a couple of edge cases in text drawing.
Don't accidentally flip the x-axis glyph size when resetting after
a sub- or superscript.

Special-case three tildes in a row.  (We could also do this for
sub- and superscript, but does anyone really need a superscript
^ or a subscript?

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

Fixes: lp:1851880
* https://bugs.launchpad.net/kicad/+bug/1851880
2019-11-09 20:22:44 +00:00
Jeff Young 114ea1f406 Cleanup. 2019-11-09 20:22:44 +00:00
jean-pierre charras 062e7273b7 footprint viewer: fix a minor issue:
New settings from footprint viewer dialog settings were never updated.
2019-11-09 20:07:19 +01:00
jean-pierre charras 5833392689 FIX: Pcbnew plot BezierCurve: add missing line thickness initialization. 2019-11-09 14:02:41 +01:00
jean-pierre charras 01553a6bd1 FIX: add parameter to GAL::DrawCurve to control the curve to polyline conversion. Cairo supports curves, but not Opengl, that needs a conversion to polyline. This control allows optimization in conversion 2019-11-09 11:41:29 +01:00
jean-pierre charras 943858fd67 FIX: Bezier curves: replace previous algorithm to convert the curve to segments. In some cases it was not working well. Opengl was using an other algo (using the curve properties to create segments) Now only the OpenGL algo is used, with optimization to reduce the number of segments. 2019-11-09 11:41:29 +01:00
jean-pierre charras c4023637df FIX: footprint viewer: avoid display a empty footprint list when a library is selected.
When invoking the viewer the fp list was sometime blank until a new lib is selected.

Fixes: lp:1851799
https://bugs.launchpad.net/kicad/+bug/1851799
2019-11-08 17:41:39 +01:00
jean-pierre charras 0a018f514b Fix crash when saving config in Pcbnew.
Due do latest changes, a local copy of m_DisplayOptions was used instead of m_DisplayOptions itself.
But saving config use references to save params, so a non existing reference was used.
2019-11-08 09:42:33 +01:00
Philipp d788a5d99e Warn for excessive pads
Fixes: lp:1849664
* https://bugs.launchpad.net/kicad/+bug/1849664
2019-11-07 19:26:04 -08:00
Seth Hillbrand 7f507a4e6b Explicitly delete ctor/copy constr
This will throw the error when compiling instead of when running if a
developer accidentally instantiates the BOARD() ctor or copy
constructor.
2019-11-07 18:07:12 -08:00
Fabien Corona 6182133a4e Ratsnest default value for tracks and vias
Fixes: lp:1851611
* https://bugs.launchpad.net/kicad/+bug/1851611
2019-11-07 08:41:56 -08:00
Seth Hillbrand 6625d0721e Implement Get/Set display options
The pointer passing for display options is deprecated.  This removes the
excess casting as the EDA_FRAME didn't need the base call with no value.
All requests for display options are now returned const and are updated
with a Set() routine after modification.

In Gerbview, this resolves an issue where the display options were not
stored because it was receiving the NULL from EDA_FRAME.
2019-11-07 08:26:44 -08:00
Fabien Corona 29ce76b4e4 Pad ratsnest settings initial value
Pad ratsnest settings set to global settings during initilization.

Fixes: lp:1848488
* https://bugs.launchpad.net/kicad/+bug/1848488
2019-11-07 08:26:44 -08:00
jean-pierre charras 81020e8824 minor fix in dialog gen place file. 2019-11-07 16:55:05 +01:00
Seth Hillbrand 79972a3867 3d: Fix initialization call
The vector duplication call was invalid as growing the vector
invalidates the iterators.
2019-11-07 04:45:46 -08:00
jean-pierre charras a60fb9a4b8 Pad properties dialog: minor change: in pad type list; change "Connector" to more explicit "Edge Connector".
Reason: this type "Connector" is used in Gerber files, and is specific to edge cards connectors.
2019-11-06 18:11:37 +01:00
jean-pierre charras 22c11d1092 Footprint editor: remove not selectable layers from the layer box selector.
3 layers shown (but not selectable) in layer manager are removed from layer box
(inner_layers is a pseudo layer, Edge_Cuts and Margin are not yet managed in Fp)
2019-11-06 11:35:02 +01:00
jean-pierre charras 85156300d6 Gerber plot: fix a minor issue: TF attribute "Drawing" is now "OtherDrawing,Comment"
Also use "AssemblyDrawing" attribute for fabrication layers in Pcbnew (actually assembly layers)
This is due some changes in recent Gerber file format.
2019-11-06 10:05:23 +01:00
Seth Hillbrand 81ce588a00 eeschema: Set sheet unit number when setting unit
The auto increment needs to ensure the unit number is updated in two
places.  Hierarchy and draw list.

Fixes: lp:1851431
* https://bugs.launchpad.net/kicad/+bug/1851431
2019-11-05 14:04:01 -08:00
Seth Hillbrand 19c643b29a pcbnew: Prevent extra selection
We want to avoid selecting items that are disabled in the item list.
Our standard method is in the GetViewLOD() that performs both size and
visibility.  This extends the check to module text and via.

Fixes: lp:1851133
* https://bugs.launchpad.net/kicad/+bug/1851133
2019-11-05 12:24:29 -08:00
Jeff Young 383adaa6f4 Remember update footprint checkbox values.
Fixes: lp:1851365
* https://bugs.launchpad.net/kicad/+bug/1851365
2019-11-05 18:03:45 +00:00
Jeff Young dc8c396c4f Cleanup. 2019-11-05 18:03:45 +00:00
Jeff Young ddf887d24a Add layer selector to Footprint Editor for consistency.
Fixes: lp:1850858
* https://bugs.launchpad.net/kicad/+bug/1850858
2019-11-05 17:22:51 +00:00
Jeff Young fae86d4dd0 When copying an item it's no longer at the original location and so can't be "locked".
Fixes: lp:1851038
* https://bugs.launchpad.net/kicad/+bug/1851038
2019-11-05 17:22:51 +00:00
Jeff Young 1c153c55c0 Add default units and precision for new dimension objects.
Fixes: lp:1846376
* https://bugs.launchpad.net/kicad/+bug/1846376
2019-11-05 17:22:51 +00:00
Jeff Young a6a4973324 Handle rotation for N/S/E/W pad cardinal points.
Fixes: lp:1844727
* https://bugs.launchpad.net/kicad/+bug/1844727
2019-11-05 17:22:51 +00:00
Jeff Young caf5d01530 Promote found items to visible during find & replace.
Fixes: lp:1849875
* https://bugs.launchpad.net/kicad/+bug/1849875
2019-11-05 17:22:51 +00:00
Jeff Young 872826085a Filter PCBNew contents when pasting into Footprint Editor.
Fixes: lp:1850724
* https://bugs.launchpad.net/kicad/+bug/1850724
2019-11-05 17:22:51 +00:00
Jeff Young 4662205ecb Fix compiler warnings. 2019-11-05 17:22:51 +00:00
Jeff Young 48c8ac9663 Added new action for "Change Track Width".
Default out-of-the-box is no hotkey. Removed all the preference stuff.

Note that the new implementation is a little different: the old one only
operated on a selection with a single item where the new one operates on
all selected items. So if you want the whole track do a 'U' before the 'W'
(or whatever you have Change Track Width assigned to).

Fixes: lp:1844023
* https://bugs.launchpad.net/kicad/+bug/1844023
2019-11-05 17:22:51 +00:00
Jeff Young 984c64677e Hook up rotate & flip to bus entries when drawing them.
Also adds support for the bus entry shape hotkeys while drawing.

Fixes: lp:1849967
* https://bugs.launchpad.net/kicad/+bug/1849967
2019-11-05 17:22:51 +00:00
Jeff Young 35c8d64f98 Add super- and subscript support to Eeschema.
Note that since the markup might exist for other reasons, it has
to be turned on with a preference setting.  (It goes through a set
of bitflags so the same architecture can be used for other markup
structures that we might want to support in the future.)

Note also that this is more about engineering nomenclature than
visual formatting.  In that respect it's more similar to overbar
than italic or bold.
2019-11-05 17:22:51 +00:00
jean-pierre charras 52fcbeab44 Fix incorrect HitTest in DRAWSEGMENT (bezier curve) 2019-11-05 16:17:56 +01:00
jean-pierre charras 5f3353cad1 Add native Bezier curve plot in SVG plotter. 2019-11-05 14:27:07 +01:00
jean-pierre charras bb9b226744 Pcbnew, plot function: add missing plot for bezier curves in footprints.
It was existing for pcb graphics, but not for footprint graphics.
2019-11-05 11:07:07 +01:00
jean-pierre charras c34a584289 Fix a bug in ZONE_CONTAINER copy constructor.
I fixed it in commit 26ebf3c96, and broke it in commit 04bae776.

Fixes: lp:1850758
https://bugs.launchpad.net/kicad/+bug/1850758
2019-11-05 09:13:43 +01:00
Seth Hillbrand 42daf172fd router: Keep meander placer world in base
m_world overloaded in pns_meander_placer and didn't get the correct
pointer in certain tune modes.

Fixes: lp:1851251
* https://bugs.launchpad.net/kicad/+bug/1851251
2019-11-04 09:11:19 -08:00
jean-pierre charras 8621a1cf3a Fix a wxWidgets alert (on wxWidgets 3.1.3) 2019-11-04 17:30:50 +01:00
jean-pierre charras 51ed01d765 GERBER_PLOTTER: small change in code to manage the current selected aperture.
Avoid using an iterator to store this aperture because iterators can be invalided
when modifying a list.
Enhancements in gerber_placefile_writer.
2019-11-04 14:33:10 +01:00
jean-pierre charras 56525296ba Pcb_calculator: TransLine default parameters pre-selection: fix a minor issue in countries using comma sepator in doubles. 2019-11-04 12:59:22 +01:00
jean-pierre charras 002c4cea96 Pcb_calculator: TransLine default parameters (Er, TanD, Rho) choices: keep pre-selection valid between sessions. 2019-11-04 11:08:52 +01:00
Fabien Corona bb938b2af4 TransLine default parameters (Er, TanD, Rho) are now equal to the previously selected values when opening the selection window
Fixes: lp:1828857
* https://bugs.launchpad.net/kicad/+bug/1828857
2019-11-04 11:02:07 +01:00