Commit Graph

319 Commits

Author SHA1 Message Date
Tomasz Wlostowski 1a2e02040a qa/libs/kimath: simple test suite for collisions of SHAPE_COMPOUNDs 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 8d9d3ff795 qa/drc_proto: debug level settable by env var 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski 91b68e4578 drc_proto: follow up Jeff's changes in legacy DRC/board model 2020-07-29 23:14:03 +02:00
Tomasz Wlostowski abe6ccf97e common: re-enable libeval_compiler and DRC proto test (fixed missing file issues) 2020-07-29 23:14:03 +02:00
Jeff Young 0fecb5f277 Be more explicit about string/character conversions.
This *may* fix the bug where a layer name isn't displayed correctly
in the error dialog.  But probably not.
2020-07-28 20:44:40 +01:00
Seth Hillbrand 1374d82114 Adding QA project files 2020-07-28 10:44:51 -07:00
Jeff Young 552dde8976 Fix return value going out of scope.
(From Coverity report.)
2020-07-26 13:41:43 +01:00
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 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
jean-pierre charras 6d8fb94d86 Fix a few Coverity warnings. 2020-07-20 16:19:19 +02:00
Seth Hillbrand 69d75b90b1 Adding failed arc test
This test implements a case where the current arc calculations fail
2020-07-18 13:03:22 -07:00
Ian McInerney 7b705af038 Refactor common QA components to create a single common library
This moves the program-specific code (e.g. BIU files) into
the program tests.

Also, create title_block.cpp to break a dependency that pulled
in eda_text.cpp when using the TITLE_BLOCK object.
2020-07-18 16:21:15 +01:00
Ian McInerney 019313711a Move geometry tests into the kimath qa test 2020-07-18 16:19:01 +01:00
Jeff Young d1da053d2e Update test to prettier file extension wildcard syntax. 2020-07-17 21:22:28 +01:00
Jeff Young 7340c97ef9 Undo for schematic-wide operations.
Editing value/footprint fields of multi-unit components.
Find/Change.
Annotation.
Back annotation.

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

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

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

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

Fixes https://gitlab.com/kicad/code/kicad/issues/3899
2020-07-13 12:32:17 +01:00
Jeff Young 1872d05f72 Fix netlist test golden file to include proper escaping. 2020-07-07 11:18:52 +01:00
Ian McInerney 6672efdf2c Disable DRC prototype by default 2020-07-06 00:55:36 +01:00
Tomasz Wlostowski 0a4c8cd45c drc_proto: import latest Jeff & Jon's changes + update copyright headers 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski e9d37dd7ce drc_proto: implement QueryWorstConstraint 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski bc86ea7682 drc_proto: use separate lexer for rule file from current pcbnew DRC 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 0e0cf5dff8 drc_proto: moving to GetEffectiveShapes() 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 1cabc1bc0f qa/drc_proto: rework common clearance code into base class, start working on hole clearance test refactor 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski b3ce23f0e2 PCB_EXPR_EVALUATOR: implement isPlated virtual property 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski d57d5d73b2 qa: clearance test works and reports. about to do board outline clearance test 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski bd19892cd0 qa/drc_proto: clearance test seems to work with conditional rules, need to clean up & add reporting 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 6bddc4bdd6 qa: more tests for libeval_compiler 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski 085698d17c drc_proto: wip 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski aaa91655aa libeval_compiler: integrated in common/ 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski b82ec2161f libeval_compiler: initial version 2020-07-05 22:44:38 +02:00
Tomasz Wlostowski bff209b07c qa: disable single test in PROPERTY test suite due to boost incompatibility 2020-07-05 22:44:38 +02:00
Maciej Suminski f084a86601 Properties replacement method
Adds a possibility to replace properties inherited from base types with
a more specific ones. For example, such properties may have:

- different meaning which should be reflected in property name
  (e.g. TRACK::{G,S}etWidth() sets actual track width, but
  VIA::{G,S}etWidth() modifies the diameter)

- different set of possible values (e.g. BOARD_CONNECTED_ITEM::SetLayer()
  should accept any copper layer, but MODULE::SetLayer() works only with
  F.Cu and B.Cu)
2020-07-05 22:44:38 +02:00
Maciej Suminski cbd5004fd4 Properties (introspection)
Introduces classes:
- INSPECTED: base class for types taking advantage of
  generic properties system.
- PROPERTY*: meta-data storing information about properties
- PROPERTY_MANAGER: singleton class to get properties data
2020-07-05 22:44:38 +02:00
Jon Evans 4dbbe1cf68 Project settings fixes from review
- Fix file extension for new project
- Fixes for exceptions on MSW
- Fix some ASAN issues
- Allow SETTINGS_MANAGER to run headless
- Don't flag schematic as modified after schematic setup is closed
- Don't automatically unload projects when LoadProject is called
- Don't unload project if it's the same as the current one
- Make sure to properly init/de-init template field names
2020-07-02 22:08:54 -04: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
Jon Evans a4fadfcdf2 Begin moving project file load to new system 2020-07-02 22:08:54 -04:00
Jon Evans a7708fa6dc Add PROJECT_FILE and basic load/unload methods 2020-07-02 22:08:54 -04:00
Jeff Young eb1ff80d57 SHAPE collision fixes.
1) An actual distance of 0 is still a collision, even if the allowed
distance is 0.
2) Be consitent about edges and interiors.  Everyone expect the edge
of a RECT to be part of the RECT; same with a CIRCLE.  SHAPE_POLY_SET
shouldn't be any different.  (And SHAPE_LINE_CHAIN was a split-
personality with the edge considered part of it for Collide() but not
for PointInside()).
2020-07-02 21:38:37 +01: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
Jon Evans e91b9f6dfb Rip out the unused leftovers of the old color system 2020-06-18 22:32:14 -04:00
Seth Hillbrand a8ab668122 Move SHAPE_ARC to start->mid->end format
The arc shapes need to connect with their adjacent points.  By storing
the relevant points, we allow exact point matching on both ends of the
arc as well as localize point storage.
2020-06-13 11:23:14 -07:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Wayne Stambaugh 52078a4b1b Allow setting mandatory derived symbol field properties.
CHANGED: All mandatory fields in derived symbols can be edited.  This
not only includes the field value but also all text properties.

Kill the dual datasheet variable storage which caused many datasheet
bugs over the years.  The datasheet is now always stored in the data
sheet field.
2020-06-02 14:21:11 +00:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Jon Evans e934f8b459 Remove python netlist QA facilities 2020-05-23 22:48:09 -04:00
Jon Evans f730aa7834 Update netlist testcases 2020-05-23 22:48:03 -04:00
Jon Evans f7578eb038 Implement new native netlist QA test 2020-05-23 21:04:11 -04:00