1710 Commits

Author SHA1 Message Date
jean-pierre charras
aa4de22ef4 EDA_3D_CANVAS: fix crash when used in dialogs and clicking in the 3D shape
It was due to the fact a message (using ExpressMail) was sent to the board
and schematic editor, but it is possible only if the manager of this canvas
is a EDA_3D_VIEWER_FRAME, because only this kind of frame has ExpressMail stuff

Fixes https://gitlab.com/kicad/code/kicad/-/issues/21728
2025-09-12 20:00:10 +02:00
Seth Hillbrand
5dc6d43f43 Add via tenting/plugging representation to 3d-viewer
Fixes https://gitlab.com/kicad/code/kicad/issues/21704
2025-09-12 01:23:41 -07:00
Seth Hillbrand
6e2b20ed0e Update BS Threadpool to 5.0 2025-09-10 13:02:24 -07:00
Seth Hillbrand
abf3438ed6 Remove noise from orthographic projection raytracing
We generally add some jitter to the raytracing lines in order to smooth
out over multiple iterations some of the imperfections.  However, when
we do this to an orthographic projection (where all lines are parallel
to start, we don't average and just introduce noticeable noise in the
render

Fixes https://gitlab.com/kicad/code/kicad/issues/8863
2025-09-09 13:16:57 -07:00
Seth Hillbrand
f9e25c2e06 ADDED: Cross-probing from 3d-viewer
Send cross-probe messages to pcb and schematic editors to highlight
objects when clicked in the 3d viewer
2025-09-09 07:50:51 -07:00
jean-pierre charras
622ddd3a37 3D viewer: fix a minor issue, clean code and and a few comments.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21629
2025-09-03 18:24:56 +02:00
Seth Hillbrand
053c46aa72 Add last point in 3d export 2025-08-31 05:29:37 -07:00
jean-pierre charras
7610c02fed 3D view: honor round rectangle shape.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21597
2025-08-30 18:51:43 +02:00
Jeff Young
9808889c9c Make 3D view/toolbar/contextmenu command lists more consistent.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21347
2025-08-25 16:35:01 +01:00
Seth Hillbrand
bd86f979ed Set embedded delegate to update view properly
When embedding a 3d model we want to be able to see it immediately but
this requires getting the embedded files from the delegate model

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19991
2025-08-20 08:34:09 -07:00
Jeff Young
33c73d7db4 Fix crashes when settings manager doesn't exist yet. 2025-08-14 11:33:25 +01:00
Seth Hillbrand
0a5de5010f ADDED: Spacemouse support for Linux
Uses libspnav to handle spacemouse data.  Overlays on existing
spacemouse framework to handle view activation

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16133
2025-08-12 07:04:54 -07:00
Seth Hillbrand
563489d612 Make 3d-viewer mouse controls standard
We should use the common panel preferences for 3d viewer as well

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20098
2025-08-11 15:55:58 -07:00
John Beard
e82d19eeb7 Pcbnew 3D: Add a toggle for plated barrel visibility
This can be useful when checking 3D models and/or generating
images of components in place on board, or if a dense via field is
in the way when looking at something on an inner layer.
2025-08-07 00:55:48 +08:00
Seth Hillbrand
4aa2047f45 Replace alg::delete and alg::delete_if with std c++20 2025-08-04 09:03:16 -07:00
Jeff Young
b67b467483 Uninitialized variable. 2025-08-04 11:18:20 +01:00
Jeff Young
57f3f22aa4 nullptr safety 2025-08-03 12:51:34 +01:00
Seth Hillbrand
e6e44d08fc ADDED: Common 3d image export and file size choice
Instead of two actions for exporting to two different file formats,
unify into a single Export Image command with the format chosen based on
file extension/selected format in save dialog.

Also allow arbitrary image size export

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

Fixes https://gitlab.com/kicad/code/kicad/-/issues/4693
2025-08-02 14:30:07 -07:00
Jeff Young
8c85cd43f3 Copy c'tor / operator= safety.
Also fixes a memory leak of search pane handlers.
2025-08-02 22:04:53 +01:00
Jeff Young
51e244d7d4 Don't remove nonexistent entries from wxArrayStrings (KICAD-PG7) 2025-07-28 19:37:52 +01:00
Jeff Young
0495828a55 Honour front/back layer types for user layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21284
2025-07-17 09:35:21 +01:00
Ian McInerney
33a4d6ea6f Link copper layer color swatches in 3D viewer 2025-07-11 15:35:02 +01:00
Jeff Young
7b0aceb99e Prevent wxWidgets assert (KICAD-6VM). 2025-07-03 22:50:56 -06:00
Jeff Young
bf6712d4f4 Don't attempt to convert reference image to a SHAPE_POLY_SET.
Also make sure we render table thicknesses when they're
drawn on copper layers.
2025-07-01 01:01:49 -06:00
Jeff Young
c57f0f79ff Fix memory leaks. 2025-06-28 17:13:20 -06:00
Jeff Young
044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young
98e0a79f05 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
jean-pierre charras
6471db70cd 3Dviewer: Fix crash created by commit 447b7426 when a board has Bezier shapes. 2025-06-16 11:06:44 +02:00
Jeff Young
18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Damjan
2c92f95a1c 3d-viewer: Navigation gizmo for 3D viewer
ADDED: Blender-like navigational gizmo - new feature

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16956
2025-06-09 10:29:34 -07:00
Jeff Young
e045def6f7 Correct underline spacing in dialogs; flatten origins & axes. 2025-06-09 12:53:11 +01:00
Jeff Young
9750f7690c Performance optimizations. 2025-06-05 18:01:44 +01:00
Jeff Young
2e87a04358 Differentiate between FP previews and FP editor for 3D viewer settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21053
2025-06-03 16:11:28 +01:00
Jeff Young
4ebe0686e2 Fix linebreak. 2025-06-03 11:41:27 +01:00
Jeff Young
96fa79cef2 Minor performance optimizations. 2025-06-03 11:41:27 +01:00
Jeff Young
aa77f74c76 Invalid iterator safety. 2025-06-03 11:41:27 +01:00
Jeff Young
327cca9de5 Coverity fixes. 2025-05-25 20:01:18 +01:00
jean-pierre charras
6a9b427562 3D viewer: do not change anything in the board shared by the FP editor.
Especially, the BOARD managed by FP editor had is m_project member reinitialized
when creating the 3D viewer, thus creating issues in FP editor, and create
a crash when closing kicad

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20964
2025-05-23 15:56:25 +02:00
Jeff Young
f58fc0b952 Rewrite GROUP undo based on uuids.
This also removes the GROUP/UNGROUP-specific undo actions.

This also fixes a bunch of undo bugs when duplicating
group members, creating pins, etc.

This also fixes some undo bugs when dividing wires etc.

This also fixes some bugs with new sch items not
being created within an entered group.
2025-05-21 14:24:59 +01:00
Damjan
447b7426fd 3d_viewer: hatched polygons shown as solid 2025-05-17 17:45:29 +00:00
Michal Suchanek
8110347844 Define GL_SILENCE_DEPRECATION globally on OS X 2025-05-11 15:50:10 +00:00
Michal Suchanek
81bbb5e67b Define WIN32_LEAN_AND_MEAN globally
In modern Windows code WIN32_LEAN_AND_MEAN should be defined.

Without this define windows.h pulls in some legacy headers, notably
winsocks.h. Modern code that cares about winsocks includes winsocks2.h
which conflicts with winsocks.h. Other code that does not care about
winsocks (OpenGL, fontconfig, ...) includes windows.h pulling in legacy
winsocks.h, causing definition conflicts and build errors.

At worst defining WIN32_LEAN_AND_MEAN requires explicitly including some
additional headers on Windows.
2025-05-11 15:50:10 +00:00
Jeff Young
d384790d47 Don't use line styles for solder masks on shapes in 3D viewer.
Also convert hatched fills to solid for solder masks.

Also give track solder masks their specified
expansion when exporting to STEP.

Also implement solder masks for shapes when
exporting to STEP.
2025-04-28 21:46:10 +01:00
Jeff Young
e0e1f73f9e Fix rendering issues with hide-holes-while-moving.
Also fixes the checkbox names to be more accurate.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20775
2025-04-28 17:39:54 +01:00
Jeff Young
9fc60621f6 Fix rendering issues with solderpaste and hide-holes-while-moving. 2025-04-28 17:39:54 +01:00
Jeff Young
524575a595 Allow embedded files to come from components
as well as parent containers, part II.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20210
2025-04-25 12:26:31 +01:00
Jeff Young
c2be7fa3e6 Account for aperture & track masks in plated copper calculations. 2025-04-25 12:23:23 +01:00
Jeff Young
31100451c6 Fill in some missing 3D render code.
1) add footprint graphics and text to copper
polys when differentiating plated from non-plated
copper

2) simplify adding footprint graphics and text
for contour walls

3) add dimension text and shapes for contour walls

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20111
2025-04-23 10:41:36 +01:00
Seth Hillbrand
e75076ab41 Revert "Replace glew with epoxy"
This reverts merge request !2217
2025-04-22 15:16:58 -07:00
Michal Suchánek
0c36e16292 Replace glew with epoxy
Glew has the problem that it has to be selected at build time if GLX or
EGL is supported by the library, and this in not encoded in the library
name, nor ABI, nor anything.

Then it's easy to get into the situation that a binary is built but
cannot run because glew supports an API different from the one used by
wxWidgets, or the binary fails to link in the end after all objects are
compiled.

epoxy can support both with the same library avoiding this problem.

epoxy is not initialized explicitly, replaced initialization with
version check where one was not done already.

It seems to be available as vcpkg https://vcpkg.link/ports/libepoxy

There are problems related to GL context switching on Windows which does
not seem to be used in kicad
https://github.com/anholt/libepoxy#known-issues-when-running-on-windows
There is also a problem related to multithreaded rendering on Windows
https://github.com/anholt/libepoxy/pull/265 It's harder to tell if
threading is used for rendering but it does not look like kicad is doing
anything complex enough to warrant using multiple rendering threads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20630
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12543
2025-04-22 12:54:39 -07:00