Commit Graph

43298 Commits

Author SHA1 Message Date
Alex Shvartzkop 76b2741a92 Make sure to add start points to arcs in TransformOvalToPolygon.
Otherwise the long line segments can be non-parallel to the centerline.

This was the root cause of the slowdown in https://gitlab.com/kicad/code/kicad/-/issues/18156

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-09 20:04:27 +03:00
Alex Shvartzkop 80b7f5fcbf Revert "Pcbnew, Altium import: Fix issues with hatched zones."
This removed the hatch fill import functionality,
and is no longer needed now that the root cause was found.

This reverts commit 616510aca2.
2024-06-09 20:04:27 +03:00
Alex Shvartzkop 7bca6cdea7 Make crosshair follow view movement when using pan/zoom gestures. 2024-06-09 18:46:42 +03:00
jean-pierre charras fb3730a9c0 STEP export: fix missing zones (they were added too late in code)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18177
2024-06-09 17:32:34 +02:00
Jon Evans 3bb7b3722c Fix MSVC not understanding operator== anymore 2024-06-08 17:27:34 -04:00
Jon Evans f5e7c705db Move custom shapes to PADSTACK; support in API 2024-06-08 14:26:36 -04:00
jean-pierre charras b20a32f2fd bitmap_info.xxx: add comments to try to avoid issues like 8b1e971f
No actual code change
2024-06-08 20:18:11 +02:00
Alex Shvartzkop 4b96bb5d8f Support touchscreen gestures (zoom/pan/rotate) in 3D viewer.
Though rotate doesn't work yet on MSW due to a wxWidgets bug.
2024-06-08 21:13:16 +03:00
Jeff Young ed0869aa0c Share more library tree code. 2024-06-08 19:06:10 +01:00
Alex Shvartzkop 832393b07c Remove debug line. 2024-06-08 17:25:49 +03:00
Alex Shvartzkop 8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Alex Shvartzkop 8e90063258 Support hidpi in Cairo GAL canvas; performance improvements.
We now draw onto wxBitmap directly, reducing the amount of copying.
Also moves the bitmap blit into paint event handler.
Modifies ClearScreen to work universally between Cairo/OpenGL backends.
2024-06-08 12:51:27 +03:00
Seth Hillbrand 31a0652c58 Force VECTOR2 templates to use standard promotion rules
This forces the operators -, +, * to use standard promotion rules when
operating on vectors of two different types.  Previously, this depended
on the order in which the operator was called, so subtracting a VECTOR2D
from a VECTOR2I could have a different result than negating the result
of subtracting the same vectors in the opposite order
2024-06-07 15:32:07 -07:00
Jeff Young 90652a741d Don't generate thermal reliefs for pads that don't intersect zone.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18174
2024-06-07 23:08:15 +01:00
Seth Hillbrand ff188450e6 Handle degenerate arcs
Arcs with their centers too far away are effectively straight lines, so
draw them as such

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18170
2024-06-07 11:28:34 -07:00
jean-pierre charras d7b743a896 MAINTAIN_PNGS option: fix missing entries in CMakeLists.txt.
The commit 16de0a66 should have added these icons in list, but unfortunately
they are missing, thus creating a broken (missing entries) auto-generated file
bitmap_info.cpp when rebuilding png icons.
2024-06-07 16:15:48 +02:00
Jeff Young cb7d51dbe4 Formatting. 2024-06-07 12:10:41 +01:00
Jeff Young d8c2929163 SCH_SHEET_PATH::IsContainedWithin() didn't do what I thought it did.... 2024-06-07 12:09:58 +01:00
Jeff Young c0ee987e8b Fix typo. 2024-06-07 10:52:11 +01:00
jean-pierre charras dc6b211227 better tool tips 2024-06-07 11:19:56 +02:00
jean-pierre charras 8b1e971f29 bitmap_info.cpp: fix a crash when opening the simulator frame.
It was due to missing bitmaps, used in simulator frame horizontal toolbar.
They were removed probably by mistake in commit 0e66adbc
2024-06-07 11:13:58 +02:00
Wayne Stambaugh 360d185e3b Clear parent symbol references when flattening derived library symbols.
Broken parent symbols could lead to invalid return values and flattened
library symbols cannot be derived from a parent symbol.
2024-06-06 18:53:27 -04:00
Seth Hillbrand 6dcb9bb664 Do not allow trailing/leading whitespace in mandatory fields
Reference, Value, Footprint and Datasheet all reference elements that
should not use trailing/leading whitespace or similar hidden charaters.
Other fields may utilize leading/trailing whitespace for obscure
purposes but won't break functionality as they are display only
2024-06-06 11:48:20 -07:00
Jeff Young edc7603d2a Make it clear that GetSheets() is heavy.
Also removes the side-effect that SCH_SHEET_LIST's
c'tor would sort the list (and write virtual page
numbers) anytime the starting sheet was the root.

Also, definitely don't build a SHEET_LIST (sorted or
otherwise) if you're not even going to use it.

Also don't build SCH_SHEET_LISTs on idle events.  Better
to just always have the Next Sheet button enabled (we
already beep if you click it and there's no next sheet).

Also, use a SCREEN_LIST when you can.  It's much cheaper
to create.
2024-06-06 18:00:59 +01:00
jean-pierre charras 616510aca2 Pcbnew, Altium import: Fix issues with hatched zones.
- Filled zones using the hatch pattern cannot use the primitives from Altium.
the filled shapes must be rebuilt.
_ Filled zones using the hatch pattern with a very small gap are now converted
to a polygon pattern. Otherwise the calculation time can be very big.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18156
2024-06-06 16:37:28 +02:00
Jeff Young cbfc692e24 Performance for large hierarchies: symbol fields table
Don't bother to sort sheet list when we're going to
sort the symbols anyway.
2024-06-06 11:53:01 +01:00
Jeff Young 758974f5aa Performance for large hierarchies: sorting
Cache page numbers during sort.
Don't construct SCH_SHEET_PATH when reference will do.
Don't construct SCH_SHEET_PATH when KIID_PATH will do.
2024-06-06 11:53:01 +01:00
Jeff Young a6e8cfe35f Performance for large hierarchies: avoid sorting
Don't sort SCH_SHEET_LISTs if we're just scanning the doc.
2024-06-06 11:53:01 +01:00
Jeff Young 44c588f122 Performance for large hierarchies: lazy eval
Don't create SCH_SHEET_LISTs until we have to, and then
only create them once.
2024-06-06 11:53:01 +01:00
Jeff Young e543ff0578 Performance for large hierarchies: lookups
Don't bother to sort sheet lists when we're just looking
up a UUID, sheet count, other symbol units, etc.
2024-06-06 11:52:57 +01:00
Jeff Young 68fbe98b1d Performance for large hierarchies: ERC
Share constructs between ERC tests.

Large SCH_SHEET_LISTs, in particular, can be very
expensive to construct.
2024-06-06 11:41:37 +01:00
Jeff Young 9b8f1109e6 Formatting. 2024-06-06 11:41:37 +01:00
Jon Evans 10922a194c Remove extraneous cache fill per row
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18159


(cherry picked from commit 64da49f22e)

Co-authored-by: Jon Evans <jon@craftyjon.com>
2024-06-05 16:08:45 +00:00
Mike Williams f3d2f4af01 PCB: add fields checkbox to Edit Text and Graphics
Also add missing saves for dimensions checkboxes.
2024-06-05 11:50:17 -04:00
Wayne Stambaugh 82b310f666 Do not update schematic editor net navigator when it's not shown.
Since the addition of all nets to the net navigator, performance on very
complex designs is unacceptable.  Not updating the net navigator is a
cheap and dirty short term fix.  Users with complex designs will not be
able to use the net navigator.  A better fix to resolve the performance
issues needs to be implemented.
2024-06-05 11:46:19 -04:00
Jeff Young 9fb07d886e PCB_GENERATOR_Ts are PCB_GROUP_Ts too.
Also, an item must already be in a commit to add it to a group.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17595
2024-06-05 10:51:24 +01:00
Marek Roszko 944835eefc Add PCB_VIA equality operator overload 2024-06-04 21:34:14 -04:00
dsa-t 34f0fb8f21 Revert "Don't reset the view controls state just because we are setting the already active tool state again"
This reverts commit e914c0c1a0

(cherry picked from commit 6b7b6fa3e3)

Co-authored-by: Mark Roszko <mark.roszko@gmail.com>
2024-06-04 18:03:41 +00:00
Jeff Young 8e855156c8 Import child sheets relative to project, not parent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17785
2024-06-04 17:47:55 +01:00
Seth Hillbrand 08f181115b Use KiROUND for consistency
Ensure that it is clear we are rounding to nearest point
2024-06-04 08:55:42 -07:00
Mike Williams 7679f40b2b SCH_REFERENCE: drop separate pointer to LIB_SYMBOL
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18115
2024-06-04 10:03:00 -04:00
Jon Evans 0b0a37aaf7 Move padstack serialization to PADSTACK
Also move a few more things from pad/via
2024-06-04 09:28:24 -04:00
Jeff Young 4f4311ba57 Use consistent positive rotation direction.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17580
2024-06-04 13:25:57 +01:00
Jeff Young 42caceb799 Tidy incorrect column width (and fix some formatting). 2024-06-04 13:00:02 +01:00
Jeff Young e5bad195b6 Fix a bunch of failures to resolve text variables. 2024-06-04 12:46:34 +01:00
Jeff Young 26fc2bd071 Reduce compiler warnings. 2024-06-04 11:18:45 +01:00
Jeff Young a74e834b33 Formatting. 2024-06-04 11:16:11 +01:00
Jeff Young 855c972156 Add regression test and example rule.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18142
2024-06-04 10:58:52 +01:00
dsa-t bc3ae8ca51 Don't construct an arc if we won't need it in pcbnew gfx importer.
(cherry picked from commit d34df3e951)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-04 04:21:06 +00:00
dsa-t ca18112041 Fix ellipse angles when importing DXF.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18121


(cherry picked from commit 044a2305e3)

Co-authored-by: Alex Shvartzkop <dudesuchamazing@gmail.com>
2024-06-04 04:19:51 +00:00