Commit Graph

136 Commits

Author SHA1 Message Date
Mario Luzeiro 8ec0cef572 3D-Viewer: Fixes correct copper plated color in Raytracing mode 2020-11-11 20:09:12 +00:00
Mario Luzeiro 5841ea3cd2 3D-Viewer: Raytracing, add silkscreen texture
improves other textures
2020-11-11 16:22:34 +00:00
jean-pierre charras 6570cd5850 minor compil warning fix 2020-11-11 12:28:37 +01:00
Mario Luzeiro c08f9ac9f6 3D-Viewer: properly clears the container
Fixes https://gitlab.com/kicad/code/kicad/issues/6346
2020-11-11 09:42:14 +00:00
Ian McInerney 11e6cac42b Introduce EGL backend support for the OpenGL canvas
wxWidgets 3.1.5+ on Linux will compile with the Wayland EGL
canvas as the backend instead of the X11 backend. This requires a
version of GLEW compiled with the proper EGL defines and a different
header/code for certain parts that are X11 GLEW specific.

This introduces an in-tree version of GLEW that will be built with the
GLEW_EGL flag then statically linked into the KiCad executables when
EGL support is needed.
2020-11-11 00:41:02 +00:00
Mario Luzeiro e105451f44 3D-Viewer: when possible, uses only the board edges to calculate boundings
Add Report messages to Raytracing

Fixes https://gitlab.com/kicad/code/kicad/issues/6316
2020-11-10 17:32:24 +00:00
Mario Luzeiro 753383d6ec 3D-Viewer: disable layer subtraction operations on non realistic mode 2020-11-10 14:40:42 +00:00
Mario Luzeiro 82bd232737 3D-Viewer: mark flag as initialized
Fixes https://gitlab.com/kicad/code/kicad/issues/6331
2020-11-09 13:19:28 +00:00
Mario Luzeiro 89fea36ddd 3D-Viewer: OpenGL, remove outline polygons where it intersects a hole at edge of board 2020-11-06 20:21:40 +00:00
Mario Luzeiro 3fce3b6591 3D-Viewer: fix code style 2020-11-06 20:21:40 +00:00
Mario Luzeiro 386a0bbe4a 3D-Viewer: add antiboard as a single object
improves ray transversal,
fixes previous csg operation issues.

Fixes https://gitlab.com/kicad/code/kicad/issues/6097
2020-11-06 20:21:40 +00:00
Mario Luzeiro b06db80151 3D-Viewer: raytracing, implement an outline board cut
it cut board items that are outside and on the edge of the board.
Allows castellations render.
2020-11-06 20:21:40 +00:00
Ian McInerney 6bd3b0afa4 Various Coverity fixes 2020-10-27 00:25:08 +00:00
Seth Hillbrand f8a4edb1c9 First pass renaming module to footprint
This is mostly in comments and the few remainin text strings that
reference module
2020-10-20 20:49:11 -07:00
jean-pierre charras 539ac4c214 Remove a few include<wx/wx.h> in many files that do not actually use this include. 2020-10-19 09:00:50 +02:00
Jeff Young 3c01147f10 Fix 3D hole knock-out of silkscreen.
It still doesn't knock-out the board edges, but this is a good first
step.

Fixes https://gitlab.com/kicad/code/kicad/issues/4837
2020-10-01 11:49:28 +01:00
jean-pierre charras 42350a4928 Minor code cleanup: remove useless include or useless code.
fix also a minor compil warning
2020-10-01 11:36:15 +02:00
jean-pierre charras 3f8c9d49f8 Revert "Code cleanup: remove useless wx/wx.h include inside a few files."
due to compil issue on Linux

This reverts commit cffccc3970.
2020-09-30 20:47:20 +02:00
jean-pierre charras cffccc3970 Code cleanup: remove useless wx/wx.h include inside a few files.
in most of files, including wx.h is not necessary, when only 2 or 3 wx files must be included.
Moreover, on windows, including wx.h sometimes create compil warnings about
shadowed vars defined in some specific windows headers.
2020-09-30 20:03:27 +02:00
Seth Hillbrand bf3cb0b1d0 Standardize pad type enums 2020-09-30 08:38:35 -07:00
Mario Luzeiro 6db0c58e8f 3D-Viewer: fix some code style 2020-09-28 02:26:25 +00:00
Mario Luzeiro 3f2cada6c6 3D-Viewer: fix a bug introduced in the previous commits 2020-09-28 02:26:25 +00:00
Mario Luzeiro 6bc19dbfe9 3D-Viewer: intercect modules and cooper items
show module and net information.
highlight shapes when selected.
2020-09-28 02:26:25 +00:00
Mario Luzeiro c7a546042e 3D-Viewer: add skip material to model loading 2020-09-28 02:26:25 +00:00
Mario Luzeiro 0ab82ef66a 3D-Viewer: add an option to enable render of plated pads
by default this option is disabled and will render as in previous
version.
2020-09-27 13:35:55 +00:00
Seth Hillbrand 08d4e91f3b Change partitions to fixed size
Partititioning small polygons causes excessive partitions when we use a
fixed number of cells per side.  Partitioning by size keeps the
partition count limited and speeds the calculations.

Also adds an option to not partition the grid for elements (like 3d
raytracing) that do not need it.

Fixes https://gitlab.com/kicad/code/kicad/issues/5579
2020-09-10 09:31:20 -07:00
Mario Luzeiro d52c475b27 3D-Viewer: implements plated copper texture
improves copper and board textures.
Related to https://gitlab.com/kicad/code/kicad/-/issues/2058
Use only one PerlinNoise class.
2020-09-08 21:02:20 +00:00
Mario Luzeiro d7a95951e1 3D-Viewer: implement nonplated copper on raytracing 2020-09-08 21:02:19 +00:00
Mario Luzeiro 306a8f57f7 3D-Viewer: Parameterize sampling options 2020-09-04 15:12:01 +00:00
Mario Luzeiro 2feef44fca 3D-Viewer: Limit the recursive reflection level
Fixes https://gitlab.com/kicad/code/kicad/issues/5426
2020-09-01 01:08:38 +00:00
Mario Luzeiro 820e3089a2 3D-Viewer: use the correct opacity meaning in the color settings 2020-09-01 01:08:38 +00:00
Mario Luzeiro 40d5746df6 3D-Viewer: Parameterize body board transparency
Fix/workarround raytracing render issues related with refraction
2020-09-01 01:08:38 +00:00
Mario Luzeiro 0302fe5570 3D-Viewer: Parameterize soldermask transparency 2020-09-01 01:08:37 +00:00
Wayne Stambaugh ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
Mario Luzeiro 2764a41d96 3D-Viewer: fixes a shadow hit bug 2020-08-18 00:31:35 +00:00
Mario Luzeiro 78ac675316 3D-Viewer: parameterize raytracing lights, add it to options dialog
Remove some hacks related to postprocessing (not need now because the
previous postprocessing improvements, light parametrization could be
used for tune or future parameters could be implemented)
2020-08-15 09:41:34 +01:00
Joshua Redstone ad99d85390 3d-viewer: add option to clip silkscreen around via annular ring
Add more conservative clipping of silkscreen layers around vias.
Clips at outside of annular ring rather than outside of copper plating.
2020-07-16 22:36:06 +00:00
Mario Luzeiro 779ed40588 3D-Viewer: improve SSAO
Implement blur based on depth weights.
Improve occlusion based on direct light/shadow it receives.
Improve occlusion mixing with the final color by using multiply instead
of subtract.
Remove debug and test code.
2020-07-16 11:23:02 +00: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
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 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
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
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
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
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 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