Commit Graph

17077 Commits

Author SHA1 Message Date
jean-pierre charras 30dd8224be Fp editor, DIALOG_PAD_PROPERTIES: fix crash if no footprint loaded.
Fix also a incorrect pad stack for SMD pad in some cases.
2024-06-30 10:43:10 +02:00
Ian McInerney 10988478da Take footprint edge cuts into account in the board statistics
Reported in https://gitlab.com/kicad/code/kicad/-/issues/18245
2024-06-29 03:11:54 +01:00
Ian McInerney c8ebcc8e0f Only modify visibility checkboxes for layers with them 2024-06-29 03:05:57 +01:00
Jeff Young 7962ab07e7 Improve consistency of clearance line painting.
Showing the clearance area is not obvious as the clearance
extends from the pad on flashed copper layers and from the
hole on non-flashed copper layers.  Because of this, we
choose to not display clearance lines at all on non-copper
active layers as it's not clear which we'd be displaying.

We follow the same rule for tracks for consistency (even
though they don't have the same issue).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18287
2024-06-28 22:10:22 +01:00
Jeff Young 9e6884f656 ADDED: support for ERC & DRC errors and warnings in text variables.
Also fixes some bugs in storing exclusions in
symbol fields and children.

Also fixes some bugs in checking for resolved text
variables in symbol children.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18279
2024-06-28 22:10:22 +01:00
Jeff Young 16340e6cf4 Support both short and long item descriptions. 2024-06-28 22:10:22 +01:00
Seth Hillbrand f48a105357 Modify some int32 ops to avoid potential overflow 2024-06-28 08:04:07 -07:00
Seth Hillbrand d033f93d89 Fixup Altium import rectangle handling
Ensure we have positive sizes
Keep rectangles when rotating by multiples of 90
2024-06-27 16:40:25 -07:00
Seth Hillbrand 51eb7aa5b5 Fixup for Altium pad/fill importer
The previous commit merged pads with copper areas.  This was appealing
but broke when the pad and the area were meant to have different
size/shape technical layers.  Small pads = Small paste.  Instead, we do
not merge the pads but we assign them to have the appropriate nets in
KiCad, allowing the same effective result but keeping the technical
layers correct
2024-06-27 13:49:16 -07:00
Seth Hillbrand 64c36e8bda Fix via layer test for DXF plotting
Vias might have their primary layer set to a single layer but cross
multiple layers that should be included when plotting

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18282
2024-06-27 09:59:37 -07:00
Alex Shvartzkop dc2a63d146 STEP export: don't put copper on non-flashed pad layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18267
2024-06-27 06:40:11 +03:00
Jon Evans c70ef36739 ADDED: Opacity control for filled graphic shapes
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18253
2024-06-26 22:29:58 -04:00
Seth Hillbrand 7102d9f72a Altium import: handle polygons on copper
In Altium, copper polys will be connected automatically to their
associated pads.  In KiCad, we need to do the equivalent when parsing,
which is to combine the joining copper into the underlying pad.  We also
don't want to treat copper polys as proxy pads without the original
anymore.
2024-06-26 17:27:08 -07:00
Seth Hillbrand f97ac5ce73 C++-ify output using ToString 2024-06-25 18:35:12 -07:00
Seth Hillbrand 4fff28220e Extract common code into VERTEX_SET mixin
The VERTEX_SET is useful when we need to quickly find elements that are
close to each other.  Extracting to a mixin keeps the code from
diverging between implementations and simplifies that maintenance.
2024-06-25 12:19:56 -07:00
Seth Hillbrand 6aaaaad37f Properly count multiple Altium version settings
There is a fair amount of gradation in different Altium products

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18276
2024-06-25 10:18:55 -07:00
Alex Shvartzkop fa5b6d7929 If there's a single shape in fuseShapesOrCompound input, just return it. 2024-06-25 14:56:33 +03:00
Jeff Young a2f7edde2e Import PCB into existing project.
Or, to be more direct: don't pull the project rug
out from under EESchema when importing in non-
stand-alone mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18241
2024-06-25 11:49:02 +01:00
Jeff Young 14a55facf2 Clearer naming and commenting.
Also some const& hygiene and some formatting.
2024-06-25 11:07:14 +01:00
jean-pierre charras 0a5784fc9e Gerber plots: Ensure reserved chars are not used in Gerber field strings.
In gerber fields, reserved chars (,*%) must be replaced, because they are separators.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18275
2024-06-25 10:49:41 +02:00
dsa-t cb41b53ab7 Use MurmurHash3_x64_128 (MMH3_HASH) for polygon checksum.
Improves performance when moving footprints.

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 21:19:43 +00:00
Jeff Young 080cbbe0dd Error reporting for drawing sheet loading. 2024-06-24 20:22:29 +01:00
Jeff Young 26b86b3922 Don't use wxLogMessage/wxLogError for messages not meant for user.
They are particularly damaging when our event loop
gets tied up in knots with the log message window
behind a modal window -- thereby locking up KiCad.
2024-06-24 20:22:29 +01:00
Seth Hillbrand 11c6164934 Silence font replace warnings for libs
When loading schematics/pcbs, notification of font replacements might be
warranted but in libraries, this warning is not helpful and intrusive
2024-06-24 09:55:10 -07:00
Jeff Young b227bae2c6 Commit strings are user-visible menu strings. 2024-06-24 14:16:05 +01:00
Alex Shvartzkop 4bf8ed32cd Optimize testCourtyardClearances when moving footprints (33%->0.69%)
Check bounding boxes without hidden text first before trying to check courtyards.

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 06:43:58 +03:00
Alex Shvartzkop dc56364cf2 Optimize testCourtyardClearances when moving a board.
CPU usage: 86% -> 33%

See https://gitlab.com/kicad/code/kicad/-/issues/18148
2024-06-24 02:00:34 +03:00
Jeff Young 0040c290ed Don't flip alignment of non-side-specific text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18235
2024-06-22 23:54:57 +01:00
Jeff Young aaf5c454ff Mask new shape properties from textboxes. 2024-06-22 23:54:57 +01:00
Jeff Young 5fba8289aa Formatting. 2024-06-22 23:54:57 +01:00
Alex Shvartzkop 0a75053e9d Revert "Handle degenerate arcs"
It is not needed anymore, and could cause problems
for legitimate arcs.

This reverts commit ff188450e6.
2024-06-22 22:13:18 +03:00
Jeff Young e450258c0f Show footprint change/update immediately.
Also, don't deselect selected footprints.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18248
2024-06-22 19:47:40 +01:00
Alex Shvartzkop 1613816e77 Fix EasyEDA/JLCEDA Pro 2.2 footprint/symbol library import.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18250
2024-06-21 22:20:54 +03:00
Jeff Young c549a214c9 Performance: don't alloc std::vector in critical areas.
For some history, see also aa2ad3b44c
2024-06-21 19:07:46 +01:00
Alex Shvartzkop ece46223c9 Fix shadowed/conflicting enum values. 2024-06-21 16:16:29 +03:00
Ian McInerney 672d2c6af8 Always include footprint edgecuts in board edge bounding box
The footprint edgecuts should always be part of the board edge bounding
box, even if the layer the footprint is on is hidden from view.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18245
2024-06-20 23:17:54 +01:00
Alex Shvartzkop c40708c051 Optimize TEARDROP_PARAMETERS memory layout.
56 -> 40 bytes.
2024-06-20 15:05:45 +03:00
Alex Shvartzkop f5be388acd Don't call GetSide in FOOTPRINT::GetBoundingBox when not needed.
CPU usage: -13% when moving a board.
2024-06-20 06:02:11 +03:00
Alex Shvartzkop 48f6f837a1 Optimize BOARD_ITEM::GetParentFootprint.
CPU -8% when panning a board.
2024-06-20 04:25:33 +03:00
Alex Shvartzkop 62fb5697b4 Optimize redrawNetnames.
Using RTree is slower in this case.

RTree: 25 ms when moving cursor
This method: 5 ms when panning/zooming
2024-06-19 20:55:33 +03:00
Jeff Young 31ab276aaf Ease-of-use for un-commented ERC/DRC exclusions.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18220
2024-06-19 17:07:50 +01:00
Jeff Young 8e349eedf0 Bug fixes for PCB_TABLES.
In particular, rotated tables and tables in rotated
footprints.
2024-06-19 12:39:22 +01:00
Seth Hillbrand 9aba808366 Altium import
- Handle intermediate Altium version with some fields but not others
- Ensure that we are properly moving text that is not a box and not a
  field
2024-06-18 21:35:41 -07: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
Seth Hillbrand 0d2c4c91fd Properly initialize fonttype for older Altium files 2024-06-18 17:55:31 -07:00
Jon Evans 81a1e9e83e Don't write out non-explicit tenting
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18230
2024-06-18 17:52:42 -04:00
Jon Evans 1a1083def6 Revert "Tented usually means that there is no soldermask"
This reverts commit 021f251efd.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18230
2024-06-18 17:52:42 -04:00
Seth Hillbrand 7e561acf53 Altium: Handle textboxes
Also, corrects a minor issue with the text width calculation where
Altium calculates centerline to centerline but KiCad text heights are to
the edge of the stroke font.  Need to still do better adjustments for
the various altium stroke fonts

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9468
2024-06-16 17:20:59 -07:00
Seth Hillbrand b11e030f8f Cleanup Altium text import
Handle inverted text
Correct location for flags
Add mechanics to detect inverted_rect (like text boxes)
2024-06-16 17:20:59 -07:00
Jeff Young 5a9b681009 Clear timestamp when clearing cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17913
2024-06-16 10:46:36 +01:00