Commit Graph

75 Commits

Author SHA1 Message Date
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
Maciej Suminski 5bbb4489b3 Fixed out of bounds access to m_shaderBuffer array in 3D viewer raytracer 2018-03-05 17:49:34 +01:00
Bernhard Stegmaier a786078747 Fix clang-mp build error (don't declare const variables as being firstprivate) 2018-03-04 12:22:12 -05:00
Camille 5c4f8abd24 Fix type promotion in math function 2018-01-09 19:11:27 -05:00
jean-pierre charras 00c2257b26 3D viewer: Remove outdated option "show holes in zones" that was no longer used in opengl mode, and useless in ray tracing
(it was only used to reduce the calculation time)
Also add a wxBusyCursor when rebuilding the 3D scene.
2017-12-28 11:01:10 +01:00
jean-pierre charras 68268973b7 To avoid mistakes between graphic layers for pads, holes and not plated holes, rename 3 GAL_LAYER_ID names:
LAYER_NON_PLATED to LAYER_NON_PLATEDHOLES
LAYER_PADS_HOLES to LAYER_PADS_PLATEDHOLES
LAYER_PADS to LAYER_PADS_TH
and add comments and fix a render issue in gal mode for non plated holes.
2017-11-29 09:48:41 +01:00
Oliver b80449b069 Fixes for 3D model offset
- Display offset units in 3D preview window (inches or mm)
- Fix offset in 3D renderer
- Fix offset in Raytracing renderer
- Fix offset in STEP export
- Fix offset in VRML export
2017-11-20 17:46:03 -05:00
Wayne Stambaugh f3908bd87c Revert premature commit of 17ab319b, "Fixes for 3D model offset".
This reverts commit 17ab319b99.
2017-11-11 20:04:46 -05:00
Oliver 17ab319b99 Fixes for 3D model offset
- Display offset units in 3D preview window (inches or mm)
- Fix offset in 3D renderer
- Fix offset in Raytracing renderer
- Fix offset in STEP export
- Fix offset in VRML export
2017-11-11 15:08:08 -05:00
Tomasz Włostowski 90ab5860dc refactoring: removed dependency of libpcbcommon on 3d-viewer. 2017-11-03 20:01:42 +01:00
Maciej Suminski 1e87ae6c50 Fixed a memleak in raytracer 2017-06-27 10:58:43 +02:00
jean-pierre charras 6a3c1720b2 Fix a few doxygen warnings 2017-06-25 11:26:04 +02:00
Tomasz Włostowski 3b16d3cffe further DLIST/Iterators cleanup, some code formatting 2017-06-23 11:12:37 +02:00
Wayne Stambaugh 66e97fa905 Doxygen comment improvements.
Fix lots of Doxygen warnings.

Fix Doxygen comment for IO_MGR::FootprintEnumerate() which was recently
changed.
2017-06-13 19:47:46 -04:00
jean-pierre charras 6eb2000b69 fix Coverity warning (CID 151565) (CID 155147) 2017-04-01 20:05:33 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
jean-pierre charras bbedad3456 Fix a Coverity warning, which looks like a (minor) bug in ccontainer2d.cpp. 2017-03-13 12:53:01 +01:00
Maciej Suminski 14cbdcec1f Fixed mismatched new[]/delete in 3D viewer 2017-03-08 09:12:16 +01:00
Kevin Cozens 458b0e75e0 Prevent raytracing render engine option from crashing the 3D viewer
Fix for lp bug #1667722 using a change made by Mario Luzeiro.

Fixes lp:1667722

https://bugs.launchpad.net/kicad/+bug/1667722
2017-03-01 18:34:19 -05:00
Mario Luzeiro 2a793cc22c Remove mm_malloc from raytracer
There is no need to use mm_malloc at this moment. Explanation:
1) It was planned that there was advantadge to use aligned memory but it
was not measured the performance. 2) aligned memory is needed for use
with SIMD (i.e: SSE) but that is not used at moment.

Fixes: lp:1626278
https://bugs.launchpad.net/kicad/+bug/1626278
2017-02-13 10:08:20 -05:00
Mario Luzeiro 840bcb5189 3D-Viewer: improvements on reflections and on plastic normal texture
+ make the number of samples for reflection and refraction
parameterizable.
+ add some fuziness to reflection.
+ improvements on plastic normal texture
2017-01-26 07:22:46 -05:00
Mario Luzeiro 33449216b5 3D-Viewer: Improvements on reflection and refraction
- crete an option for absorvance (works better to make the epoxy
different for regular transparent materials).
- visual fix an issue related with the epoxy render (square bands on the
render).
- fix a reflection issue (it was not take in account the reflection
material color).
2017-01-21 09:21:44 -05:00
Mario Luzeiro 2eb840b2ed 3D-Viewer: Fix precision issues (experienced on isometric mode) in frustum tests 2017-01-18 18:09:27 -05:00
jean-pierre charras d56a49d218 Performance counter rework: More comments, code cleaning, and move GetRunningMicroSecs() prototype from common.h to profile.h.
profile.h should now contain all info for profiling.
2017-01-02 13:49:36 +01:00