Commit Graph

87 Commits

Author SHA1 Message Date
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03:00
jean-pierre charras 4d1f9f6fb9 Pcbnew: Fix some draw issues in PCB_TEXT and PCB_TEXTBOX:
- fix incorrect ViewGetLayers() layer list.
- fix incorrect color of graphic items (BOARD_CONNECTED_ITEM items) on copper layers
- slightly modify how a PCB_TEXTBOX is drawn on LAYER_LOCKED_ITEM_SHADOW.
Fixes #15458
https://gitlab.com/kicad/code/kicad/-/issues/15458
2023-08-20 17:33:11 +02:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Jeff Young c697a934b2 Update layer names to current terminology.
Also fixes some out-of-date tooltips/names.
2023-08-04 11:37:46 +01:00
Roberto Fernandez Bautista cf0b719a4a Fix some unreachable code msvc warnings 2023-07-16 15:41:05 +02:00
Jeff Young a66360525a Broaden "Style footprint fields" to cover graphics as well.
Also cleans up the layout of the symbol & fp properties dialogs.

Also fixes the background colour of the link textEdit controls on Mac.

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15152
2023-07-09 12:45:55 +01:00
Mike Williams 6d93950dcc PCB: abolish TEXT_TYPE::TEXT_is_*
PCB_TEXT is now always what was formerly TEXT_is_DIVERS and PCB_FIELDs
now what mandatory field type they are already.
2023-06-20 18:34:52 +00: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
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 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 95a09f686b Revert attempt to use drawing code to generate text bounding boxes. 2023-05-27 22:11:34 +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 b41d446f58 Fix a bunch more issues with sheetpaths and allowExtraText.
A sheetpath is required to correctly resolve text variables.
Depending on currentSheet is rife with bugs.

There are many places where we do *not* want to be prepending
field names to the field values, such as netlisting,
building PDF hypertext menus, etc.

Also, Find/Replace needs to work on unresolved text, as
that's what we're going to display (and if replace nuked
your variable references you wouldn't be happy).
2023-05-05 17:23:52 +01:00
Jeff Young adc213a04d Add Keep Upright to properties inspector.
Fixes https://gitlab.com/kicad/code/kicad/issues/14421
2023-04-10 00:00:54 +01:00
jean-pierre charras 31354a2d91 PCB_TEXT::TransformTextToPolySet(): fix some issues:
- incorrect rotation for texts with option "Keep Upright"
- missing code for knockout texts.
Fixes #14473
https://gitlab.com/kicad/code/kicad/issues/14473
2023-04-02 09:54:53 +02:00
Jeff Young b80a9014ff Fix gcc warning. 2023-03-31 23:53:11 +01:00
Jeff Young bbd6c80507 Collapse FP_* down into their PCB_* equivalents. 2023-03-31 22:57:46 +01:00
Jeff Young 23accffc6d Add Property Inspector support for dimension objects.
Includes changing the class hierarchy so that dimension objects inherit
from PCB_TEXT rather than containing a PCB_TEXT member variable.
2023-03-04 23:16:46 +00:00
Jeff Young 2312cf34c4 Pay attention to knockout text when adding to DRC Rtrees. 2023-01-25 18:34:03 +00:00
Jeff Young 26c821962f Simplify and regularize text variable substitution architecture.
EDA_ITEMs are responsible for giving their parent a crack at it if
they failed to resolve it.  This recurses all the way up to the schematic/
board, and then to the project.

Cross-reference handling is also move to the EDA_ITEMs.  It must be done
before bubbling up so that we don't end up in loops.  (The aDepth parameter
will break the loop, but without having done anything useful.)

Fixes https://gitlab.com/kicad/code/kicad/issues/13541
2023-01-17 17:05:41 +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
Jon Evans 18788b03eb Properties: Hide unsupported hyperlink property 2022-12-22 17:45:16 -05:00
Jon Evans ad33515916 Properties: mask visibility for free text 2022-12-08 18:06:14 -05:00
Jon Evans a5f7ecbe00 Properties: support text knockout 2022-12-02 21:46:03 -05:00
Jon Evans 88495e5be1 Properties: Fix masking of layers for non-copper items
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12884
2022-11-24 20:34:40 -05:00
Jeff Young 03ba14c6d3 Tighten lifecycle management of parent group pointers.
Also adds some debugging to try to catch dangling pointers.

Also adds a cache for group bounding boxes (which will be expensive
to calculate for large groups).

Fixes https://gitlab.com/kicad/code/kicad/issues/12875
2022-11-11 17:27:28 +00:00
Jeff Young f480cbf93f Treat internal copper layers as side-specific.
Fixes https://gitlab.com/kicad/code/kicad/issues/12726
2022-10-25 12:08:57 +01:00
Jeff Young 4778122aa0 Flip anything on a side-specific layer, rather than physical layer.
Fixes https://gitlab.com/kicad/code/kicad/issues/12726
2022-10-24 16:54:33 +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
jean-pierre charras 63002cec57 Do not add a title/comment in mandatory field strings when writting netlists.
This is mainly for "Sheetfile" property because current it is the only one
that has a title when plotting/drawing it.
2022-10-22 12:50:26 +02:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
jean-pierre charras f3bb34779a TransformTextShapeWithClearanceToPolygon() add optimization for 3D viewer.
This function convert a text shape to a set of polygons for the 3D viewer.
Texts shapes are a bit special and can generate a lot of small overlapping polygons.
These polygons are now merged before being added to the list of polygons handled
by the 3D viewer draw functions.
Locally merging polygons is usually not efficient but in this case it can speedup
the 3D viewer (up to 10x).
Mainly noticeable for silkscreen layers when the "copper" thickness is shown
2022-10-17 07:32:30 +02:00
Jeff Young 897135a4f0 Support mirroring on the board too.
Also fixes a few bugs in FP item mirroring.

Fixes https://gitlab.com/kicad/code/kicad/issues/2168
2022-09-22 15:05:58 +01: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
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00: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
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Marek Roszko f0956e48f2 Make EDA_TEXT common
Since EDA_TEXT is a base class, we can just force the child classes to pass the correct iu scaled size

ALLOW_BOLD_THICKNESS removed because it's a pre-custom font holdover
2022-08-29 07:31:03 -04:00
Jeff Young f42b66bc1c Regularize ellipsization of menu and status text.
Fixes https://gitlab.com/kicad/code/kicad/issues/12257
2022-08-22 17:52:58 +01:00
Jeff Young 509d233d97 Fix knockout text bounding boxes and hit testing.
Fixes https://gitlab.com/kicad/code/kicad/issues/12133
2022-08-06 00:00:04 +01:00
Jeff Young 47e002a33d Add font to status bar for text objects. 2022-04-26 18:52:53 +01:00
Seth Hillbrand 442aae19d9 Separate flashing check for connectivity
When building the connectivity database, we should not be using the
connectivity to check for shapes.

To make this deterministic, we introduce two flags (ALWAYS_FLASH and
NEVER_FLASH) that are used with connectivity building to determine
whether a pad is flashed for connectivity or not.  ZONE <-> PAD/VIA
connectivity will be checked with ALWAYS_FLASHED and all other
connectivity will be checked with NEVER_FLASHED if they are marked for
potential annular ring removal.  If they are not marked for removal,
they will be checked ALWAYS_FLASHED.

Fixes https://gitlab.com/kicad/code/kicad/issues/11114
2022-03-16 17:30:01 -07:00
jean-pierre charras 0440aa3d83 Extend layer LAYER_LOCKED_ITEM_SHADOW to draw shadow markers on other locked items:
tracks, texts, graphics.
2022-03-09 18:50:31 +01:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
jean-pierre charras e560e765e6 PCB_TEXT::Rotate(): ensure the final orientation is -180 ... +180 deg 2022-02-01 18:07:14 +01:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young 1b19ff5f42 More EDA_ANGLE changes. 2022-01-14 16:08:19 +00:00