Jeff Young
bf445c1a95
Performance enhancements.
...
1) cache pad polygon outlines
huge improvement in connectivity performance and a decent
improvement in DRC performance
2) don't pre-allocate CONTEXT stack
significant improvement in DRC rule performance
2) don't keep re-encoding strings
decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young
f97c50bfde
Give excluded DRC items their own layer.
...
(And fix a bug with the new mulit-layer zones and rule-based keepouts
at the same time which prevented me from testing it.)
Fixes https://gitlab.com/kicad/code/kicad/issues/4954
2020-07-24 01:28:25 +01:00
Jeff Young
6529e339a9
Don't store context in the uCode. (It's not thread-safe.)
...
Although it does give some pretty funny results when filling zones.
2020-07-23 22:21:13 +01:00
Jeff Young
a6b6084a60
Add preflighting for DRC rule function calls.
2020-07-22 14:33:32 +01:00
Jeff Young
c52df811ae
Add expression eval to constraint min/max/opt values.
...
Also adds error reporting for above.
2020-07-21 23:43:10 +01:00
Jeff Young
095937563b
Hook libeval compiler up to rule parser
...
- convert expression string tokens to single-quote-delimited
- fix bug where netclass assignments weren't getting updated after
board setup dialog
- move property manager rebuild to lazy evaluation
- improve performance with wider use of const&
- retire DRC_SELECTOR stuff
- use wxString for GUI stuff (particularly translated stuff)
- fix EqualTo() to return false instead of asserting when op types
don't match
- fix buffer overruns with fixed-size string buffers
- make expression function calls case-insensitive
- integrate expression errors into rule parser
- produce more and better error messages
- keep BOARD_ITEM ptrs const as long as possible
- fix a couple of uninitialized variables
2020-07-20 22:11:53 +01:00
Jeff Young
998c216487
Remove some nag tests which keep you from doing a DRC.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4845
2020-07-09 16:22:59 +01:00
jean-pierre charras
5226d6b4df
libcommon build: add NGSPICE_INCLUDE_DIR in include list (similar to Eeschema build).
...
Useful when ngspice is build by the developer in a specific folder.
Fix also an other minor compil warning.
Fixes #4851
https://gitlab.com/kicad/code/kicad/issues/4851
2020-07-09 08:46:59 +02:00
Jeff Young
d85a707385
Move rest of DRC to SHAPE collision architecture.
2020-07-06 20:00:50 +01:00
Jon Evans
2a1550d1d2
Don't crash when failing to deserialize old exclusions
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4820
2020-07-06 12:53:55 -04:00
jean-pierre charras
0d8c6d43a8
fix minor I18N issues.
2020-07-06 13:47:42 +02:00
Tomasz Wlostowski
8ffa86a63f
get it to compile after rebase
2020-07-05 22:44:38 +02:00
Tomasz Wlostowski
8bb442ac37
pcbnew: try to compile 'old' DRC alongside the new prototype
2020-07-05 22:44:38 +02:00
Jon Evans
12b4a55ae8
Port Eeschema to new project settings
...
DRC/ERC error serialization changed to use explicit tokens
Old stored severities and ignored errors are discarded
2020-07-02 22:08:54 -04:00
Jon Evans
c0aa6965de
Migrate PcbNew project settings to new framework
...
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Jeff Young
441dfa30f0
Return individual custom pad shapes instead of a SHAPE_POLY_SET.
...
Also implements an optional pointer to return the actual distance
from all the SHAPE collision routines.
Fixes https://gitlab.com/kicad/code/kicad/issues/4774
2020-07-02 17:09:15 +01:00
Jeff Young
424d551054
Cache pad bounding boxes for performance.
...
Also allows us to return to a LOD test for pad numbers which treats
round and square pads the same.
2020-07-01 16:57:00 +01:00
Jeff Young
40a72d9530
Add SH_RECT handling to 3D shape conversion.
...
Also add some debugging for not-implemented shape cases in other
places to catch simmilar issues in future.
Fixes https://gitlab.com/kicad/code/kicad/issues/4757
2020-06-30 18:32:31 +01:00
jean-pierre charras
42296d7eb9
fix issues in DRC and fill zone, related to recent changes in code.
...
Note also: the actual clearance between 2 pads when < minimal clearance
is incorrectly calculated.
2020-06-30 12:59:26 +02:00
Jon Evans
0d4ee39f75
CHANGED: Copper zones can be on more than one layer
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1963
2020-06-28 08:52:37 -04:00
Jeff Young
d01b29ab37
Cleanup pad geometry handling.
...
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.
This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
Jeff Young
c57c21f577
Pad bounding radius is from pad centre, NOT shape centre.
2020-06-22 20:36:54 +01:00
Jeff Young
7877e4083e
Don't match to an unknown layer.
2020-06-20 14:34:53 +01:00
Seth Hillbrand
32738862b8
Fix build error in linux
2020-06-18 09:52:04 -07:00
Jeff Young
76d1b8bfa1
Make sure selectors match against user layer names.
...
Also allows for user specification of units in rule constraints.
2020-06-18 15:38:01 +01:00
Jeff Young
a7703d1207
Cleanup Graphics to parallel Cleanup Tracks & Vias.
...
This also allows for easier migration to DRAWSEGMENT::S_RECTs by
auto-converting 4 rectilinear lines to a rectangle.
2020-06-17 18:44:39 +01:00
Jeff Young
aeed8e6e2c
Finish implementation of DRAWSEGMENT::C_RECT.
...
It's currently only supported in the Footprint Editor. It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young
d7d877241a
More explicit type conversion to attempt to fix GCC compile issue.
2020-06-10 13:41:45 +01:00
Jeff Young
4138c8554c
Parse DRC rules when closing Board Setup dialog.
2020-06-10 12:03:37 +01:00
Jeff Young
f4d8c30f9a
Tighten DRC epsilon value until we decide what to do about it.
2020-06-04 18:28:48 +01:00
Jeff Young
36d197d8b6
Increase pad clearance test epsilon to polygonization max error.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4604
2020-06-03 18:47:19 +01:00
Jeff Young
d2cd4de280
Allow rules to operate on hole when hole-to-track testing.
2020-06-03 12:11:50 +01:00
Jeff Young
6d5b6c8b81
A bit more refactoring to get code out of the DRC tool.
2020-05-29 22:06:48 +01:00
Jeff Young
39ec63c4e9
Fix some inconsistencies in clearance priorities.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4555
2020-05-29 13:41:45 +01:00
Jeff Young
9f2be3714f
Add unresolved variable testing for worksheet items.
2020-05-28 17:36:22 +01:00
Jeff Young
e61185775f
Implement testCopperDrawItem() for POLYGON draw items.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4549
2020-05-26 23:48:21 +01:00
Jeff Young
1db799d841
Implement "disallow" rules and integrate with keepout settings.
2020-05-25 22:51:47 +01:00
Jeff Young
c415130de9
Improve parse error messages.
2020-05-25 22:51:47 +01:00
Jeff Young
160981ee71
Better error reporting for DRC rule parsing.
2020-05-25 22:51:47 +01:00
Jeff Young
416d82727f
Redo DRC rules to get ready for new system.
2020-05-25 22:51:47 +01:00
Jeff Young
9a08ee2778
Add a 1nm tolerance to prevent rotated pad roundoff errors.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4139
2020-05-22 18:04:29 +01:00
Jeff Young
0a9adaef73
Don't use bboxes for non-cartesian-rotated pad collision testing.
2020-05-22 14:12:56 +01:00
Jeff Young
69f121d907
Another attempt to get DRC and status bar to share message content.
2020-05-22 14:12:56 +01:00
Jeff Young
4f14769ce1
Use both pads when calculating pad-to-pad clearance.
2020-05-21 21:26:36 +01:00
Jeff Young
a5b53a623d
Update status bar with clearance & rule sources.
2020-05-21 21:26:30 +01:00
Jeff Young
98be50883d
Fix bug in single-item layer matching.
2020-05-21 11:25:39 +01:00
Jeff Young
89c46e6834
Fix typo in DRC check of rule-based track-width.
2020-05-19 21:17:49 +01:00
Jon Evans
f4d7c323f5
Coverity fixes
2020-05-18 22:58:28 -04:00
Jeff Young
7d537e83ea
Match layers only if both items are on the given layer.
2020-05-18 22:37:37 +01:00
Jeff Young
ae9662c5cd
Fix some unitialized variables.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4477
Fixes https://gitlab.com/kicad/code/kicad/issues/4473
2020-05-18 21:30:38 +01:00