128 Commits

Author SHA1 Message Date
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
Wayne Stambaugh
42a1d1cf0b Include folder and 3D viewer code housekeeping. 2025-01-11 07:25:14 -05:00
Sam Schweigel
373d9c9281 Disable touch events on OSX only, allowing them on GTK and Windows
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14374
2025-01-09 23:00:53 +00:00
Seth Hillbrand
09e30adbb1 Move GL_CONTEXT_MGR into PGM_BASE singleton
This is the second try at 5326c36a5f.  The difference here is that we
have moved GL_CONTEXT_MGR into kicommon first which will hopefully
address some of the Windows linkage issues

The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-09 09:03:08 -08:00
Seth Hillbrand
f38e661a02 Revert "Move GL Context into Singleton class"
This reverts commit 5326c36a5ff8a3a465d386cc31172aa90847a9e9.
2025-01-03 21:22:37 -08:00
Seth Hillbrand
5326c36a5f Move GL Context into Singleton class
The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-03 17:26:23 -08:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Jeff Young
753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
Jeff Young
7a4b3602b9 Reduce dependency on dynamic_cast.
(3DViewer crosses compile boundaries when run from
CvPCB.)
2024-12-05 18:17:02 +00:00
jean-pierre charras
05e34714fc 3D viewer: Ensure the 3D display view is not modified after left clicking.
After opening a context menu and left clicking on the 3D canvas, the view
was modified because a drag event was generated, probably a wxWidgets bug.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17422
2024-11-11 16:49:46 +01:00
Jon Evans
74517856ca Make touchscreen events Windows-only
They break things on macOS and probably also on GTK
according to the wxWidgets documentation.
2024-06-09 13:18:32 -04:00
Alex Shvartzkop
4b96bb5d8f Support touchscreen gestures (zoom/pan/rotate) in 3D viewer.
Though rotate doesn't work yet on MSW due to a wxWidgets bug.
2024-06-08 21:13:16 +03:00
Alex Shvartzkop
5e14ae9698 Add OpenGL info to About. 2024-05-05 21:30:25 +03:00
Alex Shvartzkop
f6f0b9a661 ADDED: PCB 3D image raytracing rendering from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3691
2024-03-08 14:38:18 +00:00
Alex Shvartzkop
85b1978408 Use 64-bit type to represent microseconds.
int and long are 32-bit on Windows, causing overflows.
2024-03-03 21:40:26 +03:00
Alex Shvartzkop
80457d5871 Support transparent background in 3D viewer PNG/clipboard export.
Only really works with realtime renderer currently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12060
2024-02-29 17:11:53 +03:00
Alex Shvartzkop
9b11dfd4d4 Fix 3D viewer getting stuck or rendering twice when dragging, at least on GTK. 2024-02-08 15:19:54 +03:00
Jeff Young
fef404352d Remove stale TODOs. 2024-02-05 15:49:57 +00:00
Jeff Young
fceace93da Remove dead code. (Coverity) 2024-01-04 16:00:43 +00:00
Jeff Young
f9530d0b3f Remove "Reset View", which does the same as "Home View".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16115
2023-11-19 14:07:50 +00:00
Alex Shvartzkop
5cd1a4674f Fix a crash in 3D viewer when changing preferences.
It was possible for OnMouseMove to come after ReloadRequest
but before DoRePaint.

Which meant m_3d_render_raytracing->Reload() has't been called yet,
thus the BVH contained invalid data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16059
2023-11-09 20:52:39 +03:00
Marek Roszko
bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04:00
Jeff Young
d5d07e64c9 Use IsShownOnScreen(), not IsShown(), if you really want to know if its visible. 2023-10-14 23:51:37 +01:00
Marek Roszko
ee91b550d8 gl_context_mgr and gl_util belong in the gal folder 2023-09-19 23:06:44 -04:00
Marek Roszko
11de95778b Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
2023-09-09 00:10:57 -04:00
Marek Roszko
7505fd0f37 Profile can live in core 2023-09-07 07:47:01 -04:00
Marek Roszko
a6a20bf8dc Evict the Pgm() dependency in GAL 2023-09-06 20:13:46 -04:00
Josue Huaroto
4d84bee6f6
Add Zoom level to the 3D viewer in PCB 2023-09-01 17:51:50 +00: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
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
Ian McInerney
6a2dcd1936 Refactor 3D viewer view into enum class 2023-06-20 21:52:50 +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
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
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
Wayne Stambaugh
68decdd4f2 Fix static event table derived object definitions. 2023-01-28 14:10:06 -05:00
Wayne Stambaugh
f6297d328c Fix 3D viewer canvas timer event clash. 2022-10-22 16:58:04 -04: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
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
Fabien Corona
976670e987 Move 3D controls to a new class 2022-06-21 23:38:22 +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
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
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
68d2630d08 Flatten a layer of indirection out of 3D config settings. 2021-12-24 13:08: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
Mikolaj Wielgus
cf3a979711 3D Viewer: Fix zoom limit calculations
Fixes https://gitlab.com/kicad/code/kicad/issues/9407

Fixes https://gitlab.com/kicad/code/kicad/issues/8805
2021-10-24 18:14:49 +00:00