Commit Graph

17195 Commits

Author SHA1 Message Date
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
jean-pierre charras 4813eb12e6 DIALOG_POSITION_RELATIVE: fix some issues: wxWidgets alerts and unit selection not taken in account after the first run.
Fixes: lp:1849231
https://bugs.launchpad.net/kicad/+bug/1849231
2019-10-22 14:09:11 +02:00
jean-pierre charras da28426617 Gerber P&P file: fix a syntax error. 2019-10-21 15:15:46 +02:00
jean-pierre charras 3fffd042de Use wxASSERT instead of assert (assert creates issues when debugging on Windows) 2019-10-20 21:19:35 +02:00
jean-pierre charras 8a4ba87fba Gerber output: Fix incorrect zones outline thickness in filled areas.
Fixes: lp:1848929
https://bugs.launchpad.net/kicad/+bug/1848929
2019-10-20 21:15:31 +02:00
Sylwester Kocjan 1c01cc001d eeschema: fixed recognizing SPICE sim directive 2019-10-20 12:08:01 -07:00
Seth Hillbrand 8f1c1cf298 pcbnew: Don't limit editing of the polygons
45 deg contraints are not saved per polygon, so don't limit per polygon.
The constraint is only enforced during creation.

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

Fixes: lp:1846029
* https://bugs.launchpad.net/kicad/+bug/1846029
2019-10-20 09:29:42 -07:00
Seth Hillbrand 2e1af66a2b pcbnew: Commit polygon points to new constrained zone
Adds leader points if they are not already existing in the zone

Fixes: lp:1846028
* https://bugs.launchpad.net/kicad/+bug/1846028
2019-10-20 09:29:35 -07:00
Seth Hillbrand 70c64d93e4 pcbnew: prevent assert with first pt
Finding the pt-to-end intersection requires a segment, so check for
multiple points.

Fixes: lp:1846431
* https://bugs.launchpad.net/kicad/+bug/1846431
2019-10-20 07:39:48 -07:00
jean-pierre charras 846397c692 Fix compil warning 2019-10-19 15:44:40 +02:00
jean-pierre charras 11cf260b7d DIALOG_GENDRILL: modify an option: Gerber format is not experimental now. 2019-10-19 13:45:17 +02:00
jean-pierre charras f892ebbb49 Fix issues in Gerber attributes 2019-10-19 11:26:29 +02:00
jean-pierre charras b9202e81bc Fix Gerber plot pad oval for pad orientation not n*90 degrees.
Use now a Gerber region that support TO attributes like flashed pads.
2019-10-19 11:26:29 +02:00
jean-pierre charras 47f9c505c5 Gerber plot: better handling of polygonal pad shapes plotting
update GBR_CMP_PNP_METADATA.
2019-10-19 11:26:29 +02:00
jean-pierre charras 36253450e7 Pcbnew: Add experimental place file (P&P) export in Gerber format. 2019-10-19 11:26:28 +02:00
Seth Hillbrand 6084614371 GAL: Use vector for stroke elements
deque structures have higher overhead than vectors.  Not usually
problematic, but with hundreds of thousands of characters each with only
a few strokes, the overhead becomes dominant.
2019-10-18 21:48:58 -07:00
Seth Hillbrand 080275b4ee Cleanup wire merge code 2019-10-18 20:15:29 -07:00
Seth Hillbrand 92011d91d2 eeschema: Testing for static/dynamic cast failure 2019-10-18 15:29:26 -07:00
Seth Hillbrand 132adf8ac3 Remove Yahoo Groups link
Yahoo has discontinued its groups.

See https://help.yahoo.com/kb/groups/SLN31010.html

(cherry picked from commit 1161562bc8)
2019-10-17 16:00:46 -07:00
Seth Hillbrand 363281dd4d eeschema: add junction when needed for broken wire
The break wire command will break all wires at a point.  If there are
multiple crossing wires, we need to check to see if a junction might be
required to reflect the new connection.

Fixes: lp:1848450
* https://bugs.launchpad.net/kicad/+bug/1848450
2019-10-17 12:22:57 -07:00
Jeff Young e73e7bdc23 Process via size inc/dec commands while running via tool.
Fixes: lp:1846320
* https://bugs.launchpad.net/kicad/+bug/1846320
2019-10-17 20:17:26 +01:00
Jeff Young 0995433601 Map nets (if possible) from clipboard to destination.
Fixes: lp:1795057
* https://bugs.launchpad.net/kicad/+bug/1795057
2019-10-17 18:04:07 +01:00
evanshultz a3229c455d Only add view menu final separator on OS X 2019-10-16 21:23:20 +01:00
Seth Hillbrand 5b8661f2ab view: Check for viewData in IsVisible()
viewData can be NULL, make sure we verify it before dereferencing.
2019-10-15 09:44:16 -07:00
Seth Hillbrand 07c8596084 pcbnew: Check all layers for routing snaps
Flipped footprint pads may report their "primary" layer as not the front
layer in high contrast.  We need to check whether the board item for
snaps is visible on the active layers.

Fixes: lp:1847877
* https://bugs.launchpad.net/kicad/+bug/1847877
2019-10-15 09:44:16 -07:00
jean-pierre charras 0878c7c64c Fix typo 2019-10-15 17:51:29 +02:00
jean-pierre charras 26ebf3c961 Fix ZONE_CONTAINER ctor issue: incorrect net info setting.
In ZONE_CONTAINER( ZONE_CONTAINER& aOther ), the net info was set before zone type and layer were set.
So the net info was always set to ORPHAN net, instead of set to aOther net info.
Especially, it broke undo/redo function.

Fixes: lp:1840727
https://bugs.launchpad.net/kicad/+bug/1840727
2019-10-15 13:41:49 +02:00
jean-pierre charras 23e09d3de7 some other WXDEBUG replacement 2019-10-14 12:38:52 +02:00
jean-pierre charras d77ba30a95 Replace __WXDEBUG__ (improperly used) by DEBUG in some #define.
__WXDEBUG__ comes from a build option of wxWidgets,
and is not related to a Debug versus Release Kicad build.
2019-10-14 11:17:38 +02:00
Seth Hillbrand e291576c38 plotting: When aggregating areas, heal first
The fracture routine introduces degenerate points that are healed by the
Clipper Polygon simplify command.  This is normally fine but in the case
of hatched areas, there are thousands of degenerate points, which is
very slow in Clipper.  Healing the degenerate points first before
simplifying and fracturing is much faster.

Fixes: lp:1847764
* https://bugs.launchpad.net/kicad/+bug/1847764
2019-10-12 20:14:57 -07:00
jean-pierre charras 337244d423 Gerbview: displays aperture attribute value (TA.attribute) for Regions (polygons) having no dcode 2019-10-12 14:04:41 +02:00
jean-pierre charras a18d3cca6e Pcbnew, zone filler: Ensure hatch pattern thickness bigger than zone minimal width (one micron bigger).
This margin is mandatory to avoid incorrect polygons in Gerber files:
due to the fact Gerber units can be 10 nm (and Gerbview internal unit is also 10nm), valid polygons
can be converted to non valid (self intersecting for instance) by coordinates truncation.
This is a known problem in Gerber files (not specific to Gerber format)

Fixes: lp:1847737
https://bugs.launchpad.net/kicad/+bug/1847737
2019-10-12 11:12:27 +02:00
jean-pierre charras 4b2d801fec Gerber file export: avoid duplicate corner when creating polygons (regions in Gerber dialect)
Fixes: lp:1847714
https://bugs.launchpad.net/kicad/+bug/1847714
2019-10-11 20:59:23 +02:00
Seth Hillbrand 0f8a1c22ad pcbnew: Snap during routing needs active parent
The router items may not yet have a board item parent.  In this case,
the reference to the parent needs to be guarded before dereferencing.

Fixes: lp:1847717
* https://bugs.launchpad.net/kicad/+bug/1847717
2019-10-11 09:16:26 -07:00
jean-pierre charras a43b00b666 Gerber job file Fix incorrect .gbrjob file format when the board stackup is not yet initialized.
Fixes: lp:1847636
https://bugs.launchpad.net/kicad/+bug/1847636
2019-10-10 21:16:45 +02:00