1685 Commits

Author SHA1 Message Date
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
Alex Shvartzkop
8051904211 Un-translate layer names in 3D appearance panel.
(cherry picked from commit 33fad39cf435cf859e22f97e54106ccb3ddbc12c)
2025-04-21 13:40:59 +03:00
Jeff Young
046f1c916b Reset colors on Reset to Default Settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20624
2025-04-18 13:41:18 -07:00
Mike Williams
82ec293907 CW rotation: add missing default hotkey in sch/3d to match pcb editor hotkeys 2025-04-15 10:19:40 -04:00
Seth Hillbrand
bccf365380 Isolate thread pool loops
Now that we are threading things in different frames, we need to watch
that we are not waiting for a process to complete in one frame while
working in another.  To accomplish this, we only wait for our own loop
results

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20572
2025-04-07 12:17:11 -07:00
Jeff Young
cf96295fa1 Clipper2 is much faster at intersecting layers for drawing vertical walls.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/9202
2025-04-03 16:57:45 +01:00
Jeff Young
7f9a277594 Remove unsafe C-style casts. 2025-04-01 18:04:33 +01: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
jean-pierre charras
eaa1e6d594 Fix a collision with a Windows define and our use of the same var name.
We use IN for INCH as units, but IN is defined in a Windows header
2025-03-02 11:34:30 +01:00
Jeff Young
f951497a4f Code brevity. 2025-03-01 21:58:31 +00:00
Ian McInerney
85810510f4 Tweak toolbar settings a bit
* Manage the settings using the settings manager for better lifetimes
* Better architect the internals and JSON to make it easier to identify
  the various tool types
2025-02-28 01:57:37 +00:00
Ian McInerney
548334b4e2 Load toolbar configuration from settings 2025-02-28 01:57:37 +00:00