74 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
Jeff Young
d384790d47 Don't use line styles for solder masks on shapes in 3D viewer.
Also convert hatched fills to solid for solder masks.

Also give track solder masks their specified
expansion when exporting to STEP.

Also implement solder masks for shapes when
exporting to STEP.
2025-04-28 21:46:10 +01:00
Jeff Young
6873a75313 Solder masks for teardrops on tracks with solder masks.
Also moves teardrops away from the zone UI: they
are now always filled and their borders never
drawn.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20744
2025-04-25 12:23:23 +01:00
Jeff Young
1ec47a053b Don't save UUIDs for teardrop zones.
They're really just a geometry cache.

Also removes writing of filled_areas_thickness,
which hasn't been supported in yonks.

Also cleans up writing of island removal strategy
(the limit is only needed in limit mode).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20717
2025-04-23 10:41:36 +01:00
Jeff Young
281aa74f30 Performance improvements for teardrop regeneration.
Avoid O(n^2) behaviour when deleting many
zones from the board zones list.
2025-02-19 23:43:53 +00:00
Seth Hillbrand
633aaff654 Revert "Improve curved teardrop shapes for roundrect pads."
This reverts commit 4556ace032bb2782d9c698c63614a30b77076adf.
2025-02-14 08:01:56 -08:00
Jeff Young
32fd79c708 Check dirty tracks when removing teardrops.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19871
2025-02-12 11:32:43 +00: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
jean-pierre charras
bff4ab5cfe DIALOG_GLOBAL_EDIT_TEARDROPS: save teardrop scope in board design settings.
These parameters were already in board design settings, but never used.
2024-10-15 18:02:22 +02: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
Jeff Young
62fc18d22e Allow teardrops on custom-shaped pads.
They work OK in a lot of circumstances.  Where the don't
work, the user can turn them off.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17565
2024-07-10 15:02:25 +01:00
Alex Shvartzkop
70296107b4 Use std::set::contains instead of alg::contains in UpdateTeardrops.
(-356 ms on https://gitlab.com/kicad/code/kicad/-/issues/18148 when placing)
2024-07-03 21:24:49 +03:00
Alex Shvartzkop
c40708c051 Optimize TEARDROP_PARAMETERS memory layout.
56 -> 40 bytes.
2024-06-20 15:05:45 +03: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
Seth Hillbrand
d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Jeff Young
b986391a04 Remove stale teardrops before rebuilding connectivity.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15398
2023-08-15 12:13:34 +01:00
Roberto Fernandez Bautista
90ff331c58 Refactor: Move static to be inside ZONE_SETTINGS 2023-06-10 12:03:41 +02:00
Wayne Stambaugh
bdee545841 Coverity warning fixes. 2023-06-03 07:28:17 -04:00
Jeff Young
ea341289de Fix uninitialized variable (Coverity report). 2023-05-20 21:10:09 +01: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
22de1c8813 Teardrop dialog: refinements. Show a PROGRESS_REPORTER when refilling zones. 2023-05-12 10:06:20 +02:00
Jeff Young
4da6d5ff28 Add "generate raw teardrops" option to Add Teardrops dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/14711

Fixes https://gitlab.com/kicad/code/kicad/issues/14704
2023-05-11 15:47:42 +01:00
Jeff Young
daa3a1aae9 Revert addition of update-teardrops checkbox to DRC dialog. 2023-05-11 14:53:28 +01:00
Jeff Young
2d15067453 ADDED allow update of teardrops before running DRC.
Fixes https://gitlab.com/kicad/code/kicad/issues/14264
2023-04-15 12:18:41 +01:00
jean-pierre charras
0bd83d3096 Footprint viewer: ensure the footprint is updated after new library selection
Previously, if the first fp of the new lib has the same name as the old
displayed fp, the old fp was not replace by the new fp.
2023-03-29 16:53:49 +02: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
c409646aad Update message panel after rebuilding connectivity.
Fixes https://gitlab.com/kicad/code/kicad/issues/10122
2022-11-18 15:29:16 +00:00
Jeff Young
d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young
57a6aeb86a Redraw ratsnest after removing teardrops.
No, I don't know why this is needed.  But after a couple of hours trying
to chase it down, return-on-investment is fading....

Fixes https://gitlab.com/kicad/code/kicad/issues/12420
2022-10-10 21:07:18 +01:00
Jeff Young
d67437a2aa Move ratsnest exclusion processing to a post-pass.
Also fixes a few cases where we were unnecessarily rebuilding
connectivity more than once for an operation.
2022-09-29 17:08:49 +01:00
Marek Roszko
3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko
a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Marek Roszko
161775fdbc Fix another type warning 2022-08-26 20:15:01 -04:00
Jeff Young
4423755176 Pretty up the Teardrops dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/12170
2022-08-07 23:22:21 +01:00