Commit Graph

98 Commits

Author SHA1 Message Date
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
Jeff Young 5134856f18 Rationalise 3D settings data-structure.
Move the camera out to its own so that everything else is board-
related, and then rename BOARD_ADAPTER.

At some point the flags should probably be moved out too, and they
can have the EDA_3D_SETTINGS name.
2020-03-28 16:09:40 +00:00
Jeff Young d69ebfae49 Push tool framework base down into TOOL_HOLDER.
This allows us to use it outside of EDA_BASE_FRAMEs (in this case, in
PANEL_PREVIEW_3D.)
2020-03-24 19:00:25 +00:00
Ian McInerney 34e5b76c5f Add virtual constructors to some classes that should have them
This is more for safety from undefined deletion behavior than
anything else (it also silences the Clang -Wnon-virtual-dtor warning).
2020-02-05 22:19:14 +00:00
Ian McInerney 5053f58bfc Move 3d viewer board outline warning to the status bar
This is less intrusive than a dialog that is constantly opening
whenever the 3d view is refreshed.
2020-02-03 22:09:14 +00:00
Mario Luzeiro 970a0a593a 3d-viewer, add an option to subtract Mask from Silk
Remove holes on Silk layer by default so the behaviour is the same
on OpenGL and Raytracing.
Fixes #1836
Fix raytracing shadow offset issue.
Some codestyle fix.
2020-01-29 16:00:05 +00:00
Ian McInerney c5a9479953 Only get 3D viewer colors when launched from the PCb editor
When launched from CVPCB or the footprint editor/viewer the stackup
isn't user-editable, so it just gives its default colors.
2020-01-22 22:48:20 +00:00
Fabien Corona 183bbf6914 3d-viewer : synchronise colours with board stackup.
ADDED: 3d-viewer can now look up colours defined in board properties

Fixes https://gitlab.com/kicad/code/kicad/issues/2261
2020-01-22 22:38:30 +00:00
Ian McInerney f896043067 Fix comments for switch statement fall throughs
This cleans up all GCC warnings (-Wimplicit-fallthrough=2) about
implicitly falling through switch cases.
2020-01-11 19:16:32 +00:00
Seth Hillbrand 7c28c3838a Comment-only changes
Makes class comments conform to coding standards
2020-01-10 16:43:01 -08:00
Mario Luzeiro 518c1df81b 3d-viewer, ray-tracing, do not add coincident segments
Fixes #1946 (lp 1852970)
2020-01-06 14:11:02 +00:00
Mario Luzeiro 37c3e34486 3D-viewer: raytracing, implement multiple shape board.
Fixes #1879 (lp:1820099)
Fixes #2126 (lp:1764039)
2020-01-04 20:50:37 +00:00
Mark Roszko b11d52eda1 Scope 3d viewer enums
Also fix one rogue character in a gerbview file that wasn't proper UTF8.
2019-12-30 13:01:06 +00:00
Ian McInerney c21e96bcf9 Add virtual destructor to CMATERIAL
CMATERIAL is a base class, so it should have a virtual constructor
to prevent undefined behavior (and silence warnings).
2019-12-28 16:44:28 +00:00
Mark Roszko 19ceb11ae7 Change more enums over to scoped enums 2019-12-28 00:55:11 +00:00
Mark Roszko ae785194ce Silence/fix double to float conversion warnings 2019-12-12 21:51:21 +00:00
Seth Hillbrand eb3d32f967 SHAPE_LINE_CHAIN: Unify constructors
Keeps the multi element SHAPE_LINE_CHAIN constructors in a single
routine using std::vector and implicit construction.
2019-12-12 13:54:48 +00:00
Seth Hillbrand b5f021ff9f Cleanup: Replace push_back with emplace_back
In cases where we create a new item and immediately push into a
container, the emplace idiom is faster and more efficient.
2019-12-05 13:41:21 -08:00
Seth Hillbrand 4d2e953f42 Cleanup: Replace C-only deprecated headers
This replaces headers deprecated by C++14 with their equivalent
replacement
2019-12-05 11:03:15 -08:00
Seth Hillbrand 79972a3867 3d: Fix initialization call
The vector duplication call was invalid as growing the vector
invalidates the iterators.
2019-11-07 04:45:46 -08:00
Jeff Young a25368cc6b Improve spelling.
The groundwork here is thanks to kunda1.

Fixes: lp:1831510
* https://bugs.launchpad.net/kicad/+bug/1831510
2019-08-20 19:14:05 +01:00
Jeff Young baeb3689b5 Improve SNR (and spelling). 2019-08-20 18:02:28 +01:00
Seth Hillbrand 59ed9f086f 3d-viewer: Remove dead code
The 2d-bbox of the 3d viewer was calculated and set but never used
2019-08-16 10:56:32 -07:00
Simon Schubert 0823692dda 3d: min dot needs to be square
Given that we compare the dot product (square of length) to s_min_dot,
it means that s_min_dot also needs to be square, or we wind up
converting line segments into circles that are visually distinct from
circles, leading to gaps in polylines.
2019-08-15 14:02:00 -07:00
Seth Hillbrand 77cefe0c16 Normalize line endings
A few files snuck in with CRLF for the line endings.  These make it hard
to look at diffs as every line appears to have changed.  This commit
makes only line ending changes, so can be ignored
2019-06-19 15:18:30 -07:00
Seth Hillbrand 9163ac543a pcbnew: Move pads to std::deque 2019-06-01 16:23:54 -07:00
Seth Hillbrand 888c01d11b pcbnew: Move tracks to std::deque 2019-06-01 09:53:23 -07:00
Seth Hillbrand d1877d7c1b Moving modules from DLIST to std::deque 2019-06-01 09:53:23 -07:00
Henner Zeller 2aea26de1e Raytracing - a more pleasing way sequencing blocks to render. 2019-05-14 09:27:16 -04:00
John Beard 18593d2dbb 3D viewer: decouple renderers from wxCursors
Provide a toolkit-agnostic interface for "busy indicators", which
allows the 3D viewer to show a busy cursor, without the canvases
having to to know how a wxCursore works.

The motivation here is to decouple the 3D renderers from the WX
GUI system, as they can then be used when when there is not an
active window (e.g. for offscreen rendering).

Otherwise, attempting to use a wxBusyCursor without a GUI
available is an instant segfault.
2019-05-12 14:19:39 +01:00
jean-pierre charras 3dd5a912b6 remove dead code. 2019-01-07 19:42:18 +01:00
Mario Luzeiro 350a6052c0 Fixes 3D Viewer: Raytracing line artifact, lp:1680530 2018-11-14 09:46:03 -05:00
Seth Hillbrand ddea4e11d1 3d-viewer: Fix intersection bug
Bounding box check always returned false, leading to incorrect BBox
checks when one bbox is interior to the other
2018-10-11 14:47:06 -07:00
Seth Hillbrand f8784f30a8 Removing OpenMP
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt

std::thread is used instead for multithreaded computation
2018-09-21 12:44:20 -07:00
Maciej Suminski 18c38bd60e Fixed a shadowed variable warning 2018-09-10 10:06:17 +02:00
Seth Hillbrand a6325aab29 Replacing Tesselation
Replaces Poly2Tri with updated code to process polygons faster and more
robustly.  Notably, we can now handle overlapping holes in the polygons,
allowing us to cache the triangulation of complex boards
2018-09-01 19:30:50 -07:00
Seth Hillbrand 86f744a1fd Adding initialization to GLM vectors 2018-04-11 10:59:28 -07:00
Ievgenii Meshcheriakov 18b0b78397 Correctly initialize module matrices in raytracer
Initialize module matrices to identity matrices instead of default zero
matrices while creating scenes for raytracer. This fixes disappearing
modules in raytracer view.

Fixes: lp:1763026
* https://bugs.launchpad.net/kicad/+bug/1763026
2018-04-11 10:06:36 -07:00
Carsten Schoenert a11714b1a4 fix misspelled 'an other' -> 'another' 2018-04-08 13:24:37 -04:00