Commit Graph

42457 Commits

Author SHA1 Message Date
Seth Hillbrand 0a29c0dea3 Fixup Altium import rectangle handling
Ensure we have positive sizes
Keep rectangles when rotating by multiples of 90

(cherry picked from commit d033f93d89)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 8832b22952 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

(cherry picked from commit 51eb7aa5b5)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 33b93a3824 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.

(cherry picked from commit 7102d9f72a)
2024-06-29 12:17:53 -07:00
Seth Hillbrand b589da63d8 Cleanup Altium text import
Handle inverted text
Correct location for flags
Add mechanics to detect inverted_rect (like text boxes)

(cherry picked from commit b11e030f8f)
2024-06-29 12:17:53 -07:00
Seth Hillbrand 48077d77c4 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

(cherry picked from commit 7e561acf53)
2024-06-29 12:17:53 -07:00
Alex Shvartzkop a605c4b6ff Disable hidpi cursors on GTK and OSX.
wxCursor scale factors won't be supported before wx 3.3.
MSW doesn't scale cursors, so it works as expected there.

(cherry picked from commit e3e63fb1b8)
2024-06-29 21:43:47 +03:00
Seth Hillbrand 092ce30b40 Altium: Handle footprint vias
These are treated as pads in KiCad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18194

(cherry picked from commit 7ea013b96c)
2024-06-29 11:38:36 -07:00
Seth Hillbrand 28eb6dab97 Handle hierarchical sheets in incremental change
The drivers need to get passed up and down the hierarchical sheets.  In
order to do this, both the sheet pin and the hierarchical pin need to
be in the changed items.  However, we only get sheets in the screen
items list while the pins are the elements that get set dirty

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17797

(cherry picked from commit 5f16c5892c)
2024-06-29 11:26:03 -07:00
Seth Hillbrand fb82130530 Fixup cherry-picks for v8 2024-06-29 11:22:11 -07:00
Seth Hillbrand a3d218ffbc Fixup arc check in dp coupled
Handle arcs starting at candidate end point.
Fix total arc size

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967

(cherry picked from commit 015b93b474)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 471f72a340 Handle arcs dp coupling
Calculate coupled arcs and spacing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17967

(cherry picked from commit 75ab3d9e8b)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 2abbc601a0 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16231

(cherry picked from commit ab0426d620)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 522f1c7bea Ensure nets are referenced to main board
We set new elements to the temporary board's netlist.  These need to be
updated when moving the fooprint to the main board

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17242

(cherry picked from commit 54efd32f7a)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 828f32649f Hookup footprint reload to redraw icon
Fixes https://gitlab.com/kicad/code/kicad/-/issues/7195

(cherry picked from commit 6537f9fa15)
2024-06-29 11:22:11 -07:00
Seth Hillbrand b39b54a92e Fallback to scientific notation when fixed-point is long
Fixed point output can create arbitrarily long string representations of
floating points.  When this happens, we would like to just represent the
scientific notation to a limited precision

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17890

(cherry picked from commit 24f02e72d0)
2024-06-29 11:22:11 -07:00
Seth Hillbrand 6a55a47276 Subtract all holes in board area calc
When we say "Subtract holes from board area", we should also subtract
those holes in pads and vias

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17905

(cherry picked from commit 91f6c534b9)
2024-06-29 11:22:11 -07:00
Wayne Stambaugh 648d463b32 Tag stable version 8.0.4 release candidate 1. 2024-06-29 11:58:56 -04:00
Seth Hillbrand 489f345fb2 ADDED: Handle PIECHART in Altium import
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16895

(cherry picked from commit 5bd94f118d)
2024-06-29 08:05:04 -07:00
Seth Hillbrand e308d65108 Ignore hidden text fields when cross-probing
Zoom-to-selection should only show the elements that we can see, so
avoiding hidden fields in footprints keeps the zoom window appropriately
sized

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15245

(cherry picked from commit 416033e8e5)
2024-06-29 08:02:57 -07:00
Seth Hillbrand ee0be76fb4 Don't list IPC-2581 import
We don't currently support importing 2581 files.  We need to clear
IO_FILE_DESC to prevent this from accidentally showing

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17866

(cherry picked from commit eeee63186d)
2024-06-29 08:02:27 -07:00
Seth Hillbrand 813fce2d2d Fully expand all text variables in 3d output
We were doing half of the job but we need to get the board variables as
well

Fixes https://gitlab.com/kicad/code/kicad/issues/17768

(cherry picked from commit 79166510e9)
2024-06-29 08:01:33 -07:00
Frank Muenstermann e0a27b430a kicad-cli: The --precision parameter was not recognized, if unit was inch, the export crashed
(Cherry-picked from 63d828d5ff)
2024-06-29 03:43:06 +01:00
Ian McInerney 73b2180c06 Take footprint edge cuts into account in the board statistics
Reported in https://gitlab.com/kicad/code/kicad/-/issues/18245

(Cherry-picked from 10988478da)
2024-06-29 03:27:42 +01:00
Ian McInerney b3f53ac862 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

(Cherry-picked from 672d2c6af8)
2024-06-29 03:27:14 +01:00
Ian McInerney 9b49fc5a0d Display unit name in symbol context menu
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18285

(Cherry-picked from cc81ccf79a)
2024-06-29 02:16:26 +01:00
Jeff Young 03c71b22d5 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 21:46:49 +01:00
Jeff Young 7d79bebcc6 Don't overload error dialog.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18195

(cherry picked from commit 441da8dfb6)
2024-06-28 20:59:29 +01:00
Jeff Young 5c2300022b Don't flip alignment of non-side-specific text.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18235

(cherry picked from commit 0040c290ed)
2024-06-28 20:58:47 +01:00
jean-pierre charras 91b042990f footprint selector in symbol properties: fix footprint selection issue.
When using the button to select a footprint using the footprint chooser
dialog, the new footprint was not always taken in account (perhaps MSW specific).
It was due to the code to update the footprint name was between Disable() and
Enable, thus creating a loss of some events in the complex grid edition stuff.
This is now replaced by a lock flag to protect this code to be executed when
it should not.
From master branch

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18270
2024-06-27 20:07:38 +02:00
Jeff Young 265e2d61be Clear timestamp when clearing cache.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17913

(cherry picked from commit 5a9b681009)
2024-06-25 13:56:33 +01:00
Jeff Young df3924421d enclosedByArea test for zone needs to be outline-based.
(Otherwise it's order-specific when filling, which
is pretty unpredictable.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18202

(cherry picked from commit 5ba2896968)
2024-06-25 13:55:51 +01:00
Jeff Young 4ee2a007eb Hidden footprint libraries are not yet supported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18183

(cherry picked from commit b7161181e8)
2024-06-25 13:54:56 +01:00
Jeff Young b19a47fa2a Performance for large hierarchies: ERC
Share constructs between ERC tests.

Large SCH_SHEET_LISTs, in particular, can be very
expensive to construct.

(cherry picked from commit 68fbe98b1d)
2024-06-25 13:34:49 +01:00
jean-pierre charras 7f3ca3b889 Gerber plots: Ensure reserved chars are not used in Gerber field strings.
In gerber fields, reserved chars (,*%) must be replaced, because they are separators.
From master branch.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18275
2024-06-25 11:26:03 +02:00
Seth Hillbrand a3d64d604c 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

(cherry picked from commit 11c6164934)
2024-06-24 12:01:30 -07:00
Alex Shvartzkop 006f0a95c1 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

(cherry picked from commit 4bf8ed32cd)
2024-06-24 06:44:28 +03:00
Alex Shvartzkop 6afd865259 Optimize testCourtyardClearances when moving a board.
CPU usage: 86% -> 33%

See https://gitlab.com/kicad/code/kicad/-/issues/18148

(cherry picked from commit dc56364cf2)
2024-06-24 02:03:33 +03:00
Alex Shvartzkop d319cd4b89 Improve error message when trying to Open non-KiCad schematic files.
See https://gitlab.com/kicad/code/kicad/-/issues/18241
2024-06-22 20:35:23 +03:00
Wayne Stambaugh 566fefafc5 Fix Eagle schematic importer incorrect symbol value field and visibility.
Also fix a crash if an XML_PARSER_ERROR exception is thrown when importing
Eagle symbol libraries.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18232
2024-06-22 12:22:03 -04:00
Seth Hillbrand 66bd0f850a Allow NIC pins to be stacked
Previously, we only allowed pins of the same time as well as passive
pins to be stacked.  This change allows NIC pins as well since they are
not internally connected, there is no reason that they cannot be tied to
another pin electrically

(cherry picked from commit 0e0ada8e4e)
2024-06-22 08:12:51 -07:00
Alex Shvartzkop 491bb6e57a Altium schematic import: fix power port styles.
Need to use the symbol name with style, like "VCC_CIRCLE", not "VCC".

Issue was introduced in d939004bbd

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18209
2024-06-22 06:58:41 +03:00
dsa-t 4fe74a9870 Fix arc edit points ordering in schematic.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18254


(cherry picked from commit f6994702aa)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-22 03:20:02 +00:00
Seth Hillbrand 8f03f7c367 Allow non-identical schematic/pcb nets
The schematic net names are fully unique but if we have multiple pads
that are mapped to a NC pin, they need to have unique net names so that
they do not get connected to each other in the ratsnest.  This breaks
the schematic parity check as we have modified the netname for some
pads.  To work around this, we first maintain the zero-th net without
suffix and then add an additional check in DRC to ensure that we allow
unconnected nets as long as the share a common prefix with the schematic
netname.

(cherry picked from commit f61d400d88)
2024-06-21 12:26:23 -07:00
Seth Hillbrand 7f690d596b Resolve worksheet variables in SCH_FIELD
Sheet fields should also resolve the worksheet of that sheet and not the
parent sheet

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17723

(cherry picked from commit 6540c3ec9f)
2024-06-21 10:31:11 -07:00
Mark Roszko be4c2715ab Don't use message as part of the assert dedup
kimath overflow can generate thousands of unique messages in one run lolol


(cherry picked from commit acec5552c0)

Co-authored-by: Marek Roszko <mark.roszko@gmail.com>
2024-06-21 11:20:17 +00:00
Seth Hillbrand 02f8260e18 Clean git conflict markers 2024-06-20 09:25:04 -07:00
Seth Hillbrand a8871fdda4 Fix cherry-pick for v8 2024-06-20 09:13:12 -07:00
Alex Shvartzkop d552ce00aa Optimize redrawNetnames.
Using RTree is slower in this case.

RTree: 25 ms when moving cursor
This method: 5 ms when panning/zooming

(cherry picked from commit 62fb5697b4)
2024-06-20 18:49:32 +03:00
Alex Shvartzkop 37dd7c6df9 Backport BOX2I_MINMAX. 2024-06-20 18:49:32 +03:00
Alex Shvartzkop a5cbcd4abe Don't call GetSide in FOOTPRINT::GetBoundingBox when not needed.
CPU usage: -13% when moving a board.

(cherry picked from commit f5be388acd)
2024-06-20 18:49:32 +03:00