Commit Graph

1218 Commits

Author SHA1 Message Date
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Mikolaj Wielgus 996835826e Do not change FOV when zooming in/out, only move the camera
It's odd to both move the camera and change FOV when one wishes to
enlarge or smallen the models. Let's only move the camera.
2021-09-15 17:58:47 +00:00
Mikolaj Wielgus e8a7e4cbed Change 3D model preview projection toggle tooltip
Isometric projection is a special case of orthographic projection, the
projection where all projection lines are orthogonal to the projection
plane.
2021-09-15 17:53:45 +00:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Wayne Stambaugh 41c7089417 Minor dialog layout improvements. 2021-09-07 08:06:02 -04:00
jean-pierre charras 0eb0fa64bb 3D viewer: In menus show Zoom In/out instead of Zoom In/out at Cursor.
Zoom In/out at Cursor does not exist in 3D viewer, and is Zoom In/out when
using F1 or F2 keys.
Fixes #9107
https://gitlab.com/kicad/code/kicad/issues/9107
2021-09-07 10:54:51 +02:00
jean-pierre charras 5e8b23af64 3D viewer: add missing initialization of the line width of the grid.
Fixes #9082
https://gitlab.com/kicad/code/kicad/issues/9082
2021-09-02 18:33:59 +02:00
Seth Hillbrand f95732a4bb Generalize 4670309e
Allows loading of multiple types of .gz extensioned files by extracting
the second extension

Fixes https://gitlab.com/kicad/code/kicad/issues/9047
2021-08-30 14:43:11 -07:00
jean-pierre charras 4670309ec1 kicad2step: fix broken handing of UTF8 filenames.
the conversion between UTF8 std::strings and wxString were missing in some places.
3D model: fix management of file having double ext .stp.gz
Fixes #9038
https://gitlab.com/kicad/code/kicad/issues/9038
2021-08-27 16:58:23 +02:00
jean-pierre charras d98e93de7e 3D viewer: fix color issues when using the colors stackup:
- Add missing Yellow (.gbrjob predefined color) in list
- silkscreen colors: add .gbrjob predefined colors in list
- Use a default body color (FR4) for dielectric material not in known list
2021-08-25 18:33:49 +02:00
Jeff Young e6ca9837a2 Clear numbers from non-numberable pads and don't run DRC on them.
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().

Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Johan Grip b984777b52 Add more items to 3D viewer toolbar 2021-08-21 17:06:42 +00:00
Seth Hillbrand 4cd9278041 Remove most wxFilepicker wildcards from translations
This prevents translation errors from preventing user actions such as
opening the correct file
2021-08-20 12:56:47 -07:00
Jeff Young 9f8f81cae2 Fix null-ptr dereference when layer doesn't exist.
Also removes a whole slew of extraneous type-casts, and makes better
use of for( x : listOfX ) for readability.

Fixes https://gitlab.com/kicad/code/kicad/issues/8996
2021-08-19 11:52:24 +01:00
Jeff Young 89d943a90c Transfer custom colours from board stackup to 3D viewer. 2021-08-16 20:05:35 +01:00
jean-pierre charras e1bbb717f6 3D viewer: ensure 3D shapes are loaded when switching 3D shapes visibility option to ON.
Fixes #8959
https://gitlab.com/kicad/code/kicad/issues/8959
2021-08-16 16:28:59 +02:00
Jeff Young bff247b08a Hook up 3D viewer colors to board stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5173
2021-08-14 14:00:17 +01:00
Jeff Young ef9f041279 Don't show 3D color opacities where they're not supported.
Fixes https://gitlab.com/kicad/code/kicad/issues/8938
2021-08-14 14:00:17 +01:00
Jeff Young 77680eba30 Naming conventions. 2021-08-05 14:31:36 +01:00
Jeff Young 78fd268b18 Retire PARAM_OBSOLETE in favour of a schema migration. 2021-08-02 17:38:15 +01:00
Jeff Young 7d501e8a43 Add PARAM_OBSOLETE to clean out old JSON structures.
While not technically necessary, the old structures can be confusing
to users looking at the files.

Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-08-02 12:53:57 +01:00
Jeff Young 4943d2f0a3 More consistent formatting. 2021-08-02 12:53:57 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Jeff Young 46338403e7 Unwrap some std::library typedefs. 2021-07-28 22:16:38 +01:00
jean-pierre charras dda70622ba 3D viewer: fix missing refresh in raytracing mode when changing items visibility.
Fixes #8866
https://gitlab.com/kicad/code/kicad/issues/8866
2021-07-28 16:00:10 +02:00
Jeff Young 29b23df7a1 Save both front and back soldermask colour preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-07-27 22:26:13 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
Seth Hillbrand 3e815882c1 Threading additional 3d transform
Transforming solid areas to polygons can be time-intensive for some
boards.  This threads the transformation to all simultaneous builds in
different layers
2021-07-22 12:12:27 -07:00
jean-pierre charras e00f609bdd 3D viewer: add a bit more activity messages during 3D scene building. 2021-07-22 16:13:38 +02:00
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
jean-pierre charras 396213fa30 3D viewer: shows 3D shapes hide/show option in main menubar (Preferences)
Although these options are already in Preferences/Preferences/3D Viewer,
a direct access is useful because it avoid rebuilding the 3D scene, not needed
to hide/show 3D shapes.
2021-07-21 17:55:27 +02:00
jean-pierre charras 0525d50c58 3D viewer: avoid recreating the 3D scene when not needed. 2021-07-21 12:37:44 +02:00
jean-pierre charras 1c1f7ac07e 3D viewer: fix a Coverity warning and add more messages when loading a board. 2021-07-19 08:27:01 +02:00
jean-pierre charras a43ca978df 3D viewer: do not build the board 3D data during 3D frame creation, but after.
Building the 3D data is time consuming, so creating the data after the 3D
frame is shown is better, and the build activity is visible, especially on Linux.
2021-07-18 17:55:40 +02:00
Marek Roszko c794a6ce7a Add pdb install option for msvc 2021-07-14 23:42:45 -04:00
Wayne Stambaugh 01515680b3 Code cleaning. 2021-07-14 15:47:32 -04:00
Marek Roszko 9162013132 Add advanced cfg to force reloading memory cached 3d models 2021-07-11 00:35:38 -04:00
Marek Roszko 7cb0f8f808 Add ADVANCED_CFG to always reload cached 3d models in memory 2021-07-11 00:31:06 -04:00
Marek Roszko 79b90813ec Add ADVANCED_CFG to skip caching 3d models to file 2021-07-11 00:00:06 -04:00
jean-pierre charras 289a35ad81 3D viewer, PANEL_3D_RAYTRACING_OPTIONS: use our DIALOG_COLOR_PICKER to select colors.
Fixes #8689
https://gitlab.com/kicad/code/kicad/issues/8689
2021-07-05 21:01:12 +02:00
Jeff Young ea6769b702 The REPORTER interface is inherently line-based.
Also fixes a bunch of error messages that were similar but not
identical (which just increases translation burden).

Fixes https://gitlab.com/kicad/code/kicad/issues/8723
2021-07-05 13:41:06 +01:00
Jeff Young c11ee69499 Save 3D prefs after editing, and load some of them into FP Props.
Fixes https://gitlab.com/kicad/code/kicad/issues/8712
2021-07-04 13:20:55 +01:00
Marek Roszko eff75b630f Get rid of anonymous struct typedefs
We are using C++14 where there is no reason for this and is banned in C++20 under P1766R1. MSVC generates a warning under C++14 as a reminder.
2021-07-01 18:28:41 -04:00
Wayne Stambaugh b579d004ad 3D Viewer: minor display options panel layout improvements. 2021-06-29 15:49:00 -04:00
Maurice d9a11c30ef 3d viewer fix for 3d single material object Diffuse Only opacity 2021-06-28 20:32:03 +00:00
Jeff Young 3347531f70 Better zoom defaults for 3D viewer.
Also includes a fix for 3D model viewer in the file dialog for Retina
(and possibly other HIDPI) displays.

Fixes https://gitlab.com/kicad/code/kicad/issues/6144
2021-06-28 19:08:23 +01:00
Jeff Young 73b91a1a92 More sensible zoom defaults for 3D viewers.
Also fixes a bug where the model viewer in the file picker was using
only 1/4 of the screen on HIDPI displays.
2021-06-28 19:08:23 +01:00