Commit Graph

638 Commits

Author SHA1 Message Date
Jon Evans 0c529411d7 Update SHAPE_POLY_SET API to not hide virtual functions 2023-08-18 21:40:40 -04:00
Marek Roszko 726f09f9ad Add a workaround to Nahimic crapware
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11850
2023-08-17 22:46:22 -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
Jon Evans d2ec4834d9 Fix macOS impl of Valid3DConnexionDriverVersion 2023-07-27 08:30:08 -04:00
Seth Hillbrand 8546d417df Prevent dereferencing end iterator 2023-07-25 10:49:35 -07:00
Roberto Fernandez Bautista dadcc70a3d Partially revert 6cb80422
We don't need to touch cmake for anything (avoid confusion for future Devs)
2023-07-24 21:40:06 +00:00
Roberto Fernandez Bautista 6cb804228b Fix windows build
core needs to be linked after wxWidgets + use wide string literals
2023-07-24 22:59:41 +02:00
Seth Hillbrand 9902250f5d Fix a couple of issues with NAVLIB version checker
Need to include core lib in kiplatform for the version functions.  Need
to link kiplatform into the navlib library in eeschema to load
2023-07-24 13:55:12 -07:00
Seth Hillbrand 32ad42a435 Add 3dconnexion driver version check
Re-enable 3dconnexion driver by default as we are able to gate the
driver versions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13362
2023-07-24 18:09:52 +00:00
Ian McInerney c26863cc1e Don't try to enable sequential mode on non-existant files on GTK
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15222
2023-07-18 21:03:28 +01:00
Marek Roszko c009328c07 Undo accidental commit from some time ago (woops) 2023-07-16 21:54:09 -04:00
Roberto Fernandez Bautista e7019cc7d2 Fix msvc warnings in kimath (add explicit casts) 2023-07-16 15:41:04 +02:00
Marek Roszko b0fa2561b6 Add support for enum based policies 2023-07-13 19:01:04 -04:00
Ian McInerney 5aff8b6a6e Switch to string_view in tool action construction
The TOOL_ACTION_ARGS construction method is supposed to be fairly light
weight, so instead of creating/destroying strings all the time, pass
string_views to the actual string data instead.

wx doesn't currently support string_view -> wxString implicitly
currently, so we have to do the conversion ourself.
2023-07-13 00:53:06 +01: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
Alex Shvartzkop f8f7b84f13 LTspice import: add LTspice 17.1 Windows library path. 2023-07-12 10:57:30 +05:00
Jeff Young a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Mark Roszko e53e571d2d const bool is just bool 2023-07-08 01:02:59 +00:00
Seth Hillbrand 954b265839 Check for zone-zone overlap
Instead of just checking for the zone outline, we adjust to check the
full fill area of the zones for intersection and overlaps
2023-07-07 11:52:25 -07:00
Kuba Sunderland-Ober b938064e29 Fix missing consts. 2023-07-05 10:20:18 +00:00
Kuba Sunderland-Ober 1edb9bb0ce Get rid of VECTOR2U. 2023-06-28 20:48:07 +00:00
Jeff Young 4f52c69724 Better path handling for importing LTspice files. 2023-06-26 20:51:16 +01:00
Jeff Young 40abb013ec Don't consider a group to be on a copper layer.
Its members can be on copper layers, but the group itself isn't on any
layer.

Also fixes a bug where we were trying to clone TRIANGULATED_POLYGON::TRI
shapes as indexable sub-shapes.  (The TRI only has indexes into its
parent, so cloning it will only result in segfaults down the line.)

Also fixes a bug where we weren't including copper items inside groups
when checking footprint net ties.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15021
2023-06-20 18:13:21 +01:00
Jeff Young 840e4b6f72 Push fix for #14890 down a level.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15005
2023-06-19 18:05:37 +01:00
Alex Shvartzkop 3c742c71a0 GTK: Add workarounds for broadway and allow wayland GDK backend.
For testing. X11 backend is still used unless GDK_BACKEND=wayland
is set explicitly.
2023-06-13 09:42:20 +03:00
Jeff Young 0f8c5a96b2 Support shape collisions between SHAPE_POLY_SET and other shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14890
2023-06-06 13:40:44 +01:00
jean-pierre charras 92018f0066 Fix minor compil warnings 2023-06-04 16:24:28 +02:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
jean-pierre charras 6b845b9054 Fix compil warnings and a wxWidgets alert. 2023-05-30 09:00:46 +02:00
Marek Roszko c31b5eb7d8 Fix errant typecast in VECTOR2<T>::Resize
This fails QA on Windows but not Linux
2023-05-29 19:34:40 -04:00
Jeff Young f5791f5dc6 Left some fixes out of previous commit. 2023-05-29 16:22:24 +01:00
Jeff Young 65e53b8ecd Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation.
1) Also reorders parameters to make sure the compiler helps out.

2) This also makes it harder to mess up the discrepency between
   BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.

3) Also fixes a couple of bugs where the corner strategy was passed
   in as a segCount.

4) Also fixes a couple of bugs where the error wasn't forced to the
   outside to match the ERROR_LOCATION.

5) Also fixes a couple of bugs where the seg count was specified
   without regard to an already passed-in max deviation
2023-05-29 15:29:03 +01:00
Jeff Young 4ed267394a Outline font performance improvements.
1) Don't fracture font glyphs when generating them; we're going
   to fracture during triangulation anyway.
2) Don't check for self-intersection when deciding to fracture.
   It costs nearly as much as the fracture does.
3) Cache drawing sheet text.
4) Use the current font when checking for cache validity.
5) Parallelize glyph triangulation.
6) Don't invalidate bounding box caches when offset by {0,0}
7) Use the glyph cache when generating text effective shape.
8) Short-circuit NormalizeJustification() if its center/center.
9) Don't triangulate for GuessSelectionCandidates()
10) Avoid sqrt whenever possible.
11) Pre-allocate bezier and SHAPE_LINE_CHAIN buffers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14303
2023-05-27 01:35:40 +01:00
Jeff Young 1282e00775 Fix (presumed) stale name in macOS KIPLATFORM::IO. 2023-05-25 11:26:09 +01:00
jean-pierre charras ff072feeb4 Fix an annoying compil warning on msys2 2023-05-25 11:09:58 +02:00
Seth Hillbrand 39ab2ea41f Fix typo in MSW io.cpp 2023-05-24 19:23:32 -07:00
Seth Hillbrand 48ecd742eb Maintain file permissions when renaming
Temporary and autosave files do not neccessarily have the correct
permissions set to replace existing project files.  This updates the
permissions to match the existing values where possible

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13574
2023-05-24 17:09:38 -07:00
Jeff Young 29674051b4 Readability (no functional changes). 2023-05-21 16:22:14 +01:00
jean-pierre charras 52bf337b55 vector2d.h: fix for the fix of the awrning fix. 2023-05-21 16:06:15 +02:00
Marek Roszko c2e019b773 Fix warning fix 2023-05-21 08:09:49 -04:00
Marek Roszko 4eeae65411 Fix another warning
Cast the args with static_cast so the compiler knows its intentional
2023-05-20 08:05:14 -04:00
Marek Roszko 7774b75172 Another set of C5266 warning fixes 2023-05-18 22:46:57 -04:00
Marek Roszko 573b66d243 Fix a bunch of C5266 warnings (pointless const on bool/int returns)
warning C5266: 'const' qualifier on return type has no effect
Microsoft doesn't even document C5266
2023-05-18 21:35:06 -04:00
Marek Roszko 3cd89eeffb Use a placeholder commit hash if we can't get a git hash
Makes CLI test happy on...build systems circa 1990s that don't just shallow copy the git repo
2023-05-17 21:24:26 -04:00
jean-pierre charras a2ec8bf0a4 Fix last changes in io.cpp for msys2.
- use the same code for msys2 and msvc
- add an option to use a fallback for msys2 if the common code does not compile
2023-05-11 12:51:53 +02:00
Marek Roszko dd8dc4e513 Add a sequential read flagged fopen helper
Trying to squeeze out some kind of gain by informing the OS we will read a file sequentially.
In particular our FILE_LINE_READER just uses fgetc until the end
2023-05-10 20:24:27 -04:00