Commit Graph

12807 Commits

Author SHA1 Message Date
Jeff Young b7e196b710 ADDED assertion constraints for user-defined DRC checks. 2021-12-24 16:13:18 +00:00
Jeff Young 4ba3937f8a Cleanup. 2021-12-24 15:43:24 +00:00
Jeff Young 9ee28ea8f5 Flatten out some more preferences. 2021-12-24 15:43:20 +00:00
Jeff Young 0332ec6016 ADDED exclude all violations of rule X.
Fixes https://gitlab.com/kicad/code/kicad/issues/5463
2021-12-24 15:42:22 +00:00
Jeff Young 5f37c2b247 Custom rule severities.
ADDED severity token to custom rule syntax.  Each rule can now define
its own severity.

Fixes https://gitlab.com/kicad/code/kicad/issues/6148
2021-12-24 15:42:22 +00:00
Jeff Young fcb013e5d7 When updating footprints indicate which were changed.
Fixes https://gitlab.com/kicad/code/kicad/issues/4203
2021-12-24 15:42:22 +00:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
Jeff Young f1410f0240 Line styles for PCBNew shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/2150
2021-12-24 12:36:59 +00:00
Jeff Young b2dff6fa55 Fix solder mask plotting issues.
1) Don't plot all footprint texts for each footprint graphic item.

2) Enforce min web thickness around board shapes and board text.

3) Enforce min web thickness around footprint shapes

4) Correctly handle multi-layer zones.

(1) and (4) will get cherry-picked back to 6.0, so after rebasing
won't actually appear in this changelist anymore....
2021-12-24 12:36:45 +00:00
Jeff Young ef10b36948 Add mask-to-copper clearance parameter and rename mask margin. 2021-12-24 12:36:41 +00:00
Jeff Young 3aa6d73770 Allow min/max/opt to come from different rules. 2021-12-24 12:36:37 +00:00
Jeff Young 4b6f2f0658 Add mechanical copper clearance testing for shapes.
Also includes going from distance-based neighbor exclusion to angle-
based.  (Distance doesn't work when very short segments are followed
by very long ones.)

Fixes https://gitlab.com/kicad/code/kicad/issues/2512
2021-12-24 11:40:10 +00:00
Jeff Young 1305c2177f Add a checker for copper-to-copper clearance within a single zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/2512
2021-12-24 11:40:06 +00:00
Jeff Young 815c2c69e7 Support for dielectric colors in board stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8491
2021-12-24 11:39:50 +00:00
Jeff Young db06693d22 Be more selective about hiding solder mask. 2021-12-24 00:03:51 +00:00
Jeff Young 5433684d3c Try to make gcc happy. 2021-12-23 23:59:48 +00:00
Jeff Young b95b21dbd1 Try to make gcc happy. 2021-12-23 23:58:20 +00:00
Jeff Young 40cb7b40c8 Fix typo in custom rule example. 2021-12-23 22:35:24 +00:00
Jeff Young 235e0a430d Less flashing of the progress bar. 2021-12-23 22:31:33 +00:00
Jeff Young 56c85bd354 Improve clearance and constraint resolution reporting.
1) Report on all applicable clearance types
2) Don't double-book constraints if they're used by more than one
test provider

Fixes https://gitlab.com/kicad/code/kicad/issues/8961
2021-12-23 22:31:26 +00:00
Jeff Young 3f64b69917 Mechanical clearance rules.
ADDED mechanical_clearance and mechanical_hole_clearance constraints.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:31:21 +00:00
Jeff Young a48867ea01 Solder mask integrity testing.
ADDED DRC test for solder mask aperture bridging copper from different
nets.
ADDED visualization of minimum web width processing for solder masks.
ADDED allow_soldermask_bridges property for footprints.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/1792
2021-12-23 22:31:14 +00:00
Jeff Young 533276e6b6 Copper sliver checking.
ADDED DRCE_COPPER_SLIVER DRC error.
ADDED ADVANCED_CFG DRCSliverWidthTolerance and DRCSliverAngleTolerance.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:31:05 +00:00
Jeff Young a1e3f2b188 Starved thermals DRC checking.
ADDED min_resolved_spokes constraint.
ADDED "Thermal relief connection to zone incomplete" violation.

Fixes https://gitlab.com/kicad/code/kicad/issues/2183
2021-12-23 22:30:42 +00:00
Jeff Young 32721755bf Hook up zone-pad connections to custom rules.
ADDED zone_connection constraint.
ADDED thermal_relief_gap and thermal_spoke_width constraints.

ADDED angle override for thermal relief spokes in Pad Properties.

Fixes https://gitlab.com/kicad/code/kicad/issues/4067
2021-12-23 22:30:26 +00:00
Jeff Young 28b279cb2d Units cleanup.
It's 2021.  Time to move beyond ASCII.  This also makes spacing of
units consistent (space before abbreviated units, no space before
symbolic units).
2021-12-23 22:17:10 +00:00
Jeff Young 56665b9ca7 Map Altium bold dimension text to a greater text thickness. 2021-12-23 22:17:05 +00:00
Jeff Young 3c0e3610e2 Import Altium radial dimensions to KiCad radial dimensions.
(We converted them to KiCad leaders in 6.0 because we didn't have
radial dimensions yet.)

Fixes https://gitlab.com/kicad/code/kicad/issues/8789
2021-12-23 22:17:01 +00:00
Jeff Young e26341d424 Cleanup. 2021-12-23 20:36:18 +00:00
Jeff Young 92e589b398 Use board maxError value, and return SH_ARC for unfilled circle. 2021-12-23 20:36:11 +00:00
Jeff Young 2bc86fa0a8 Shapes for schematic.
ADDED arc, circle and rectangle shapes for schematic.  Shapes support
line styles and fill colors.

CHANGED sheet background color in Edit Text & Graphics Properties to
fill color (and it now affects shapes).

Pushed STROKE_PARAMS down into common and moved all shapes to using it
for stroke descriptions.
2021-12-23 20:36:07 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
Jeff Young 21eb928218 Add Ignored Violations tab to DRC dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/7726
2021-12-23 19:18:45 +00:00
Jeff Young 2001d08186 Add DRC tests for text height and text thickness.
Fixes https://gitlab.com/kicad/code/kicad/issues/8683
2021-12-23 19:18:45 +00:00
Jeff Young 0a609dd48d Add footprint library checking to DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/6821
2021-12-23 19:18:45 +00:00
jean-pierre charras c4432e5d03 pcbnew print: minor fix: option edge.cut on all layers not stored.
Fixes #10046
https://gitlab.com/kicad/code/kicad/issues/10046
2021-12-23 17:58:51 +01:00
jean-pierre charras a0bcde088e Use ChangeValue() instead of SetValue() in some wxTextCtrl
(It avoids generating unused events)
2021-12-23 17:58:50 +01:00
jean-pierre charras 68d66af5bf PANEL_SETUP_BOARD_STACKUP: fix a typo that prevent displaying a color swatch.
Fixes #10027
https://gitlab.com/kicad/code/kicad/issues/10027
2021-12-23 17:57:25 +01:00
Jeff Young 4e8a7fc911 Hot-update units in track editing dialogs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10099
2021-12-23 16:54:03 +00:00
Jeff Young d5a5928e5a Improve clean up tracks & vias algorithm for neck-downs.
Fixes https://gitlab.com/kicad/code/kicad/issues/10098
2021-12-23 16:54:03 +00:00
Jeff Young 6e2460ad37 Add hot-updating of units in common wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10020
2021-12-23 16:54:03 +00:00
Jeff Young 77239591c0 Don't commit zone refill if there were no changes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10085
2021-12-23 16:54:03 +00:00
Jeff Young 9af33cdfe8 Don't leave stranded symbols/footprints in editors when doc closes.
Fixes https://gitlab.com/kicad/code/kicad/issues/10026
2021-12-23 16:54:03 +00:00
Jeff Young d9dba2edb2 Tidy up pad & parent footprint selection corner cases.
Fixes https://gitlab.com/kicad/code/kicad/issues/9923
2021-12-23 16:54:03 +00:00
Jeff Young 8b52e969d6 Restore units to a bunch of wxGrids.
Fixes https://gitlab.com/kicad/code/kicad/issues/10063
2021-12-23 16:54:03 +00:00
Jeff Young f696c4ddfc Fix failure to remove hover selection after rotate operation.
Fixes https://gitlab.com/kicad/code/kicad/issues/10058
2021-12-23 16:54:03 +00:00
Jeff Young a1c8e36c99 Scale markers somewhat proportionally to zoom.
Fixes https://gitlab.com/kicad/code/kicad/issues/10048
2021-12-23 16:54:03 +00:00
Seth Hillbrand bd0fbea044 Handle 360° arcs on import as circles
KiCad breaks a bit when dealing with 360° arcs, so convert them to
circles on import.  The break happens when converting to polygons for
viewing, the arc is passed from start->mid->end format to
center->start->angle format.  At 360°, the angle is normalized to 0
2021-12-18 18:44:20 +00:00
Jeff Young a17a58203b Preserve legacy dimension information. 2021-12-17 23:31:37 +00:00
Jeff Young 699ba78b74 Fix legacy (pre-sexpr) board importer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10025
2021-12-17 17:21:31 +00:00
Jon Evans 1610195a09 Coverity fix 2021-12-15 23:17:04 -05:00
Tomasz Wlostowski 57af990066 router: fix layer switch issue when starting a track on via without fixed segments
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9915
2021-12-16 00:55:17 +01:00
Jeff Young 20dcf43fdd Fix typo.
Fixes https://gitlab.com/kicad/code/kicad/issues/10009
2021-12-15 23:39:24 +00:00
Mike Williams 956ac871c3 PCB Editor: changes to track width overrides starting track width
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/8797
2021-12-15 23:32:48 +00:00
Tomasz Wlostowski 97c2627de6 router: added missing case items (fixes regression in component dragging)
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10010
2021-12-15 23:18:55 +01:00
Seth Hillbrand 24fe5bc2a8 Fix DRC thread locking 2021-12-15 06:05:40 -08:00
Roberto Fernandez Bautista dadaf26ff1 Board Setup: Ensure board editor layers page always gets updated
We need to update it even if we move to a different page, as when moving
back to the physical stackup page it will reset the layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9991
2021-12-15 10:39:44 +00:00
Seth Hillbrand 40d44c94cd Fix single-threaded loads/connectivity
We cannot set thread counts to hardware_concurrency()-1 without
considering that single core machines will get a thread count of 0.
2021-12-14 17:18:46 -08:00
Tomasz Wlostowski 965ab42938 router: when dragging segments, don't snap to other segments on the same layer. Fixes drag flickering for short segments.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9720
2021-12-15 01:48:04 +01:00
Tomasz Wlostowski 2ae3a83b54 router: fix use-after-free crash in single trace shove routing when m_endItem's owning NODE is erased by the springback algorithm.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/9994
2021-12-15 01:33:05 +01:00
Seth Hillbrand 401de24274 Recalculate ratsnest after zone fill
Push the mutex down into the ZONE::Fill() routine and set the
connectivity update to run after zone fills.  The connectivity update
cannot run while the mutex is locked for zone fills.

Fixes https://gitlab.com/kicad/code/kicad/issues/9993
2021-12-14 13:37:15 -08:00
Roberto Fernandez Bautista aa64b739eb Board stackup: Ensure that m_choiceCopperLayers is updated
Need to do a full synchronisation with the board to ensure that the
drop down and other UI elements are reset

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9991
2021-12-14 18:00:07 +00:00
Seth Hillbrand 78ff9a857a Jerry-rig HTML-format alpha parsing
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors

Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
Wayne Stambaugh 348c2bc612 Fix another wxUpdateUIEvent retrigger loop. 2021-12-13 18:43:30 -05:00
Wayne Stambaugh 755607b8f8 Fix a few wxUpdateUIEvent retrigger loops. 2021-12-13 15:46:13 -05:00
Jeff Young 4c565fd222 Top layers includes a whole bunch of layers...
... and the first isn't particularly meaningful.  Use GetActiveLayer
instead.

Fixes https://gitlab.com/kicad/code/kicad/issues/9972
2021-12-13 18:23:18 +00:00
Simon Schaak 8e5f929724 Fix default reference text copy for new footprints 2021-12-13 14:42:14 +00:00
Jon Evans b291d6c810 Fix success conditions in DP placer
The placer can sometimes generate segments that are not quite parallel.
Use a different tolerance for ApproxParallel to account for this.

Also set a minimum score for placement judging so that any placement
that doesn't violate DRC can be placed.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9948
2021-12-12 13:05:38 -05:00
Jeff Young 88fc6d25a7 Correctly handle deleting multiple selections in some grids.
Fixes https://gitlab.com/kicad/code/kicad/issues/9952
2021-12-12 17:28:17 +00:00
Seth Hillbrand 779629ad33 Fix deadlock
Fixes https://gitlab.com/kicad/code/kicad/issues/9959
2021-12-12 07:20:03 -08:00
jean-pierre charras c360bbba20 Browse footprint libraries now remember window-size and position
(resolveCanvasType() saves the settings, so it must come after they are loaded)
Fixes #9935
https://gitlab.com/kicad/code/kicad/issues/9935
2021-12-12 09:02:15 +01:00
dsa-t f2639e2928 Reverse sort order for net id in inspector 2021-12-11 23:12:47 +00:00
Seth Hillbrand 758ce43d9c Lock Connectivity Data when resetting
When we reset m_connAlgo, we need to lock the data mutex otherwise,
yields to the system may sometimes issue calls back to invalid data
until m_connAlgo has finished rebuilding

Fixes https://gitlab.com/kicad/code/kicad/issues/9922
2021-12-11 15:11:10 -08:00
jean-pierre charras 6d0d4e0db9 Pcbnew, router tool: ensure switching layer by + or - works when starting routing.
Fixes #9936
https://gitlab.com/kicad/code/kicad/issues/9936
2021-12-11 09:54:03 +01:00
Jeff Young 84e0feeee6 LibTree selection should follow footprint after Save As.
Fixes https://gitlab.com/kicad/code/kicad/issues/9913
2021-12-10 00:45:21 +00:00
Jeff Young 4f60d7ac78 Don't use lib tree target if lib tree isn't shown.
Fixes https://gitlab.com/kicad/code/kicad/issues/9913
2021-12-10 00:34:22 +00:00
Jon Evans 62e6f542ed Init zone type when creating in convert tool
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9918
2021-12-09 18:20:30 -05:00
Jon Evans 196571d004 Fix edge case in re-enabling auto track width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9887
2021-12-09 18:07:05 -05:00
Seth Hillbrand 9884f40952 Update call signature for SwitchLayer
We don't use DC anymore
2021-12-09 10:14:11 -08:00
Seth Hillbrand 77fbb495f2 Highlight net during inline drag
Keep consistent UX between inline drag and drag started in the router
tool itself by highlighting the net being dragged

Fixes https://gitlab.com/kicad/code/kicad/issues/9919
2021-12-09 09:28:43 -08:00
jean-pierre charras f2d6251979 PCB_EDIT_FRAME: very minor fix: make the frame title translatable in stand alone mode 2021-12-09 14:39:27 +01:00
Jon Evans 48e95dcf7e Disable custom track/via width when re-enabling connected width
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9887
2021-12-08 21:13:34 -05:00
Jon Evans a9168860e0 Reduce excessive epsilon in polygon search algo
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9903
2021-12-08 21:04:23 -05:00
Jon Evans 622d0fc896 Re-add code to refresh plugins at each frame load
Should now be safe

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9781
2021-12-08 20:48:35 -05:00
Jon Evans 587ee890d9 Move where flag is cleared to catch more cases
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9892
2021-12-08 20:46:53 -05:00
Jon Evans 44e01dcd0a Skip newly-added footprints in connectivity
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9892
2021-12-08 20:39:12 -05:00
Jeff Young e9847cf2bd Exclude vias from first 'U' step.
Fixes https://gitlab.com/kicad/code/kicad/issues/9902
2021-12-08 23:16:33 +00:00
Jeff Young 1f9e75f676 Pad with hole same size or larger than pad isn't flashed.
... even if it's marked as being on copper layers.

Also changes the default hole clearance to 0.25mm.

Fixes https://gitlab.com/kicad/code/kicad/issues/9901
2021-12-08 23:16:33 +00:00
Jeff Young df1e74d418 Clean up dead code from last commit. 2021-12-08 23:16:33 +00:00
Jeff Young 7ffd43a6f4 Regularize the promotion of pads to footprints in non-free-pad mode.
Also regularizes some of the other selection filtering options.

This also fixes an invalidated iterator (and subsequent segfault) in
the old code.

Fixes https://gitlab.com/kicad/code/kicad/issues/9896
2021-12-08 13:08:54 +00:00
Seth Hillbrand 1160bd94b0 Scale vertex lineweights in DXF import
DXF lineweights are always in 100th of mm, so scale the set weights on
import

Fixes https://gitlab.com/kicad/code/kicad/issues/9854
2021-12-07 16:23:44 -08:00
Jon Evans 63f67b7e5b Fix loading netclasses from legacy boards via Python 2021-12-07 18:55:08 -05:00
dsa-t 9c619d8f4e Allow some navigation tools when selecting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9565
2021-12-07 23:00:39 +00:00
dsa-t a7193e0932 Do not warp cursor to last location when footprint/text placement is activated from toolbar/menu.
Also makes the footprint appear instantly after closing the dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9840
2021-12-07 22:48:56 +00:00
Seth Hillbrand fbdb2bd91f Fix broken refactor from 0e65fe5
'auto' here was utilizing a copy constructor to avoid assigning a new
value to the underlying shared pointer
2021-12-07 12:38:05 -08:00
Seth Hillbrand c613f5e2f1 Convert DXF arcs in fp space
Once the arcs are set in pcbnew, they have integer representation and
can accumulate rounding errors.  So we convert the start/end points in
the importer to ensure that the connected points in a DXF remain
connected

Fixes https://gitlab.com/kicad/code/kicad/issues/9827
2021-12-07 10:53:35 -08:00
Seth Hillbrand 84cdc9701f Partially reverts d877f041
Based on discussion in https://gitlab.com/kicad/code/kicad/-/merge_requests/1029
we will keep the original behavior.  The new routines to get stock paths
are still useful (possibly in scripting) and are kept
2021-12-06 16:14:40 -08:00
Jeff Young 73b39e836d Set modify bit when editing page layout.
Fixes https://gitlab.com/kicad/code/kicad/issues/9891
2021-12-06 23:08:33 +00:00
Jeff Young 2446844cd3 Fix bugs in free-pad logic.
Don't promote pads to parent footprint selection when NOT in free
pad mode during move.

Implement move algorithm in rotate.

Fixes https://gitlab.com/kicad/code/kicad/issues/9893
2021-12-06 22:53:45 +00:00
Konstantin Baranovskiy d00810c0fb Pcbnew: make search field focused by default in Find dialog 2021-12-06 19:08:23 +00:00