Commit Graph

1316 Commits

Author SHA1 Message Date
Alex 58f9b82c1e 3D viewer: Fix GL_INVALID_ENUM error. 2022-06-09 18:35:07 +00:00
Jeff Young bf71cada4e ADDED: User viewports for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5724
2022-06-06 22:24:02 +01:00
Seth Hillbrand 77cd56fbd3 Fix missing assignment 2022-05-26 08:17:47 -07:00
Seth Hillbrand c0a9a02591 Handle settings sequencing
Avoids crash when window close ordering places 3d viewer after the
common settings are closed
2022-05-25 16:56:54 -07:00
Mario Luzeiro ef4f0b49fc 3D-Viewer, raytracing: implement bevel edges on item layers 2022-05-25 00:11:46 +00:00
Mario Luzeiro 2aa56e2c86 3D-Viewer: assign correct copper material based on render plated option.
change plated material intensity.
2022-05-25 00:11:46 +00:00
Jeff Young fa11e1c097 Take text height into account as well as thickness for knockout margin.
Also centralizes calculation so all clients will get the same answer.

Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-20 12:29:01 +01:00
Roberto Fernandez Bautista 0e2429b5cc 3D Viewer: Don't render zero-width circles 2022-04-11 21:50:40 +01:00
Marek Roszko 5bb2cdf73d Revert "Stop leaking submenu items"
This reverts commit 34c70a51ea.
2022-04-10 22:33:43 -04:00
Marek Roszko 34c70a51ea Stop leaking submenu items
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
2022-04-10 22:04:48 -04:00
markus-bonk 1a9ef4bd0f Add support for using a SpaceMouse to pan & zoom in the schematic editor. 2022-03-31 19:03:41 +00:00
Mario Luzeiro 7659f3c81b 3D-Viewer: binds the default texture after draw and before end the list
Fixes https://gitlab.com/kicad/code/kicad/issues/2547

Fixes https://gitlab.com/kicad/code/kicad/issues/10741
2022-03-25 21:56:10 +00:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Jeff Young 65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young 32fdab8902 Bubble ESC up from the 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/issues/9984
2022-03-13 23:14:06 +00:00
Jeff Young e03b06927d Fix rotation problems for knockout fp text, and implement 3D rendering.
Fixes https://gitlab.com/kicad/code/kicad/issues/11086
2022-03-12 14:17:52 +00:00
jean-pierre charras d3e9165146 3D viewer: fix overzealous pad filter in BOARD_ADAPTER::addPads()
Fixes #11092
https://gitlab.com/kicad/code/kicad/issues/11092
2022-03-10 12:43:17 +01:00
Jeff Young 0dc857b5ab Clean up pad handling in 3D viewer.
Most importantly, create F_Cu/B_Cu layers if they're otherwise empty
but we have plated pads to render on them.

Fixes https://gitlab.com/kicad/code/kicad/issues/10207
2022-03-06 13:57:12 +00:00
Wayne Stambaugh aa9fa09000 Minor code cleaning. 2022-03-04 10:07:10 -05:00
jean-pierre charras 9fec8aa269 3D viewer: disable thickness rendering on tech layers when disabled for copper.
Building the vertical walls around shapes to show layer tickness is very
time consuming. It can be disabled for copper layers but was always enabled
for other layers.
Now layer thickness is enabled or disabled for all layers.
2022-03-01 11:29:35 +01:00
Jeff Young 8d19b52aed Line stroking for 3D view.
Fixes https://gitlab.com/kicad/code/kicad/issues/10887
2022-02-17 18:02:56 +00:00
Jeff Young 2172810600 Performance: better sharing of zone fills. 2022-02-15 19:19:03 +00:00
Jeff Young 3deaf902bb Retire the V5 zone fill algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +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
Marek Roszko 41f54349a5 Replace inserts/push_backs with emplace in some spots 2022-02-05 19:53:31 -05: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
Marek Roszko 36a5580f56 Use unique_ptr to avoid memory leak in 3d model cache loading
PVS V773
2022-02-05 14:38:07 -05:00
Jeff Young b070914216 Fix cardinal sin of macro definitions. 2022-02-02 18:18:27 +00:00
markus-bonk 53cf899b67 Fix 3dmouse navigation in 3d-viewer orthographic projection.
The zoom level was being incorrectly calculated. When zooming in on a
PCB, the zoom function can become disabled if you get too close. At
which point you need to use the mouse wheel to zoom back out.
2022-02-02 12:51:29 +00:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
markus-bonk 14c5f744ff Fix missing navlib pcbcommon dependency declaration.
The 3d-viewer_navlib didn't have a proper dependency chain. It
relies on headers that come from pcbcommon.
2022-01-31 16:07:55 +00:00
markus-bonk a8486c5296 Fix warning: declaration shadows a previous local [-Wshadow]. 2022-01-31 10:41:51 +00:00
jean-pierre charras 98b9600373 nl_3d_viewer_plugin_impl.cpp: remove useless includes 2022-01-29 13:09:35 +01:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
markus-bonk bb542e5959 Fix compilation when KICAD_USE_3DCONNEXION is undefined. 2022-01-28 12:21:42 +00:00
markus-bonk be58ab679b Fix coding style policy violations and CMake version.
Fix violations of 4.2.2 Function Definitions and 4.2.3 Control
Statements.
Set the minimum CMake version required to build to 3.1.
Removed the Visual Studio solution and project files.
2022-01-28 12:21:42 +00:00
markus-bonk 91d261d735 Fix "Error loading editor" when no 3Dconnexion driver installed. 2022-01-28 12:21:42 +00:00
markus-bonk 87d7bdbd5e * PCB_EDIT_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Added full support for using a 3Dconnexion device in PCB_EDIT_FRAME. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

Use build option KICAD_USE_3DCONNEXION (default = ON) to control whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk aec7802fcf EDA_3D_VIEWER_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Full support for using a 3Dconnexion device in the 3D viewer has been added. Full 3D navigation is available for both the orthographic and perspective projections. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

ADDED: A build option KICAD_USE_3DCONNEXION (default = ON) has been added to the main CMakeLists.txt. The option controls whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk f61c798295 Fix compilation errors in Fedora pipeline. 2022-01-28 12:21:42 +00:00
markus-bonk cd82a927c2 TRACK_BALL: Allow two input devices to simultaneously pan & rotate
Instead of the mouse pan and drag algorithms calculating the new
position or rotation values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or rotate the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +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
markus-bonk 5b9f56613e CAMERA: Make the CAMERA_FRUSTUM structure values for nw, nh, fw and fh consistent.
The CAMERA_FRUSTUM structure values for nw, nh, fw and fh to always mean width and height for both perspective and orthographic views instead of half-width and half-height in perspective.

The orthographic / perspective view toggle has been modified to keep the viewed plane at m_camera_pos_init * m_zoom the same dimensions in both projections.
2022-01-28 12:21:42 +00:00
Jeff Young 0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young b828355206 A bit more angle cleanup. 2022-01-18 09:48:24 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00