40 Commits

Author SHA1 Message Date
jean-pierre charras
963aa47778 Pcbnew: fix teardrop generation for pads having different shapes by layer.
Teardrop generator used pad::HitTest not testing the hit of a specific layer.
It created false test for some complex pads. Now use a test specific to a layer.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21560
2025-08-27 11:03:00 +02:00
Seth Hillbrand
9c577a4f4c Allow mid-track teardrops
Tracks passing through but not stopping at pads/vias should still get
teardrops

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21246
2025-08-26 10:04:52 -07:00
Jeff Young
9750f7690c Performance optimizations. 2025-06-05 18:01:44 +01:00
Jeff Young
c2537f81b7 Use board maxError for teardrops. 2025-05-12 20:28:47 +01:00
Seth Hillbrand
633aaff654 Revert "Improve curved teardrop shapes for roundrect pads."
This reverts commit 4556ace032bb2782d9c698c63614a30b77076adf.
2025-02-14 08:01:56 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jeff Young
4556ace032 Improve curved teardrop shapes for roundrect pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19405
2024-12-29 17:04:16 +00:00
Jeff Young
1cf569b0be Firebomb teardrop curve points.
See 17b0dabec364d24bab4333a9ad15cfefd852728e for the start.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19403
2024-12-28 22:38:51 +00:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
Jon Evans
f8b193dd9c Teardrops: Improve support for padstacks 2024-11-06 19:49:37 -05:00
Jon Evans
2a605e4a4e Infrastructure and file format for via stacks 2024-10-06 18:45:25 -04:00
Jon Evans
56e0811516 Phase 2 of padstack support
CHANGED: PCB file format now supports saving/loading complex padstacks

CHANGED: PTH pads are now rendered per copper layer in the copper color;
         the PTH pad color is no longer used.

ADDED: support for importing complex pad stacks from Altium PCBs

Enforce padstack-aware access to pad properties across KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/8182
2024-10-01 19:55:03 -04:00
Seth Hillbrand
17b0dabec3 Remove the now unused curve-point count
With the refactor of the bezier lib, we no longer base the curve on the
number of points but rather on the error allowed.  The parameter was
vestigal and had no effect on output
2024-07-10 11:19:09 -07:00
Jeff Young
080761c85e Fix side-effect from algo change.
(I also discovered that we were computing the intersection
twice, so I fixed that too.)
2024-07-10 18:55:07 +01:00
Jeff Young
c3dfa672e1 Apply a bit more tension to teardrop shapes.
This also simplifies the algorithm a bit.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17017
2024-07-10 15:02:25 +01:00
Jeff Young
05d77c6a7d Minor readability improvement. 2024-07-10 15:02:25 +01:00
Seth Hillbrand
bcf6b620a8 Large rework of BEZIER_POLY
Add direct handling of quadratic beziers to save compute time and number
of points.  Update cubic interpolation to reduce number of points
generated for a given smoothness

Cache data on open and used cached data to avoid multiple re-calcs

Remove minimum line length and number of segments and replace with
standard max error level.  Allows us to specify the tolerance of bezier
interpolation
2024-06-18 17:55:41 -07:00
Jeff Young
ee3be0802c Move PCBNew overrides to nullable properties.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5562
2024-02-24 20:05:51 +00:00
jean-pierre charras
ef6a5b6252 teardrops: calculate better points on track for track arc.
Previously, a reference point to calculate teardrop length was calculated
using a track segment. It can create significant position error with track arcs.
Now a arc is used to find this reference point.
2024-02-23 11:36:14 +01:00
Wayne Stambaugh
bdee545841 Coverity warning fixes. 2023-06-03 07:28:17 -04:00
Jeff Young
8b1fd62d35 Make pad & via teardrops 1st-class citizens (props of the pad/via)
Change teardrop generation to rely more heavily on BOARD_CONNECTIVITY
for improved performance.

Add updating of teardrops on BOARD_COMMIT::Push().

Also converts m_CopperItemRTreeCache to std::shared_ptr.
We don't copy it around anyway, and having to create a new set
of std::unique_ptr's for each operation is likely to be more
expensive than std::shared_ptr's overhead.
2023-05-19 18:02:03 +01:00
jean-pierre charras
db66419f02 Teardrops: fix incorrect shape in some cases. 2023-02-20 09:06:21 +01:00
jean-pierre charras
3a11d90d92 Teardrops: handle arcs in tracks.
Fixes #13858
https://gitlab.com/kicad/code/kicad/issues/13858
2023-02-19 14:44:37 +01:00
jean-pierre charras
3f50199dad TEARDROP_MANAGER: fix a corner case that generate a invalid teardrop polygon.
Also add a better handling of connected tracks when searching for a track connected
to a too short track to create a teardrop, search was stopped to Y connections.
Now the selected track is the longest of these 2 candidates.
Fixes #13006
https://gitlab.com/kicad/code/kicad/issues/13006
2022-11-26 14:37:20 +01:00
Jeff Young
d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Marek Roszko
a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Jeff Young
2de10080cd Add edge and margin clearances to message panel. 2022-07-15 16:14:32 +01:00
luz paz
af6ba1a16e Fix typos in pcbnew sub-directory
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-06-30 09:39:45 -04:00
Wayne Stambaugh
7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
jean-pierre charras
27c25debea teardrops: fix a not very good shape for not round targets after code change. 2022-02-02 13:31:29 +01:00
jean-pierre charras
f651e31965 Fix minor compil and Coverity warnings. 2022-01-25 12:52:13 +01:00
jean-pierre charras
1b42152ba0 Teardrops: store parameters in BOARD_DESIGN_SETTINGS. 2022-01-23 10:57:08 +01:00
Jeff Young
c8a50d9b50 Remove unit-less angles from VECTOR2I/D APIs. 2022-01-20 23:58:20 +00:00
Jeff Young
14006495d5 Angle cleanup. 2022-01-20 22:35:41 +00:00
Jeff Young
4eac8d7c66 Remove unit-less angles from geometry lib APIs. 2022-01-20 21:10:04 +00:00
jean-pierre charras
826154d666 teardrop: rework on code 2022-01-18 17:12:17 +01:00
jean-pierre charras
ef6ce972d6 Fix missing filtering of teardrop targets. 2022-01-16 17:20:48 +01:00
jean-pierre charras
5b0527bdfe Teardrop: add separate settings for round, rect shapes and tracks 2022-01-16 10:24:23 +01:00
jean-pierre charras
ac78d51b14 Teardrops: better dialog, and better code 2022-01-10 20:04:41 +01:00
jean-pierre charras
d42514ad30 Add code and dialog to create/add/remove teardrops, step 1 2022-01-10 20:04:40 +01:00