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
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
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
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
Alex Shvartzkop
de0c1218c3
Add a method to offset line chains.
2023-10-06 15:50:37 +03:00
Alex Shvartzkop
8a22a8fa69
Add aExact to SHAPE_LINE_CHAIN::Split.
2023-10-06 15:50:37 +03:00
Alex Shvartzkop
d7863b09c5
Move CORNER_STRATEGY out of SHAPE_POLY_SET.
2023-10-06 15:42:50 +03:00
Alex Shvartzkop
2cd630b47d
Fix a bug causing lower segment count on holes when deflating polygons.
2023-10-06 15:36:42 +03:00
Seth Hillbrand
06428e0161
Remove unused
2023-09-27 18:05:21 -07:00
Marek Roszko
e83f87520c
Transform is right at home in kimath
2023-09-07 18:03:33 -04:00
jean-pierre charras
3e6f7ab3e5
Fix compil issues (especially easyeda_parser_base.xx) and compil warnings
...
Compil issues can be gcc13/msys2 specific.
2023-09-07 13:41:25 +02:00
Alex Shvartzkop
21ee65aa9c
ADDED: Importers for EasyEDA (JLCEDA) Standard / Professional.
2023-09-07 11:02:40 +03:00
Alex Shvartzkop
1b8abdfde7
ADDED: Basic STEP manipulation utils available to Python.
2023-09-07 10:57:02 +03:00
John Beard
78c8de9b08
Fix oval pad snapping
...
Previously the snap points computed for oval pads didn't get all the
points correct. This breaks out the "find snap points for ovals"
into a function, reworks the logic, adds some tests.
Also adds "extremum points" when the oval isn't exactly H/V.
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15594
2023-09-06 21:33:45 +01:00
Josue
94e86a69be
Update RECT to RECTANGLE
2023-08-29 11:50:22 -05:00
Josue
e5316fd1aa
Change name: Truncate -> Round
2023-08-29 11:50:12 -05:00
Josue
8d7255aae3
truncate angle values in Segment properties
2023-08-29 11:50:09 -05:00
Jon Evans
0714d3f1ab
Fix SHAPE::Distance warnings
2023-08-22 08:30:47 -04:00
Jon Evans
0c529411d7
Update SHAPE_POLY_SET API to not hide virtual functions
2023-08-18 21:40:40 -04:00
Marek Roszko
3f182a36c9
Silence uint32 to uint8 cast warning
2023-08-17 22:27:15 -04:00
Jon Evans
bf0592ad53
Lift some point-vs-shape APIs into SHAPE base class
...
Also provide a virtual method for conversion to polygon
2023-08-17 08:02:14 -04:00
Alex Shvartzkop
040fd327ab
SHAPE_POLY_SET: add BooleanXor()
2023-08-10 00:29:47 +03:00
Alex Shvartzkop
6d624ac1ff
SHAPE_POLY_SET: allow constructing/adding/iterating with POLYGON
2023-08-10 00:29:33 +03:00
Jeff Young
0413270012
ADDED: Move Corner To... and Move Midpoint To...
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5012
2023-08-05 16:43:55 +01:00
Roberto Fernandez Bautista
e7019cc7d2
Fix msvc warnings in kimath (add explicit casts)
2023-07-16 15:41:04 +02:00
John Beard
046d978ba7
ADDED: Pcbnew chamfer and extend tools
...
Using the new ITEM_MODIFICATION_ROUTINE system, drop in two new
tools: chamfer and line extend. These are two geometric operations
that are relatively common when editing footprints in particular.
Chamfer delegates the geometric calculations to a dedicated unit
in kimath/geometry.
2023-07-12 19:21:37 +01:00