Seth Hillbrand
eed95e612d
Skip exterior segments when splitting
We need to avoid fracture points when choosing how to split exterior
segments
(cherry picked from commit 50274352b1 )
2 months ago
Seth Hillbrand
415aac7fc5
Fix Chessboard splitting
Due to a bug(?) in Clipper2, 45° collinear edges may not be detected.
See https://github.com/AngusJohnson/Clipper2/issues/1008 for current
status. In the meantime, we pre-process these to remove the extraneous
joints preventing our triangulation from getting mixed up
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18176
(cherry picked from commit 408e1feae2 )
2 months ago
jean-pierre charras
42c67b40b1
fix issues in ROUNDRECT: Fix incorrect ROUNDRECT Ctor.
- Do not throw an error in CTor: this is not the place. It is much easy to
fix the value of incorrect radius.
Moreover, the Ctor is called without catching a throw-ed error in code.
- fix the test about radius validity, broken.
From master branch.
2 months ago
jean-pierre charras
5baaa89131
Reapply "SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc."
This new algo is now tested since more than 2 months, so it should be good.
This reverts commit 88ad461514 .
3 months ago
Jeff Young
f66a5be0d6
Fix m_importProperties not getting nulled (KICAD-6BJ).
(cherry picked from commit caf6e23064 )
4 months ago
Jeff Young
ee36806c94
Retire WINDOW_FREEZER in favour of wxWindowUpdateLocker.
Also pulls out previous fix to a Sentry issue I can
no longer find, at least until I figure out what
went wrong.
4 months ago
Jeff Young
aefebbf1b0
Upgrade ShowPlayer re-entrancy guard (KICAD-XAC).
(cherry picked from commit 53c90b0469 )
4 months ago
jean-pierre charras
cf9f11a135
Fix mingw build (from master branch)
4 months ago
Mark Roszko
ce1f3b8819
Add support for SHAddToRecentDocs on windows with app model id
4 months ago
Jeff Young
5b5fa6ede6
Collect more debugging.
(cherry picked from commit f589ed906f )
4 months ago
Mark Roszko
954e75b014
Windows, msys2 build: fix cast not accepted by GCC
(cherry picked from commit d0288dbcbf )
Co-authored-by: jean-pierre charras <jp.charras@wanadoo.fr>
4 months ago
Mark Roszko
589bfeafe3
Fix shift+middle click on windows no longer working
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21267
4 months ago
Jeff Young
512131a062
Equality for doubles. (Potentially KICAD-SV8)
(cherry picked from commit c960f69a9b )
4 months ago
Jeff Young
0ecd5d86bc
Performance optimizations.
(cherry picked from commit 31c6c28882 )
5 months ago
Jeff Young
ad8209069d
Negative number safety.
(cherry picked from commit 265d273f93 )
5 months ago
jean-pierre charras
88ad461514
Revert "SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc."
This reverts commit 8279276fe4 .
This commit is probably good, but arc calculations are a mined field.
So revert until is is widely tested in master branch.
5 months ago
jean-pierre charras
8279276fe4
SHAPE_ARC::GetCentralAngle(): better algo to calculate actual arc.
The old algo worked fine only if the arc "middle point" was on the middle
of the arc. This algo just needs a "middle point" on the arc, not necessary
exactly near the middle of the arc.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21035
(cherry picked from commit 2124f2b846 )
5 months ago
Alex Shvartzkop
4d3ac103ad
Improve performance of SEG::Contains.
(cherry picked from commit a82916f4db )
8 months ago
Seth Hillbrand
b47bf99632
Safety valve for integer sqrt
If the value is negative, we have likely overflowed the available size
of the integer container. In which case, rather than slowly counting
down, we return the largest logical square root size to allow processing
to continue
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20947
6 months ago
Seth Hillbrand
d6607146c4
Fix silk board edge collision case
First, fix the error limit check in drc_test_provider_edge_clearance.
Then, we rotate the final point incorrectly in SHAPE_ARC::Collide (need
negative angle). We were not checking this result in the QA, so add the
proper tests
(cherry picked from commit 9bedb6eedb )
6 months ago
Jeff Young
241959bca3
Slice() must also support aMaxError.
In some cases arcs are re-inserted.
6 months ago
Jeff Young
427d4173b1
Allow math tests to run with their own precision.
(cherry picked from commit 32cd142c39 )
6 months ago
Jeff Young
f334a9a3bd
Use a high definition for display of arcs in SHAPE_LINE_CHAINs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20895
(cherry picked from commit 3474e962d5 )
6 months ago
Jeff Young
0ee2685ab6
Use consistent terminology and types.
(cherry picked from commit 6757ba8165 )
6 months ago
JamesJCode
1215b0c304
Add char_traits<T> specialisations for wxUniChar and NANODBC_SQLCHAR
when building on Apple with Clang >= 17.
These specialisations are not strictly required by the C++ standard,
and have been removed from LLVM.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20631
(cherry picked from commit a5be581b1b )
7 months ago
Jeff Young
bae846c2cd
Don't allow auto-conversion from double to EDA_ANGLE.
We have no idea if the double is in radians or
degrees.
7 months ago
Jeff Young
9c4a88a129
Performance optimisation.
Reduces board loading for #17820 from 15 seconds
to about 6.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17820
(cherry picked from commit 7151d21f0b )
7 months ago
Jeff Young
537a8cc652
Allow context menus in footprint chooser when called from Eeschema.
Also moves several RAII utility classes (some of which
were duplicated in open code) to a common header file.
(cherry picked from commit b74c2791f4 )
9 months ago
Seth Hillbrand
c4ad3456f4
Fix mistake in arc circle collision
Need to test nearest point from the circle center to the arc. Add QA to
prevent regression
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20336
(cherry picked from commit de09403b10 )
8 months ago
Seth Hillbrand
2da1294492
Fix IsEffectiveLine calculation
We sometimes represent circles as 360° arcs. These are approximately
colinear but are definitely not a line
(cherry picked from commit c24832f72b )
8 months ago
Mark Roszko
12d3f54da4
Fix compilation on mingw
(cherry picked from commit c2685ef76f )
a3c14a6e Build: fix: allow compilation on mingw
Co-authored-by: Kreijstal <rainb@tfwno.gf>
8 months ago
jean-pierre charras
dc1ecea4bc
OUTSET_ROUTINE::ProcessItem(): handle an exception thrown for incorrect prm.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19880
9 months ago
John Beard
43be371f83
Kimath: don't access aActual unless set
Avoids at least one test failure in qa_pcbnew
due to uninitialised access.
9 months ago
Seth Hillbrand
0281bfe05e
Fix missing display pads on MacOS
The distance from any point in the negative quadrant to
std::numeric_limits::max will be larger than std::numeric_limits::max,
meaning that if we take the square of this value, we will overflow the
extended_type. Overflows are undefined behavior when dealing with
signed integers (c.f. C99 §3.4.3/1) so while most compilers retain a
positive value, Apple, in release mode, overflows into the sign bit,
resulting in a negative number for the squared distance.
This prevented us from displaying certain shapes in the negative
quadrant on MacOS, only in release mode builds
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19424
10 months ago
jean-pierre charras
2a143a63e5
Build on MSYS2: use shobjidl.h, instead of shobjidl_core.h
shobjidl_core.h is not available on mingw
10 months ago
Marek Roszko
337ec6d862
Add a version_header depend, not ideal
10 months ago
Marek Roszko
a0b50622dd
Implement AppUserModelID for windows
10 months ago
Alex Shvartzkop
3a0df97dbf
Optimize SHAPE_LINE_CHAIN::Segment slightly.
10 months ago
Seth Hillbrand
5cd9e319d3
Handle more arc degeneracies
10 months ago
Seth Hillbrand
bfb3875a68
Add additional handling for arc collisions
Provides nearest point calculation for circles, segments and rects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18203
10 months ago
Seth Hillbrand
bcebc694b8
Implement MTV for arcs
10 months ago
Seth Hillbrand
b73481dd49
Update SHAPE_ARC::IntersectionPoints()
Force it to handle a number of edge cases from Arc-Arc collision test.
Unify and simplify the Collide Arc-Arc. Add additional arc collision
QA test
10 months ago
Jeff Young
77a524fa22
Fix slicing operator.
(Also a minor performance improvement.)
10 months ago
Seth Hillbrand
3e8791b88d
Fixup multiple issues with DP checks
Handle arcs properly even when not exactly concentric. Properly check
for interfering elements that would prevent coupling. Avoiding those
that are directly connected
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967
10 months ago
Seth Hillbrand
8ab5d95d1b
Handle GTK themes that don't use the revealer
10 months ago
Marek Roszko
06a61e773f
Fix bg/fg fed to GetInfoBarColours
10 months ago
Jon Evans
4279672876
Fix incorrect signature
10 months ago
Seth Hillbrand
e8167f33d7
Grab GTK default colors for infobar
This implements the wxWidgets fix for KiCad. We can't wait for distros
to update their wx libs so until then, we'll roll our own.
Nicely, this also implements the MacOS setting that was an ifdef
previously
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19506
10 months ago
Seth Hillbrand
452e69de85
Move thread pool into true singleton
Thread pool needs to be stored in a single location for all of KiCad
otherwise each kiface will spin up its own pool of persistent threads
10 months ago
Alex Shvartzkop
9a3d7594d9
Add pivot/pan/rotation/lights controls to PCB render dialog.
10 months ago