Commit Graph

604 Commits

Author SHA1 Message Date
Cirilo Bernardo 68a7a5235e Fix 3D plugins mutiarch support.
Use CMAKE_INSTALL_LIBDIR instead of wxStandardPaths::GetPluginsDir() to
determine plugin directory.

Fixes lp:1682812

https://bugs.launchpad.net/kicad/+bug/1682812
2017-04-18 09:11:53 -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 68b141dcb8 Make polygon built by BOARD::GetBoardPolygonOutlines strictly simple.
It fixes issues in 3d viewer (crashes and incorrect 3D board outline in some cases)

Fixes: lp:167484
https://bugs.launchpad.net/kicad/+bug/1674844
2017-03-23 08:56:52 +01:00
jean-pierre charras 05220a86f1 BOARD::GetBoardPolygonOutlines(): do not generate a separate SHAPE_POLY_SET for holes.
They are already managed by SHAPE_POLY_SET board outline.
2017-03-22 11:47:03 +01:00
Kristoffer Ödmark d6dd176aca Changed default increment values and added shift+scroll for fine tuning
Fixes: lp:1669550
* https://bugs.launchpad.net/kicad/+bug/1669550
2017-03-13 11:25:40 -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
Cirilo Bernardo 68bcdec87e Workaround for non-ASCII filenames in Windows 2017-03-03 14:30:47 -05:00
Kristoffer Ödmark 49c7400ca9 Reallow large scaling of 3D models
Fixes: lp:1669510
* https://bugs.launchpad.net/kicad/+bug/1669510
2017-03-03 10:30:09 -05:00
Maciej Suminski 1dfd74bec9 Display S3DSG in single line during CMake configuration step 2017-03-03 13:38:12 +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
Simon Richter 70b3edd06f Drop unnecessary and possibly harmful optimization setting
Using -O3 is default for release builds with gcc/clang anyway, so this
doesn't gain anything, but overwriting the existing flags might remove some
that might be needed.
2017-02-23 14:44:15 -05:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
Cirilo Bernardo 2b2b73ee4b Fix bug: Footprint add 3D shape recognizes only files with lower case ext on Windows
Fixes: lp:1659027
https://bugs.launchpad.net/kicad/+bug/1659027
2017-02-22 10:22:33 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
jean-pierre charras 1e242f3710 Remove a #define used in a debug session, and now useless in panel_prev_model.* 2017-02-19 08:30:34 +01: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
jean-pierre charras 9074c57a28 panel_prev_model.cpp: try a better way to fix issue with wxSpinButtons on Linux. 2017-02-07 11:05:08 +01:00
jean-pierre charras fec02f6161 panel_prev_model.cpp: Fix a minor issue on Linux with wxSpinButtons.
The min and max values must be set, and the curr value forced to 0, to avoid disabling up or down arrows.
2017-02-07 10:26:03 +01:00
jean-pierre charras 42c9e4d602 panel_prev_model.*: fix minor issues. 2017-02-07 09:06:43 +01:00
jean-pierre charras cca0ffed60 panel_prev_3d: Add spin buttons and inc/dec by mouse wheel for 3D parameters 2017-02-07 09:06:43 +01:00
jean-pierre charras 43cb4560bf Rewrite code for PANEL_PREV_3D because the way events were previously managed are not compatible with a good mouse event management.
To avoid a lot of tedious code, wxFormbuilder is used to create the PANEL_PREV_3D_BASE class.
2017-02-07 09:06:42 +01:00
Forrest Voight bce04c930d 3d-viewer: draw dimension graphics
Fixes: lp:1406754
* https://bugs.launchpad.net/kicad/+bug/1406754
2017-02-01 09:45:32 -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
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.

Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.

Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
2017-01-25 08:03:32 -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
Baranovskiy Konstantin 3dc2050498 Improved MousewheelPAN mode. 2017-01-17 16:34:11 -05:00
Simon Wells 19512b46a3 Fix unlimited zoom with "Use touchpad to pan"
Additionally, fix an unreported bug allowing zoom level to get stuck at
MAX_ZOOM.

Fixes: lp:1625754 (3dviewer zoom not limited with Use touchpad to pan)
https://bugs.launchpad.net/kicad/+bug/1625754
2017-01-14 09:17:56 -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
Chris Pavlina 6078ca85e5 Improve broken edge outline error message 2016-12-29 12:31:12 -05:00
Mario Luzeiro d365dc590e Soft plastic textures even more 2016-12-22 16:18:38 -05:00
Mario Luzeiro b33e42ef2c Soft plastic textures 2016-12-22 16:18:30 -05:00
Mario Luzeiro ad2458056a Improvements on 3DViewer raytracing render
+ Implement sRGB to Linear and Linear to sRGB conversions.
+ Fix an issue in the AntiAliasing adaptive logic.
+ Improves the ambient color use on the shader.
+ Improves post-shader calculation. Fixes the saturated dark regions.
+ Improves the transparency of soldermak material.
2016-12-22 16:18:20 -05:00
Chris Pavlina 4c340cefee Also rename footprint attributes in 3D viewer
Follow-up to commit: 809e71a
2016-12-15 14:48:14 -05:00
Mario Luzeiro 86dcfeb69d improve anti-aliasing
+re-implement anti-aliasing, making it more acurate, not blured, better
and much faster (unsing much less lines of code)
+rewrite some function on camera and raypacket.
+small improvements on raytracing realtime, remove useless ifs
comparisons.
2016-10-27 10:22:21 -04:00
Simon Richter 6000336fe7 Add missing include
std::iota is defined in <numeric>
2016-10-10 19:44:46 -04:00
Mario Luzeiro 6d27087053 Improve board texture (make it square), add directional light to top/bot. 2016-10-09 11:34:28 -04:00
Mario Luzeiro f59bde8cc3 Improve brushed and plastic textures 2016-10-09 11:34:20 -04:00
Mario Luzeiro ae8c62843e Raytracing: implement brushed metal perturbator 2016-10-09 11:34:09 -04:00
Mario Luzeiro 995fde8d9c (forget to staged modified files) 2016-10-09 11:33:53 -04:00
Mario Luzeiro 8493a2f6d5 Raytracing: implement textures based on normal perturbation
Implement normal perturbation for black epoxy and color plastic.
Fix some UI issues in 3D-Viewer (menu options was not proper saved or
updated)
2016-10-09 11:33:25 -04:00
Mario Luzeiro ee71875b4b Implement normal perturbation materials on raytracing 2016-10-09 11:33:16 -04:00
Mario Luzeiro 89bb47ede6 Improve shadow on postshader and add a gamma sRGB color space convertion 2016-10-09 11:33:09 -04:00
Mario Luzeiro 49dce5d191 Improve shadow calculation on Raytracing
Makes it not so dark.
Speed optimization on post shader calculation.
2016-10-09 11:32:59 -04:00
Chris Pavlina 278ee7da7d Remove deprecated 'register' storage spec 2016-09-30 22:32:24 -04:00
Chris Pavlina b9abcc309f Fix Validate hiding overloaded virtual in 3D viewer dialog 2016-09-30 22:32:24 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00