Commit Graph

728 Commits

Author SHA1 Message Date
Ian McInerney d44b04978a Allow enabling WXTRACE in release builds on all platforms
Setting the environment variable KICAD_ENABLE_WXTRACE now enables wx
trace logging on all platforms. MSW still requires its original
environment variables to be set to get the console displayed.
2024-02-02 14:21:33 +00:00
Alex Shvartzkop 1122d80388 Better support for arcs in tuning patterns. 2024-01-31 23:38:05 +03: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 e950475bc3 Add assert to SHAPE_LINE_CHAIN::Segment + Deduplicate code
CSegment should have the exact same logic as Segment

Also, moving definition to .cpp file to reduce need to rebuild every time
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
Seth Hillbrand 3cf8b718f3 Don't truncate if not needed 2024-01-26 09:11:11 -08:00
Marek Roszko 8f57a9bcf0 Fix spacemouse version check by pawning it off on wxWidgets
Version is a value not a key name. Also the registry returns things in wchars soooo lets just pawn off the encoding mess on wxWidgets

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16730
2024-01-24 19:04:50 -05:00
Jeff Young 8410a5e685 Coding conventions and cleanup. 2024-01-23 16:03:25 +00:00
Seth Hillbrand f1dacf7d92 Updated revision of polygon triangulation from 0a67dd3fdd
This maintains the primary goal of ensuring that bad splits do not allow
the triangulation process to continue.  Instead, we boot this back up to
the top-level where we will simplify the polygon before triangulating
again.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16624
2024-01-18 11:07:40 -08:00
Seth Hillbrand e4a0b9c7ed Revert "Revise triangulation"
This reverts commit 0a67dd3fdd.
2024-01-18 11:07:40 -08:00
Alex Shvartzkop d512e09eb8 std::isnan is not constexpr in C++17 2024-01-16 18:42:37 +03:00
Alex Shvartzkop 4c630e5aec KiROUND: make sure input type is floating point before checking for nan. 2024-01-16 17:25:46 +03:00
Alex Shvartzkop f99505e190 Fix arc editing bugs when endpoints match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16532
2024-01-16 16:17:45 +03:00
Jeff Young 33c97da0fa Performance enhancement. 2023-12-27 13:52:02 +00:00
Ian McInerney 5c334c147b Make some types auto-reference to prevent copies 2023-12-19 14:23:36 +00:00
Marek Roszko 5341af1a55 Add wxUniChar overload for nlohmann's internal char_traits 2023-12-18 22:10:39 -05:00
Wayne Stambaugh a4b38fbb80 Coverity warning fixes. 2023-12-18 16:09:13 -05:00
Jeff Young cfa55d958a performance efficiencies 2023-12-18 18:45:02 +00:00
Jeff Young 8251fca66a performance efficiencies 2023-12-18 17:39:29 +00:00
Jeff Young 11805d6696 performance efficiencies 2023-12-18 17:01:55 +00:00
Seth Hillbrand 0a67dd3fdd Revise triangulation
- Avoid double-splitting a single point
- Check for mid-line intersections
- Avoid splitting zero-area polygons
- Keep full z-list for intersection checks

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16241
2023-12-13 13:37:17 -08:00
Alex Shvartzkop bfcd087751 Add KiROUND for VECTOR2 types. 2023-12-02 17:08:56 +03:00
Alex Shvartzkop 2d9eee93e2 Fixes for length tuning patterns.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16198
2023-12-01 08:44:10 +03:00
Seth Hillbrand daf178b64f Upgrade Clipper2 to 1.3.0
Fixes a number of minor inflation issues including slivers when
overlapping points are inflated

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16182
2023-11-28 16:02:39 -08:00
jean-pierre charras 7fd9226bec Fix issue in CalcArcCenter( VECTOR2D& aStart, VECTOR2D& aMid, VECTOR2D& aEnd )
It happens when the segment (aStart, aMid) is horizontal
Probably also when the segment (aEnd, aMid) is horizontal
Slopes with value 0.0 are set to double:: epsilon(), but it was a too small values
generating broken calculations.
Now set to 1e-10 (it seems working).
Fixes #16089
https://gitlab.com/kicad/code/kicad/-/issues/16089
2023-11-18 20:08:26 +01:00
Alex Shvartzkop 648b4a7689 TransformOvalToPolygon: make segments align at 45 deg angles. 2023-11-06 14:50:40 +03:00
Jeff Young 24ca7add42 Don't clamp arc centers quite so aggressively.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16029
2023-11-06 00:45:19 +00:00
Wayne Stambaugh bfd3e71a88 Don't show integer overflow errors in release builds.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15529
2023-10-28 15:06:32 -04:00
Wayne Stambaugh 84f58f36d4 Coding policy fixes. 2023-10-28 14:45:44 -04:00
Wayne Stambaugh b8310efd19 Coding policy, Doxygen comment, and spelling fixes. 2023-10-20 14:32:54 -04:00
Jon Evans dda14e68a2 Add macOS required libraries in kiplatform
Supersedes 36b0aa60
2023-10-20 11:26:22 -04:00
Alex Shvartzkop 28c72f0cf4 Fix secrets.cpp on Windows. 2023-10-20 18:20:14 +03:00
Seth Hillbrand 5c5a38af21 Update fixes for MacOS 2023-10-20 16:21:31 +02:00
Seth Hillbrand 7720ef3fae Add missing include in kicad_algo.h 2023-10-20 16:11:46 +02:00
Seth Hillbrand 91f28f84d7 Update MacOS security routines 2023-10-20 16:10:49 +02:00
Seth Hillbrand d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Alex Shvartzkop be1008cbd8 ADDED: Heal Shapes; Fix discontinuities in gfx import and Cleanup dialog. 2023-10-17 10:29:43 +03:00
Jeff Young 2b28580f0c Comments. 2023-10-15 17:59:11 +01:00
Mark Roszko 8b7af2b545 Fix broken 3dconnexion driver check
It essentially inverted it because version > min_win_version would return true, but then it would be checked against <= 0 which is false
2023-10-13 17:06:44 +00:00
Jeff Young 62d959ed0e Don't assume an error location for PAD::GetEffectivePolygon().
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.

Also reverts part of the change to always use polygons for PNS::SOLIDs.  A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14898
2023-10-13 13:59:26 +01:00
Alex Shvartzkop 8b21a260c9 Refactor MEANDER_PLACER_BASE::cutTunedLine to SHAPE_LINE_CHAIN::Split. 2023-10-08 02:41:17 +00:00
Alex Shvartzkop f9efed692d Pick location closest to aSeg.A in SHAPE_COMPOUND and SHAPE_RECT Collide. 2023-10-06 16:05:05 +03:00
Alex Shvartzkop 92ef40327d Add accuracy parameter to SHAPE_POLY_SET::PointOnEdge. 2023-10-06 15:56:46 +03:00