Commit Graph

17 Commits

Author SHA1 Message Date
jean-pierre charras 9e446ba17b Update Clipper2 to commit 7cf615c2799a9328ec32eb116f46b64ed34aecff.
(it fixes (or try to fix) an issue impacting Kicad)
2023-08-27 11:13:27 +02:00
Seth Hillbrand 57ae1b872e Fix build issue in Clipper2 for *nix 2023-08-22 12:15:05 -07:00
jean-pierre charras 235006a1b7 Update Clipper2 to commit 4ef91e99756f97cab23e7fa2cd78861deeb61338.
It fixes some of our issues.
However, Clipper issue 618 can create problems in zone filler, Clipper2
will be updated as soom as issue 618 is fixed.
2023-08-22 18:18:55 +02:00
Seth Hillbrand fe62a3f985 Update Clipper2 to 9d946d7
Fixed a number of smaller issues as well as overlapping segment
cleaning.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14682
2023-06-01 11:38:33 -07:00
Seth Hillbrand f7f52d77e4 Rework Copper Sliver check
Adds QA checks to copper sliver tests.  Adds the following checks:
- Dot product between two arms (quickly avoids checks for >90°)
- Checks the sliver is convex (area test)
- Eliminates minor slivers with angles that are approximately 0 and ones
  with the opposite side width beneath a configurable level
- Updates Clipper2 to fix a couple of jagged edges on inflate
- Adds simplify during zone fill inflation to limit jaggies

Fixes https://gitlab.com/kicad/code/kicad/issues/14549
2023-04-25 10:32:46 -07:00
jean-pierre charras ac71227e75 Fix compil warnings. 2023-03-23 18:36:59 +01:00
Seth Hillbrand 97558b62ec Update to Clipper 1.2+
Updates to Clipper2 742614f, which includes bug fixes for specific KiCad
boards beyond Clipper2 itself

Fixes https://gitlab.com/kicad/code/kicad/issues/14294
2023-03-22 15:24:26 -07:00
Seth Hillbrand 5a56b18b0e Revert "Update Clipper2 to version 1.1.1"
This reverts commit c594a0eba2.
2023-02-17 09:24:19 -08:00
Seth Hillbrand c594a0eba2 Update Clipper2 to version 1.1.1 2023-02-17 17:14:37 +01:00
Steven A. Falco 0c2e550143 Fix GCC 13 build error.
See https://kicad.zulipchat.com/#narrow/stream/258851-Developer-Chat/topic/GCC.20Breakage
for more info.
2023-01-18 23:14:33 +00:00
Seth Hillbrand f8d2bdbdf9 Fix Clipper2 memory leak 2022-12-18 11:45:52 -08:00
Seth Hillbrand fd592abddd Refactor inline RectClip routines 2022-10-28 21:34:25 -07:00
Seth Hillbrand f91ac8a03f Undefine None for X11 after Clipper2 update 2022-10-28 21:30:59 -07:00
Seth Hillbrand c6417fd101 Update Clipper2 to 1.0.6 2022-10-28 17:01:36 -07:00
Seth Hillbrand 283dba00c3 Fix the "None" define with a hammer
The X.h definition of None creeps in older Linux distributions in
multiple places.  Better to just force undefine it because we never need
it
2022-10-20 08:24:09 -07:00
jean-pierre charras 0a2fa51d91 Clipper2: fix an incorrect compil otion on mingw 2022-10-20 11:29:31 +02:00
Seth Hillbrand 27add591ec Add Clipper2
Currently this lives behind the advanced config flag `UseClipper2`.
Enabling this flag will route all Clipper-based calls through the
Clipper2 library instead of the older Clipper.  The changes should be
mostly transparent.

Of note, Clipper2 does not utilize the `STRICTLY_SIMPLE` flag because
clipper1 did not actually guarantee a strictly simple polygon.
Currently we ignore this flag but we may decide to run strictly-simple
operations through a second NULL union to simplify the results as much
as possible.

Additionally, the inflation options are slightly different.  We cannot
choose the fallback miter.  The fallback miter is always square.  This
only affects the CHAMFER_ACUTE_CORNERS option in inflate, which does not
appear to be used.

Lastly, we currently utilize the 64-bit integer coordinates for
calculations.  This appears to still be faster than 32-bit calculations
in Clipper1 on a modern x86 system.  This may not be the case for older
systems, particularly 32-bit systems.
2022-10-19 16:25:45 -07:00