Jeff Young
29f2afedbd
Fix hidden text painting.
2023-08-04 11:37:46 +01:00
jean-pierre charras
a16ab0aae1
Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
...
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344
about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
jean-pierre charras
2cb23bd43a
VIA on solder mask: fix incorrect size (radius) of displayed mask
2023-07-11 17:35:30 +02:00
jean-pierre charras
74c5f5a054
Ensure a layer exists before using it.
...
Fixes #15170
https://gitlab.com/kicad/code/kicad/-/issues/15170
2023-07-11 16:19:46 +02:00
jean-pierre charras
ab4535f01b
Pcbnew, show solder mask on VIAS: refinement: take in account the mask expansion.
2023-07-11 11:07:50 +02:00
Jeff Young
879e6c302d
Redraw via mask layers when switching Tented Vias on/off.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-10 23:29:54 +01:00
Mike Williams
37837dc392
PCB: introduce PCB_FIELD_T
2023-06-20 18:34:52 +00:00
Jon Evans
7d6cb4e77b
DRC markers should not be considered inactive layers
2023-06-19 21:58:08 -04:00
Jeff Young
f5791f5dc6
Left some fixes out of previous commit.
2023-05-29 16:22: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
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
Seth Hillbrand
0de24bfd59
Cleanup text alignment between version 6 and 7
...
Version 7 text alignment changed subtly for stroke fonts from version 6.
Additionally, the output has been different between screen and plotting,
leading to offset text in plotted output relative to the text shown on
screen.
This introduces a fudge factor in FONT::getLinePositions to correct the
offset in the plotting output relative to v6.
This also changes the SCH_PAINTER and PCB_PAINTER to correct the
relative offsets between GAL and PLOTTER classes. The source of these
offsets is atm unclear.
Fixes https://gitlab.com/kicad/code/kicad/issues/14755
2023-05-17 13:33:49 -07:00
Jeff Young
35158a7db9
Use track opacity for teardrops.
2023-05-11 15:57:44 +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
jean-pierre charras
ba12f00c15
Pcbnew: re-add draw umbilical line for texts in footprints.
...
It was lost after removing FP_TEXT in code.
2023-04-18 09:48:46 +02:00
Jeff Young
7e5fedef6a
Markup fixes.
...
1) allow escape sequences inside markup sequences
2) keep overbar when inside nested markup
3) always place overbar at full height, not sub/superscript height
Fixes https://gitlab.com/kicad/code/kicad/issues/14553
Fixes https://gitlab.com/kicad/code/kicad/issues/13449
2023-04-17 17:56:54 +01:00
Jeff Young
bbd6c80507
Collapse FP_* down into their PCB_* equivalents.
2023-03-31 22:57:46 +01:00
Seth Hillbrand
f93fde15b7
Locked shadow needs to be in shadow color
...
Otherwise, text shadow is stroked by text color
2023-03-28 13:01:08 -07:00
Jeff Young
c9351dfd67
Drawing improvements for symbol & footprint diffs.
...
Moves forced-transparency setting down into VIEW_ITEM so that it can
be used to place forced-transparent objects in a different target.
This keeps EnableDepthTest() from equalizing the alpha values between
the two symbols (or two footprints).
2023-03-11 12:45:16 +00:00
Jeff Young
357427d803
Graphical diff for board vs library footprints.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13736
2023-03-10 17:16:40 +00: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
jean-pierre charras
d3c5f25be6
Pcbnew: optimize netname and num text size and position display on pad.
...
Sizes where a bit too big. Fix also a difference between Cairo and OpenGL.
Fixes #13872
https://gitlab.com/kicad/code/kicad/issues/13872
2023-02-25 11:05:21 +01:00
Seth Hillbrand
887c740c2e
Limit the number of potential netnames
...
Don't set text if outside of the clipbox. Text is non-cached so will
get redrawn on zoom
Fixes https://gitlab.com/kicad/code/kicad/issues/13572
2023-02-04 11:17:09 +01:00
Alex
13ce2ebf46
15% rendering optimization in PCB_TRACK::ViewGetLOD.
2023-01-27 18:37:43 +03:00
Jeff Young
12215647f1
Handler blind/buried/micro via drawing when all layers are hidden.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13607
2023-01-20 19:09:12 +00:00
jean-pierre charras
90c76fa4bc
Pcbnew: display first and last layer ID on buried and micro vias.
...
Fixes #13566
https://gitlab.com/kicad/code/kicad/issues/13566
2023-01-18 09:56:25 +01:00
Jeff Young
22497502e6
Don't leave a dummyPad in a group. Freeing it will cause problems.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13556
2023-01-16 17:30:40 +00:00
Jeff Young
096cc7a5ad
Suppress unflashed annular rings only when copper layer is primary.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13471
2023-01-11 18:15:46 +00:00
Jeff Young
e509fa0fc9
Don't depend on a pad being connected to a non-zone when filling zones.
...
If the pad hasn't already been owned by another zone, and the zone we're
currently filling can connect to it, then we want to try to flash it even
if it's not connected to anything else.
Fixes https://gitlab.com/kicad/code/kicad/issues/13415
2023-01-07 19:34:32 +00:00
Jeff Young
2cbb66d70d
Dim other pads when in pad edit mode.
2023-01-06 11:13:57 +00:00
Mike Williams
d62681f6db
PCB Editor: fix pad preview sketch mode not applying immediately
2022-12-28 12:27:57 -05:00
Jeff Young
5dce8323e8
KIGFX::REPAINT is not enough if the item isn't in the view.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11656
Fixes https://gitlab.com/kicad/code/kicad/issues/13217
2022-12-24 17:18:22 +00:00
Seth Hillbrand
bd40684ecd
Handle polygons' triangulation
...
Graphic polygons may be invalid and so need to be explicitly simplified
before triangulation.
Also clean up hole handling in triangulation routine
2022-11-28 15:46:12 -08:00
Alex
f9bfb8534f
Fix orientation of track netnames.
2022-11-16 00:43:06 +05:00
jean-pierre charras
90238dede8
PCBNEW_PRINTOUT: fix incorrect size of holes printed with the "small drill" option
...
Fixes #12880
https://gitlab.com/kicad/code/kicad/issues/12880
2022-11-12 16:02:24 +01:00
Seth Hillbrand
8b7d997a6d
Fix broken refactor
...
Don't trust the automatic refactor. It misses the strangest things
2022-11-08 20:30:30 -08:00
Seth Hillbrand
39774463db
Remove extra line
2022-11-08 16:35:03 -08:00
Seth Hillbrand
056f45cd70
Fixup most intersecting polygon points
...
Remaining is the intersecting complex pad, so this keeps the error
message when drawing
Fixes https://gitlab.com/kicad/code/kicad/issues/12806
2022-11-08 16:05:04 -08:00
Jeff Young
396e220133
Non-visible layers are stored in the GPU so still have to be drawn.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12792
2022-11-06 17:37:29 +00:00
Jeff Young
25f06eed8c
Move zone borders back to their "host" layer.
...
Zone borders shouldn't be affected by zone-opacity control; we always
draw them in full layer opacity.
Fixes https://gitlab.com/kicad/code/kicad/issues/12438
2022-11-05 16:50:54 +00:00
Seth Hillbrand
c1f2ca1d8d
Make multiple names of the net on a track
...
Rather than moving the netname around, we want to keep the correct
number of netnames on a track such that there is always at least one
displayed on long tracks even when panning.
This reduces calculation time while keeping the netnames visible
Fixes https://gitlab.com/kicad/code/kicad/issues/12436
2022-11-04 11:49:50 -07: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
Jeff Young
d16b23d16e
Name shortening and line-break reduction.
2022-10-21 18:41:39 +01:00
Jeff Young
8d40bf25d6
Need to setup outline mode stuff if it's turned on late.
2022-10-18 14:41:27 +01:00
Jeff Young
437d2c4589
Overhaul of remove-unconnected's zone filling and drawing strategies.
...
1) The highest priority zone that a via/pad collides with "owns" its
connectivity state. Once set, lower priority zones cannot change it --
and in fact, if they would have connected to it are forced not to.
2) The connectivity state goes with the zone fill state, and therefore
must be saved in the file.
3) Display of remove-unconnected's pads is no longer done in GetViewLOD()
(which isn't called for selected items), and is instead done in PCB_PAINTER.
This allows us to draw the full pad in outline mode when a via/pad is
selected which would otherwise only show the hole.
4) Note that in some cases this will still generate DRC errors -- in
particular when a via nearly collides with a higher priority zone it
won't get "owned" by that zone and may therefore have insufficient
clearance if said zone concludes it's unconnected and a subsequent
(lower priority) zone connects to it (causing it to now become flashed).
Fixes https://gitlab.com/kicad/code/kicad/issues/11299
2022-10-18 13:05:42 +01:00
Jeff Young
e866dfe137
Avoid trying to draw empty pads.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12605
2022-10-09 20:28:54 +01:00
Jeff Young
04fec5016b
Add keepout zones set to keepout footprints to footprint courtyard checker.
...
(This is for the move tool, not DRC. DRC uses more sophisticated keepout
processing which is too slow for the move tool, and doesn't let us know which
keepout area collided for collision highlighting.)
Fixes https://gitlab.com/kicad/code/kicad/issues/12594
2022-10-07 22:23:37 +01:00
Jeff Young
513fc872bb
Support both X and Y mirroring in FPEditor.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12409
2022-09-21 00:16:27 +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
Jeff Young
aa0863cdf4
Don't mirror text on non-physical layers when in flip board view.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10037
2022-09-16 00:46:14 +01:00
dsa-t
bd8b737c44
GAL: Do better job at reserving vertices.
2022-09-14 16:07:47 +00:00
Jeff Young
281b9d405a
ADDED ability to specify where pad number (& net name) go on custom shaped pads.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6627
2022-09-14 11:37:20 +01:00
Jeff Young
9523586bf1
Remove atrophied PCB NO_CONNECTS layer and its colour.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/12316
2022-09-08 00:28:31 +01:00
Jeff Young
16b4f96405
Centralize no-connect- and free-pad processing.
...
Also makes the track-net-names less squirrelly around the viewport
edges.
2022-09-06 13:59:52 +01:00
Jeff Young
b4492e0bd2
More EDA_RECE yeetage.
2022-08-31 17:19:50 +01:00
Jeff Young
2dc6300501
Move EDA_ITEM bounding boxes to BOX2I.
2022-08-31 10:16:55 +01:00
jean-pierre charras
a306246558
Fix a few (minor) compil and Coverity warnings.
2022-08-25 20:21:00 +02:00
Jeff Young
ae86c6f3a7
Don't include text in locked-item-shadow-calc for footprints.
...
And make shadow margins consistent for all objects.
Fixes https://gitlab.com/kicad/code/kicad/issues/11545
2022-08-24 10:30:20 +01:00
Jeff Young
6cfbf895fc
Make sure parent pos is factored in for polygons.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11945
2022-08-16 17:28:56 +01:00
Jeff Young
96f01d33c8
Performance improvements.
...
1) Move a bunch of std::map's to std::unordered_map to get constant-time
look-ups
2) Lengthen progress-reporting intervals to spend more time doing work
and less time talking about it
3) Reverse order of SHAPE_LINE_CHAINs in thermal intersection checks to
make (much) better use of bbox caches
4) Don't re-generate bboxes we already have
5) Fix some autos that weren't by reference (and were therefore copying
large datasets)
6) Rename delta progressDelta so it's easier to search for in future
7) Get rid of a few more autos (because I don't like them)
8) Pass large items to lambdas by reference
Fixes https://gitlab.com/kicad/code/kicad/issues/12130
2022-08-03 11:59:42 +01:00
Jeff Young
43df863df2
Fix issue with caches not being initialized when printing msg bar.
2022-08-01 13:09:51 +01:00
Jeff Young
e10158ff10
ADDED show pin names on footprint pads when assigning to symbol.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4576
2022-07-24 23:41:41 +01:00
Jeff Young
1bad72f14f
Remove bad static_cast.
...
(m_settings isn't a PCBNEW_SETTINGS in non-PCB_EDIT_FRAMEs)
2022-07-24 23:41:41 +01:00
jean-pierre charras
8eee766791
Fix Cvpcb DISPLAY_FOOTPRINTS_FRAME: some display options not working. Commit 5e4a7041
moved 4 settings used in Cvpcb to a PCBNEW_SETTINGS struct. But in Cvpcb, this config struct does not exist. So these 4 settings are now moved to a section (PCB_VIEWERS_SETTINGS_BASE) common to Cvpcb and Pcbnew config.
2022-07-23 18:45:13 +02:00
Jeff Young
f41af10007
Clean up hole shapes for safety (smart pointer) and consistency.
2022-07-22 23:06:07 +01:00
Mike Williams
f8b157a1fb
PCB: Bitmaps should respect layer opacity and highlighting options
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/12045
2022-07-20 14:59:19 -04:00
Seth Hillbrand
c8a383a48e
Get via font fill/color correct when highlighted
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11802
2022-07-15 11:40:46 -07:00
Mike Williams
99f8b21ed1
PCB: Add bitmap layer per board layer
2022-07-14 11:23:23 +00:00
Mike Williams
3669cb4673
PCB Editor: Add User Background Images
2022-07-14 11:23:23 +00:00
Jeff Young
231ac567b8
Bug fixes for printing vias.
...
Blind/buried and microvias didn't get their layers trimmed properly,
nor did through vias with dropped pads.
Fixes https://gitlab.com/kicad/code/kicad/issues/11851
2022-06-19 11:58:21 +01:00
Jeff Young
fa11e1c097
Take text height into account as well as thickness for knockout margin.
...
Also centralizes calculation so all clients will get the same answer.
Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-20 12:29:01 +01:00
jean-pierre charras
57e59a4959
Pcbnew, on line DRC when moving footprints: add visible collisions between courtyards
2022-05-20 12:58:05 +02:00
Jeff Young
cc86d3da2a
Give up trying to find a one-size-fits-all boudningBox for text.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-18 17:14:57 +01:00
Jeff Young
492259a1d4
Outline font bug fixes for PCBNew dimensions.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11583
2022-05-06 18:14:25 +01:00
jean-pierre charras
1d5be1adeb
Cairo GAL: fix incorrect size and thickness of text drawn by GAL::BitmapText()
2022-04-08 18:40:26 +02:00
Jeff Young
90af5a36d2
Show hole clearance lines around NPTH pads.
...
Also make the clearance line NONPLATED_HOLES colour, not the PADS_TH
colour.
2022-04-04 10:28:33 +01:00
Jeff Young
cf611f1742
Better safety around layersets.
2022-03-21 18:19:00 +00:00
Jeff Young
4225f92573
Slight improvements to via drawing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8717
2022-03-16 14:56:32 +00:00
Jeff Young
65185f53a1
Rotate fp zones before comparing with library versions.
...
Also includes some performance fixes to not copy around triangulation
data when it's not needed.
Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young
e03b06927d
Fix rotation problems for knockout fp text, and implement 3D rendering.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/11086
2022-03-12 14:17:52 +00: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
jean-pierre charras
016af235db
Pcbnew: add a GAL layer (LAYER_LOCKED_ITEM_SHADOW) to draw markers on locked footprints
2022-03-09 17:54:58 +01:00
Jeff Young
40fd8860fe
Plotting (and some bug fixes) for knockout text.
2022-03-08 18:06:41 +00:00
Jeff Young
293021c58c
ADDED: knockout pcb and fp text.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/7055
2022-03-08 13:22:20 +00:00
Jeff Young
bf0f2aa4a8
Adjust bitmap text spacing a bit so it's closer to the stroke font.
...
This helps the text better match the highlighting when it gets small
enough that we switch to the bitmap font for performance.
2022-03-07 20:30:50 +00:00
Jeff Young
513486b0ec
Overhaul show no-net indicators logic.
...
It doesn't appear that it was ever finished the first time around.
Fixes https://gitlab.com/kicad/code/kicad/issues/11020
2022-03-02 18:28:39 +00:00
Jeff Young
69a6033905
Hysteresis for track netnames.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10416
2022-02-28 21:11:01 +00:00
Jeff Young
5544dd8018
Don't call GetLayer() on a multi-layer object.
2022-02-21 00:08:43 +00:00
Jeff Young
bc24002be7
Don't print clearance lines.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10883
2022-02-17 23:59:09 +00:00
Jeff Young
2172810600
Performance: better sharing of zone fills.
2022-02-15 19:19:03 +00:00
jean-pierre charras
a455dd8815
Fix issue for stand alone python scripts, when running without project.
2022-02-14 18:58:55 +01:00
Jeff Young
a2ca8cf413
Improve SNR.
2022-02-12 18:38:11 +00:00
Jeff Young
3deaf902bb
Retire the V5 zone fill algorithm.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +00:00
Jeff Young
7ccac79192
More wxString wide literals.
2022-02-05 21:29:34 +00:00
Jeff Young
5739505aa3
TextBoxes for PCBNew.
2022-01-31 20:00:47 +00:00
Jeff Young
09d0f6e17c
Map zone layers before checking their visibility.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10509
2022-01-21 23:26:10 +00:00
Jeff Young
4e493e2cbc
Clean up some more deci-degrees.
2022-01-18 14:08:47 +00:00