* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
* Use platform cache path insted of the KiCad configuration path to write the
3D model cache.
* OSX: ${HOME}/Library/Caches/kicad/3d
* Linux: ${XDG_CACHE_HOME}/kicad/3d or ${HOME}/.cache/kicad/3d
* Windows: AppData\Local\kicad\3d
* Add a Help button and text to the 3D alias configuration dialog
* Display KISYS3DMOD and internally defined KiCad path env vars
* Add a button to bring up the "Configure Paths" (env vars) dialog
* Remove the file name mapping feature from the resolver; this results in
the resolver always using the current definition rather than a possibly
outdated cache value.
Array is in pairs but has a single sentinel, trips up Coverity (CID 147346) and
does allow an out-of-bounds write if WX_GL_SAMPLES were ever removed from the
array.
* Paths defined via pcbnew->Preferences->Configure Paths are now included in
the 3D file browser's drop-down list except for KICAD_PTEMPLATES, KIGITHUB,
KISYSMOD, any paths resembling a URL, and any non-existent paths. When an
absolute path is shortened using one of these path aliases, let's say
'KISYS3DMOD' then the name appears in the pcb file as "${KISYS3DMOD}/blah.wrl".
If a user defines and actual environment variable with the same name, then
that user defined variable will have precedence over the internally defined
variable.
* Paths relative to the current project directory are no longer represented
as "some/path/to/file.wrl". For compatibility with previous KiCad versions
it shall always be stored as ${KIPRJMOD}/some/path/to/file.wrl.
* Various restrictions on alias path values have been removed since the
imposed restrictions could result in corrupted user data as aliases are
silently dropped.
* Overall the patch should improve back-compatibility by providing a ${ENV_VAR}
mechanism for supporting different model root directories and ensuring that
paths relative to KIPRJMOD are expressed in a way that is compatible with
earlier KiCad versions. This allows users more flexibility and the ability
to work in a way that ensures 3D model files can be correctly resolved in
earlier versions of KiCad. Users who do not care about back-compatibility
may prefer to use the newer alias system.
The attached patch fixes a segfault due to a race condition.
If a user starts eeschema with an empty sheet and clicks
the 'cvpcb' button, memory is corrupted and the program
segfaults. The issue appears to arise from multiple threads
accessing the 3D cache and resolver. This patch makes
relevant code thread-safe by using a wxCriticalSection.
(In this case the schematic frame exists, but some members are not initialized as expected, and a crash happens when calling the schematic editor dtor)
Minor other fix: avoid multiple very similar strings to translate in 3d_filename_resolver.cpp
The attached patch ensures the S3D_MASTER class does not cause
a segfault in pcbnew when used from Python scripting.
The issue is due to an "extern KIWAY* TheKiway" which was exposed
to allow S3D_MASTER to use the new resolver to handle 3D filenames.
Unfortunately TheKiway cannot be assigned a value until a window is
created which implements Kiway. The change introduced by this
patch should not alter the behavior of S3D_MASTER compared to
the behavior before the 3D merge.
The extern variable is only there to support S3D_MASTER which in
turn is there to support the current 3DViewer. In the planned software
structure the rather complex S3D_MASTER class is replaced with
a simple struct which only holds the model name and position/
orientation/scale data as stored in the PCB file; since the replacement
does not perform filename resolution there is no need to expose the
Kiway. For example in Mario's branch we removed the extern and
S3D_MASTER class many months ago.