Commit Graph

9937 Commits

Author SHA1 Message Date
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
Jeff Young b4672c64ea Fix Group Properties dialog grow behaviour. 2020-09-25 21:14:08 +01:00
Jeff Young 955ba0a483 Add LAYER_ANCHORS to the always-active layer set.
Otherwise you can't see your groups in high-contrast mode.

Fixes https://gitlab.com/kicad/code/kicad/issues/5769
2020-09-25 19:42:06 +01:00
Jeff Young 6fde9ea8a5 Don't leave stale pointers in groups when exchanging modules.
Also simplifies groups so that other areas of code that have to know
about them at least don't have to know as much. One of the simplifications
is to not worry so much about empty groups until save time; others are in
the access logic to parent groups.

Also simplifies user model slightly by removing Merge and Flatten
(which are just ungroup/group and ungroup/ungroup/.../group).

Also allows multiple groups to have the same name.  This is useful when
using groups for a classification system.

Fixes https://gitlab.com/kicad/code/kicad/issues/5788
2020-09-25 18:43:19 +01:00
PJM d1322e7d1d Refactor GetDocumentExtents()
CHANGED: GetDocumentExtents() in 'eda_draw_frame.h' now has a bool
parameter "aIncludeAllVisible" with a default value "true" which makes
it behave as it did before adding parameter.  If "aIncludeAllVisible"
is false, the returned bbox ignores some items depending on which
program it is running in.

CHANGED: Made "Zoom to Objects" use only PCB edge in Pcbnew.  This
allows text, notes, etc outside the PCB edge to be excluded in the
zoom calculation.

CHANGED: Added "Zoom to Objects" to Pcbnew main menu, and to RMB context
menus for Eeschema and Pcbnew.

Fixes https://gitlab.com/kicad/code/kicad/issues/5787
2020-09-25 00:31:56 -07:00
Jon Evans 0783669633 CHANGED: Design rules files now use .kicad_dru extension
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5763
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5444
2020-09-24 21:26:23 -04:00
Jeff Young ae3ef90f7d Add location points to dimension message bar info.
Fixes https://gitlab.com/kicad/code/kicad/issues/5673
2020-09-25 00:43:30 +01:00
Ian McInerney bba29a1036 Always show the track and via menu in the router context menu 2020-09-25 00:17:54 +01:00
Seth Hillbrand 9937f52f06 Fix crash when not wrapping search
The iterator at the end of the search is already set the end(), so we
cannot increment it safely
2020-09-24 15:57:49 -07:00
Ian McInerney 672756a018 Move the router tools to a TOOL_MENU context menu
The previous way of displaying a context menu was being
usurped by the selection tool because it was displaying its
menu before DispatchContextMenu was called, and all other tools
explictly use the TOOL_MENU system.

Fixes https://gitlab.com/kicad/code/kicad/issues/5762
2020-09-24 23:51:34 +01:00
Jon Evans 1319885285 Wrap ZONE_FILLER to allow use without commit from Python
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5646
2020-09-24 18:08:23 -04:00
Jon Evans ff652d5375 Fix saving colors modified outside of preferences 2020-09-24 17:29:40 -04:00
Jeff Young e16b7626cd Implement GetMsgPanelInfo for dimensions.
Fixes https://gitlab.com/kicad/code/kicad/issues/5673
2020-09-24 22:23:59 +01:00
jean-pierre charras dfaf0851fe Fix broken layer names used when saving a footprint from library.
This issue was also existing when copying to the clipboard.
Saving boards was not affected.

Instead of using canonical layer names, the user layers names were used.

Fixes #5779
https://gitlab.com/kicad/code/kicad/issues/5779
2020-09-24 20:01:24 +02:00
Wayne Stambaugh feeb925e61 Pcbnew: add user defined layer colors to color preferences panel. 2020-09-24 13:51:18 -04:00
Jeff Young f0739315f6 Use title-bar-style for group names.
Fixes https://gitlab.com/kicad/code/kicad/issues/5769
2020-09-24 16:35:20 +01:00
Wayne Stambaugh 564f363c57 Pcbnew: fix user defined layer bugs. 2020-09-24 10:19:10 -04:00
Jeff Young 5ad76a237e Moving checking the rules up a level so we can properly exit DRC dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/5778
2020-09-24 15:17:46 +01:00
Jeff Young 3e366a901f Expose pad type in property system.
Also corrects the spelling of some enum items so they match the
menus (otherwise folks will never be able to figure out what they
are).
2020-09-24 14:41:02 +01:00
Jeff Young dba42ebed0 ADDED Properties Dialog for groups.
ADDED memberOf() function for DRC rule expressions.

Also fixes a bug in several of the pickers where the event wasn't
being correctly passed.

Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-24 14:41:02 +01:00
jean-pierre charras 446a9ca866 Round-rect pads: use a circle to draw degenerated shapes.
A degenerated shape is a round-rect pads with same X and Y size, and a
radius very near 50% of the size.

Fixes #5768
https://gitlab.com/kicad/code/kicad/issues/5768
2020-09-24 11:05:56 +02:00
jean-pierre charras aa6158a9fb fix a minor wxWidgets alert 2020-09-24 10:18:28 +02:00
Jon Evans 690575e2b6 Improve edit point legibility with a hover state 2020-09-23 21:27:23 -04:00
Seth Hillbrand 856cf51fc8 Fix typo 2020-09-23 14:00:39 -07:00
Seth Hillbrand b31eafdfa8 Restore missing layer check 2020-09-23 13:33:42 -07:00
Wayne Stambaugh 188232de6f Pcbnew: add user defined layers and allow all layers to have user names.
This changes the file format.  All previous copper layers that had a user
defined name are forced back to the canonical name and the user defined
name is stored as an optional quoted string in the layer definition and
only used for UI and plotting purposes.  All copper object layer names
are now the canonical name for internal file use.

ADDED: Nine new user definable non-copper layers that can be optionally
added to the board layer stack.

CHANGED: All board layers can now be renamed by the user.

CHANGED: User defined layer names can now contain space characters.

Fixes https://gitlab.com/kicad/code/kicad/issues/1969
2020-09-23 15:41:43 -04:00
Jeff Young 660cdcb056 More defensive coding for wxDataViewCtrl selection access.
Fixes https://gitlab.com/kicad/code/kicad/issues/5747
2020-09-23 20:31:48 +01:00
Jeff Young 4a0d469cec Back out zone layer misunderstanding and make types clearer. 2020-09-23 20:02:21 +01:00
Jeff Young 1f284111b0 Faster algorithm for zone-to-zone connectivity test. 2020-09-23 18:51:52 +01:00
Jeff Young e0ee420cb6 Add cross-reference processing to dimension prefix and suffix.
Fixes https://gitlab.com/kicad/code/kicad/issues/5752
2020-09-23 18:01:50 +01:00
Jeff Young 8b2dd76efe Update syntax help. 2020-09-23 17:52:44 +01:00
Jeff Young f5af17e1ba Fix file somehow left out of last commit. 2020-09-23 17:51:48 +01:00
Jeff Young 6dae769944 Progress reporting for connectivity tests.
Also makes via annulus terminology more consistent.
2020-09-23 16:28:00 +01:00
Jeff Young 167ae374fd Don't allow two DRC runs at the same time.
Fixes https://gitlab.com/kicad/code/kicad/issues/5745
2020-09-23 14:10:07 +01:00
Jeff Young 7d3eee8cf9 Move DebugZoneFiller to advanced config.
This will hopefully keep it from accidentally getting checked in
again.
2020-09-23 10:52:44 +01:00
Jeff Young 524603de14 Fix debug flag that shouldn't have been merged. 2020-09-23 10:24:32 +01:00
Jon Evans 8f01771138 ADDED: Python API to run DRC and write a report
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2030

Note: this is a fairly basic API, you can't retrieve
individual DRC items.  This is intended to be a hold-over
until we write the new Python API that can expose full
functionality (since we do not want to wrap the entire
DRC system with SWIG)
2020-09-22 20:25:44 -04:00
Jon Evans 8ef888e115 Add a path for scripting console to work from build dir for debugging 2020-09-22 20:25:44 -04:00
Jeff Young 6d18f20093 ADDED constraints reporter for diagnosing constraints.
Also fixes an issue with via type property and makes property
comparisons in rule case-insensitive.

Fixes https://gitlab.com/kicad/code/kicad/issues/5754
2020-09-23 01:14:35 +01:00
Jeff Young fb7f98b51d Implement visual zone dumping and fix the default fill algo setting. 2020-09-23 01:14:35 +01:00
Jeff Young 7e5a6371c1 Cleanup. 2020-09-23 01:14:35 +01:00
Jeff Young 4d8537fcfa Handle multi-layer zones in connectivity. 2020-09-23 01:14:35 +01:00
Mark Roszko 610f0372d3 Initialize Py_SetPythonHome for msvc/vcpkg 2020-09-23 00:02:32 +00:00
PJM e77b7e3360 Make MMB double click perform 'Zoom to Fit'
ADDED: Make middle mouse button double click do a 'Zoom to Fit'
in Eeschema, Pcbnew, and Gerbview.  Ctrl-MMB does a 'Zoom to Objects'
in Eeschema.

Fixes https://gitlab.com/kicad/code/kicad/issues/1988
2020-09-22 23:21:44 +00:00
Jon Evans 5d78e9512f Don't check for a control that doesn't exist
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5759
2020-09-22 18:00:12 -04:00
jean-pierre charras 9efc91c107 fix 2 minor compil warnings and make a sentence more easily translatable 2020-09-22 16:56:55 +02:00
Seth Hillbrand 4a86daa86d pcbnew: Restore missing pad size
After adjusting the pad size, we need to restore it when we
short-circuit the drawing routine

Fixes https://gitlab.com/kicad/code/kicad/issues/5702
2020-09-22 06:55:49 -07:00
Mark Roszko 7656663a2f Fix Python integration to build with vcpkg
* Add vcpkg support to find Oython using CMake
* Fix pid_t conflict with python
* Fix COMPILER conflict with python
2020-09-22 12:39:05 +00:00
Jon Evans acf13a1869 ADDED: Orthogonal dimension object 2020-09-21 23:55:02 -04:00
Jon Evans e345e7d17a Allow creating an empty project when saving a board standalone 2020-09-21 23:55:02 -04:00
Jon Evans 18e17abd6a Rename "Keepout" to "Rule Area"
These objects can now be used in advanced DRC rules and
not just for keeping things out.  Also remove the restriction
that at least one of the "basic" keepout rules must be set,
so that these areas can be used for more advanced rules.
2020-09-21 23:55:02 -04:00
Seth Hillbrand 408cd20294 drc: Test all zone layers for intersection
Zones can span multiple layers so we need to test each explicitly.

Fixes https://gitlab.com/kicad/code/kicad/issues/5750
2020-09-21 20:40:50 -07:00
Seth Hillbrand ffa1947056 pcbnew: Simplify copy routine
Choose a decent copy reference from the mouse position when copying.
Don't break UX standards by requiring mouse action when activating copy.
2020-09-21 13:28:21 -07:00
Jeff Young 4badcba4c2 Zone fill performance improvements
1) better load-balancing for deferred zones
2) sort zones by priority before filling
3) retire BOARD::GetZoneList() which had a horrible performance profile
4) implement a zone bounding box cache
5) better checks for IsCancelled() so long fills can be exited

Fixes https://gitlab.com/kicad/code/kicad/issues/5738
2020-09-21 21:09:58 +01:00
Ian McInerney d3dd1c45b6 Disable editing tools on the canvas when DRC is running 2020-09-21 20:39:46 +01:00
jean-pierre charras 456735f803 VIEW::ViewGetLOD() returns double now instead of int.
ViewGetLOD() returns the minimal value of a zoom to show an item.
However a zoom is a double, and using int as minimal value does not
allows setting a correct value in some cases.
2020-09-21 17:55:24 +02:00
jean-pierre charras 492a634413 Fp editor: Fix bug when moving fp anchor: pad shapes where not updated on screen. 2020-09-21 14:43:26 +02:00
Jeff Young 719e8d276f Use footprint editor display and window settings for footprint viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5737
2020-09-21 13:13:09 +01:00
Ian McInerney b1160660d9 Check return value for zone fill in VRML exporter
If the zone fill failed, then don't add the zone to the
exported VRML because it might not be correct.

Also test that the Python command in DIALOG_SCRIPTING worked.
This dialog actually isn't used anywhere currently, so it
could in theory be removed - but it is simple enough and
it provides a decent testing dialog that it is more work to remove
it.
2020-09-21 12:32:30 +01:00
Ian McInerney 9e6a1225db Catch exception when creating app settings objects
These settings objects could be created in a constructor/destructor
so we should catch the exception since those are noexcept.

Also change the settings trace to match the other kicad traces
as KICAD_SETTINGS
2020-09-21 12:07:51 +01:00
Ian McInerney 542f447daa DRC tool: Ensure all calls to the dialog are guarded by null checks 2020-09-21 12:04:41 +01:00
Jeff Young 6020b70596 Display green badge for zero errors or zero warnings.
Fixes https://gitlab.com/kicad/code/kicad/issues/5735
2020-09-21 11:59:27 +01:00
Jeff Young c6fb799fcd Restore severity in saved DRC/ERC reports.
Fixes https://gitlab.com/kicad/code/kicad/issues/5733
2020-09-21 11:59:27 +01:00
Jeff Young 1b77c4c270 Mention rule priority system in Syntax Help and Clearance Report.
Fixes https://gitlab.com/kicad/code/kicad/issues/5647
2020-09-21 11:59:27 +01:00
Jeff Young 865249c227 Handle two panels both referencing same colour theme.
Fixes https://gitlab.com/kicad/code/kicad/issues/5185
2020-09-21 11:59:27 +01:00
jean-pierre charras 4db4a0a46f Pcbnew, PCB_PAINTER: very minor enhancement for commit 2751c677 2020-09-21 08:56:53 +02:00