Commit Graph

17229 Commits

Author SHA1 Message Date
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
Seth Hillbrand cbb88ce609 tool manager: Don't adjust the iterator to invalid
When finishing the first tool, we don't want to return an invalid
iterator
2019-11-03 10:15:21 -08:00
jean-pierre charras 11f0acefe2 Footprint wizard frame: rebuild the parameter grid list after any parameter change.
The python footprint wizard can modify other parameters than the one that was changed by user.
So the parameter grid list must be updated after every parameter change.

Fixes: lp:1846404
https://bugs.launchpad.net/kicad/+bug/1846404
2019-11-02 10:17:35 +01:00
jean-pierre charras 1dcd442156 minor fix in a python script (kicad_netlist_reader.py)
Sort lists was incorrectly made.
2019-11-02 09:27:50 +01:00
Seth Hillbrand 9bccbaf497 qrcode: Handle Python3 integer promotion
In Python3, all division operators promote integers to floats.  We need
to downcast back to integer for the polygon vertices.

There was also an unhandled overflow in the QR generation that allowed
more than 512 bits to be loaded.  This overflows the type of QR we
generate, so this truncates the input string to 62 bytes ( leaving 12
bits for the checksum )

Fixes: lp:1850223
* https://bugs.launchpad.net/kicad/+bug/1850223
2019-11-01 13:32:50 -07:00
jean-pierre charras 65bf669387 Refinements in gerber placefile writer: allows adding board edge cuts in file.
Use a pad bounding box for footprints having no valid courtyard defined.
Refinement also in Gerber files when plotting oval pads.
2019-11-01 18:12:26 +01:00
Seth Hillbrand dc5e8aa609 pcbnew: Performance improvement on moving items
This adjusts the fix for 1813038 to focus on the duplicate ghost,
preventing the need to unselect/reselect in every cycle.  This improves
large move speeds substantially
2019-11-01 10:00:38 -07:00
jean-pierre charras c59fa1b672 Gerbview: Fix outdated warning message about missing D-Codes and old RS274D files.
RS274X Gerber files using only regions (polygons) can be valid, and are not old RS274D files
Now a warning is raised only if there are some missing D codes definitions
(RS274D file or broken RS274X file)

Remove unused var and add comments

Fixes: lp:1850821
https://bugs.launchpad.net/kicad/+bug/1850821
2019-11-01 08:34:24 +01:00
jean-pierre charras 4a0bd46ed6 More work on Gerber pick and place files
In P&P files, user strings are now quoted, and use UTF8 encoding
2019-11-01 08:34:24 +01:00
Seth Hillbrand 4178cf7f36 pcbnew: Add PadToDie length for tuning actions
This adds the pad to die parameter from each pad to the total line
length of the tuned line for comparison with desired.

Fixes: lp:1711541
* https://bugs.launchpad.net/kicad/+bug/1711541
2019-10-31 16:00:19 -07:00
Seth Hillbrand 4135f0c0e7 pcbnew: Don't duplicate tracks
Dragging in freeangle mode can be forced, in which case, we don't want
the extra line from the SHOVE element.

Fixes: lp:1845844
* https://bugs.launchpad.net/kicad/+bug/1845844
2019-10-30 10:44:33 -07:00
jean-pierre charras 9c1c609fa3 Better error message in Findngspice.cmake on msys. 2019-10-30 08:59:32 +01:00
Seth Hillbrand 47d7fea9be Fix bug in ReplaceDuplicateTimestamps
When more than one item has the duplicated timestamp, the update code
doesn't accurately change the duplicates as it only checks that a single
sort has not adjacent duplicates.

This adds all items to a set, ensuring that updated timestamps are
unique to the schematic, which prevents reseting or mangling the units
for duplicated components.
2019-10-29 16:49:15 -07:00
Seth Hillbrand bbf355a12f eeschema: Fix an issue with duplicate timestamps
Duplicating into a non-clone still doesn't get a new timestamp, so we
need to explicitly set it.
2019-10-29 16:48:19 -07:00
Seth Hillbrand 868ff5bb2c Right click gets a new object if the mouse has moved
Right click is a pointing operation combined with a request for the
context menu.  We need to highlight the user's intended object when they
have moved their mouse to a new element instead of showing the context
menu for the selected object.

However, in cases where the selection is difficult to make, it is
sometimes helpful to select the item first, then right-click.  In these
cases, we keep the selection where the mouse remains inside the selected
object's bounding box.
2019-10-29 16:11:06 -07:00
Seth Hillbrand 43768b71c0 Unify string lists of forbidden footprint chars
We have forbidden lists maintained in 3 separate locations.  This causes
a bit of confusion as to which is correct.

This makes the list uniform but remains to place the character set in a
single location.
2019-10-29 13:31:11 -07:00
Seth Hillbrand 7b2d6ab40e eeschema: Allow mult-part placement option
When placing a new component in the schematic, this allows the user to
iterate through all units in the selected component without re-opening
the choose part dialog.  It also allows the optional addition of
multiple copies of the same component to be placed in the schematic.

Fixes: lp:1806217
* https://bugs.launchpad.net/kicad/+bug/1806217
2019-10-29 12:20:14 -07:00
jean-pierre charras 04bae776a7 Keepout in footprints: fix issues related to netclass management. Keepout do not actually use netclasses, but the netclass info must be valid. Especially when editing a fp in the fp editor, the netclass info is related to the dummy board managed by the fp editor. But when saved to the board editor the netclass info must be related to the main board 2019-10-29 11:24:57 +01:00
jean-pierre charras 1c2891e6d4 Fp editor: allow internal layers in footprint keep-out zones Especially: Enable one internal layer to manage keep-out areas only on internal layers Allowing one internal layer is a trick to manage these keep-out areas (visibility and selection) In fact this internal layer groups all internal layers enabled is these keep-out areas. 2019-10-29 11:24:57 +01:00
jean-pierre charras bc5dcf182f keepout in footprint: fix some crashes and issues. Create a specific type (PCB_MODULE_ZONE_AREA_T) for zones in footprint. The new class (MODULE_ZONE_CONTAINER) is the same as ZONE_CONTAINER, but the type ID is PCB_MODULE_ZONE_AREA_T instead of PCB_ZONE_AREA_T.
This is mandatory because these zones must be handled differently in many functions.
2019-10-29 11:24:57 +01:00
Ross Schlaikjer 64a42ffa35 Add keepout in footprints: Starting point. 2019-10-29 11:24:30 +01:00
Seth Hillbrand e533ea4ae6 eeschema: Keep selection with only components
Adding a field to a selection changes the bounding box and count for
rotation.  This can cause odd offsets when the field is rotated against
the selection center rather than the bounding box as well as with the
component.

Fixes: lp:1849078
* https://bugs.launchpad.net/kicad/+bug/1849078
2019-10-28 10:50:26 -07:00
Seth Hillbrand 39241dc0ff Footprint browser: Handle frame calls
The frame() call requires an edit frame but the browser is derived from
PCB_BASE_FRAME.

Fixes: lp:1849962
* https://bugs.launchpad.net/kicad/+bug/1849962
2019-10-26 08:27:27 -07:00
Seth Hillbrand 4f594550a2 eeschema: Respect multi-unit sheet numbering
When we are numbering by sheet, don't continue multi-unit parts across
sheets.
2019-10-26 07:52:57 -07:00
jean-pierre charras d5e982897c Fix comment. 2019-10-26 10:07:43 +02:00
Seth Hillbrand 133772e964 pcbnew: Correct optimizer breakout calculation
The previous fix for optimizer breakout length calculation was providing
better scores to longer traces rather than longer breakouts as intended.

This limits the length scoring to breakout only.
2019-10-25 11:18:16 -07:00
Seth Hillbrand 9c8ae217a6 pcbnew: Treat circular ovals as circles
The oval clearance adds an edge on the 0-length side of a circular oval.
This is not needed and can affect the fill algorithm.  Instead, we treat
round ovals as circles for pad polygons

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

(cherry picked from commit 57f0f88552)
2019-10-25 09:37:43 -07:00
jean-pierre charras 08169afbee PCB_BASE_FRAME::SelectFootprintFromLibTree(): fix annoying issue:
the progress reporter was displayed after loading libraries, because it was destroyed too late.
2019-10-25 17:55:18 +02:00
jean-pierre charras bfe2fbf991 Fix uninitialized variables.
especially BOARD_DESIGN_SETTINGS::m_HoleToHoleMin was not initialized, but used in pcbnew when creating a new board
2019-10-25 09:15:19 +02:00
Seth Hillbrand bae50fab9f pcbnew: Fix 45° snapping polygons
The constrained draw was constraining the polygon size to fit the
existing points rather than extending the existing points to fit the
user's intent.

This adds a 90° double-joint for the completion polygon that allows the
user to complete common constrained polygons visually based on the
preview with a double-click to finish.
2019-10-24 16:01:14 -07:00
Seth Hillbrand ea1c8525ce Increase visibility of polygon preview
This set the polygon preview item to wider size and adjusts the draw
order to ensure it remains visible even when antialiasing
2019-10-24 16:00:01 -07:00
Seth Hillbrand df3fabfa21 pcbnew: Fix DXF Import with blocks
BLOCK elements in DXF are re-usable bits that are useful when editing
the file but should not be shown when importing the model.  This skips
all references except those that exist in the default "*Model_Space".
This block is required in each DXF file and cannot be renamed.

Fixes: lp:1790821
* https://bugs.launchpad.net/kicad/+bug/1790821
2019-10-23 11:28:26 -07:00
Ian McInerney 3b1817ee32 pcbnew: Fix deletion of vias in global delete window
Fixes: lp:1847580
* https://bugs.launchpad.net/kicad/+bug/1847580
2019-10-23 12:04:42 -04:00
Seth Hillbrand a934fa49aa Check for tool manager before dereference
Changing common settings in EDA_BASE_FRAME may segfault for frames that
don't implement tool manager yet (simulator)

Fixes: lp:1849492
* https://bugs.launchpad.net/kicad/+bug/1849492
2019-10-23 06:45:33 -07:00
Seth Hillbrand 4004c733c8 eeschema: Pad spice ops to differentiate
The .op command is isolated, so differentiating from .option with a
space will only work if we ensure all commandlines have a space at their
end.
2019-10-23 06:31:56 -07:00
jean-pierre charras 10d23ad82d PROGRESS_REPORTER: fix serious bug in its DTOR: the DTOR was calling Destroy. But Destroy() in wxWidgets calls the DTOR.
It can create recursive calls of the DTOR.
2019-10-23 11:28:15 +02:00
jean-pierre charras e621ae7538 Minor fix in ZONE_CONTAINER code. 2019-10-22 14:13:16 +02:00