Jeff Young
5875f89531
Centralize text size clamping.
...
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01: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
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
jean-pierre charras
484acd4246
BOARD_ADAPTER::addText() do not call Fracture twice: it is useless.
2023-05-09 09:18:20 +02: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
1406341d2d
Fix a few doxygen errors (no actual code change)
2023-04-19 16:20:24 +02:00
Jeff Young
3b63d70d01
Centralize NPTH has-annulus processing.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13437
2023-04-08 15:06:49 +01:00
Jeff Young
bbd6c80507
Collapse FP_* down into their PCB_* equivalents.
2023-03-31 22:57:46 +01:00
Seth Hillbrand
72ebe5a429
Avoid drawing null-arcs in 3d viewer
...
An arc with no radius or no angle is not visible and should be avoided
Fixes https://gitlab.com/kicad/code/kicad/issues/14271
2023-03-13 11:48:05 -07: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
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
2023-02-18 22:57:18 -05:00
Jeff Young
203f0f66fb
Guard 3D viewer against degenerate shapes.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/13693
2023-01-29 22:40:12 +00: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
19b00b5d57
Cleanup.
2022-08-01 13:09:51 +01:00
Jeff Young
f41af10007
Clean up hole shapes for safety (smart pointer) and consistency.
2022-07-22 23:06:07 +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
Roberto Fernandez Bautista
0e2429b5cc
3D Viewer: Don't render zero-width circles
2022-04-11 21:50:40 +01: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
d3e9165146
3D viewer: fix overzealous pad filter in BOARD_ADAPTER::addPads()
...
Fixes #11092
https://gitlab.com/kicad/code/kicad/issues/11092
2022-03-10 12:43:17 +01:00
Jeff Young
0dc857b5ab
Clean up pad handling in 3D viewer.
...
Most importantly, create F_Cu/B_Cu layers if they're otherwise empty
but we have plated pads to render on them.
Fixes https://gitlab.com/kicad/code/kicad/issues/10207
2022-03-06 13:57:12 +00:00
jean-pierre charras
9fec8aa269
3D viewer: disable thickness rendering on tech layers when disabled for copper.
...
Building the vertical walls around shapes to show layer tickness is very
time consuming. It can be disabled for copper layers but was always enabled
for other layers.
Now layer thickness is enabled or disabled for all layers.
2022-03-01 11:29:35 +01:00
Jeff Young
8d19b52aed
Line stroking for 3D view.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10887
2022-02-17 18:02:56 +00:00
Jeff Young
2172810600
Performance: better sharing of zone fills.
2022-02-15 19:19:03 +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
9582457fef
Be explicit about literal wide-strings.
2022-02-05 20:40:21 +00:00
Jeff Young
b070914216
Fix cardinal sin of macro definitions.
2022-02-02 18:18:27 +00: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
07013d00e1
More EDA_ANGLE.
2022-01-14 16:08:19 +00:00
jean-pierre charras
a6c85a9204
3D viewer: fix a truncation taht created PCB_TEXTs with 0 width (not visible)
...
Fixes #10377
https://gitlab.com/kicad/code/kicad/issues/10377
2022-01-11 18:34:35 +01:00
jean-pierre charras
cd8d6ba079
3D viewer: fix bad rendering of circles and segments due to truncation.
...
the item radius or thickness was a int. should be a double.
Fixes #10357
https://gitlab.com/kicad/code/kicad/issues/10357
2022-01-11 13:13:51 +01:00
Jeff Young
73a2984963
Fixes for rotated footprint text.
2022-01-10 15:30:19 +00:00
Jeff Young
e811a39881
Readability.
2022-01-10 15:05:57 +00:00
Jeff Young
236feeb592
Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
...
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
Jeff Young
7d032f9c2f
Outline font rendering for Cairo, plotter, printer and 3D viewer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young
aef2a3fca4
Default font for eeschema.
2022-01-08 16:47:45 +00:00
Marek Roszko
c4c56de708
Neurotically update position wxPoint usages
2022-01-01 11:55:51 -05:00
Marek Roszko
2d1357dc54
Swap some of the 3d viewer to VECTOR2I
2021-12-29 14:20:40 -05:00
Jeff Young
ccb94fd1a7
APIs for passing KIFONT::FONT pointers around.
...
Also some clean-up and bug fixes.
2021-12-29 17:32:19 +00:00
Jeff Young
fa908e1f98
Dimensions for footprints.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young
ef10b36948
Add mask-to-copper clearance parameter and rename mask margin.
2021-12-24 12:36:41 +00:00
Jeff Young
92e589b398
Use board maxError value, and return SH_ARC for unfilled circle.
2021-12-23 20:36:11 +00:00
david-beinder
fd6a75b779
Do not call TransformToPoly for negative sized PADs
2021-11-12 15:40:08 +00:00
Jeff Young
6c0110ecd3
Naming conventions.
...
There's nothing "legacy" about the OpenGL 3D renderer.
2021-10-21 14:30:03 +01:00
Jeff Young
9b9e379aa0
Overhaul arc internal model to not over-specify information.
2021-10-15 12:45:43 +01:00
Jeff Young
a41944020d
Push most of PCB_SHAPE impl down in to EDA_SHAPE.
2021-10-15 12:45:43 +01:00
Jeff Young
6aaf4413b3
Fix kicad_string.h / string.cpp mismatch.
...
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Wayne Stambaugh
78e5e98ea0
Pass VECTOR2I objects by reference instead of on the stack.
2021-07-27 08:41:27 -04:00