Commit Graph

10302 Commits

Author SHA1 Message Date
Michael Kavanagh 70fcc139ec Cleanup: Move P-CAD files into plugins folder 2020-10-12 16:36:08 +00:00
Michael Kavanagh f45ca7179b Cleanup: Move GEDA PCB files into plugins folder 2020-10-12 16:36:08 +00:00
Jeff Glass d40faf836e pcbnew: Fixing misleading "Rescue Layer" message
Change wording of Undefined Layers dialog to indicate that
rescued layers will be denoted 'User.Comments' rather than
the deprecated 'Cmts.User'

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5967
2020-10-12 10:39:08 -05:00
Jeff Young 1bcefe420a Move compound graphics tests back out to the shared path. 2020-10-12 11:46:08 +01:00
jean-pierre charras 380534807b Plotters: better support of filled circles having a thickness set to 0.
Setting a line thickness = 0 for graphic objects (circle, rect, line) is
allowed but creates issues for circles that were plotted a non filled shapes
but having a outline thickness = 0.
2020-10-12 11:30:43 +02:00
Jeff Young b92cb5c930 Hook up PNS via command to new rule system.
Fixes https://gitlab.com/kicad/code/kicad/issues/5951
2020-10-12 00:14:32 +01:00
Jeff Young 72f6127e53 Clean up terminology so it matches the user message better. 2020-10-12 00:14:32 +01:00
Seth Hillbrand 5fac21161c Revert "Remove footprint browser from pcbnew."
The footprint browser loads much faster than the add a footprint dialog,
so should remain until/unless we fix the loading speed.

This reverts commit 4d8ee4685d.
2020-10-11 12:17:47 -07:00
Jeff Young 37568d10ec Min width is smallest width it *can* be, not largest it *can't*.
Fixes https://gitlab.com/kicad/code/kicad/issues/5966
2020-10-11 19:17:19 +01:00
Marek Roszko 03074ae6ed Kick the selection tool to activate (and thus update cursors) on exiting some picker tools 2020-10-11 13:12:29 -04:00
jean-pierre charras 57da733f56 Avoid loss of data when saving a board having duplicate UUID
Some  (old) boards used for panelisation can have duplicate UUID
(timestamp). duplicate timestamps create loss of data when saving these boards.

Fixes #5969
https://gitlab.com/kicad/code/kicad/issues/5969
2020-10-11 19:07:28 +02:00
Jeff Young 7fb767653c Performance enhancements.
Don't redraw all pads when active layer is set unless it has
really changed.
2020-10-11 17:17:21 +01:00
Jeff Young 8e70381be3 Don't try and infer optimum widths for board minimums.
It doesn't work well with sorting the implicit rules by clearance.

Fixes https://gitlab.com/kicad/code/kicad/issues/5951
2020-10-11 17:17:21 +01:00
Seth Hillbrand 8fcb6c6f05 Exit fix loop in cleanup tracks
Fixes https://gitlab.com/kicad/code/kicad/issues/5968
2020-10-11 08:00:51 -07:00
Jeff Young af28ef9d56 Add silk clearance checking to Resolve Clearances...
Also fixes a bug in order of RTrees in silk collision checker.
2020-10-11 14:18:11 +01:00
Jeff Young 42eecdfd3a Collapse silk constraints down to one.
Also updates the rule syntax help and code-completion with a bunch
of diff-pair and other stuff that hadn't been updated yet.
2020-10-11 13:19:23 +01:00
Jeff Young bcebb19665 Add implied diffpair netclass rules. 2020-10-11 13:19:23 +01:00
Marek Roszko 558f4b4b51 Add new place cursor, fix cursor hotpoints again 2020-10-10 23:45:21 -04:00
Jeff Young 79f91481f3 Fix missing break stmt. 2020-10-11 01:11:55 +01:00
Jeff Young 614d452f12 Resolve trackwidth[0]/viasize[0] to be the netclass values.
If we don't have a netclass use the default netclass.

Fixes https://gitlab.com/kicad/code/kicad/issues/5957
2020-10-11 00:54:49 +01:00
Jeff Young f680ff17d6 Need an item to pick a netclass value. 2020-10-11 00:14:42 +01:00
Jeff Young 22cde88ba9 Allow chamfering/filleting of zone/board edge intersections.
Fixes https://gitlab.com/kicad/code/kicad/issues/5947
2020-10-10 23:09:43 +01:00
Mark Roszko a8bd0a9b84 Handle Windows manifests ourselves and add dpi awareness option 2020-10-10 19:08:23 +00:00
Jon Evans 6c6a3ff465 Remove API removed in 04c4012e from Python helpers 2020-10-10 15:05:38 -04:00
Jon Evans c1a724377f Fix AUI pane caption colors for dark mode 2020-10-10 14:55:32 -04:00
Jeff Young 04c4012ee6 Make track/via sizes UI more predictable and compatible with DRC.
Two main changes: netclass values need to go through the DRC engine
so they can interact with other rules.  They're also now dependent
on the layer being routed as well as the start object.

Also make the controls adjust to each other better.  For instance,
copy-track-width needs to turn off when you select a particular
track width, and a particular track width needs to zero out when
you choose copy-track-width.

Fixes https://gitlab.com/kicad/code/kicad/issues/5951
2020-10-10 19:32:30 +01:00
Jeff Young fdeb340d21 Defensive code against missing nets.
Also adds net re-parenting code to Repair Board.

Fixes https://gitlab.com/kicad/code/kicad/issues/5935
2020-10-10 16:54:19 +01:00
Jeff Young 527d5f1290 Disallow external fillets on self, not just interacting zones.
Fixes https://gitlab.com/kicad/code/kicad/issues/5947
2020-10-10 16:54:19 +01:00
Michael Kavanagh b2124a34dc Add grid properties context menu to grid toolbar
Fixes https://gitlab.com/kicad/code/kicad/issues/5663
2020-10-10 14:44:03 +00:00
jean-pierre charras 213a74cbe6 Gerber, Dialog plot: add option to disable Aperture Macro use.
Some broken Gerber readers cannot handle Aperture Macros without errors
although this feature exists since the beginning of RS274X format.
2020-10-10 16:42:21 +02:00
Ian McInerney 1df13ce32b Dismiss the layer selector grid combobox when it loses focus
Fixes https://gitlab.com/kicad/code/kicad/issues/5943
2020-10-10 15:24:35 +01:00
Ian McInerney 5aa796b5fe Cleanup compiler warnings 2020-10-10 15:24:35 +01:00
Jeff Young 90baed7e82 Fix typo of transposed semi-colon and comma.
Also eases translation of strings while we're here.

Fixes https://gitlab.com/kicad/code/kicad/issues/5933
2020-10-10 12:25:22 +01:00
jean-pierre charras c5f01501c1 PnS, router/router_preview_item: fix incorrect size of SH_RECT shape when drawing it.
The width of the rectangle was used instead of the width of outline (usualy 0) to
draw the shape (when dragging the pad for instance)

Fixes #5944
https://gitlab.com/kicad/code/kicad/issues/5944
2020-10-10 10:03:23 +02:00
Jeff Young 7f3ed1479e Back out fromOtherCommand handling.
It's only needed in PlaceModule() and creates problems here.  Also
adds a comment regarding the encapsulation leak that makes all this
hard to maintain.

Fixes https://gitlab.com/kicad/code/kicad/issues/5932
2020-10-09 23:41:30 +01:00
jean-pierre charras 411914dffb Fix python footprint wizards after recent changes in code 2020-10-09 20:48:13 +02:00
Seth Hillbrand 4d8ee4685d Remove footprint browser from pcbnew.
This is still used to choose footprint in eeschema, so the frame remains
2020-10-09 08:46:08 -07:00
jean-pierre charras dd929c7b2e Gen drill map file: ensure plot works when the edge cut layer is not visible
Fixes #5912
https://gitlab.com/kicad/code/kicad/issues/5912
2020-10-09 17:33:43 +02:00
jean-pierre charras f60954c232 Gerber export: add support for flashed chamfered rect (with no rounded corner) pads 2020-10-09 16:47:34 +02:00
Jeff Young b31470012a Previous check didn't account for router dragging. 2020-10-09 14:30:55 +01:00
Jeff Young 2ca819a627 Don't assume a DRC_CONSTRAINT has a parent rule.
It will still have a name, though.
2020-10-09 14:26:09 +01:00
Jeff Young 1cb0cbff2e Fix crash when router gets notifed but has no current m_placer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5935
2020-10-09 14:26:04 +01:00
Jeff Young 1fc94c7a2d Fix printf arg mismatch.
Fixes https://gitlab.com/kicad/code/kicad/issues/5933
2020-10-09 13:57:49 +01:00
Jeff Young afe5d9ae05 Don't flip group name when flipping board view.
Fixes https://gitlab.com/kicad/code/kicad/issues/5915
2020-10-09 13:45:05 +01:00
Jeff Young e1eabac5e2 Fix name-change in DRC rules syntax help. 2020-10-09 11:31:30 +01:00
jean-pierre charras 7f1c376128 Fix a minor wxWidgets alert 2020-10-09 08:40:47 +02:00
Marek Roszko bd30a4a406 Add selection lasso and window cursors 2020-10-08 21:25:21 -04:00
Jon Evans 966730710e Partial fix for routing with no start item 2020-10-08 20:38:08 -04:00
Jeff Young 0c7630f8b4 Get rid of wxWidgets assert. 2020-10-09 00:31:29 +01:00
Jeff Young 298d5b6a11 Report units in clearance/width/etc. resolution reports. 2020-10-09 00:16:30 +01:00
Jeff Young 4f2e574f4b Move IsADiffPair to drc_engine.cpp for now.
Otherwise we have to include drc_test_provider_diff_pair_coupling.cpp
in CVPCB, which isn't ideal either.

I'll let Tom figure out the best plan going forward, but this should
at least get things compiling/linking again.
2020-10-09 00:05:22 +01:00
Jeff Young ce7794d9b6 Refresh after a Select All (without having to wait for mouse move). 2020-10-08 23:59:07 +01:00
Jeff Young 6550e01318 Sort synthetic netclass rules by min clearance.
This way when 'A' and 'B' have different netclasses the largest will
fire (rather than just a random one of the two).

Fixes https://gitlab.com/kicad/code/kicad/issues/5926
2020-10-08 23:41:27 +01:00
Tomasz Wlostowski 38cef95da9 router: initial support for V6 Design Rules (width/clearance/diff pair width/diff pair gap). Still a lot of work to do! 2020-10-09 00:01:26 +02:00
Tomasz Wlostowski 9bef95418e router: wip on less intrusive dragged trace optimization 2020-10-09 00:01:26 +02:00
Tomasz Wlostowski b5fa523a11 PCB_EXPR_EVALUATOR: added isDiffPair() API method 2020-10-09 00:01:26 +02:00
Tomasz Wlostowski 5c2c66dd07 drc: sane default rules for via diameters/diff pair widths/diff pair gaps (required by the P&S) 2020-10-09 00:01:26 +02:00
Tomasz Wlostowski 5e4fb46aef MINOPTMAX: added OptThenMin() method as syntax sugar 2020-10-09 00:01:26 +02:00
Jeff Young ea387f2f28 Don't segfault after doing a cutout which removes entire zone.
Fixes https://gitlab.com/kicad/code/kicad/issues/5532
2020-10-08 20:33:54 +01:00
Jeff Young 5ee302d2dc Fix spacing issue in Plot dialog. 2020-10-08 18:11:06 +01:00
Jeff Young 80ba02caf5 Fix iterator bug in group selection filtering.
Fixes https://gitlab.com/kicad/code/kicad/issues/5804
2020-10-08 14:15:10 +01:00
Jeff Young 9c6977a994 Remember mirror setting in print dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/5909
2020-10-08 14:15:10 +01:00
Jeff Young d305e9c715 Line width safety for PSLIKE plotter and some cleanup. 2020-10-08 14:15:10 +01:00
Marek Roszko f820dc990e Make the delete tool use KICURSOR 2020-10-08 07:40:14 -04:00
Jeff Young a534f24fb6 Repair deleting of groups in modedit. 2020-10-08 11:33:32 +01:00
Jeff Young 6752fdd58b Fix bug with adding items to group in modedit. 2020-10-08 11:33:32 +01:00
Jeff Young 2f49db49bf Fix fly-off arc handles and move Arc Properties to start/end/angle.
Fixes https://gitlab.com/kicad/code/kicad/issues/5791
2020-10-08 11:33:32 +01:00
Jeff Young 77aa48b825 Fix COMMIT handler for deleting PCB_GROUPs in footprint editor. 2020-10-08 11:33:32 +01:00
Marek Roszko f5e0754f65 Use the setCursor lambda pattern and fix up the initial cursor states 2020-10-07 23:26:14 -04:00
Marek Roszko 93376fa80e Use the central SetIfPresent helper 2020-10-07 22:13:46 -04:00
Roberto Fernandez Bautista 09ac5e0fdc Make GetCenter() in arcs return the center of the arc
Currently GetPosition() calculates the center of the arc
2020-10-08 01:41:37 +00:00
Mark Roszko d9485129c8 Implement more context specific cursors using both stock and custom cursors. 2020-10-08 00:50:28 +00:00
Ian McInerney 50405b558e Make the gerbview ruler tool more like the pcb ruler tool
* Allow the ruler to persist after clicking once on the canvas
2020-10-08 00:45:47 +01:00
Jeff Young 75185f6723 Don't allow negative line widths for grahpic shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/5599
2020-10-07 18:30:55 +01:00
Wayne Stambaugh cb73f43fc8 Remove duplicate SWIG include file. 2020-10-07 12:47:01 -04:00
Jeff Young 0ab583cf72 Special-case clearances of NPTH pads with no copper on layer.
These should get the hole clearance, not the copper clearance.

Fixes https://gitlab.com/kicad/code/kicad/issues/4017
2020-10-07 16:31:55 +01:00
Jeff Young 4565631728 Finish moving eeschema assigned netclasses to sheet-path-relative.
Also adds code for the case where a new label is created on a net
with an existing netclass assignment.

Fixes https://gitlab.com/kicad/code/kicad/issues/5886
2020-10-07 16:31:55 +01:00
Jeff Young cfc636d25f Minor adjustments to DRC syntax help. 2020-10-07 16:31:55 +01:00
Tomasz Wlostowski eb8287ded8 router: bring back legacy GetEffectivePolygon() for complex pad shapes (more info in comments) 2020-10-07 16:36:37 +02:00
Tomasz Wlostowski 8a7fc7e970 drc: more robust segment pair detection, still issues with approximated arc corners though... 2020-10-07 16:36:37 +02:00
Tomasz Wlostowski 719363fa4a Factor out class MINOPTMAX<> into a separate header 2020-10-07 16:36:37 +02:00
Jon Evans c3da54b741 Allow editing properties of locked pads
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5861
2020-10-06 17:54:50 -04:00
Michael Kavanagh 42496a7d62 Convert DRC rules syntax help to markdown
Note, the original markdown spec specifies using 4 spaces to indent a
code block (https://daringfireball.net/projects/markdown/syntax)

Wrapping with three backticks doesn't work with this lib. Wrapping
with a single backtick for span elements works ok.
2020-10-06 17:18:35 +00:00
Jeff Young 7c46cb0a05 Make GetCenter() return the boundingbox center by default.
Leaves pads and markers returning the position.

Fixes https://gitlab.com/kicad/code/kicad/issues/1924
2020-10-06 18:00:18 +01:00
Jeff Young f620f8bdd3 Report silk/edge collisions.
Fixes https://gitlab.com/kicad/code/kicad/issues/5854
2020-10-06 13:20:52 +01:00
Jeff Young ee95d8fe2e Improve SNR in status bar (and use common code). 2020-10-06 12:08:31 +01:00
Jeff Young 305fe54971 Drawing tool needs to pass resetLocalCoords event after recording it.
Fixes https://gitlab.com/kicad/code/kicad/issues/5879
2020-10-06 12:08:31 +01:00
Benjamin Vernoux 00baaaa831 Add substrateMaterial FR408-HR
https://docs.oshpark.com/resources/four-layer-substrate-FR408HR.pdf
2020-10-06 10:31:00 +00:00
Jon Evans 728c207105 Deduplicate settings migration handling 2020-10-05 23:21:57 -04:00
Jeff Young d23d5510e7 Restore a side-effect that the router appears to depend on. 2020-10-06 00:07:34 +01:00
Jeff Young 35fa857fd8 Make sure router tool passes events it doesn't handle.
Fixes undo/redo when router tool is active but not routing.
2020-10-05 23:16:37 +01:00
Jeff Young 18a3c4c1db Fix some fairly catastrophic bugs in shape collision optimization.
I did a little too much copy & paste last time around....
2020-10-05 22:32:07 +01:00
Jeff Young 6d50c9749c Mark the colliding shape so we know which one to highlight.
Also checks the nets when checking for a pad being flashed on a particular
layer (so we don't end up thinking the currently-routing-collided track
is a connection).
2020-10-05 22:32:07 +01:00
Jeff Young 8f870e87d6 Flip default for KeepTopBottom in parser.
File only has a token if it's set to true.
2020-10-05 22:32:07 +01:00
Jeff Young bb5d393917 Respect "keep top/bottom" setting when checking pad layer. 2020-10-05 22:32:07 +01:00
Jeff Young d063c56971 Move PNS pad solids to COMPOUND_SHAPE.
Also fixes plated holes solids to include plating thickness.
2020-10-05 22:32:07 +01:00
Jeff Young 0751965b2b Be more responsive to user cancel. 2020-10-05 22:31:52 +01:00
Ian McInerney 43c14face0 Switch to showing metric/imperial units in comboboxes and menus
This will always show 1 unit from each system, with the primary unit
being the current frame unit and the secondary unit being the
most recent unit used from the other system. These are saved in
the settings, so they are saved between runs.
2020-10-05 20:26:33 +01:00
Wayne Stambaugh 27f3ac980f Fix broken Python builds. 2020-10-05 10:52:51 -04:00
Michael Kavanagh 1416280662 Cleanup: Move Eagle files into plugins folder 2020-10-05 14:19:07 +00:00
Jeff Young 5705859e9e Remove accidental debug code. 2020-10-05 12:27:21 +01:00
Jeff Young 37906511f5 Class renaming.
DRAWSEGMENT  -> PCB_SHAPE
EDGE_MODULE  -> FP_SHAPE
TEXTE_PCB    -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Mark Roszko a28a0e14ba Fix conversion warnings 2020-10-05 10:41:14 +00:00
jean-pierre charras 49f0d80f14 gen_footprints_placefile: fix unit selection not stored in config.
Fixes #5884
https://gitlab.com/kicad/code/kicad/issues/5884
2020-10-05 10:50:40 +02:00
Jon Evans 0eaf7bfd1f Ensure visible layers are synchronized properly
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5873
2020-10-04 16:55:22 -04:00
Ian McInerney 8b0fb9f4cf Remove units and polar settings from the preferences panels
These options are already available in menus, toolbars and hotkeys,
so having them in the preferences pane is more trouble than it is
worth.
2020-10-04 17:53:55 +01:00
Ian McInerney 3a570c27f0 Update unit handling in the preview ruler
* Make the ruler able to switch to mils after creation
* Cleanup an unused flag in Pcbnew dimensions
* Move unit changed notification into EDA_DRAW_FRAME so more
  frames to use it.
* Allow switching units when GerbView ruler tool is active
2020-10-04 17:53:55 +01:00
Ian McInerney 5828416960 Simplify area printing in the board statistics dialog
Store the board area in IU, and then convert it to the user
units on display using the common unit printing functions.
2020-10-04 17:53:55 +01:00
Ian McInerney 122bd7ca7c Make the statubar aware of mils units
Switch Eeschema to use the built-in printing routines
because its precisions are close to those and it is
cleaner.

Give mils a precision of 2 decimal places to match
the precision shown in inches.
2020-10-04 17:53:55 +01:00
Ian McInerney ad29a2f3b4 Update more places to properly display mils 2020-10-04 17:53:55 +01:00
Ian McInerney b1bd1f2a97 Introduce new action to switch to mils as a unit 2020-10-04 17:53:55 +01:00
Jeff Young 7a4900b8dc PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
Seth Hillbrand 8e515d0069 Standardize default hotkey refresh 2020-10-04 05:48:26 -07:00
Jeff Young 85c6cebd77 Rework silk-to-pad checker to handle all solder mask clipping of silk.
Fixes https://gitlab.com/kicad/code/kicad/issues/5851
2020-10-04 13:21:01 +01:00
Jeff Young 36ceb8075e Fix logic bug in DRC RTree handler.
Return value from visitor is whether or not to keep searching, not
whether or not there was a collision.
2020-10-04 13:21:01 +01:00
Jeff Young 4702e279b9 A DRAWSEGMENT can be stroked *and* filled.
Make sure its effective shape reflects that.  Note also that the
strokes need to have the correct width.
2020-10-04 13:21:01 +01:00
jean-pierre charras ba8b8d2738 Fix incorrect vertical position of some ckeckboxes in some wxGrid used in dialogs 2020-10-04 10:34:31 +02:00
Marek Roszko 9e115a548e Add advance config variable to skip bounding box loading on footprints 2020-10-03 22:01:42 +00:00
Jeff Young bb753aaadf Clean up terminology around active & high contrast layers. 2020-10-03 22:55:34 +01:00
Jeff Young 44580acee2 Clean up some compiler warnings. 2020-10-03 22:55:34 +01:00
Mikolaj Wielgus d14761bee6 Fix inches being sometimes used instead of mils 2020-10-03 20:06:56 +00:00
Mikolaj Wielgus 400c15b8eb Add mils to units, remove useMils variables 2020-10-03 20:06:56 +00:00
Ian McInerney b69d396afc Turn the toolbar context menus into unique_ptr for easier management 2020-10-03 19:09:18 +01:00
Jeff Young 81154c9270 Back out check-for-mouse-in-selection-bbox for PCBNew.
Unlike eeschema, PCBNew has had a selection model for two major
releases so folks have gotten used to RMB acting on the selection
rather than what's under the mouse.

Plus it makes RMB after a drag-select nearly useless as your mouse
by definition ends up outside the selection bbox.

Fixes https://gitlab.com/kicad/code/kicad/issues/5857
2020-10-03 18:50:49 +01:00
jean-pierre charras 3144bab36f final cleanup about removing useless include 2020-10-03 16:40:36 +02:00
jean-pierre charras 0b23cb7dbb more cleanup about removing useless include 2020-10-03 15:26:03 +02:00
Jeff Young bea5914726 Make sure all DRC paths check for via/pad being flashed on layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5830
2020-10-03 14:20:19 +01:00
Jeff Young 8eb8d967d7 Show correct clearance lines for pads & vias not flashed on cur layer. 2020-10-03 14:19:33 +01:00
Jeff Young ba26e056ec Implement groups for modedit.
This uncovered a memory corruption bug in MODULE's move operator,
several bugs in MODULE's move and copy constructors, and a bug in
BOARD's GetItem() call.

It also bumps the file format for saving/restoring groups inside
footprints.
2020-10-03 12:19:50 +01:00
jean-pierre charras e76736b7bf Fix a few Coverity warnings 2020-10-03 12:47:41 +02:00
jean-pierre charras b38cef409b Rename CopyFile() to KiCopyFile() to avoid name colliding with a windows header.
Using CopyFile() that can collide with a windows header create hard to
understand errors, including link errors.

Renaming this function avoids these strange errors.
2020-10-03 10:08:21 +02:00
Roberto Fernandez Bautista 8c783687a9 pcbnew: Add "All supported formats" drop-down to the "Import Non Kicad Board" file dialog 2020-10-03 02:19:13 +00:00
Jon Evans 716598ac24 Layout tweaks to CADSTAR layer mapping dialog 2020-10-02 22:17:08 -04:00
Roberto Fernandez Bautista 72d9a36fd6 ADDED: Dialog to handle import of unmatched layers from CADSTAR 2020-10-03 01:21:57 +00:00
Jon Evans 45d7f2b6f5 Expose via holes to color theme properly 2020-10-02 21:12:59 -04:00
Jon Evans a25d091b6c Add Convert Shapes tool to footprint editor 2020-10-02 18:42:41 -04:00
Jeff Young 4c5db9681c Naming conventions. 2020-10-02 21:25:14 +01:00
Jeff Young cc617b715f Implement hypertext links for intersheet references. 2020-10-02 21:18:34 +01:00
Tomasz Wlostowski 5ef1dc17ad drc: ignore silk2pad/silk2silk violations for hidden text objects 2020-10-02 21:06:52 +02:00
Tomasz Wlostowski ca8aca6faa drc: implement DRC_RTREE::CheckColliding 2020-10-02 21:06:52 +02:00
jean-pierre charras 87a220b8e2 more cleanup about removing useless include 2020-10-02 14:51:11 +02:00
Jeff Young 732f588d83 Don't hit-test groups; allow only selection promotions from members.
Also fixes some bugs were the selection filters weren't getting
applied correctly on drag-selects.

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

Fixes https://gitlab.com/kicad/code/kicad/issues/5804
2020-10-02 13:50:16 +01:00
jean-pierre charras 13304d0870 more cleanup about removing useless include 2020-10-02 13:40:00 +02:00
jean-pierre charras 0cca2a0ad2 Rect, Round Rect, Oval, Trapezoid (rotated) pads now use flashed apertures.
Complex shapes are plot using regions.

The old code is still available, just in case...
2020-10-02 10:19:45 +02:00
jean-pierre charras 8285110c2a more cleanup about removing useless include 2020-10-02 08:58:19 +02:00
Peter Montgomery 60046a1bcc Dynamically scale cross-probe zooming
CHANGED: When doing cross-probe zooming, KiCad zooms the selected
component to fill the screen.  This makes it hard to understand the
part in context so users would have to always zoom out manually.  This
commit uses the default text height in Eeschema and Pcbnew as a
constant to compare the height of selected parts or components against.
This lets the code determine how big the part is and scale the zoom
wider accordingly.  Big parts get less scaling and small part get more.

NOTE: There is a little bit of debug code present.  There are #ifdefs
to let developers easily swap in the original KiCad zoom for comparison.
There is also a bool added that can force each program to always perform
the new calculated zoom since KiCad ignores zooms that are close to the
current value. This debug code can be removed later as desired.
2020-10-02 00:56:52 +00:00
Jeff Young daac95400f Make sure new DRC_ENGINE is initialized.
Fixes https://gitlab.com/kicad/code/kicad/issues/5824
2020-10-01 23:44:52 +01:00
Jon Evans b369506697 Don't test forbidden footprint layers in board editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5847
2020-10-01 18:34:17 -04:00
Jon Evans 71ed7ee707 Revert "Drag preselected items even when "prefer selection to dragging" enabled"
This reverts commit d530e2c2cd.
2020-10-01 18:23:30 -04:00
Jeff Young 803f53d6b2 Don't reload DRC lists on activate event.
Fixes https://gitlab.com/kicad/code/kicad/issues/5701
2020-10-01 22:45:54 +01:00
Ian McInerney ff463842a8 Fix memory management with DIMENSION shapes
The previous way leaked the temporary SHAPE that was used
to construct the shared_ptr. Also, emplace_back shouldn't
be used with make_shared - since we already have the shared_ptr
and emplace_back will try to construct a new one.
2020-10-01 20:11:35 +01:00
Ian McInerney 481026e901 Move microwave tools into a group on the main drawing toolbar
ADDED: Drawing group for microwave tools on main drawing toolbar
REMVOED: Microwave toolbar no longer exists
2020-10-01 19:47:55 +01:00
Tomasz Wlostowski 8eb9d34aad drc: silk to silk clerance test should not report errors for hidden text 2020-10-01 18:55:53 +02:00
Tomasz Wlostowski aee16efe32 drc: LVS test should not throw an error if running in no-project mode 2020-10-01 18:55:53 +02:00
Tomasz Wlostowski 9b470b6c09 EDA_TEXT: Use actual draw rotation angle to generate the effective shape.
Fixes: #5814
2020-10-01 18:55:53 +02:00
jean-pierre charras 35e129ed47 Minor code cleanup, step3: remove more useless include. 2020-10-01 18:28:12 +02:00
jean-pierre charras f702da95c7 Minor code cleanup, step2: remove more useless include.
fix also a minor compil warning
2020-10-01 15:39:47 +02:00
jean-pierre charras 42350a4928 Minor code cleanup: remove useless include or useless code.
fix also a minor compil warning
2020-10-01 11:36:15 +02:00
Jon Evans d530e2c2cd Drag preselected items even when "prefer selection to dragging" enabled
Not being able to drag an already-selected item feels broken
2020-09-30 20:10:13 -07:00
Jon Evans 4dda3a1715 Don't allow editing design rules without a project
Also fix a crash initializing DRC engine on an empty board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5835
2020-09-30 19:12:26 -04:00
Jon Evans 8fad4bb34c Remove ratsnest visibility from PcbNew preferences
Ratsnest visibility is a quick toggle, not a preference

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5261
2020-09-30 19:12:26 -04:00
Jon Evans 6f54a9982c Remove PCB_LAYER_WIDGET 2020-09-30 19:12:26 -04:00
Ian McInerney e7c31f5dba Fix build error due to variable renaming 2020-09-30 23:42:56 +01:00
Ian McInerney a5ed5e5675 Handle single line segments on footprint edgecuts
Also, only display an infobar message for footprints when
there is no footprint loaded (instead of if the outline
isn't closed).

Fixes https://gitlab.com/kicad/code/kicad/issues/4866
2020-09-30 23:34:04 +01:00
Ian McInerney 37eed564ab Process all drawsegments on the outline layer 2020-09-30 23:34:04 +01:00
Ian McInerney 0ac2803624 Create footprint edgecuts differently than the board edge cuts 2020-09-30 23:34:04 +01:00
Ian McInerney 78c43158f4 Annotate the board class with if it is for a footprint edit/view 2020-09-30 23:34:04 +01:00
Jeff Young 4165ae6df1 Make zero-stripping sensitive to locale separator.
Fixes https://gitlab.com/kicad/code/kicad/issues/5813
2020-09-30 23:27:03 +01:00
Jeff Young 6abe68fff0 Cleanup. No changes to execution. 2020-09-30 23:07:12 +01:00
Jon Evans 7c003f98d5 ADDED: Appearance panel for footprint editor
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5643
2020-09-30 17:46:58 -04:00
jean-pierre charras 3f8c9d49f8 Revert "Code cleanup: remove useless wx/wx.h include inside a few files."
due to compil issue on Linux

This reverts commit cffccc3970.
2020-09-30 20:47:20 +02:00
jean-pierre charras cffccc3970 Code cleanup: remove useless wx/wx.h include inside a few files.
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
2020-09-30 20:03:27 +02:00
Seth Hillbrand 12a30c43de Fix missing refactor 2020-09-30 08:42:58 -07:00
Seth Hillbrand bf3cb0b1d0 Standardize pad type enums 2020-09-30 08:38:35 -07:00
Jeff Young 673b52b5c4 Non-copper zones need a different trim-outside-board strategy.
The copper zones are checking for any point being outside the board
as they will have already been broken in to islands either entirely
outside or entirely inside the board.  Not so for non-copper zones.

However, non-copper zones are *already* trimmed to the board edges,
so we just need to avoid using the above faulty assumption.

Fixes https://gitlab.com/kicad/code/kicad/issues/5811
2020-09-30 11:50:51 +01:00
Jeff Young d3f8f2b81e Remove confusion between pad->IsOnLayer and pad->IsPadOnLayer 2020-09-30 11:50:51 +01:00
Jon Evans 31549cdc10 Clean up some things about pad locking
Allow selecting pads on a locked footprint (but not editing)
Don't create point editor for pads that should be locked

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5829
2020-09-29 18:53:49 -04:00
Jeff Young ab033327c7 Limit checks need to be done at start, not end.
(We also use the limit checks to ignore violations.)

Fixes https://gitlab.com/kicad/code/kicad/issues/5831
2020-09-29 21:23:26 +01:00
Jeff Young 2cf303bb09 Test against pad hole cylinder when pad is not on layer. 2020-09-29 18:18:19 +01:00
Jeff Young 95f12d0826 Add some missing includes. 2020-09-29 16:32:44 +01:00
Jeff Young d0773cbe89 Be more careful with iterators when deleting.
Fixes https://gitlab.com/kicad/code/kicad/issues/5811
2020-09-29 14:11:32 +01:00
Jeff Young 66454ec895 Don't do hole-to-pad clearance testing on compound pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/5822
2020-09-29 14:11:32 +01:00
Jeff Young d70f812255 Fix some initialisation issues in the Python framework.
Fixes https://gitlab.com/kicad/code/kicad/issues/5824
2020-09-29 14:11:32 +01:00
Jon Evans 4bb3e9dd98 Better handling of rounded pad shapes in GRID_HELPER 2020-09-28 23:59:44 -04:00
Jon Evans 30663c293c GRID_HELPER: allow snapping to collinear points 2020-09-28 21:38:08 -04:00
Jon Evans fe0f6b5ac7 ADDED: snapping to pad shape endpoints and midpoints
ADDED: snapping to rectangle midpoints

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4749
2020-09-28 21:38:08 -04:00
Jon Evans e4ca4a2a47 REMOVED: "Delete twice to delete locked" action
Now that it is possible to disable selection of locked
items, it is better to just prevent accidental editing
of locked items

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5793
2020-09-28 21:38:08 -04:00
Jon Evans 74b0e1fa47 Break apart locked items from the rest of the selection filter
Disable selection of locked items by default

See discussion in https://gitlab.com/kicad/code/kicad/-/issues/5793
2020-09-28 21:38:08 -04:00
Jeff Young 8dfb5b5640 Go back to separate intermediate and final corner strategies.
While we can *almost* get away with only chamfering/rouding acute
corners, some ugly edge cases turn up.

Fixes https://gitlab.com/kicad/code/kicad/issues/5581
2020-09-29 00:51:36 +01:00
Jeff Young bf67648562 Support optional location reporting in SHAPE collisions.
Also fixes a few bugs in the collision routines.
2020-09-28 23:28:33 +01:00
jean-pierre charras 39d2a46b30 Avoid Pcbnew crash when double clicking in DIALOG_DRC on a error item. 2020-09-28 21:07:51 +02:00
jean-pierre charras c21883c8c9 fix minor I18n issues. 2020-09-28 20:52:55 +02:00
PJM 258d1a1971 Pcb: Get proper "Break Track" location when invoked from RMB context menu
When invoking "Break Track" from the RMB context menu, Pcbnew
gets and uses the current position of the mouse to figure out where to
break the track.  The problem is that the mouse has to be moved to select
the "Break Track" menu item, and the mouse position used is wrong.  This
can result in the break in the wrong location or not happening at all.

CHANGED: This commit determines if the "Break Track" was invoked from a
context menu or a hotkey.  If a hotkey, it uses the current mosue position.
If a context menu, it uses the original postion of the mouse when the menu
was opened.
2020-09-28 16:56:02 +00:00
Mario Luzeiro 456112de03 Request redraw of 3D-Viewer when moving a footprint 2020-09-28 02:26:25 +00:00
Mario Luzeiro 5a362dfeeb Request redraw of 3D-Viewer when a selection from Schematic is made 2020-09-28 02:26:25 +00:00
Mario Luzeiro a1e94c2583 3D-Viewer: request a redraw when a footprint is selected in pcbnew 2020-09-28 02:26:25 +00:00
Roberto Fernandez Bautista 72b904a978 ADDED: CADSTAR Archive project importer 2020-09-27 23:50:20 +00:00
Roberto Fernandez Bautista 39995341d9 Compile fixes
Fix compile error
Fix string format to use %ld instead to work on clang in CADSTAR Archive importers
Add virtual destructor to CONNECTION in CADSTAR_ARCHIVE_PARSER
2020-09-27 22:05:07 +00:00
Jeff Young db1d3ea710 Update track, via and pad clearances for the current layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5797
2020-09-27 21:33:37 +01:00
Jeff Young 09ab269770 Support for 'L' in DRC expression language.
Also make layer testing work again against both canonical names and
user names.
2020-09-27 21:33:37 +01:00
Jeff Young a2d9acb647 Rename DRC rule function onLayer to existsOnLayer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-27 21:33:37 +01:00
Roberto Fernandez Bautista 6f5f6a0fba CADSTAR Schematic / PCB Archive Importers: Fix string formatting asserts 2020-09-27 18:14:02 +01:00
Roberto Fernandez Bautista 93242eb3ad CADSTAR Schematic / PCB Archive Importers: Add missing import warnings and fix code formatting 2020-09-27 18:14:01 +01:00
Roberto Fernandez Bautista 2d99703e28 CADSTAR Schematic Archive Importer: Load all Sheets and Hierarchical Blocks 2020-09-27 18:13:58 +01:00
Roberto Fernandez Bautista 646a733556 CADSTAR Schematic Archive Importer: Parse all elements 2020-09-27 18:13:57 +01:00
Roberto Fernandez Bautista 1b20a2910a Move all common CADSTAR Importer Parser code
Move all common code from CADSTAR_PCB_ARCHIVE_PARSER (pcbnew) to CADSTAR_ARCHIVE_PARSER (common)
2020-09-27 18:13:56 +01:00
Tomasz Wlostowski c5c6b97c8b drc: fixed warnings in length matcher 2020-09-27 17:51:16 +02:00
Tomasz Wlostowski fbb669aa75 drc: diff pair test provider reports gap & max uncoupled length violations. 2020-09-27 17:50:57 +02:00
Tomasz Wlostowski 8e9a39e17c drc: fix incorrect DRCE_LAST 2020-09-27 17:50:24 +02:00
Tomasz Wlostowski 3cca2ace44 pcbnew: fix warnings in FROM_TO_CACHE 2020-09-27 17:49:54 +02:00
Tomasz Wlostowski 5874373a0c drc: unfinished version of diff pair gap/coupled length test 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 9b4504e73f drc: report from-to paths for length matched signals 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski adf7d3260d drc: parse diff pair constranits 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski cb2dfcde83 drc: error codes for diff-pair related stuff 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 3654e7b795 pcbnew: add QueryFromToPath() method to FROM_TO_CACHE 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski bd0bd5b84b drc: support for skew & via_count constraints. Length test now generates a length report 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski f38147c201 drc: add support for via_count constraint to the parser 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 7b7c3bde88 pcb_new: CONNECTIVITY_DATA now keeps a cache of DRC from-tos 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski bc7369d70c pcbnew: include silk2silk and length/skew DRC tests in the makefile 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 8d206a9ef0 PCB_EXPR_EVALUATOR: added fromTo() method 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 2258c861c9 drc: initial version of matched trace lengths test provider 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 2bacfe8202 drc: use R-Tree intersection for silk clearance tests 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski b215361b30 drc: default constraints for silk2pad, silk2silk 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 26e7dc6e14 drc: added length/skew constraint types 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski abe354773f drc: initial version of tree intersection (QueryCollidingPairs) 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 8405793e57 drc: add error codes for length/skew/via count violations 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 201a630740 drc: extend drc-rules file format with length and skew tokens 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 6578a76b72 drc: first R-tree based test (silk to pad clearance) 2020-09-27 16:45:46 +02:00
Tomasz Wlostowski 43404d4577 drc: be more verbose when skipping LVS due to lack of schematic netlist 2020-09-27 16:45:46 +02:00
PJM 9544c58bd7 Pcbnew: Cross-probe - Get correct zoom direction when view flipped
CHANGED: When Pcbnew has the view flipped, it causes cross-probe zooming
to go the wrong direction.  Instead of zooming in to the selected part,
it zooms very wide.  The problem is the x dimension of the screen size
becomes a negative value when the view is flipped, so "fabs()" is used
to correct it.

Fixes https://gitlab.com/kicad/code/kicad/issues/5157
2020-09-27 13:29:02 +00:00
jean-pierre charras 6b958ff4e0 Move specialized plotter classes from plotter.h to specific plotter_xx.h
plotter.h contains now only a header common to all plotters.
The code does not actually change, but it allows modifying a specific plotter
without recompiling most of kicad files.
2020-09-27 09:54:39 +02:00
Ian McInerney fc565edb33 Add a palette to the toolbars to display groups of actions
This adds a palette to toolbar items that displays groups
of actions when long-pressed on a button.
2020-09-27 01:00:44 +01:00
Jeff Young 23938356b9 Move "selection copied" to the status bar. 2020-09-27 00:26:18 +01:00
Jeff Young 4c21668940 Use high-contrast layer to inform clearance rules for outline.
Fixes https://gitlab.com/kicad/code/kicad/issues/5797
2020-09-27 00:11:51 +01:00
Jeff Young 7f33c229d8 Allow selection of nested items (ie: pads) inside an entered group.
Also moves some group-related functionality from BOARD to PCB_GROUP.
2020-09-26 20:35:52 +01:00
Jon Evans b6e4b7bf7d Fix order of initializing tools when loading board
Also add a few safeguards against invalid situations

Fixes https://gitlab.com/kicad/code/kicad/-/issues/5801
2020-09-26 14:45:16 -04:00
Jeff Young 7300640da0 Reload DRC rules on MODEL_RELOAD.
Fixes https://gitlab.com/kicad/code/kicad/issues/5794
2020-09-26 16:49:09 +01:00
Jeff Young f8875bc5a6 Move std::contains to alg::contains. 2020-09-26 14:42:40 +01:00
Jeff Young 035abe960c Fix copy/paste of groups.
We can't check for selected on parent groups because the order isn't
defined (and the parent may not yet have been selected).  Check for
inclusion instead.
2020-09-26 12:40:48 +01:00
Jeff Young d7e80f8008 Add std::contains() to simplify a lot of code. 2020-09-26 12:40:32 +01:00
Jeff Young e32c113249 A bit more syntax help for layers. 2020-09-26 10:20:10 +01:00
Jeff Young 44af3978af Re-implement undo/redo of group ops in a pointer-safe way. 2020-09-26 10:03:13 +01:00
Jon Evans 92c8ed2943 Fix non-copper zone layer ordering
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5350
2020-09-25 23:10:52 -04:00
Jon Evans 597a212313 Fix saving of filled polys with custom layer names 2020-09-25 22:38:01 -04:00
Jon Evans 6df4a0cc7f Clean up asserts when running DRC from Python 2020-09-25 21:28:04 -04:00
Jon Evans bb8aa70ad0 Fix copy pasta 2020-09-25 21:28:04 -04:00
Jon Evans f4a8275f3e Allow selecting pads of locked footprints when filter allows
Before the selection filter, this heuristic made sense, but
now there is an explicit toggle to disable selection of locked
items, so we want to be able to select pads when that toggle
is enabled.
2020-09-25 21:28:04 -04:00
Jeff Young ba0bed7a45 Groups don't go in the view, but they do go in an overlay when entered. 2020-09-25 22:51:16 +01:00
Jeff Young 2ae4fecaea Paste items into group when group has been "entered". 2020-09-25 22:48:40 +01:00
Jeff Young eb97fe8386 Fix bug when entered group is immediate parent. 2020-09-25 22:14:22 +01:00