Commit Graph

897 Commits

Author SHA1 Message Date
Seth Hillbrand 08c61e6788 Ensure triangulation follows moving zone
Dragging filled zones in OpenGL was extremely slow due to the
invalidated triangulation cache.  Moving the zone should also move the
triangles and keep the cache valid.
2020-06-17 19:43:11 -07:00
Jeff Young aeed8e6e2c Finish implementation of DRAWSEGMENT::C_RECT.
It's currently only supported in the Footprint Editor.  It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young f84406009b Push a couple of layers of indirection out of grid settings. 2020-06-13 11:35:56 +01:00
Electro707 4a3743e7dd 3D viewer flip action 2020-06-08 21:35:40 +00:00
Ian McInerney a9fa592f5f Fix button size on 3d preview panel
Fixes https://gitlab.com/kicad/code/kicad/issues/4626
2020-06-07 15:47:34 +01:00
Ian McInerney 6083c0849f Make the 3d viewer rotation increment configurable
ADDED: Setting for the 3d viewer rotation increment

Fixes https://gitlab.com/kicad/code/kicad/issues/4618
2020-06-07 11:44:07 +01:00
Ian McInerney 9d0ea66a96 Don't use the accelerator table in the menubars
It seems that the accelerator table causes issues with
keyboard events on MSW.

Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Ian McInerney 4357c1d3b3 Coverity and compiler warning fixes
* Initialize variables
* Test dynamic casts

Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
Ian McInerney d46f9a5273 Give the 3D viewer an infobar & Infobar upgrades
ADDED: Infobar warning in 3d viewer for board outline issues
2020-06-04 00:13:27 +01:00
Wayne Stambaugh 0032845f9e Fix clipped bitmap buttons with GTK on Linux.
A note to developers, please do not set the minimum and/or size of bitmap
buttons.  It causes bitmaps to get clipped using GTK on Linux.  If the
bitmap button size is not acceptable, then supply an appropriately sized
bitmap rather than attempt to force the wxWidgets sizing mechanism to do
what you want.  This almost always causes platform differences that do
not work well.
2020-06-03 14:01:44 -04:00
Érico Rolim e9e72bd8e4 Fix sg_version detection for cross compilation
Fixes https://gitlab.com/kicad/code/kicad/issues/4525
2020-05-28 13:05:49 +00:00
Jon Evans a52435bbb0 ADDED: New mouse settings panel, expanded mouse settings
You can now choose the behavior of dragging with the
middle and right mouse buttons.

You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.

You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.

You can also now zoom by dragging with the right or
middle button if desired.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04:00
Mario Luzeiro 94ed433f64 3D-Viewer: Fixes #4432
Set default transparency of model from the assigned material.
2020-05-22 13:28:04 +00:00
jean-pierre charras 2215d8a96b 3d viewer: ensure the opengl engine is selected on start.
(the ray tracing engine is too time consuming to be select on start)
2020-05-16 13:18:56 +02:00
jean-pierre charras 3b84653591 3D viewer: avoid crash in raytracing (null pointer use) if layer mask is
not shown and must be removed from silk screen layer.

Fixes #4430
https://gitlab.com/kicad/code/kicad/issues/4430
2020-05-14 11:50:12 +02:00
Simon Richter 632494cba7 Add missing includes
A few more instances of missing <algorithm> for std::max
2020-05-10 00:24:11 +02:00
jean-pierre charras c78e7c5485 Fix compil issues (warnings and missing include) 2020-05-09 08:59:00 +02:00
Jon Evans 7ca069e63e A few formatting fixes 2020-05-08 17:32:06 -04:00
Mario Luzeiro 9446a9166d 3D-Viewer: implement opacity in raytracing
fix opacity implementation on OpenGL
2020-05-08 21:28:16 +00:00
Mario Luzeiro 5a7f875602 3D-Viewer: implements opacity property for 3D models
fixes #2087
2020-05-08 21:28:16 +00:00
Jon Evans 4923d993a7 Factor out raytracing background color calculation 2020-05-07 18:40:06 -04:00
Emery Burhan 6c3cc0cfd4 3d_viewer: Ceiling plane: fixed formatting. 2020-05-07 18:00:55 -04:00
Emery Burhan c665bf69b6 3d_viewer: Added a ceiling plane, similar to the floor plane. 2020-05-07 18:00:55 -04:00
jean-pierre charras a43e4fa163 3D Viewer: Animation Speed setting looks wonky (GTK only)
Fixes #4317
https://gitlab.com/kicad/code/kicad/issues/4317
2020-05-05 10:41:35 +02:00
Wayne Stambaugh 63291141df Pcbnew: minor footprint properties dialog layout improvements. 2020-05-03 11:45:18 -04:00
Jeff Young 874f13e29e Fix some issues with rotated oval pads. 2020-05-01 18:49:42 +01:00
jean-pierre charras 262283995c string fix 2020-04-30 21:03:03 +02:00
jean-pierre charras 93b9be7ebe DLG_SELECT_3DMODEL rework: better dialog (use split window) and fix a few issues. 2020-04-30 19:49:41 +02:00
Jeff Young d2046b17d7 More shrinking of Footprint Properties. 2020-04-27 00:24:57 +01:00
Ian McInerney d006acecf4 More window sizing fixes
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
  so that we can then save it in the config if the
  window is maximized. Otherwise the config ends up
  with the maximized size saved, and weird behavior
  occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01:00
Emery Burhan e20e45fa54 3d_viewer: Added Animation Speed option
ADDED: Option to set the speed of and enable/disable 3d viewer animations
2020-04-24 23:58:50 +00:00
Ian McInerney 99dcadf7e6 Introduce new KI_FALLTHROUGH macro
Annotate purposeful fallthroughs in switch statements with the
KI_FALLTHROUGH macro.
2020-04-25 00:44:09 +01:00
Ian McInerney ff67d6300d Hide more OpenGL deprecation warnings on OSX 2020-04-24 23:28:31 +01:00
jean-pierre charras cf66aac15d 3d viewer: fix compil issue (missing include in c3d_render_ogl_legacy.cpp) 2020-04-24 08:24:59 +02:00
Mario Luzeiro b0bf9f7b57 3D-Viewer: use wxStaticBoxSizer for options, fix coding style 2020-04-23 17:28:56 +01:00
Mario Luzeiro 67fe304f1f change the default display tab 2020-04-23 09:29:39 +00:00
Mario Luzeiro 00da17bc7d 3D-Viewer: Add new options: Anti-aliasing quality, "While moving"
Create new window options with tabs for 3D-Viewer. Remove
"showCopperThickness" option from menus and place it on OpenGL options.
2020-04-23 09:29:39 +00:00
Mario Luzeiro 656efc8d62 3D-Viewer: disable AA while moving
disable AA for Raytracing
Fixes #4007
2020-04-23 09:29:38 +00:00
Emery Burhan b1ac504fcd 3d_viewer: Fix bottom view image being too dark when floor+shadows are enabled
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2083
2020-04-22 23:00:15 +00:00
Jeff Young c08a6adb2a Implement GUI and file R/W for 3D model opacity.
Fixes https://gitlab.com/kicad/code/kicad/issues/2087
2020-04-19 18:24:39 +01:00
Ian McInerney e528769637 Move TOOLS_HOLDER into tools/ folder
Also clean up some compiler warnings
2020-04-19 01:51:49 +01:00
Ian McInerney 7bda8178d1 Move library includes to main CMake file
Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
2020-04-19 01:11:56 +01:00
Jeff Young 2b6089240a Change super/subscript syntax to ^{foo} and _{foo}. 2020-04-18 21:04:41 +01:00
Oleg Endo ae6fbc9c60 Improve 3D viewer rendering performance
* Use GL vertex buffers and index buffers for 3D model rendering
* Use material or average vertex color for bounding boxes instead of red
* Reinstate bounding box rendering with GL vertex/index buffers
* Use compact vertex/index data representation
  - 8-bit normals
  - 8-bit colors
  - 16-bit or 32-bit indices, depending on model size

This should improve performance a bit on lower end GPUs with less memory
and bandwidth.

Fixes #4112
2020-04-17 16:10:04 +00:00
Jeff Young 9c8941e040 Remove a bunch of globals. 2020-04-16 17:34:46 +01:00
Simon Richter 99c1d7cf96 Add noexcept to some functions in the 3d viewer. 2020-04-16 16:11:21 +00:00
Jeff Young 6e800bddae Rationalize penWidth processing as first step in removing some globals. 2020-04-13 20:58:13 +01:00
Jeff Young 174856bac5 Promote 3D model "preview" flag to a persisted "show" flag.
Fixes https://gitlab.com/kicad/code/kicad/issues/2061
2020-04-10 22:49:56 +01:00
Jeff Young 191d4daf53 Fix crash on OSX. (It appears the DC isn't used anyway.) 2020-04-10 22:49:56 +01:00
jean-pierre charras 2c8ada42a0 Arc shaped track segments: fix 3D viewer and track to polygon converter. 2020-04-09 10:37:17 +02:00