Commit Graph

150 Commits

Author SHA1 Message Date
Seth Hillbrand 55c864ec45 Fix incremental connectivity
The connectivity routine would consider symbols, overwriting unused
subgraphs for pins that were not in the change list.  This is resolved
by updating the full connectivity to only use pins in the graph since
symbols are not connected independently.

In the process of adding QA tests for this change, additional issues
with the schematic QA were discovered.  Specifically, we were not
properly setting the root sheet UUID.  This was partially masked by a
const_cast setting of the RefDes in sch_symbol when called the RefDes
getter.  This exposed the fact that our QA ERC numbers did not match the
schematic editor stand alone ERC numbers.  So the test value for one
check needed to be updated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17528

(cherry picked from commit a9f35ba42e)
2024-04-14 14:14:38 -07:00
Seth Hillbrand 0dc894356b Check singular arcs connection
Even if there are no other segments in the line chain, we still should
check for arc connections in cases of individual arcs on a line chain

(cherry picked from commit 6b915049d1)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 9be4bf0d14 Fix slow selection time when calculating clearance
The clearance between two zones could be rather slow.  This was in part
to trying to do triangle-triangle collisions between zones when we only
need outline collision and in part to the shape_line_chain collision
routine.  The shape_line_chain collisions don't need to recreate
segments on each iteration and should instead create them once and using
this to check all collisions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17327

(cherry picked from commit 3cc1617f5a)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 1e13a7640e Tidy up some remaining triangulation cases
Found and fixed a few corner cases where triangulation point removal
could reset expected points

(cherry picked from commit 553e4a25bf)
2024-04-01 17:55:29 -07:00
Seth Hillbrand 890376d04f Do not use cache when we modify vertices
When we add vertices to the tesselation routines, we cannot reuse these
without the original vertex points.

It may be possible to copy and modify the vertices from the hint data so
that they are properly positioned but naive attempts (moving based on
first point) did not work, so for now, we disable the hint cache when
the vertex sizes do not match as this prevents OOB access

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17621

(cherry picked from commit 06b199fd41)
2024-03-31 15:01:16 -07:00
Seth Hillbrand 92ffd898f5 Update triangulation to handle poly-intersection
Polygon intersections happen against the original outline, not against
the currently remaining polygon.  This avoids pathalogical cases

Adds new simplification system to avoid duplicated points
Adds new edge-splitting algorithm to provide additional fall-back
Verifies that polygon cuts do not swap holes for outlines (negative
area)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17559

(cherry picked from commit c3f6a84d66)
2024-03-28 13:55:06 -07:00
Alex Shvartzkop e196f71d58 Support Altium Schematic ASCII import
(cherry picked from commit defcb49ac8)
2024-03-15 01:17:49 +03:00
Roberto Fernandez Bautista 64382a85fa SHAPE_LINE_CHAIN: Fix indices rotation after clipper
Also fix IsArcStart and IsArcEnd functions to work with chains that only
have arcs.
2024-03-02 18:22:18 +01:00
Roberto Fernandez Bautista 8340779f5b SHAPE_LINE_CHAIN: Add test case of seg+large angle arc 2024-03-02 18:22:18 +01:00
Jon Evans 835a82f0b9 Attempt to disable flaky tests for now
Issue8003 causes failures on some Ubuntu systems.
Disabling until we understand why.
2024-02-16 20:11:46 -05:00
Jon Evans e427099cff Disable flaky ngspice tests
These need to be re-done in a way that is more
tolerant of the inherent instability/noise in
the simulated circuits (or more ideally, changed
to test a particular thing that can be more
well-defined rather than just simulating a circuit
and seeing if the numbers come out a certain way)
2024-02-08 18:46:30 -05:00
Jeff Young 1e6986d2f5 Don't report starved thermals when connected only to isolated islands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16866
2024-02-07 14:09:03 +00:00
Roberto Fernandez Bautista 7276486756 Finish fixing SHAPE_LINE_CHAIN::Slice 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 79aba50c23 Finish fixing SHAPE_LINE_CHAIN::NextShape and add tests 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista effed5dfdf Fix SHAPE_LINE_CHAIN::Remove and SHAPE_LINE_CHAIN::RemoveShape 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 673e23c2e6 Fix and simplify SHAPE_LINE_CHAIN::Append( SHAPE_ARC ) + QA tests 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 34942290a2 SHAPE_LINE_CHAIN: Fix SetClosed() logic
SetClosed should unwrap the chain when there are coincident points at the
start.
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 7593863245 SHAPE_LINE_CHAIN: Fix and simplify ShapeCount()
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15754
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista c72ba189cf Fix SHAPE_LINE_CHAIN::Slice following NextShape() changes 2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista e9fbb36538 SHAPE_LINE_CHAIN: Fix and simplify NextShape() + remove PrevShape()
NextShape() function was too complex (trying to go back and forwards).
We only used PrevShape() in one place, so removed that usage.

Added QA tests
2024-01-31 19:17:46 +03:00
Roberto Fernandez Bautista 079478f989 EDA_ANGLE: use constexpr for constant angles
Remove all statics in the class and instead use constexpr to
ensure correct ordering
2024-01-31 19:17:46 +03:00
Jeff Young ae735d3eb4 Renaming: replace convert with body-style.
No functional changes.
2024-01-26 16:21:03 +00:00
Marek Roszko 1981997ee2 Dump the ERC report as part of the erc failure 2024-01-21 16:10:43 -05:00
Jeff Young e04cd8743c Separate out Pad_Shape so auto-complete can work.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16566
2024-01-10 19:56:46 +00:00
Jeff Young 27c253780d Separate out Pad_Shape so auto-complete can work. 2024-01-10 19:22:05 +00:00
Jon Evans 104aa1abe4 Change prettifier QA to not depend on file format changes
Instead of writing out and reading back in using the plugin,
just test the formatter itself.

Also add support for testing full boards.
2024-01-01 13:38:16 -05:00
jean-pierre charras 58b7eda47a QA test( test_prettifier) update golden files and fix a warning message. 2024-01-01 10:57:32 +01:00
John Beard 751c88ef20 Use 'uuid' (not 'id') in the s-expr PCB groups/generator format
Add some regression tests to check loading of groups and generators
from various versions of the s-expr PCB format.
2023-12-31 23:09:26 +00:00
Jon Evans ea0673e7a0 Do not merge buses of distinct types
Previously, this code would merge a vector bus
with a group bus containing the vector as a member.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16439
2023-12-30 10:54:24 -05:00
Jon Evans 2ecf1ac23f Change regression test for #13162 to be less complex
We are really only testing that `Rload1` works,
and the original testcase is unstable on some platforms.
2023-12-29 13:18:46 -05:00
Ian McInerney f2702b223c Introduce base IO_MGR class and unify RELEASER objects
The IO_RELEASER is a thin-wrapper around a std::unique_ptr, but done
this way to allow easier addition of a custom deleter in the future if
something needs to call back into the IO_MGR.
2023-12-29 00:37:38 +00:00
Marek Roszko 9a890cdba9 Kick the wildcards and file exts into a static class, export it from kicommon 2023-12-27 21:10:01 -05:00
Ian McInerney e6632bb983 Rename PCB IO classes/files 2023-12-24 01:22:21 +00:00
Ian McInerney d8b47d18d3 Initial rename of file plugin infrastructure components to IO 2023-12-24 01:22:21 +00:00
Ian McInerney 5c334c147b Make some types auto-reference to prevent copies 2023-12-19 14:23:36 +00:00
Wayne Stambaugh a4b38fbb80 Coverity warning fixes. 2023-12-18 16:09:13 -05:00
Wayne Stambaugh eb3fd10af8 Fix obscured object selection issue in board and footprint editors.
This selection improvement feature is hidden behind the advanced
configuration key "PcbSelectionVisibilityRatio".  It is turned off (1.0)
by default.  Value values are from 0.0 to less that 1.0.  From testing,
using a value between 0.1 and 0.3 produces the best results.

This fix uses normal alpha blending described in the link below.  The
current design only uses the alpha of the object's color.  It could be
improved by doing a full color alpha blending but using the color alpha
alone seems to result in satisfactory results.

https://en.wikipedia.org/wiki/Alpha_compositing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16126
2023-12-17 16:43:56 -05:00
jean-pierre charras d8b1e3fcb3 test_prettifier: Better warning message for commit 8e647c24 2023-12-16 13:30:06 +01:00
jean-pierre charras 8e647c24b4 QA test, prettifier: Update golden files to the latest version.
Add also a warning when a golden file is too old and creates comparison error.
2023-12-16 10:49:23 +01:00
John Beard e41f5efb03 Use modern bool style for footprint locking (locked yes)
Add some simple tests for specific footprint load/save checks
(including round-trip stability)
2023-12-14 21:22:59 +00:00
John Beard 481fa1f959 Allow PCB reference image locking and UUID to be saved
Add some unit tests for reference image saving/loading.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/16334
2023-12-14 21:22:59 +00:00
jean-pierre charras b9a5e04ad0 Workaround to fix a QA not working test on platforms is Python older than 3.9
A Pcbnew Python test in QA cli (to test SVG outputs) fails in old Python
because it uses a function only existing in Python 3.9 and newer.
So skip this test for older Python version
2023-12-14 11:57:10 +01:00
Wayne Stambaugh 078ba510b4 Remove empty QA layer test file stub from build list. 2023-12-11 16:42:38 -05:00
Wayne Stambaugh 5fa274ead0 Add board layer view stack up sequence from front layer to back layer.
The old bottom to top layer stack up sequence from back to front layer was
only used for plotting so it was renamed appropriately.  This will be used
for future board object select disambiguation improvements.
2023-12-11 15:07:58 -05:00
Jeff Young 1adf96d879 Update gold failure count. 2023-12-11 16:45:13 +00:00
Jeff Young 931cec862e Non-plated slots are effectively edges.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16267
2023-12-09 21:06:40 +00:00
Jeff Young e0a34efcb7 Use a more self-documenting API for router preview item flags.
Also fixes a bug where rule areas were drawn with solid fills.
2023-12-08 16:02:15 +00:00
jean-pierre charras 096bcff160 Try to fix a QA not working test on W10/msys2.
Probably due to a not closed file when trying to delete it.
2023-12-07 20:01:22 +01:00
Seth Hillbrand 343828c552 Fix invalid string compare in IBIS parser
strcmp returns 0 if strings are the same but compareIbisWord returns
True (1).

Adds an IBIS simulation QA test case to catch this in the future

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16223

(cherry picked from commit ef8b6bf9e1)
2023-11-30 09:16:38 -08:00
Marek Roszko 56b7f91361 Format the std::filesystem path directly 2023-11-29 14:27:08 -05:00