Commit Graph

265 Commits

Author SHA1 Message Date
Seth Hillbrand 4d2b964f52 Use actual bounding limits for LIB_PIN bbox
The extra padding causes unwanted disambiguation menus especially when
working with LIB_PINs that tend to be closely packed

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16183
2023-11-28 10:47:57 -08:00
Seth Hillbrand d99641be40 ADDED: Git integration support
Adds support for project-based git integration, branch support, commit,
revert and updates

Fixes https://gitlab.com/kicad/code/kicad/issues/10441
2023-10-20 12:51:47 +00:00
Seth Hillbrand 1555b207a8 Add PIN_NAME and PIN_NUM to the layer ordering
This ensures that pin names/numbers are shown above the graphics
2023-09-06 19:15:35 +00:00
Jeff Young ace394aab9 Minor cleanup. 2023-08-30 11:09:11 +01:00
Jeff Young 1eaadf7c7f Clean up pin text plotting code and update print code to match.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15501
2023-08-30 10:56:04 +01:00
Jeff Young c3d6fecccc Update pin plotting to match pin painting.
(In particular, we moved the number to the top when the name is
not shown, but forgot to update the plotter.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15501
2023-08-29 11:17:35 +01:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Jon Evans 148e111579 Refactor pin orientation to be an enum class
Add various LIB_PIN properties
2023-07-26 23:46:15 -04:00
Jon Evans 000fa28ffc Properties: initial infrastructure for symbol editor 2023-07-26 18:32:14 -04:00
Jeff Young 9854acd9e6 Don't set IS_CHANGED on symbol when modifying LIB_PINs for painting. 2023-06-25 16:01:35 +01:00
Jeff Young 47bba3cbeb Correct logic errors in pin bounding box calculation.
The name and number are both centred, and either one can be long
enough to be the determining factor for either side of the bounding
box.
2023-05-31 12:51:56 +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
Wayne Stambaugh d962b062ca Fix crash when duplicating symbol unit with alternate body style.
* Add check for valid symbol library link in annotation code to prevent
  crash even if the symbol was not defined correctly.  This will assert
  in debug builds.
* Fix broken pin comparisons when library symbols have units with alternate
  body style defined.
* Remove some macros from LIB_SYMBOL comparison function which made
  debugging painful.
* Exit LIB_SYMBOL comparison function as soon as non-equivalent comparison
  occurs.
* Fix broken library symbol comparison due to name differences when
  checking for existing variants of the library symbol.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14491
2023-04-08 15:29:01 -04:00
jean-pierre charras 7eb13c3d33 Symbol editor: clear the edit flags of a pasted pin after place it.
When pasting a single pin, its edit flags were not cleared, and create
issues when trying to edit the pasted pin.
Fixes #14188
https://gitlab.com/kicad/code/kicad/issues/14188
2023-04-06 11:08:01 +02:00
jean-pierre charras 51d46c0e73 plotters rework: add plot fct to use TEXT_ATTRIBUTES class to pass text settings
Old PLOTTER::Text is not (yet) removed, but it use negative text size
to mirrored text, which is not really compatible with some plotters (especially PDF).
Using TEXT_ATTRIBUTES is much easy and much better,
so PLOTTER::PlotText() is added.
Note: "old" PLOTTER::Text() is not removed yet.
2023-02-26 14:44:53 +01:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Jeff Young bc108023b3 ADDED operating point overlay for SCH_EDIT_FRAME.
Fixes https://gitlab.com/kicad/code/kicad/issues/11253
2023-02-11 21:11:07 +00:00
Jeff Young 9ce5978c3d Bug fixes for LIB_PIN boundbox generation. 2023-02-11 20:43:00 +00:00
Jon Evans c530bdb5a1 Rename GetSelectMenuText to GetItemDescription
This descriptive text is used for many more things than
just the select menu these days.
2023-01-11 22:27:44 -05:00
PJM 76a0d4c4c0 Eeeschema: Fixed logic to display unamed pins properly
CHANGED:  This code previously checked "m_name.IsEmpty()" to choose the
correct formatting path, but that check fails if the pin is called "~"
which is the default for an empty pin name.  Instead we get the final
display string that will be shown and check if it's empty.

Fixes https://gitlab.com/kicad/code/kicad/issues/13332
2023-01-11 21:45:32 +00:00
Seth Hillbrand a206f6717d Desaturate the symbols in DNP for print/plot
The desaturation should match screen display

Fixes https://gitlab.com/kicad/code/kicad/issues/13481
2023-01-11 13:44:08 -08:00
Jeff Young f33b158696 Honour 0-size pin names & numbers when printing and plotting. 2022-11-03 17:19:59 +00:00
Jeff Young a072c22b74 Show pin hidden state in menu text.
Fixes https://gitlab.com/kicad/code/kicad/issues/5625
2022-10-24 11:35:45 +01:00
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
Jeff Young fb80f83335 Formatting. 2022-09-27 11:12:58 +01:00
Alex 58b03b0a1c Small optimizations. 2022-09-22 17:22:04 +00:00
jean-pierre charras 78087597cd Avoid including plotters/plotter.h in many files.
It avoid a large rebuild when modifying the plot code.
2022-09-21 08:52:34 +02:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko 61e11d6896 Strip out Mils2Iu 2022-09-16 21:09:27 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Seth Hillbrand 524b129c64 ADDED: Support for explicit DNP field
Dims elements shown as DNP.  Adds property `dnp` to explicitly denote
parts that should not be populated. These parts are not included in X/Y
files
2022-09-16 22:26:16 +00:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Wayne Stambaugh 26e7261b20 Eeschema: fix schematic symbol library cache refresh bug.
Please note that this changes the LIB_PIN object name comparison from case
insensitive to case sensitive.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12342
2022-09-09 13:30:34 -04:00
Jeff Young 6f5281258e Separate text-thickness clamping into strict and lenient modes.
We used to use the bold setting, but since PCBNew allows you to
directly define the width you end up with settings in between normal
and bold that get clamped to the normal max.

Fixes https://gitlab.com/kicad/code/kicad/issues/12367
2022-09-08 00:28:30 +01:00
Jeff Young ebe9617e77 More EDA_RECT expungification, and an attempt to fix the python test. 2022-08-31 17:19:48 +01:00
Jeff Young f17a865593 Move EDA_ITEM hitTest to BOX2I. 2022-08-31 17:18:45 +01:00
Jeff Young 2dc6300501 Move EDA_ITEM bounding boxes to BOX2I. 2022-08-31 10:16:55 +01:00
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04:00
Jeff Young 3def3d659e Allow click-selection and greedy-drag selection of visible pin text.
Stingy drag still works only on the pin itself.

Fixes https://gitlab.com/kicad/code/kicad/issues/11723
2022-07-23 23:27:14 +01:00
Mike Williams e454595348 Eeschema: Changing pin length adjusts offset according to orientation
ADDED: When pin length is changed now, the pin position is adjusted
according to its orientation such that the connection point for wires
moves instead of the other side of the stem base. For pins coming out of
component boxes, etc. this keeps them attached to the box while the
length is changed.
2022-07-11 13:58:06 -04:00
Jeff Young 62cef3d830 Add LAYER_PRIVATE_NOTES for private text & graphics in symbol editor.
Fixes https://gitlab.com/kicad/code/kicad/issues/11957
2022-07-08 17:27:05 -06:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Jeff Young 76535d8572 Make LIB_ITEM::COMPARE_FLAGS really a flags field, and add ERC.
Before they were 1/2 treated as flags and 1/2 treated as a mode enum.

The ERC flag relaxes constraints on data that is settable in the
schematic editor.

Fixes https://gitlab.com/kicad/code/kicad/issues/11018
2022-03-03 13:27:18 +00:00
Jeff Young 79ad15b4fa Fix copy/pasta.
Fixes https://gitlab.com/kicad/code/kicad/issues/11005
2022-03-01 14:59:29 +00:00
jean-pierre charras 7e6829e834 Fix minor compil warnings 2022-02-12 11:43:38 +01:00
Jeff Young 082c6f5bd6 Make sure plotter uses default font when specified. 2022-02-10 20:33:06 +00:00
Jeff Young f11b8011cd Separate plotting into background and foreground.
Fixes https://gitlab.com/kicad/code/kicad/issues/10390
2022-02-10 20:33:06 +00:00
Jeff Young aedfe08bad Show pin dangling symbols in Symbol Editor.
Even though we don't have connections they're a still a good visual
indication of which end of the pin is which.

Fixes https://gitlab.com/kicad/code/kicad/issues/10742
2022-02-06 19:43:25 +00:00
Jeff Young 60bcfd1bf1 Bug fixes in arc & textbox printing.
Also removal of the no-longer-used clipping code from GR*.
2022-01-31 20:00:47 +00:00