145 Commits

Author SHA1 Message Date
jean-pierre charras
b3c6a03171 Fix a few Coverity warnings (uninitialized vars). No actual code change 2025-05-01 15:39:58 +02:00
Damjan
af11746cc4 pcbnew and eeschema: Table and textbox rotation / text justification fix 2025-04-21 13:32:46 +00:00
Jeff Young
60364a9062 Performance improvements for hatched fills (round 2)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20570
2025-04-08 17:35:35 +01:00
Jeff Young
845cdb1b25 Performance optimisations for hatching. 2025-04-07 21:11:46 +01:00
Jeff Young
0659290417 Simplify hatch damage/rebuild and move it out of view.
There should be far fewer hatched objects than other
objects, so we're spending too much effort finding
all the possible damage when we probably should
just be auto-regenerating all the hatching.

This also moves it out of being done during redraw,
which was proving problematic.  Plus the refill
zones architecture does it during commit, and has
a lot more miles behind it.
2025-04-07 11:46:02 +01:00
Jeff Young
7a9db0f8c1 Formatting. 2025-04-05 22:18:17 +01:00
Wayne Stambaugh
11edaa6e4a Use arc mid point for footprint library parity DRC testing.
The arc center is a pseudo coordinate which is calculated for drawing
purposes.  This mid point is fixed unless the arc is modified which
should result in more reliable arc parity footprint library DRC testing.

Also change EDA_SHAPE::Compare() to use the arc mid point.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15917
2025-04-04 15:30:44 -04:00
Jeff Young
822e188d55 Knockout entire hatched shape when filling zones.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20510
2025-03-31 17:31:35 +01:00
Michael712
d59f624001 Don't use transform coordination for height/width property display of rectangles
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20468
2025-03-28 16:38:12 +00:00
Jeff Young
01c1ff47ad Don't generate hatched fills for connectivity, etc.
(And in particular, don't regenerate them from
within the multi-threaded connectivity algo.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20451
2025-03-26 14:50:34 +00:00
Jeff Young
413d6747c5 Collapse SCH_TABLE border drawing into shared code.
Also pushes GetCornersInSequence() into EDA_SHAPE
so it can be shared between SCH_TABLE and PCB_TABLE.

Also fixes bug in drawing column rulings over the
right external border.

Also fixes a bug with dialog control enabling.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20350
2025-03-16 20:21:49 +00:00
Jeff Young
50174ec528 Beware of infinite recursion on colliding hatched shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20264
2025-03-08 21:23:14 +00:00
Jeff Young
46378dc760 Dirty hatching from SwapShape().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20180
2025-03-03 10:35:05 +00:00
Jeff Young
b1a4b77291 Solid fill mode is FILL_T::FILLED_WITH_COLOR for SCH_SHAPE.
(It can also be FILL_T::FILLED_WITH_BACKGROUND_COLOR
for symbol items, but those have their own getters/
setters.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20168
2025-03-02 16:05:35 +00:00
Jeff Young
7f935e290a Fracture hatched fill polygon.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20125
2025-02-28 18:52:56 +00:00
jean-pierre charras
a414cb0a17 EDA_SHAPE: fix crash when trying to create a hatch pattern inside a circle. 2025-02-27 18:03:24 +01:00
Jeff Young
3f15b0d75b ADDED: hatched fills for shapes. 2025-02-24 11:08:29 +00:00
Jeff Young
6b6729284c Remove default line styles from all items except eeschema wires and buses. 2025-01-20 11:30:46 +00:00
Seth Hillbrand
6d40bf049e Hold fp data constant
We cache arc data to ensure that we know if it has changed since
loading, however footprints perform transformation (displacement +
rotation) on their internal elements, so we need to provide the same
transformation to the cache in order to assure it matches when writing
to disk, otherwise, the arc midpoint will be recalculated leading to
instability

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19648
2025-01-16 16:05:23 -08:00
Wayne Stambaugh
5c8f4697ca Common folder housekeeping part 1. 2025-01-12 12:06:45 -05:00
Alex Shvartzkop
7afa6a086e Show "Selected 2D Length" for tracks and shapes in message panel.
Useful to verify length-matching.

Also show Length for arc shapes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19339
2025-01-06 18:45:28 +05: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
f1cbcc83fe Fixup fill versions.
Older versions saved some non-symbol shapes with wrong fill mode.

The property inspector also sets the wrong fill mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19254
2024-12-25 15:14:54 +00:00
jean-pierre charras
776075ee35 Eeschema, fille polygons: fix HitTest inside polygon.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19255
2024-12-06 18:09:17 +01:00
Jon Evans
3129e072c4 API: Move graphics and text handling to common
Required moving API_HANDLER_COMMON out of kicommon
2024-11-28 11:28:06 -05:00
Dhineshkumar S
cb41f39045 Disable custom color selection when Fill Mode is Body Background Color
Currently, the system allows custom color selection for the Fill Color
property in the Properties toolbar even when Fill Mode is set to Body
Background Color via the Properties window. However, this does not update
the color to match the Body Background color. To fix this, custom color
selection for Fill Color will be disabled when Body Background Color is
chosen.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18919
2024-10-28 15:48:02 +00:00
John Beard
215533f31a Unify flip direction handling
There was a gentle mish-mash of booleans, some with
true being left/right and some up/down, and some functions that
can flip in both axes (which is never actually done, and doesn't
really make geometric sense).

Replace all this with the FLIP_DIRECTION enum class, which makes
the intention completely unambiguous.

This also then allows a small scattering of simplifications,
because everything takes the same type and you don't have to
fiddle booleans to fit.
2024-09-27 17:13:13 +01:00
John Beard
7dfac8d1ab Bezier: Correct bounding box calculation
Beziers can extend outside the control point hull,
and can also be far inside the hull. Especially the latter
interferes with selection.

So use the approximated segments to determine.
2024-09-27 06:23:04 +01:00
John Beard
0e788f97ca Bezier: add fill to properties panel 2024-09-25 22:20:58 +01:00
jean-pierre charras
513d659ce8 Fix incorrect flip for graphic segments.
For some obscure reason, the end points of segments were swapped.
Note graphic RECTANGLE shapes have still an issue when flipped, but this
is a very different issue.
2024-08-26 19:37:23 +02:00
Jeff Young
5fba8289aa Formatting. 2024-06-22 23:54:57 +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
4a01f322ff Special-case hit-testing of filled schematic rule areas.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17879
2024-06-01 22:48:02 +01:00
Seth Hillbrand
e8c96a8a20 Fixups for a9ae86ee
Correcting a couple mistakes and clarifying rounding
2024-05-31 17:31:50 -07:00
Seth Hillbrand
a9ae86eefd Cleanup geometry functions
Added Distance(VECTOR2) function that returns a double.  Removed
superfluous EuclideanNorm, GetLineLength, integer constructor for
EDA_ANGLE (this promotes to double in the CTOR), DistanceLinePoint and
HitTestPoints

Also extended the size for arc calculations that get distances to center
points to avoid overflow
2024-05-31 12:26:37 -07:00
xx
5ff61ae561 Add rectangle height and width to properties
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17181
2024-05-27 17:28:32 +00:00
Jeff Young
1290228fbf Don't modify radius when editing center.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17192
2024-05-05 19:58:01 +01:00
Alex Shvartzkop
16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03:00
Jeff Young
d761b4f22f RIP LIB_TEXTBOX and LIB_SHAPE. 2024-04-16 16:31:16 +01:00
Jon Evans
1dbe78c68b Add QA tests and expand serialization for API 2024-04-02 19:51:18 -04:00
Jeff Young
5d37a00759 Table plotting for PCBNew.
Also fixes some bugs with property exposure that (along with
other things) allowed you to put table cells on a different
layer than their parent table.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17438
2024-03-24 16:49:33 +00:00
Jeff Young
58df9c96f4 ADDED: Expose units and DeMorgan to properties system.
(Also fixes inheritance bug in LIB_PIN's properties.)
2024-03-21 16:19:55 +00:00
Jeff Young
e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
Jeff Young
4a561b04bc Code cleanup and compiler warnings.
(cherry picked from commit 51848a0b43736d6e6abb31148344f0d8d3fb99a4)
2024-02-23 16:53:35 +01:00
Jeff Young
36275bcbc5 Make sure polygonization error is on correct side.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16869
2024-02-03 20:17:31 +00:00
Marek Roszko
4b12534dbd Fix property editor for graphic circles 2024-01-30 22:00:09 -05:00
Alex Shvartzkop
f99505e190 Fix arc editing bugs when endpoints match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16532
2024-01-16 16:17:45 +03:00
Alex Shvartzkop
5bd620d8f9 Support Bezier curve editing in eeschema. 2024-01-16 14:11:25 +03:00
Alex Shvartzkop
2a2dc3a508 Eeschema: Allow 180 deg arcs when editing, enable center point snapping. 2023-12-02 17:08:56 +03:00
Seth Hillbrand
75c6b0ab28 Added IPC2581 support
IPC2581 is a modern production file exchange system.  It provides
single-file data output for an entire board including BOM and netlist
information.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1954
2023-11-26 15:30:58 -08:00