Josue Huaroto
4d84bee6f6
Add Zoom level to the 3D viewer in PCB
2023-09-01 17:51:50 +00:00
Marek Roszko
60af0448c5
Add missing if intending to border check
2023-08-30 22:51:08 -04:00
Marek Roszko
2e58f4ea60
Fix three spots it always failed to check if the border was enabled
2023-08-30 22:39:07 -04:00
Jeff Young
22256c97f3
Fix logic errors in handling board body visibility.
...
Also fixes a bug where models were placed above the silk when the
solder paste layer was shown, but on the solder paste layer when
it wasn't shown.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15510
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6770
2023-08-26 17:33:57 +01:00
Seth Hillbrand
db8e15ce88
Require wxWidgets 3.2
...
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Jeff Young
0c37e3c443
Remove realistic-mode (and duplicated settings from preferences).
...
Most of these settings are now available in the appearances panel.
It was concluded in a Zulip discussion that any missing items can
be added back in time if people find they need them (ie: complain).
Also hooks up 3DViewer to the common language framework.
2023-08-23 14:07:58 +01:00
Ian McInerney
2d8b707a3a
Remove dummy pad from group before deleting
...
The dummy pad doesn't need group information, and it asserts when it has
it and is deleted.
Fixes KICAD-3B9
2023-08-21 10:32:50 +01:00
Jeff Young
686704bb31
ADDED: plot control over FP text.
...
(Also adds said control to "Follow Plot Settings" in 3D viewer.)
2023-08-15 16:56:46 +01:00
Jeff Young
f45760062b
ADDED: appearances manager for 3D viewer.
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12413
2023-08-14 18:08:36 +01:00
Jeff Young
5e112ca78e
ADDED: parameterize font metrics and allow customization of overbar height.
2023-08-06 20:57:41 +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
Seth Hillbrand
32ad42a435
Add 3dconnexion driver version check
...
Re-enable 3dconnexion driver by default as we are able to gate the
driver versions
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13362
2023-07-24 18:09:52 +00:00
Jeff Young
a85a2b9cbc
Add via solder mask to 3D viewer rendering.
...
(Of course, only when vias are not tented.)
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-12 18:28:02 +01:00
Jeff Young
300a60e88e
Eradicate a bunch of calls to dyn_cast.
2023-06-25 11:10:05 +01:00
Ian McInerney
6a2dcd1936
Refactor 3D viewer view into enum class
2023-06-20 21:52:50 +01:00
Mike Williams
993bb84240
PCB_FIELD: bug fixes
2023-06-20 18:34:52 +00:00
Mike Williams
37837dc392
PCB: introduce PCB_FIELD_T
2023-06-20 18:34:52 +00:00
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
66651327bd
STEP export: in board outlines, export Circles as Cylinders, round 2.
...
Other arcs (not 360 deg arcs) are still exported as polylines
2023-05-16 13:39:16 +02: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
6618cda214
3D viewer: use the right color theme (the one used in the board editor)
...
Fixes #14616
https://gitlab.com/kicad/code/kicad/issues/14616
2023-05-01 16:51:27 +02:00
jean-pierre charras
1406341d2d
Fix a few doxygen errors (no actual code change)
2023-04-19 16:20:24 +02:00
Mike Williams
32eb1ef77e
Sch->PCB: propagate DNP from symbols to footprints attributes
...
Also add a 3D viewer toggle.
2023-04-10 13:11:21 -04: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
Seth Hillbrand
2cd854af14
Move Spacemouse to advanced config
...
The spacemouse driver, particularly on Mac, is extremely unstable and
causes crashes even when not being used. This places the interface
behind an advanced config flag to ensure that users can affirmatively
opt-in to the potential for crashes
2023-04-07 10:08:43 -07: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
Seth Hillbrand
d7a6875b0b
3dviewer: Show footprint board regardless of proj
...
The settings for the project in terms of visibility should not impact
our ability to preview the 3d model of a footprint
Fixes https://gitlab.com/kicad/code/kicad/issues/14246
2023-03-10 15:18:45 -08: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
7256a51e8e
Fixes in build board outlines as polygon and convert_shape_list_to_polygon:
...
- Ensure Bezier curves have their polygon build before use it.
- When building board outlines as polygon the same chaining epsilon value
for DRC, export step and 3D view (default 0.01mm).
Fixes #14115
https://gitlab.com/kicad/code/kicad/issues/14115
Fixes #14009
https://gitlab.com/kicad/code/kicad/issues/14009
2023-02-28 16:45:03 +01:00
Marek Roszko
aacc9746e3
Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere
2023-02-18 22:57:18 -05:00
Marek Roszko
5ccf205788
Try and avoid crashing on gl context creation failure in the 3d viewer
...
Sentry event id 0ad4afa6b86a4a03ad7f8fdbcdb72f86
2023-02-14 21:19:41 -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
Wayne Stambaugh
68decdd4f2
Fix static event table derived object definitions.
2023-01-28 14:10:06 -05:00
jean-pierre charras
9e0515a79a
3D viewer: ensure dielectric thickness of all dielectric sub-layers is used.
...
Previously, when a dielectric layer had sub-layers (i.e.when a dielectric
is made from more than one layer) only the first sub-layer thickness was used.
Fixes #13042
https://gitlab.com/kicad/code/kicad/issues/13042
2022-12-01 20:02:20 +01:00
Wayne Stambaugh
f6297d328c
Fix 3D viewer canvas timer event clash.
2022-10-22 16:58:04 -04: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
jean-pierre charras
22cd2a3428
3D viewer: add option to show/hide fp not in position file.
...
Previously they were not shown, and this is really bad, because
"not in pos file" does not mean never mounted, and not even not mounted.
2022-09-24 13:58:31 +02:00
Marek Roszko
3d5913c825
Remove convert_to_biu.h, merge contents to base_units.h
2022-09-16 21:09:28 -04:00
Marek Roszko
a8613ee80f
Combine Iu2Millimeter & remove PcbMm2iu
2022-09-16 21:09:26 -04:00
Roberto Fernandez Bautista
2a0c31ed97
Don't display footprints not in position files.
2022-09-17 00:21:02 +01:00
Jeff Young
5679b9dbdc
Remove a few EDA_RECT instances.
2022-08-31 01:22:49 +01:00
markus-bonk
66b8ecb467
Use an independent pivot representation for the 3dmouse in the 3dviewer.
...
CHANGED: Instead of using the target style pivot that is used to move the
look at position, a different pivot is used for the center of rotation
used by the 3dmouse. Both pivots, the camera look at position and the
3dmouse rotation pivot, need not necessarily coincide. A blue ball is used
to represent the pivot.
2022-08-19 23:08:03 +00:00
Jeff Young
a9536b5de9
CHANGED netclass assignments now done via canvas or via patterns.
2022-08-14 22:56:29 +01:00
Jeff Young
01b61f5ff1
Minor improvements to status bar messages.
2022-08-01 13:09:51 +01:00
Jeff Young
19b00b5d57
Cleanup.
2022-08-01 13:09:51 +01:00
Jeff Young
6f49b57f9b
Cleanup & performance enhancements.
2022-08-01 13:09:51 +01:00
jean-pierre charras
4bfbf91369
3D viewer: Fix incorrect behavior when moving the scene
...
Fixes #12114
https://gitlab.com/kicad/code/kicad/issues/12114
2022-07-30 13:27:25 +02:00
Jeff Young
f41af10007
Clean up hole shapes for safety (smart pointer) and consistency.
2022-07-22 23:06:07 +01:00
luz paz
79fa911e0e
Fix various typos
...
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Fabien Corona
976670e987
Move 3D controls to a new class
2022-06-21 23:38:22 +00:00
Mario Luzeiro
ef4f0b49fc
3D-Viewer, raytracing: implement bevel edges on item layers
2022-05-25 00:11:46 +00: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
Wayne Stambaugh
7da7864f5e
Fix some Coverity issues.
2022-03-25 15:51:05 -04: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
jean-pierre charras
59babfa332
3D viewer: fix a sometimes incorrect render engine initialization.
...
inside the EDA_3D_CANVAS, it was initialized before settings are read,
and can be set to raytracing, although we always start 3D viewer in opengl mode,
thus creating a incorrect (not working) initialization.
2022-02-09 10:10:48 +01:00
Marek Roszko
41f54349a5
Replace inserts/push_backs with emplace in some spots
2022-02-05 19:53:31 -05:00
Jeff Young
7ccac79192
More wxString wide literals.
2022-02-05 21:29:34 +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
markus-bonk
aec7802fcf
EDA_3D_VIEWER_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
...
Full support for using a 3Dconnexion device in the 3D viewer has been added. Full 3D navigation is available for both the orthographic and perspective projections. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.
ADDED: A build option KICAD_USE_3DCONNEXION (default = ON) has been added to the main CMakeLists.txt. The option controls whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk
27063688b3
CAMERA: Fix spelling of method MakeRayAtCurrrentMousePosition.
...
EDA_3D_CANVAS: Fix spelling of method getRayAtCurrrentMousePosition.
2022-01-28 12:21:42 +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
jean-pierre charras
0f0a540a65
Panel 3D previewer: for show 3D body shapes, regardless the 3D viewer itself.
...
the Panel 3D previewer is made to show 3D body shapes, so do not show them
when disabled in the board 3D viewer, is really stupid.
2022-01-06 12:04:28 +01: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
dabc75bee8
Source 3D dimensions from board stackup.
...
Also includes a performance improvemnt by caching the 3D model matrices.
2021-12-24 21:10:28 +00:00
Jeff Young
68d2630d08
Flatten a layer of indirection out of 3D config settings.
2021-12-24 13:08:54 +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
815c2c69e7
Support for dielectric colors in board stackup.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8491
2021-12-24 11:39:50 +00:00
Jeff Young
92e589b398
Use board maxError value, and return SH_ARC for unfilled circle.
2021-12-23 20:36:11 +00:00
Jeff Young
4b6bf3095a
Radial dimensions.
...
ADDED radial type dimensions.
Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
jean-pierre charras
55777fca43
3D viewer: fix a minor cosmetic issue.
...
Fixes #10002
https://gitlab.com/kicad/code/kicad/issues/10002
2021-12-23 17:57:25 +01:00
Seth Hillbrand
e5d6ec836f
Remove incorrect leftover comment
2021-12-14 05:58:00 -08:00
Seth Hillbrand
78ff9a857a
Jerry-rig HTML-format alpha parsing
...
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors
Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
david-beinder
fd6a75b779
Do not call TransformToPoly for negative sized PADs
2021-11-12 15:40:08 +00:00
Roberto Fernandez Bautista
7fd669b6a8
Use green soldermask and white silkcreen when unspecified
...
Also - unspecify colour of soldermask by default
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9538
2021-11-07 15:35:14 +00:00