Commit Graph

38105 Commits

Author SHA1 Message Date
Jeff Young c36b0fcda7 Make sure 3D file browser is treated as modal by quit.
(Otherwise we crash when freeing it during the quit.)
2023-05-30 14:58:46 +01:00
jean-pierre charras 6b845b9054 Fix compil warnings and a wxWidgets alert. 2023-05-30 09:00:46 +02:00
Marek Roszko 6e468c5ce9 Fix more warnings
Needless const and out of order initializer
2023-05-29 23:01:58 -04:00
Marek Roszko 8381677f20 Remove --report_level=no 2023-05-29 22:23:44 -04:00
Marek Roszko 7e51bc2011 Use the result_code with boost test or else ctest will lie that it passed 2023-05-29 21:56:55 -04:00
Marek Roszko c31b5eb7d8 Fix errant typecast in VECTOR2<T>::Resize
This fails QA on Windows but not Linux
2023-05-29 19:34:40 -04:00
Jeff Young b53bc1ae38 Trim solder paste (and other layers) to holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8484
2023-05-30 00:02:27 +01:00
Marek Roszko 8b3f5de620 Add a simple testcase for VECTOR2I::Resize 2023-05-29 18:32:56 -04:00
Jon Evans 141cc85ff3 PNS: Work around collision checking issues in shove mode
Need to special-case shove mode since 942ee13c introduced
collision checking in all modes.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14836
2023-05-29 18:19:47 -04:00
Roberto Fernandez Bautista bb90aa24b7 Add basic QA test to CADSTAR PCB footprint import 2023-05-29 23:29:28 +02:00
Roberto Fernandez Bautista 3b56b7bf68 Fix assert in PROPERTY_ENUM (ENUM_MAP<PCB_LAYER_ID> was not initialised) 2023-05-29 23:29:28 +02:00
Jeff Young cb7f314f4b Handle through-hole via walls along with pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14757
2023-05-29 21:59:20 +01:00
Jeff Young f5791f5dc6 Left some fixes out of previous commit. 2023-05-29 16:22:24 +01:00
Roberto Fernandez Bautista 9633c8af22 CADSTAR PCB: Fix regression in loading of thermal pads
Due to removal of SetPos0 in 28028c94, we now don't need to compensate
for the position of the footprint while importing.
2023-05-29 16:41:47 +02:00
Jeff Young 65e53b8ecd Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation.
1) Also reorders parameters to make sure the compiler helps out.

2) This also makes it harder to mess up the discrepency between
   BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.

3) Also fixes a couple of bugs where the corner strategy was passed
   in as a segCount.

4) Also fixes a couple of bugs where the error wasn't forced to the
   outside to match the ERROR_LOCATION.

5) Also fixes a couple of bugs where the seg count was specified
   without regard to an already passed-in max deviation
2023-05-29 15:29:03 +01:00
Mike Williams 7f250870fe schematic: fix crash in search pane when hit list is empty
std::all_of also returns true for an empty set
2023-05-29 09:50:09 -04:00
Jeff Young 2612b49698 Fix erroneous wxEXPAND flags. 2023-05-29 14:23:31 +01:00
jean-pierre charras ef4dded915 PCB_TEXT::TransformTextToPolySet(): fix incorrect param when calling Inflate()
This incorrect value created hang when clicking on a pcb text.
2023-05-29 14:21:10 +02:00
Jeff Young a4f16423c8 Push reference and value special cases down into LIB_FIELD::compare().
Use COMPARE_FLAGS::EQUALITY and COMPARE_FLAGS::ERC when doing
library diffs.

Also fixes a few more cases where we weren't checking for -1 when
doing a fieldID < MANDATORY_FIELDS.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14830
2023-05-29 12:40:20 +01:00
Roberto Fernandez Bautista dfebe516c5 CADSTAR PCB: Fix memory leak 2023-05-28 23:56:43 +02:00
Roberto Fernandez Bautista 8493cc4c89 CADSTAR SCH LIB: Add plugin options + improve symbol caching 2023-05-28 23:56:42 +02:00
Roberto Fernandez Bautista 688a61df63 Add options editor to symbol library table + cleanup unused options 2023-05-28 23:56:42 +02:00
Roberto Fernandez Bautista a119bd604d Refactor: Move DIALOG_PLUGIN_OPTIONS to common and use enum for event ID 2023-05-28 23:56:41 +02:00
Jeff Young d526362d31 No sheet path has to be interpreted as the current sheet.
There's currently waaaay too much stuff that depends on it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14834
2023-05-28 20:46:50 +01:00
Jeff Young 8820df2187 Fix missing "else".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14831
2023-05-28 19:49:19 +01:00
Jeff Young 570978fa7f Replace larger text bboxes now that we're not using them for knockouts. 2023-05-28 18:17:24 +01:00
Jeff Young c71cf21e2f Use rendered text to generate bounding box for knockout text.
Don't open-code knockout text shape generation in several different
places.

Make sure triangulated knockout text gets clearance added when
specified.

Collapse duplicated footprint text item plot routine (they're no
longer any different from plotting pcb text items).
2023-05-28 17:20:11 +01:00
Jeff Young dacf0b2b96 Account for changes to mimic 6.0 text positioning in bounding boxes.
This is only a partial fix as knockout text is still busted....
2023-05-27 23:41:43 +01:00
Jeff Young 6b0bff2f4f Formatting. 2023-05-27 22:46:02 +01:00
Jeff Young 95a09f686b Revert attempt to use drawing code to generate text bounding boxes. 2023-05-27 22:11:34 +01:00
Jeff Young b8986709bf Every time I search for SCH_TEXT* it doesn't work.... 2023-05-27 21:25:36 +01:00
Jeff Young 81d7428fd2 Don't call OnPageSettingsChanges on Undo/Redo.
It's incredibly expensive (multiple seconds on a document with
lots of text in an outline font).
2023-05-27 20:35:05 +01:00
Jeff Young 3ab9175553 Spread the error-bar move evenly around justified text. 2023-05-27 18:53:04 +01:00
Jeff Young f35a88ce0b Cache LIB_PIN text extents for performance.
Also fixes a bug where we didn't triangulate at all when the char
count didn't warrant the likely overhead of spinning up a
thread_pool.

And fix another bug where EDA_TEXT::GetRenderCache() wasn't using
the given font.

Also reverts using the cache for drawing-sheet text.  The text
items are created from scratch from the data items each time
they're drawn, so there's never an existing cache to make use of.
Instead, we now check that the item is in the view, using a very
approximate bounding box generator (because even generating a
real bounding box shows up large in profiles).

And, lastly, fixes a bug where EndPos was never considered in
DS_DATA_ITEM::IsInsidePage().

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14822
2023-05-27 16:32:11 +01:00
jean-pierre charras f2f014a27c Symbol editor: ensure a new derived symbol has the correct DeMorgan option displayed.
Derived symbols use the same graphics as their parent, so ensure the parent is
used to enable/disable the DeMorgan option and tool in toolbar
Fixes #13739
https://gitlab.com/kicad/code/kicad/-/issues/13739
2023-05-27 10:13:43 +02:00
Jeff Young 4ed267394a Outline font performance improvements.
1) Don't fracture font glyphs when generating them; we're going
   to fracture during triangulation anyway.
2) Don't check for self-intersection when deciding to fracture.
   It costs nearly as much as the fracture does.
3) Cache drawing sheet text.
4) Use the current font when checking for cache validity.
5) Parallelize glyph triangulation.
6) Don't invalidate bounding box caches when offset by {0,0}
7) Use the glyph cache when generating text effective shape.
8) Short-circuit NormalizeJustification() if its center/center.
9) Don't triangulate for GuessSelectionCandidates()
10) Avoid sqrt whenever possible.
11) Pre-allocate bezier and SHAPE_LINE_CHAIN buffers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14303
2023-05-27 01:35:40 +01:00
Jeff Young ff37ebe61a Improve appearance of stroked knockout text. 2023-05-26 19:53:38 +01:00
Jeff Young cb53a18ee3 Bug fixes for handling boolean flags in DRC rules. 2023-05-26 18:44:33 +01:00
Jeff Young 768fbf5af2 Give up on trying to calculate text bounding boxes.
It results in too many hacks strewn through the code.  Just draw the
text and measure it.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14803
2023-05-26 18:44:33 +01:00
Jeff Young 6e127829f8 Cleanup formating and includes. 2023-05-26 18:44:33 +01:00
jean-pierre charras 68464a1993 Simulator: add missing ngspice models.
Fixes #14813
https://gitlab.com/kicad/code/kicad/-/issues/14813
2023-05-26 14:46:51 +02:00
Jon Evans 942ee13cd1 PNS: Allow width-caused DRC violations at start of route
Also fix an issue where DRC violations introduced by the
width change action could be committed in walk/shove mode.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14805
2023-05-25 23:10:00 -04:00
Jon Evans fbe185b99b PNS debug tool: HiDPI and settings fixes 2023-05-25 21:53:38 -04:00
Jeff Young 50da4e483e Tailor inspector text properties for dimension objects. 2023-05-25 16:18:37 +01:00
Jeff Young 5114d3b8c3 Don't use GetValueFieldText from within text var resolution.
(It resets the recursion checker.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14815
2023-05-25 14:34:20 +01:00
Steve Bollinger 28b37ad020 Someone accidentally exchanged the x and y coordinates when flipping
components horizontally and vertically in
SCH_DRAWING_TOOLS::SingleClickPlace()

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14725
2023-05-25 12:11:48 +00:00
Jeff Young 1282e00775 Fix (presumed) stale name in macOS KIPLATFORM::IO. 2023-05-25 11:26:09 +01:00
Jeff Young 05fef51d81 Push rendering portion of text cache generation down into CALLBACK_GAL. 2023-05-25 11:25:32 +01:00
Jeff Young 1518ddde74 Push much of text var autocomplete down into SCINTILLA_TRICKS.
Shared code == fewer bugs.  Well, in theory anyway....
2023-05-25 10:24:50 +01:00
Jeff Young 14f004d2a5 Hook up text variable auto-complete for PCBNew.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14777
2023-05-25 10:24:50 +01:00