Commit Graph

179 Commits

Author SHA1 Message Date
Alex Shvartzkop c796eeaf8b NanoSVG: change preserveAspectRatio default to "xMidYMid meet".
(cherry picked from commit c64b44913c)
2023-09-08 14:49:08 +03:00
Alex Shvartzkop bdbd7f0c9c NanoSVG: update image size to the actual size after scaling.
(cherry picked from commit 2c07866fff)
2023-09-08 14:49:08 +03:00
Alex Shvartzkop b0e09327db NanoSVG: basic support for stylesheets.
Based on https://github.com/memononen/nanosvg/pull/175

(cherry picked from commit 2cd7c0636f)
2023-09-08 14:49:08 +03:00
jean-pierre charras 5d6bb4b04f Update Clipper2 to commit 7cf615c2799a9328ec32eb116f46b64ed34aecff.
(it fixes (or try to fix) an issue impacting Kicad)
2023-08-28 08:02:28 +02:00
jean-pierre charras 049ecc43e3 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 soon as issue 618 is fixed.
Include also a fix for *nix
From Master branch
2023-08-25 07:35:06 +02:00
Alex Shvartzkop 582c9b7f08 CompoundFileReader: fix UTF16~wstring conversion on 16b wchar compilers
(cherry picked from commit c39dfb9f05)

CompoundFileReader: fix build error

(cherry picked from commit d40e34aebe)

UTF16ToWstring: stop at NUL input terminator.

(cherry picked from commit b784b44ed0)
2023-08-04 16:50:09 +03:00
Simon Richter ebc584b2a7 Fix keyword order in include setup (Closes: #15081)
The SYSTEM keyword can only be used before a visibility keyword, so
"PUBLIC SYSTEM" declares an include directory named "SYSTEM".
2023-07-05 12:16:24 +00:00
Seth Hillbrand e97c2a6864 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

(cherry picked from commit fe62a3f985)
2023-06-07 08:22:47 -07:00
Ian McInerney 17c27d1176 Fix GitLab URLs to point to the correct project page
GitLab 16.0 removes support for URLs that don't contain /-/ after the
repository name, so the report bug feature and various links we had in
the source (including the git-fixes script) would lead to a 404 error.

See GitLab docs for deprecation/removal notice:
https://docs.gitlab.com/ee/update/deprecations.html?removal_milestone=16.0#legacy-urls-replaced-or-removed

(Cherry-picked from 20ec8ed303)

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/14759
2023-05-17 13:42:48 +01:00
Seth Hillbrand 1a2c9011e6 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

(cherry picked from commit f7f52d77e4)
2023-05-03 10:22:49 -07:00
Ian McInerney 464467ae8b Fix nanodbc build with clang and gcc stdlib
This should really be fixed upstream somehow, but the upstream build
with clang is broken on Fedora 38 right now anyway due to header issues.

(Cherry-picked from 45b8dced92)
2023-04-12 16:10:20 +01:00
jean-pierre charras d30701ed59 Fix compil warnings.
(cherry picked from commit ac71227e75)
2023-04-03 10:14:14 -07:00
Seth Hillbrand e39550e77f 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

(cherry picked from commit 97558b62ec)

Fixes https://gitlab.com/kicad/code/kicad/issues/14475
2023-04-03 10:06:34 -07:00
Seth Hillbrand 4b3709b96b Revert "Update to Clipper2 1.2+"
This reverts commit 560717de76.
2023-03-24 12:30:11 -07:00
Seth Hillbrand 1fa993303d Revert "Undefine None for X11 after Clipper2 update"
This reverts commit 4f265a52a2.
2023-03-24 12:30:11 -07:00
Seth Hillbrand 01897e7755 Revert "Fix GCC 13 build error."
This reverts commit 00d1e01e12.
2023-03-24 12:30:10 -07:00
Seth Hillbrand 7040b2178d Revert "Update for Clipper 1.2"
This reverts commit e758391a23.
2023-03-24 12:30:09 -07:00
Seth Hillbrand e758391a23 Update for Clipper 1.2 2023-03-24 09:42:01 -07:00
Steven A. Falco 00d1e01e12 Fix GCC 13 build error.
See https://kicad.zulipchat.com/#narrow/stream/258851-Developer-Chat/topic/GCC.20Breakage
for more info.
2023-03-24 09:42:01 -07:00
Seth Hillbrand 4f265a52a2 Undefine None for X11 after Clipper2 update 2023-03-24 09:42:01 -07:00
Seth Hillbrand 560717de76 Update to Clipper2 1.2+
Updates to 303232e, which includes bug fixes for specific KiCad boards
beyond Clipper2 1.2 itself

Fixes https://gitlab.com/kicad/code/kicad/issues/14294
2023-03-24 09:42:01 -07:00
Marek Roszko 89d22e5f94 update sentry-native to 0.6.0
primarily interested in windows bug fix to stack unwinding


(cherry picked from commit 041b7b196d)
2023-02-16 02:10:05 +00:00
Alex 89429996da Fix a crash in rectpack2D when unable to pack footprints. 2023-02-10 22:45:07 +03:00
Kliment 327956ae27 nanosvg: Fix nanosvg default stroke width to assume 0 instead of 1px
Nanosvg assumes that an unspecified stroke width is 1px, whereas the SVG
specification specifies it should be read as 0px. This causes problems
when scaling factors are applied to 0px lines, leading to them being
misinterpeted by our import.

This commit fixes the nanosvg assumption by setting the initial stroke
width to 0 instead of 1px.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/13353
2023-01-31 20:34:25 +00:00
Marek Roszko 0f13ab8065 Update sentry-native sdk to latest
There's a crash fix in sentry itself due to threading race
2023-01-27 23:54:20 -05:00
Chris Morgan 0c3e245ff3 nanodbc - CMakeLists.txt - Provide a helpful message to the developer to indicate the two odbc options to install if neither is found 2023-01-21 22:24:52 +00:00
Jon Evans 55bf6b6773 Suppress unnecessary navlib stderr output on macOS
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13562
2023-01-20 12:32:09 -05: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
Marek Roszko 3c325f2e61 Add missing include to spacemouse CCommandTreeNode.hpp
Required by MSVC in conformance mode
2023-01-15 20:24:29 -05:00
Seth Hillbrand f8d2bdbdf9 Fix Clipper2 memory leak 2022-12-18 11:45:52 -08:00
Marek Roszko 24ca892afb Update tinysplice to latest
A few years worth of bug fixes
2022-12-06 22:28:23 -05:00
Seth Hillbrand 1b18e1eb6a Avoid double-move
This was flagged by coverity but doesn't seem to be an actual issue in
g++/clang.  It technically leaves the moved rvalue in a "valid but
undefined state", so it is best to avoid.  The single copy into an
lvalue is (I think) cheap
2022-12-04 10:26:48 -08:00
Seth Hillbrand f9a36b9c91 Update thread_pool to 3.3
Fixes an issue with `wait_for_tasks()` and adds a lower-overhead
`push_loop` helper.  We replace our usage of `parallelize_loop` with
`push_loop` as we didn't use the multi-future vector return and don't
need the extra overhead.
2022-12-02 12:01:34 -08:00
Seth Hillbrand 203f5538aa Correctly place static library spec 2022-11-22 05:45:26 -08:00
Seth Hillbrand e2fd67d434 Remove extra CPack 2022-11-21 07:01:39 -08:00
Marek Roszko 6cf6888489 Update argparse 2022-11-13 11:50:27 -05:00
jean-pierre charras 85e44c2dae pcbnew, SVG import: fix an issue for SVG files using a CR+LF end of file
The issue was in a validity test working only if CR+LF is not replaced by LF
Fixes #10096
https://gitlab.com/kicad/code/kicad/issues/10096
2022-11-09 09:33:51 +01:00
Jon Evans dd94b2d3a7 Rename PROPERTIES to STRING_UTF8_MAP for clarity
This class has nothing to do with the properties system
2022-11-06 11:51:52 -05:00
Jon Evans 995a153f27 Update nlohmann::json to 3.11.2
Also update json_schema_validator to match new deprecations
2022-11-05 10:53:57 -04: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
Marek Roszko d6f8ca9a2e Patch out the install for argparse 2022-10-12 23:17:05 -04:00
Mark Roszko fb8a4c10f7 Shove kicad2step into pcbnew itself with a new cli 2022-10-04 01:53:37 +00:00
Alex ec6cb49570 Fix warnings in rectpack2D. 2022-09-28 13:37:23 +00:00
Alex 120da60824 Add rectpack2D library. 2022-09-28 13:37:23 +00:00
Ian McInerney 31498673b7 nanodbc: Add readme describing thirdparty module 2022-09-24 01:37:57 +01:00