Commit Graph

889 Commits

Author SHA1 Message Date
luz paz 79fa911e0e Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Tomasz Wlostowski e4a36135c6 qa: added missing PCB_SELECTION_TOOL mock code 2022-07-21 13:06:36 +02:00
Marek Roszko 2ed95073a6 Use kiplatform::app::init to suppress gerbview qa noise on msvc 2022-07-18 21:35:05 -04:00
Marek Roszko 1278b2916c Add missing util mocks breaking compile 2022-07-17 11:37:51 -04:00
Jeff Young b727bfc16d Performance: avoid sqrt at all costs. 2022-07-16 18:42:32 +01:00
Alex ded4840130 Add test for rescale<int64_t> 2022-07-16 17:37:50 +00:00
Mike Williams 199d595ccd QA: Fix missing PCB_BITMAP case 2022-07-14 09:03:43 -04:00
Jeff Young d24e6c3408 Auto-annotate (and then don't re-annotate) power symbols.
Fixes https://gitlab.com/kicad/code/kicad/issues/11942
2022-07-11 21:46:01 -06:00
Jeff Young 57acce9e55 Share more code between selection tools. 2022-07-11 19:04:08 -06:00
Seth Hillbrand 3081023b5e ADDED: Minimum copper connection width DRC check
Checks all copper connections in each net/layer for minimum width
setting.

Fixes https://gitlab.com/kicad/code/kicad/issues/9870
2022-07-11 19:26:56 +00:00
Seth Hillbrand 261a557ea2 Update Altium SCH QA with rounding factors 2022-07-07 12:01:38 -07:00
Jeff Young 7633540492 Fix build issue. 2022-06-29 07:34:46 -06:00
Jeff Young ce4cedb5b4 Regression test case for 11814. 2022-06-15 11:45:29 +01:00
Seth Hillbrand 20f4e62176 Rename signalIntegrity to ibis
We do not use camelCase in KiCad
2022-06-10 13:35:48 -07:00
Fabien Corona 0d35d69f70 ADDED: Read IBIS files 2022-06-09 18:30:51 +00:00
Roberto Fernandez Bautista 80c8cfbbda Add PEGTL playground tool 2022-06-09 17:35:00 +01:00
Jon Evans af8deff063 Handle zero-length lines in log viewer 2022-06-07 19:49:38 -04:00
Tomasz Wlostowski 563b67f9a0 qa: some new stuff for the P&S debugger:
- search/filter in messages
- detection of non-45 degree lines
- indication of routing stage status (OK/FAIL)
- loading of project files (for custom DRC rules)
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski e6ebc2b9b9 geometry: use dedicated 64-bit integer square root for distance computations
Guarantees 1 LSB error, while the C++ double type has 55 mantissa bits (meaning for sqrt(X) >~ 2^22.5) the error is not guaranteed.
2022-06-03 23:28:41 +02:00
Tomasz Wlostowski 5fd84dbacc qa/pns: draw single segments too in the log viewer frame 2022-06-03 23:28:41 +02:00
Jeff Young 09c9bc3037 Fix net ordering in gold file. 2022-05-27 21:28:17 +01:00
Jeff Young e9e1878d96 Attempt to fix eeschema tests.
(Slashes in netnames must be escaped or else we think they're path
separators.)
2022-05-27 17:53:11 +01:00
Roberto Fernandez Bautista 55f22c526a Fix annotation of incomplete multi-unit symbols and re-annotation of duplicates
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11496
2022-05-26 09:23:36 +00:00
Jeff Young 4cd48cd5c9 Fix some test issues. 2022-04-23 22:15:39 +01:00
Seth Hillbrand aac6f576c2 Fix broken comparison in pin_numbers
Pin names like "+V" were incorrectly parsed as doubles leading to broken
comparisons.  These caused heap overflows when sorting pin tables

This corrects the comparison so that numeric sorts are only performed
when there is an actual number in the symbol segment.  Also adds unit
tests for common error cases
2022-04-19 14:46:05 -07:00
Roberto Fernandez Bautista 1db8229068 qa_eeschema refactor: Create generic SCHEMATIC_TEST_FIXTURE 2022-04-11 21:50:40 +01:00
Roberto Fernandez Bautista 4defc946ef Fix rounding errors in SHAPE_ARC::Collide + fix qa tests
Use CIRCLE::NearestPoint to ensure consistency
2022-04-11 13:46:36 +01:00
Jeff Young 2663ad5340 Implement Eagle text variables.
Also fixes two bugs:
1) subsequent text items that are marked >NAME or >VALUE will now get
imported as text items with ${REFERENCE} or ${VALUE} (instead of overwriting
the previous text item)

2) we no longer (accidentally) capitalize all text items.

Fixes https://gitlab.com/kicad/code/kicad/issues/11321
2022-04-10 17:29:47 +01:00
Jeff Young a23399a1af Formatting. 2022-04-10 17:29:47 +01:00
jean-pierre charras 5e52539939 eagle importer: fix incorrect conversion UTF8/wxString.
When importing a eagle board file using wxXmlDocument, the strings in eagle BOARD
(UTF8 encoded) are correctly converted to wxString (using unicode wide chars)
So trying to reconvert these strings using FROM_UTF8( <wxString>.c_str() )
is incorrect and can break initial string if non ASCII7 chars are found
2022-04-09 15:33:01 +02:00
Jeff Young 5bf163de80 Update kimath test for recent bugfix. 2022-04-08 19:13:02 +01:00
Thomas Pointhuber bd18e340f4 eagle: introduce *.lbr footprint import test
Bugs found but not fixed yet:
* Reference and Value are not converted correctly yet
  * HOTFIX: test commented out
* GP3906-TLP and UBLOX_ZOE_M8-0-10 are not able to import the description again
  * HOTFIX: description removed from gold file
2022-04-02 20:07:16 +02:00
Thomas Pointhuber 056748e0df altium: Add testcase to verify that "PCB Binary Version 5.0" is also supported 2022-04-02 18:17:19 +02:00
Thomas Pointhuber 406c528ab7 altium: Create region for items on the KEEP_OUT_LAYER and use new Track unit-tests 2022-04-02 18:17:19 +02:00
Jeff Young f7cdc7af75 Apply a more sophisticated test for ignoring isInCoupledDiffPair.
The basic problem is that the DRC engine does length testing and skew
testing by collecting all the diff pair constituent parts and pairing them
itself.  Since each part is collected on its own, we need to ignore the
'B' unit when evaluating any conditional expressions.  However, doing this
in general means that when evaluating "OwnClearance()" we also ignore the
'B' unit and return the diff pair CLEARANCE_CONSTRAINT when we shouldn't.

This implements a more discerning test which know what the current requested
constraint is when evaluating expressions.

See also https://forum.kicad.info/t/solved-custom-differencing-rule-not-working-drc/34034/6

Fixes https://gitlab.com/kicad/code/kicad/issues/11314
2022-04-02 15:12:42 +01:00
Sylwester Kocjan f5dedd77c6 eeschema,sim: add SIMULATOR and SIM_MODEL interface
SIMULATOR has now an Attach() method, which should be called
with proper SIMULATION_MODEL that should be simulated, before calling Run()

Concrete class of SIMULATION_MODEL for ngspice is NGSPICE_CIRCUIT_MODEL,
renamed from NETLIST_EXPORTER_PSPICE_SIM. DIALOG_SIM_SETTINGS relies
on above mentioned object, so it was added as an argument of the constructor.
2022-04-01 19:28:31 +00:00
jean-pierre charras eac1ab3d1f QA: fix paths in CMakeLists.txt after QA paths changes 2022-03-30 18:18:29 +02:00
Sylwester Kocjan 3da47e6123 qa: move pcbnew data to appropriate directory 2022-03-30 11:13:23 +00:00
Sylwester Kocjan cfb8fbc644 qa: move eeschema data to appropriate directory 2022-03-30 11:13:23 +00:00
Sylwester Kocjan 0d64fc8c09 qa: move unittests to the separate directory 2022-03-30 11:13:23 +00:00
Sylwester Kocjan df2d8a5680 qa: move tools to the separate directory 2022-03-30 11:13:23 +00:00
jean-pierre charras f3be3a5762 test: update test files to fix DRC issues after changing the text position algo. 2022-03-30 10:56:16 +02:00
jean-pierre charras 93066004f1 QA: fix altium qa tests now the altium to pcbnew coordiantes are rounded
to the near 10nm value.
2022-03-24 12:36:46 +01:00
jean-pierre charras 3e4fa8143a QA test: fix incorrect call to BOOST_TEST_MESSGE.
It expects a C string, not a wxString.
2022-03-21 13:49:20 +01:00
Sylwester Kocjan 6db0ad4876 qa: add missing const to mocked method 2022-03-21 11:51:39 +00:00
Jeff Young 476f1a7d4d Preload PCBnew find with selection when appropriate. 2022-03-19 19:37:01 +00:00
Sylwester Kocjan 14ded23e97 qa_common_tools: use common mocks 2022-03-18 17:51:09 +00:00
Sylwester Kocjan 2583acd1cc qa_eeschema: migrate to common mocks 2022-03-18 17:51:09 +00:00
Sylwester Kocjan aa7b65c70d qa_common: Cleanup mocks
Use mocks of KIFACE and PGM from Turtle framework
2022-03-18 17:51:09 +00:00
Sylwester Kocjan a65999b063 qa: Add Turtle 1.3.2 mocking framework 2022-03-18 17:51:09 +00:00
Jeff Young b10f774dc4 Update gold file for now. We may decide to back it out later. 2022-03-15 00:55:01 +00:00
Jeff Young d65019e280 Update tests. 2022-03-15 00:37:44 +00:00
Thomas Pointhuber 1831ae6fa4 altium: Fix test due to keepout restrictions parse changes 2022-03-12 09:59:57 +01:00
Wayne Stambaugh c7d577dfe6 Fix unit test mock build error. 2022-03-11 08:28:00 -05:00
jean-pierre charras 4ad89b9c04 Fix qa tests after fix made in commit 878c70c1 2022-03-09 17:18:54 +01:00
Thomas Pointhuber a9ebb42ecd altium: Parse keepout restrictions of tracks 2022-03-07 19:58:43 +01:00
jean-pierre charras b0470a1a9a fix a QA python test (test_arcs()). 2022-03-07 09:31:08 +01:00
Jeff Young cdd3fd416e Missed one from last commit. 2022-03-05 20:45:18 +00:00
Jeff Young 6bd448882d Update gold counts for new isolated-island test. 2022-03-05 20:39:35 +00:00
Jeff Young d9cdf46047 Fix printf format token. 2022-03-05 18:59:53 +00:00
Seth Hillbrand 2200c1319d Fix QA for arc/arc collisions
We no longer need the arbitary offset when we are calculating collisions
based on values that are not nm off from a "round" value.
2022-03-04 13:15:47 -08:00
Seth Hillbrand 9d927f3135 Check for additional connections between tracks
Prevents removal when a track is connected not just to other tracks but
also other connected items

Fixes https://gitlab.com/kicad/code/kicad/issues/10916
2022-03-03 12:07:20 -08:00
Tomasz Wlostowski 4d9c156b0a qa: forgot about the CONSOLE_LOG file (required by the refactored P&S debug tool) 2022-03-03 16:33:17 +01:00
Tomasz Wlostowski adace996f4 qa/pns: refactored the P&S debug tool:
- factored out 'business' code from the UI code
- moved to the new DEBUG_DECORATOR interface
- UI-less log file and log player classes as a step towards P&S unit tests
2022-03-03 01:02:00 +01:00
Jeff Young 843a56c4e4 Implement two-staged zone priority: assigned priority followed by UUID. 2022-03-01 14:53:35 +00:00
Jeff Young bc51c89c90 Reconcile zone-auto-fill with undo. 2022-02-25 13:05:49 +00:00
Jeff Young d465eb6425 ADDED: automatic zone refilling.
This is for the out-of-box experience for novice users.  It is presumed
that folks with larger more complicated boards will turn it off.

Fixes https://gitlab.com/kicad/code/kicad/issues/6413
2022-02-24 18:16:45 +00:00
Thomas Pointhuber 52a2d52bf0 altium: Parse solder and paste mask settings of tracks and arcs 2022-02-20 20:18:40 +01:00
Thomas Pointhuber 86c025eb30 altium: Fix parsing of zones which use the KEEP_OUT_LAYER 2022-02-19 14:37:05 +01:00
Seth Hillbrand a19d9105f0 Fix SolderBridge check to only check across multiple
We should not generate an error when overlapping a single copper element
with a soldermask that is not associated with copper.

Fixes https://gitlab.com/kicad/code/kicad/issues/10906
2022-02-18 11:47:28 -08:00
Jeff Young b1dc9dcebf Don't ask for layer of multi-layer objects. 2022-02-18 13:20:36 +00:00
Jeff Young c1874f009b Fix test case. 2022-02-15 22:18:21 +00:00
Thomas Pointhuber fc5772ad92 altium: Extend test-suite to support FP_ZONE validation 2022-02-15 21:42:03 +01:00
Thomas Pointhuber 8587f762b5 altium: Extend test-suite to support FP_TEXT validation 2022-02-15 21:42:03 +01:00
Jeff Young 2172810600 Performance: better sharing of zone fills. 2022-02-15 19:19:03 +00:00
Jeff Young 90f6edad61 Move connectivity algo to collision-based routines.
Fixes https://gitlab.com/kicad/code/kicad/issues/1800

Fixes https://gitlab.com/kicad/code/kicad/issues/1769
2022-02-13 00:35:11 +00:00
Thomas Pointhuber 81b4229e12 altium: Improve test-coverage of *.PcbLib import functionality
* Add test-code for pads
* Move test-code into board_test_utils.cpp for reuse, one method per object
* Add a real (rather small) Altium footprint for testing purposes
2022-02-12 16:50:25 +01:00
Jeff Young 00934fdd84 Move GUI queries in PLUGIN to a callback.
Also makes sure legacy zone fills get deleted and re-filled (since
just dropping the outline will change them).
2022-02-11 22:09:22 +00:00
Jeff Young 3deaf902bb Retire the V5 zone fill algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +00:00
Thomas Pointhuber 3f36e7d725 altium: Start with a test-suite to validate that *.PcbLib footprints are correctly imported
The test simply loads every footprint of a library, and compares all elements with an equivalent
KiCad footprint. This allows us to quickly spot regressions in the altium and kicad footprint importer,
and any code in-between. This test is only a demo, as the checks are still incomplete and quite a few
tests are missing.

It has to be noted that mask expansion is not supported rigt now by the altium importer, thus the
reference footprint is adjusted to keep the test happy.
2022-02-09 22:34:04 +01:00
Marek Roszko 28ce11212c Emplace_back a bit a in clipper 2022-02-05 21:00:34 -05:00
Jeff Young 3f8cada334 Fix some issues with new polygonization of arcs and arc collision test.
Test should not be testing against the polygonization error; if done
correctly that should all be on the correct side of the shape.  Use an
epsilon instead (I chose polygonization error / 10, but the value isn't
terribly important).

Fixes https://gitlab.com/kicad/code/kicad/issues/10724
2022-02-03 19:53:42 +00:00
jean-pierre charras a970acd0bc Fix some issues related to new textboxes and python:
- Fix duplicate class names returned by GetClass().
- replace MTEXT name (in GetClass) by better name (FP_TEXT, FP_TEXTBOX...)
- Add missing Cast_to_PCB_TEXTBOX and Cast_to_FP_TEXTBOX
2022-02-03 13:55:37 +01:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young c6a8100d46 Schematic and symbol text boxes.
Also fixes some plot bugs with arcs.

Also moves polygonization of arcs (when required) in plotting code
from 5 degrees to calculated based on ARC_HIGH_DEF.

Fixes https://gitlab.com/kicad/code/kicad/issues/5017
2022-01-28 21:38:15 +00:00
Jeff Young 3409783d9f Break sch_text.h/.cpp into sch_text and sch_label.
Also moves SCH_NETCLASS_FLAG to SCH_DIRECTIVE_LABEL, and remaps Altium
harnesses from SCH_TEXT to SCH_DIRECTIVE_LABEL.
2022-01-28 21:38:15 +00:00
markus-bonk 8663a399ac Move pcbnew_navlib compilation into pcbcommon.
Although pcb_base_frame.cpp is in the pcbnew source tree, it is compiled
and included in pcbcommon.lib. Because pcb_base_frame has a dependency
on pcbnew_navlib, the latter also needs to be included in pcbcommon to
avoid linkage issues.

The superfluous references to pcbnew_navlib in the qa projects have been
removed.
2022-01-28 12:21:42 +00:00
markus-bonk 87d7bdbd5e * PCB_EDIT_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Added full support for using a 3Dconnexion device in PCB_EDIT_FRAME. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

Use build option KICAD_USE_3DCONNEXION (default = ON) to control whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
Jeff Young c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
jean-pierre charras 1c8ba6dafc fix python QA tests to run with latest changes in eda_angle.h 2022-01-18 13:49:50 +01:00
dsa-t bc1ff6756f Cross-probing/selection for multiple items (SCH->PCB) 2022-01-16 20:29:03 +00:00
Jeff Young e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young 9b661aea10 EDA_ANGLE for plotters.
Also fixes a compile error in the PNS Playground.
2022-01-16 01:19:45 +00:00
Jeff Young 1539fa5af2 Move SHAPE_ARC to EDA_ANGLE. 2022-01-16 01:19:45 +00:00
Jeff Young 3f98769a77 More EDA_ANGLE.
Includes bug fix for catastrophic error in Add() for converting to
radians.

Includes bug fixes for the fact that the pcbnew test can't seem to
find the ANGLE_* objects (getting all 0's instead).
2022-01-15 01:30:04 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00
Jeff Young c9487bad18 Move BOARD_ITEM::Rotate() to EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young e048e51f5d Improve SNR of EDA_ANGLE stuff. 2022-01-14 16:08:18 +00:00
jean-pierre charras d6332bec24 Fix test_custom_rule_severities.cpp: disable tests not handled by these tests
DRCE_LIB_FOOTPRINT_ISSUES and DRCE_LIB_FOOTPRINT_MISMATCH imply a library
but the test cases do not have a library, and does not test these DRC.
2022-01-12 18:20:44 +01:00