Commit Graph

12109 Commits

Author SHA1 Message Date
jean-pierre charras cd476e1728 Gerber plotter: ensure filled areas using thick outlines have a closed outline.
Fixes #8735
https://gitlab.com/kicad/code/kicad/issues/8735
2021-07-06 13:59:05 +02:00
jean-pierre charras 1a23502e98 PAD::TransformShapeWithClearanceToPolygon(): better polygonal shapes:
- Oval and round pads ensure at least 16 segments per CIRCLE (like other shapes)
- For ERROR_OUTSIDE option, ensure the aarc approx error is the actual error,
not max allowed error.
These changes can be seen only for a large max allowed approx error, especially
when filling zones.
2021-07-06 10:50:46 +02:00
Roberto Fernandez Bautista 81fa40d659 Code style: Fix missing space 2021-07-05 20:39:42 +01:00
Roberto Fernandez Bautista 04ff8cde5e Drag & Fillet Tracks: Ignore mouse up / click events until move / drag
Ensures that any click/mouse up events generated after clicking "OK"
in the "Override locks" dialog are ignored.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8123
2021-07-05 20:29:25 +01:00
Roberto Fernandez Bautista ce8132bf4f Arc Track Drag & Fillet Tracks: Copy lock status to new track(s) 2021-07-05 20:29:25 +01:00
Jon Evans b6e8beb38c FP_TEXT: account for parent rotation when creating clearance shape
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8728
2021-07-05 13:49:40 -04:00
Jeff Young ea6769b702 The REPORTER interface is inherently line-based.
Also fixes a bunch of error messages that were similar but not
identical (which just increases translation burden).

Fixes https://gitlab.com/kicad/code/kicad/issues/8723
2021-07-05 13:41:06 +01:00
Marek Roszko a92d337905 Use wxSearchCtrl in the footprint viewer/picker. 2021-07-04 22:06:01 -04:00
Jon Evans 67762a11f6 Don't double-process arcs if we get one first 2021-07-04 12:22:52 -04:00
Jon Evans b291f36dae ADDED: Convert tool can create polygons with arcs from contiguous line and arc segments
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5409
2021-07-04 12:10:59 -04:00
Jon Evans 576d70fab0 Fix file format syntax of arcs in polygons
No format bump as there is no way to create these files yet.
2021-07-04 12:10:59 -04:00
Jeff Young 0116e9c94e Silence Altium polygon-needs-at-least-3-verticies warning.
Too many Altium files appear to have these.  Just ignore them instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/8183
2021-07-04 11:02:59 +01:00
Jon Evans e0146f73b9 PNS: Pick up complete lines between pads when dragging components
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7614
2021-07-03 20:00:54 -04:00
Jon Evans 91ea4a0569 PNS: Pick up segments directly between pads when dragging components
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7601
2021-07-03 19:50:04 -04:00
Jon Evans ab38dfd7ae Fix build 2021-07-03 19:47:58 -04:00
Jon Evans 77b68a827c Remove unused variable 2021-07-03 19:20:54 -04:00
david-beinder a5308e5f5c Fix python console toggle to work across pcbnew/eeschema 2021-07-03 22:48:46 +00:00
Jeff Young 126cd14715 Fix width setting bug in Net Inspector. 2021-07-03 21:16:15 +01:00
Jeff Young 6a0a38ec29 Prevent wxWidgets assertion. 2021-07-03 21:16:15 +01:00
Jeff Young 37fac6de35 Use ChangeValue() instead of SetValue() to keep from firing events.
Otherwise setting a filter also turns off the Show All Nets checkbox.

Also make sure that config values get saved when they're changed.
2021-07-03 21:16:15 +01:00
Jeff Young 4b07a55ef8 Fix net name to net code map to handle sorting and filtering.
Fixes https://gitlab.com/kicad/code/kicad/issues/8714
2021-07-03 21:16:15 +01:00
Roberto Fernandez Bautista 3f73d8c2b5 SHAPE_LINE_CHAIN::Area() should always be positive
The algorithm relied on the assumption that the points were
ordered anti-clockwise. When ordered in a clockwise fashion, the
result was correct but negative.

Refer to https://www.mathopenref.com/coordpolygonarea2.html
for more information.
2021-07-03 19:37:50 +00:00
Roberto Fernandez Bautista c3051ba48a Refactor SHAPE_LINE_CHAIN to allow two shapes per point
m_shapes now has two possible indices. The first one is populated if
the point is associated with an arc and the second index is populated
if the point is shared between two arcs.
2021-07-03 19:37:50 +00:00
Seth Hillbrand 4f4deece6d ADDED support for reading/writing arcs in polys
This adds support for reading and writing arc elements in polygons.
2021-07-03 19:37:50 +00:00
Jon Evans 252bf76452 Fix off-by-one in AssembleTuningPath 2021-07-03 14:37:52 -04:00
Jon Evans 3c59e452d6 PNS: Set tuned path correctly in skew tuner
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8708
2021-07-03 14:06:30 -04:00
Jon Evans 1b9893841b Add a tooltip explaining the track width dropdown
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8719
2021-07-03 13:36:18 -04:00
Jon Evans 277bf2b719 Add feedback showing current router state to the message panel
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8265
2021-07-03 13:21:51 -04:00
Jeff Young bc65b7173f Don't use SCH version number when inspecting PCB files. 2021-07-03 15:24:54 +01:00
Wayne Stambaugh 3f6811f413 Minor dialog layout improvements. 2021-07-02 11:36:06 -04:00
Jeff Young 400f4ae506 Code cleanup. 2021-07-02 15:54:26 +01:00
Jeff Young 780a8a5154 Fix another place disallowing internal microvias.
Fixes https://gitlab.com/kicad/code/kicad/issues/8716
2021-07-02 15:54:26 +01:00
Marek Roszko eff75b630f Get rid of anonymous struct typedefs
We are using C++14 where there is no reason for this and is banned in C++20 under P1766R1. MSVC generates a warning under C++14 as a reminder.
2021-07-01 18:28:41 -04:00
Seth Hillbrand c23e39dbe7 Avoid adding invalid text to temporary fp
Adding values/references to footprint text is an assertion.  This avoids
the assert when copying a full footprint by skipping the extra text
2021-07-01 11:57:29 -07:00
Jeff Young 24e54178db Make sure pin hittest regions don't get too hard to hit.
Fixes https://gitlab.com/kicad/code/kicad/issues/8616
2021-07-01 15:43:19 +01:00
Jeff Young 78d2e88f4b Beautify export STEP dialog. 2021-07-01 15:43:19 +01:00
jean-pierre charras 740b028180 pns_line_placer: do not constraint the 45deg of current segment in free angle mode.
Fixes #8691
https://gitlab.com/kicad/code/kicad/issues/8691
2021-07-01 16:38:31 +02:00
Wayne Stambaugh 175b474c3e Coverity issue fixes.
Fixes issues #280412, #314755, #329615, #332459, #332157, #332167,
2021-06-30 18:08:49 -04:00
Jeff Young e9c0920be2 Use a standard SHAPE_POLY_SET hittest for pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/8705
2021-06-30 22:36:29 +01:00
Jeff Young 6810912f09 Refuse to load schematics from the future.
Also fixes a bug where an empty window would get left when loading
a file from the KiCad manager window errored out.

Also fixes a bug where we were getting the wrong exception because
we were rethrowing the type-casted one (rather than just calling
throw).

Fixes https://gitlab.com/kicad/code/kicad/issues/8604
2021-06-30 18:32:07 +01:00
Jeff Young 5cac8afe1d Remove long-dead revision support for LIB_IDs. 2021-06-30 13:12:57 +01:00
Jeff Young b1b4caee6a Escape "naughty" characters in symbol names.
It's tempting to say that we don't need to exclude filename chars
from symbols, but we might regret that decision down the road.  Better
to just escape them.

Fixes https://gitlab.com/kicad/code/kicad/issues/8694
2021-06-30 13:12:57 +01:00
jean-pierre charras 17737af130 Fix some issues related to SHAPE_ARC:
- Some are related to shape errors when the allowed error to approximate circle
by segment is large and arc radius small.
- fix the actual error used in ConvertToPolyline().
- Use SHAPE_ARC::DefaultAccuracyForPCB() instead of a fixed value as extra margin
in zones. It should not change something, because it is also a fixed value
(5 micrometers), but it is not a magic number.
-TransformArcToPolygon() fix some issues and add a new algo, based on the arc actual
outline shape (initial algo is still available in code, just in case).
2021-06-30 13:33:49 +02:00
Seth Hillbrand 0d8f0d361e Allow aligning pads in FP editor when locked
Locking is not a concept in the footprint editor.  The signature for
checking is slightly different in the alignment tool, so we need to move
the check higher to allow aligning items in fpeditor
2021-06-29 16:48:31 -07:00
Wayne Stambaugh c6e4dcbecf Pcbnew: fix incorrect geographical annotation dialog message. 2021-06-29 17:11:37 -04:00
Wayne Stambaugh e4c108ee3a Pcbnew: minor geographical annotation dialog user message improvements.
Remove schematic from the completion message as it can no longer be
updated though the dialog.

Add a warning to synchronize the schematic with the annotation changes.
2021-06-29 15:17:00 -04:00
Roberto Fernandez Bautista 04b71f5167 Meander minimum spacing can be equal to track width + minimum clearance
2x track width was too constraining in some scenarios

Also better wording "Min Spacing" to indicate to the user that
the actual spacing could be larger if there are any constraints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8172
2021-06-29 19:30:01 +01:00
Roberto Fernandez Bautista e402563087 Don't recalculate meander spacing. Use constrained value instead.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1776
2021-06-29 19:30:01 +01:00
Jeff Young 0c2ac9a711 Move GUI font code to common.
This also allows the Mac fixes for font facenames to be more
compartmentalized.

Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-29 18:27:58 +01:00
Jeff Young 64f07ea9c6 Update text variables after changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/8697
2021-06-29 13:55:06 +01:00
Jeff Young 1db33c7b3a More safety (and better impl) for not sharing FP table/info stuff.
Fixes https://gitlab.com/kicad/code/kicad/issues/8657
2021-06-29 12:46:16 +01:00
Jeff Young a1dfc36233 More error message regularization. 2021-06-29 01:08:26 +01:00
Jeff Young c159500101 Remove nags and make Sel Layer and add via commands uniform.
Fixes https://gitlab.com/kicad/code/kicad/issues/8686
2021-06-28 19:17:01 +01:00
jean-pierre charras fa49b54f93 Fix minor issue in TransformCircleToPolygon() when aError is set to a large value.
pcb_painter.cpp: add (but not activate) compil option to show the conversion
of SHAPE_ARC::ConvertToPolyline as segments, for debug purposes.
2021-06-28 15:50:16 +02:00
jean-pierre charras 9a865b1989 Fix a typo and a minor compil warning 2021-06-28 14:37:35 +02:00
Jeff Young d296bec5b8 Differentiate aSingleLine mode for SCINTILLA_TRICKS
This allows us to avoid the monospaced font (along with the tab-stop
handling), and process a <return> as an OK rather than just <shift> +
<return>.

Fixes https://gitlab.com/kicad/code/kicad/issues/8425
2021-06-28 11:20:12 +01:00
Jeff Young 062c4fda62 More error message regularization (and translatability improvements). 2021-06-28 00:45:24 +01:00
Jeff Young 08fb05e522 Make sure HPGL and DXF drill map generators honour origin setting.
ADDED: also adds origin setting to Footprint Position File dialog
and generators.

Fixes https://gitlab.com/kicad/code/kicad/issues/8669
2021-06-27 17:40:20 +01:00
Jeff Young 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01:00
Jeff Young 70ac70f360 Don't attempt to round-trip netnames through wxListBox.
Fixes https://gitlab.com/kicad/code/kicad/issues/8684
2021-06-27 12:02:21 +01:00
Jeff Young 1fcd7992a0 Performance improvement for adding/removing dielectric layers.
(Roughly a 10X speedup on Mac.)
2021-06-27 09:43:20 +01:00
Marek Roszko b924c85f80 Start recording the precision of dxf imports 2021-06-27 00:38:19 -04:00
Jeff Young 0f27618125 Use a list dialog that can be parented by the Board Setup dialog.
(The current one keeps pulling the Kicad Manager window to the front
on OSX.)

I also removed the UpdateUI stuff which was probably causing:

Fixes https://gitlab.com/kicad/code/kicad/issues/5049
2021-06-27 01:41:35 +01:00
Jeff Young 0dfb5fcaf9 Error message cleanup.
wxString::Format is redundant in a wxLogXXX call.
Error messages should generally be translatable.
Error messages should use generally consistent sentence forms.
2021-06-26 22:53:24 +01:00
Jeff Young 4c5df22eb0 Don't show busy cursor when dialogs (including progress) are in use.
Also removes a stale comment.
Also moves the progress reporters earlier to lessen need for busy cursor.
Also cleans up some error strings and makes other more easily translatable.
2021-06-26 22:53:24 +01:00
jean-pierre charras 310adedf85 Add GetCircleToSegmentError() to geometry/geometry_utils.
This function returns the error created by a circle to segment approximation.
2021-06-26 18:57:07 +02:00
Jeff Young 5c21f93803 Consistency in progress and error messages. 2021-06-26 13:23:43 +01:00
Thomas Pointhuber e50eaed7b9 altium: Improve parsing of UTF-8 data
This is an implementation based on d4ccec05 from @fxtentacle
2021-06-26 13:58:56 +02:00
Thomas Pointhuber e6c047896c altium: introduce progress reporting, fix possible nullptr when reading 3D models 2021-06-26 12:54:31 +02:00
Jeff Young 95ec9c786c Board setup spacing. 2021-06-26 10:55:31 +01:00
Jeff Young 81fc710a5d Use consistent terminology.
Fixes https://gitlab.com/kicad/code/kicad/issues/8681
2021-06-26 10:11:41 +01:00
jean-pierre charras 83b549741d PCB_ARCS in zones: increase clearance to avoid DRC issues. This is a workaround,
but arcs in tracks are still not fully fixed.
The clearance is increased by only 4 microns, that should not create issues.
2021-06-25 19:45:32 +02:00
Jeff Young 9f51f7b055 Formatting and include cleanup. 2021-06-25 17:48:15 +01:00
jean-pierre charras 31d7a0a8d1 TransformArcToPolygon(): slightly better approximation of arc.
The error between the "right" shape and the polygon is slightly smaller.
The approximations of the inner arc and the outer arc are better, but not perfect.
Also add (for test and debug purpose only) the code to show the polygon when
drawing a PCB_ARC (currently disabled)
2021-06-25 18:46:16 +02:00
Jeff Young 1f4a56005e Remove extraneous isPrinting test.
Fixes https://gitlab.com/kicad/code/kicad/issues/8609
2021-06-25 12:44:51 +01:00
jean-pierre charras 4eafd2664a FootprintWizardBase.py: fix use of cmp(), non existing in python3
Fixes #8677
https://gitlab.com/kicad/code/kicad/issues/8677
2021-06-25 09:04:49 +02:00
Jeff Young 27804e40e2 Go back to using space-width for tabs (instead of max-char-width).
The max-char-width impl was buggy and never applied to PCBNew anyway.
Plus the stroke font has a max-char-width of 2.8 time the space width,
so it made for really wide tab spacing.

Also fixes a bug where the Scintilla editors weren't getting a
monospace font on Mac.  (This bug may also exist on the other
platforms, but each would need its own fix.)

Also moves more of the Scintalla customizations to SCINTILLA_TRICKS
where they can be shared.

Fixes https://gitlab.com/kicad/code/kicad/issues/8666
2021-06-24 23:53:27 +01:00
Jeff Young 232ffe97be Diff pair gap only overrides netclass clearance when it's smaller.
Fixes https://gitlab.com/kicad/code/kicad/issues/8676
2021-06-24 16:56:53 +01:00
Jeff Young 744dadd412 Naming conventions and formatting. 2021-06-24 16:56:53 +01:00
Jeff Young a89f6404b4 Fix logic bug found by Coverity. 2021-06-24 12:18:22 +01:00
Jeff Young 8502fd6877 Divide-by-zero safety. 2021-06-24 12:18:22 +01:00
Jeff Young a8028e3bd1 Fix uninitialized variables. 2021-06-24 12:18:22 +01:00
Fabien Corona 95ab53d119 pcbnew: fix missing layer names and missing layers in stackup table 2021-06-24 08:52:51 +00:00
Roberto Fernandez Bautista b532ecec52 Fix ALTIUM_RULE_TOKEN qa test failure 2021-06-24 05:58:24 +00:00
Jon Evans a7eb611744 Fix leftover vias in shove mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8597
2021-06-23 22:13:35 -04:00
Wayne Stambaugh 27e9750507 Pcbnew: fix footprint selection bug.
Do not remove footprint objects from list of selected objects when there
are no drawable objects other than the reference and value text.

Increase the minimum size rectangle for footprints from 0.025mm to 1mm
when the footprint has no drawing objects so that it is easier to select
the footprint in this case.

Add some pretty colors to the footprint bounding box and hull outline
so that it's possible to tell the difference between selection areas.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8379
2021-06-23 19:46:33 -04:00
Jeff Young 50eea4f487 Import progress dialog for FabMaster.
Fixes https://gitlab.com/kicad/code/kicad/issues/5315
2021-06-24 00:21:37 +01:00
Jeff Young 5fa5a73c6d File open/import progress dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/6864

Fixes https://gitlab.com/kicad/code/kicad/issues/2166
2021-06-23 23:55:54 +01:00
Jeff Young ae612a454e Make blind via rendering more intuitive by putting top on top...
bottom on bottom, and the via colour larger.
2021-06-22 18:24:46 +01:00
Jeff Young 7efca0113d Reset m_inDrawingTool on exit.
Fixes https://gitlab.com/kicad/code/kicad/issues/8653
2021-06-22 13:02:45 +01:00
jean-pierre charras a31b667e2a Plotter: better shape for CHAMFERED_RECT and ROUNDRECT pads with margin.
The shape of the pad+clearance area is not similar to the shape drawn on screen
2021-06-21 18:55:33 +02:00
jean-pierre charras 9fb77473cd pcb_painter.cpp: fix incorrect shape of CHAMFERED_RECT pads with negative clearance.
Negative clearance (for instance on mask or paste layer) was not taken in account
2021-06-21 18:52:57 +02:00
jean-pierre charras 00b4134eb8 pcb_painter.cpp: fix incorrect shape of ROUNDRECT pads with negative clearance.
If a negative clearance (for instance on mask or paste layer) is set to more
than the corner radius, the drawn shape was broken (fully incorrect size)
2021-06-21 13:44:30 +02:00
Jeff Young 685ee31c35 Workaround a few more OSX printf problems.
Also regularizes the frame title processing.

Also fixes a type where the library name wasn't processed for
variable expansion.

Fixes https://gitlab.com/kicad/code/kicad/issues/7742
2021-06-20 22:48:19 +01:00
Jon Evans de4eb1fcef Convert to zone: take dest layer from editor active layer
Show non-copper zone properties if active layer is non-copper

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8646
2021-06-20 15:13:18 -04:00
Jeff Young b72545a432 Implement more aggressive re-entrancy blocking for drawing tools.
A similar strategy was already implemented in Eeschema.

Also adds some safety around clearing of autopan and mouse capture.

Fixes https://gitlab.com/kicad/code/kicad/issues/6909
2021-06-20 11:09:55 +01:00
Jeff Young 89718dd3ba Naming conventions. 2021-06-19 19:36:53 +01:00
Jeff Young c6606a0582 Hook up delete to undo last segment when routing.
Fixes https://gitlab.com/kicad/code/kicad/issues/8362
2021-06-19 11:37:20 +01:00
Jeff Young d26449cc29 Formatting. 2021-06-19 11:37:20 +01:00
Jon Evans f8e9542004 Fix crash when opening board setup after zone filler exits 2021-06-18 12:23:12 -04:00