496 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
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
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
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
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
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
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
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
aa77f74c76 Invalid iterator safety. 2025-06-03 11:41:27 +01: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
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
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
Jeff Young
824c7ecfa7 Improve readability.
Also drops a parameter that hasn't been implemented
since early 2022.
2025-03-19 08:55:32 +00:00
Jeff Young
6307f0aee8 Use board layer names when available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20360
2025-03-17 21:23:56 +00:00
Jeff Young
142f8265c5 Simplify (and fix) plated copper differentiation.
Also a few fixes for 3D rendering textboxes and
tables.
2025-03-17 20:11:20 +00:00
Jeff Young
683444733a Formatting. 2025-03-17 20:11:20 +00:00
Wayne Stambaugh
cf4369a2ef Fix Coverity issue #545180.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545180
2025-03-17 15:16:49 -04:00
Wayne Stambaugh
19b0ac6ec4 Revert "Fix Coverity issue #545181."
This reverts commit 31d3c17d996de75f9755115a7b8d3db21b0a48dc.
2025-03-17 15:12:48 -04:00
Wayne Stambaugh
31d3c17d99 Fix Coverity issue #545181.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545181
2025-03-17 15:09:30 -04:00
Jeff Young
533551f014 Don't bleed settings between 3D viewer and 3D footprint preview.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17353
2025-03-16 11:52:56 +00:00
Jeff Young
f33f10bb38 User-defined layers for 3D viewer. 2025-03-15 16:14:33 +00:00
Jeff Young
f3f9730f2c Render tables & their borders to 3D view.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19981
2025-03-13 14:04:31 +00:00
Jeff Young
50174ec528 Beware of infinite recursion on colliding hatched shapes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20264
2025-03-08 21:23:14 +00:00
Jeff Young
241962a84d When following board or plot settings, write results to current config.
Also adds migration from older layer numbers to strings.
This may require users to dump their 9.0 settings files
(which will have the wrong layer numbers in them), but
those files are often useless anyway as they'll already
have messed up colours if they were migrated from 8.0.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18709
2025-03-08 19:11:23 +00:00
Jeff Young
9be7464681 Keep user-defined common layers order.
(And use it when plotting.)

(And don't shadow it with a second variable.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20214
2025-03-04 23:39:19 +00:00
Jeff Young
f00947266f Don't render thickness walls of text we're not going to draw.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20200
2025-03-04 11:29:05 +00:00
Jeff Young
7cfa826c9a Put non-sided layers on front, not back of board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20201
2025-03-03 21:38:14 +00:00
Jeff Young
3f15b0d75b ADDED: hatched fills for shapes. 2025-02-24 11:08:29 +00:00
Jeff Young
9d901188cb Use specific thickness for mask layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19024
2025-02-24 11:08:29 +00:00
Jeff Young
3a4aec7267 Account for solder mask thickness from board stackup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19024
2025-02-24 11:08:29 +00:00
Jeff Young
28684cfeba Formatting. 2025-02-24 11:08:29 +00:00
Jeff Young
5edae8250d Finish eradication of visibility flag on text items.
Import/read previously-hidden symbol/footprint
text items as hidden fields.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/19875
2025-02-19 23:43:52 +00:00
jean-pierre charras
ca5f867957 F3D viewer: fix incorrect code in commit becaba53 2025-01-20 17:47:34 +01:00
jean-pierre charras
becaba531b 3D Viewer: fix incorrect render of platted copper of texts.
Previously, with option "Use bare copper color for unplated copper", the
plated area of texts were drawn using their bounding box.
2025-01-20 17:15:49 +01:00
JamesJCode
c80a71f64a Make netclass name methods clearer, and improve doc strings
There are two netclass name methods, which previously were not
obvious in their uses. These have been renamed to now have:

GetName() : Used for internal or tooling (e.g. netlist export) usage
GetHumanReadableName() : Used for display to users (e.g. in infobars)

Fixing the previous unclear naming will result in fewer bugs
when users start using the multiple netclass functionality, as
the incorrect usage had started creeping in to new code. Also this
will help authors of new code select the correct name method.
2025-01-14 20:44:09 +00:00