Commit Graph

43295 Commits

Author SHA1 Message Date
Jeff Young 7fef6e8d83 Use view's RTree for redrawing netnames. 2024-06-14 00:20:37 +01:00
Jeff Young c9ddcd618d Make sure to reset the cached viewport. 2024-06-12 23:35:06 +01:00
Jon Evans ccc76aad2f Fix typo loading legacy tenting setting 2024-06-12 17:42:44 -04:00
Alex Shvartzkop 44a33eedf4 Update only visible track segments in redrawNetnames.
RequestRefresh doesn't seem to be needed.
2024-06-13 00:28:37 +03:00
Alex Shvartzkop f0e9f9f15a Optimize PAD LoD calculation. 2024-06-12 23:05:33 +03:00
Alex Shvartzkop 52daf14c78 Optimize VIA LoD calculation. 2024-06-12 23:05:33 +03:00
Alex Shvartzkop 9d0ee029bc Add a upper >= lower check to Clamp.
Similar to std::clamp.
2024-06-12 23:05:33 +03:00
Alex Shvartzkop e49d233923 Move BOX2I_MINMAX to separate header. 2024-06-12 23:05:33 +03:00
Mike Williams a5e2615251 Revert "SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL"
This reverts commit 0b187e7122.
2024-06-12 13:30:29 -04:00
Mike Williams 0c45f85bc0 Revert "sch_symbol: use fail message fall back to dummy symbol when passed null"
This reverts commit e0e837189d.
2024-06-12 13:30:29 -04:00
Jeff Young 0ca7a81181 Deferred redraw for netnames. 2024-06-12 17:20:20 +01:00
Jeff Young b7161181e8 Hidden footprint libraries are not yet supported.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18183
2024-06-12 16:59:20 +01:00
Alex Shvartzkop 73a3b880a6 Slightly optimize GPU_CACHED_MANAGER::DrawIndices. 2024-06-12 16:04:47 +03:00
Jeff Young 694a7db457 Performance improvements.
Don't construct a wxString or a LSEQ when you don't
have to.  They're both more expensive than you might
think.
2024-06-12 11:06:10 +01:00
Jon Evans 63cd110720 Make verbiage more clear 2024-06-11 22:19:33 -04:00
Jon Evans 896f56772f Fix warnings 2024-06-11 22:01:06 -04:00
Jon Evans 5fc0f1f51e ADDED: Independent control of front/back via tenting 2024-06-11 21:50:25 -04:00
Jon Evans 4aab9f59aa ADDED: Support tenting control of individual vias
REMOVED: Tenting option from plot dialog (tenting is now
         controlled from Board Setup and via properties)

See https://gitlab.com/kicad/code/kicad/-/issues/2402
2024-06-11 21:25:02 -04:00
jean-pierre charras 2a37580839 Symbol editor: ensure the left panel is correctly refreshed when hiding a pane. 2024-06-11 17:48:25 +02:00
Jeff Young d865bda4f2 Cache display netnames.
Also changes the redraw behaviour to not try and redraw
only when things entered the view (this didn't work
because it may be the netname that's entering the view,
not the whole track).  Instead we only process a finite
number of tracks on each idle event (in order to avoid
#12436).

Note that we don't need the timer at all anymore as the
netnames are in fixed locations on the track and never
make the track look like it's being dragged.

Also improves performance by avoiding sqrt.
2024-06-11 16:30:52 +01:00
Wayne Stambaugh 74070afbc6 Fix a bunch of GCC build warnings compiling the schematic editor.
Apparently GCC does not like competing definitions of the == operator.
The recent refactoring away of all LIB_ITEM objects created a conflict
with the SCH_ITEM == operator definition.  This change required some
rather ugly comparison changes.  There were no unit test failures but
that doesn't mean something didn't get broken.
2024-06-11 08:07:32 -04:00
jean-pierre charras 9bf0b479ed fix a compil issue on msys2 2024-06-11 10:58:21 +02:00
Alex Shvartzkop 44fd13af47 Slight optimization for PCB_PAINTER when drawing vias/tracks. 2024-06-11 05:30:02 +03:00
Seth Hillbrand 8dd93501cf Add additional VECTOR2 tests
Check overflow, addition using alternate value representations and
clamping
2024-06-10 15:21:44 -07:00
Seth Hillbrand 37191720ca Add common VECTOR2 test cases 2024-06-10 15:12:57 -07:00
Seth Hillbrand 439c25fca9 Altium schematic parser: Add fraction pin placement
In the schematic libaries, pin positions that are off 10mil spacing need
fractional elements stored in a different location
2024-06-10 15:02:18 -07:00
Alex Shvartzkop 35d60598d5 Fix build error on MSVC. 2024-06-11 00:06:32 +03:00
Seth Hillbrand 9d9028c979 Handle unsigned VECTOR2 casts
The previous overflow handling code casted the int_min value into an
unsigned, meaning that the min value and max value were almost the same,
clamping the output to unreasonable values.

Updated code handles floating points first, then does integer casting
through int64_t
2024-06-10 12:40:01 -07:00
Seth Hillbrand 1325701956 Altium SCH Lib updates
- Use pin-compatible line widths for symbols
- Handle circular arcs as circles, not elliptical arcs
2024-06-10 12:40:01 -07:00
Jeff Young de2fbbd11a Fix stack address escaping routine. 2024-06-10 20:23:36 +01:00
Jeff Young 4e133ae83b Cleanup. 2024-06-10 20:23:36 +01:00
Jeff Young a02cb75656 Cleanup. 2024-06-10 20:23:36 +01:00
JamesJCode 0826c10a20 Don't re-add deleted netclass assignments in incremental connectivity
Ensures that if moving or deleting a netclass directive label, the
netclass on the previously-assigned net doesn't have the stale
netclass re-applied.
2024-06-10 20:19:07 +01:00
Alex Shvartzkop d40bbed591 Cairo GAL: improve alignment between arcs and segments and of odd-width lines.
(cherry picked from commit f60b76696a)
2024-06-10 21:26:17 +03:00
Wayne Stambaugh 5e048bc64c Fix several Eagle schematic import issues.
Fix broken arc angle polarity due to library symbol changes.

Fix broken wire and text Y axis coordinate polarity due to library symbol
changes.

Fix broken field visibility and position on library symbols with multiple
units that have fields with different visibility and positions.  Because
KiCad does not support this, when parsing the Eagle schematic file, the
last library symbol unit parsed ends up being the field visibility and
position for all units in the symbol.
2024-06-10 11:28:20 -04:00
Wayne Stambaugh 889931505b Eagle schematic importer improvements.
Change Eagle file importer to use a two pass import.  The first pass
parses the entire Eagle file into an associated E* object.  The second
pass converts the parsed E* objects into the appropriate KiCad objects.

Improve handling of Eagle versioned libraries.

Add helpers to IO_BASE to ease handling of PROGRESS_REPORTER and REPORTER
objects.

ADDED: Support for importing Eagle schematic modules.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1813
2024-06-10 11:28:20 -04:00
Mike Williams e0e837189d sch_symbol: use fail message fall back to dummy symbol when passed null 2024-06-10 11:24:58 -04:00
Wayne Stambaugh 012d3f098f Fix build error caused by commit 82c2bda52b. 2024-06-10 10:56:02 -04:00
Jeff Young 2e38fa84bf Don't allow writing "//" to spice netlist.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18161
2024-06-10 15:36:20 +01:00
Alex Shvartzkop 0d2838518b Altium PCB import: don't add thickness to Solid style fills.
(cherry picked from commit b34dbf58c5)
2024-06-10 17:33:26 +03:00
Alex Shvartzkop 82c2bda52b Altium PCB import: make sure Polygon fill is contained within the outline. 2024-06-10 17:21:41 +03:00
Mike Williams 0b187e7122 SCH/LIB SYMBOL: never allow null LIB_SYMBOLs in SCH_SYMBOL
Also always always flatten incoming lib symbols.
2024-06-10 08:36:42 -04:00
Jeff Young aa1fb0604a Fix KeepUpright settings in Eagle gold files. 2024-06-09 23:38:54 +01:00
Alex Shvartzkop 43dab2a8b5 Altium PCB import: avoid integer overflows when rotating rectangular fills.
Fixes artifacts seen in https://gitlab.com/kicad/code/kicad/-/issues/18156

(cherry picked from commit 3ea314cb9f)
2024-06-10 01:01:32 +03:00
Jeff Young ca54eb422b Don't default KeepUpright to true in Eagle importer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18175
2024-06-09 22:19:26 +01:00
Alex Shvartzkop ee8b74d688 QA: update golden data for Altium "Tracks" PcbLib.
(cherry picked from commit c6b483acb9)
2024-06-09 23:03:33 +03:00
Jon Evans 74517856ca Make touchscreen events Windows-only
They break things on macOS and probably also on GTK
according to the wxWidgets documentation.
2024-06-09 13:18:32 -04:00
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