Jeff Young
9f8f81cae2
Fix null-ptr dereference when layer doesn't exist.
...
Also removes a whole slew of extraneous type-casts, and makes better
use of for( x : listOfX ) for readability.
Fixes https://gitlab.com/kicad/code/kicad/issues/8996
2021-08-19 11:52:24 +01:00
jean-pierre charras
e1bbb717f6
3D viewer: ensure 3D shapes are loaded when switching 3D shapes visibility option to ON.
...
Fixes #8959
https://gitlab.com/kicad/code/kicad/issues/8959
2021-08-16 16:28:59 +02:00
Jeff Young
46338403e7
Unwrap some std::library typedefs.
2021-07-28 22:16:38 +01:00
jean-pierre charras
e00f609bdd
3D viewer: add a bit more activity messages during 3D scene building.
2021-07-22 16:13:38 +02:00
jean-pierre charras
a43ca978df
3D viewer: do not build the board 3D data during 3D frame creation, but after.
...
Building the 3D data is time consuming, so creating the data after the 3D
frame is shown is better, and the build activity is visible, especially on Linux.
2021-07-18 17:55:40 +02:00
Marek Roszko
eff75b630f
Get rid of anonymous struct typedefs
...
We are using C++14 where there is no reason for this and is banned in C++20 under P1766R1. MSVC generates a warning under C++14 as a reminder.
2021-07-01 18:28:41 -04:00
Maurice
d9a11c30ef
3d viewer fix for 3d single material object Diffuse Only opacity
2021-06-28 20:32:03 +00:00
Jeff Young
73b91a1a92
More sensible zoom defaults for 3D viewers.
...
Also fixes a bug where the model viewer in the file picker was using
only 1/4 of the screen on HIDPI displays.
2021-06-28 19:08:23 +01:00
Jeff Young
5c21f93803
Consistency in progress and error messages.
2021-06-26 13:23:43 +01:00
Jeff Young
16047b7419
3D preferences bug fixes.
...
1) Make sure prefs get saved when closing parent frame.
2) Add camera projection mode to settings.
Fixes https://gitlab.com/kicad/code/kicad/issues/8110
Fixes https://gitlab.com/kicad/code/kicad/issues/8626
2021-06-17 12:22:18 +01:00
Seth Hillbrand
3269ca3201
Fix compile error on BSD
...
The cast here should actually be from '0' and not 'NULL' as we are
getting an integer value of 0 for the bbox_idx_count
Fixes https://gitlab.com/kicad/code/kicad/issues/8580
2021-06-16 09:19:39 -07:00
Jeff Young
5d9c1dd75a
Better names for 3D material properties rendering modes.
...
(Also restores the legacy behaviour of ignoring transparency in
diffuse mode.)
Fixes https://gitlab.com/kicad/code/kicad/issues/8437
2021-06-12 23:01:41 +01:00
Jeff Young
096e342386
Prefix TRACK, ARC and VIA.
2021-06-11 22:07:02 +01:00
jean-pierre charras
1c3df973d6
Coverity warnings fixes.
2021-06-10 13:45:02 +02:00
luz paz
5f1e9bc8a7
Fix typos in source code
2021-06-10 01:24:15 +00:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Marek Roszko
8377ebb0e1
Fix msvc warnings
2021-06-06 15:30:31 -04:00
david-beinder
86add3bb85
Fix MSVC C4312 warnings when casting 32bit ints to pointer types on 64bit builds
2021-06-05 02:57:51 +00:00
Marek Roszko
25678ee00d
Fix msvc 16.10 build error
2021-06-03 23:13:39 -04:00
Marek Roszko
4df3cb912d
Remove another leaky wx/log.h header
2021-06-03 08:11:15 -04:00
Ian McInerney
d56251fdac
Remove universal include of wx.h in 3d viewer OpenGL file
2021-06-03 02:29:09 +01:00
jean-pierre charras
a06f965ffa
3Dviewer: fix incorrect drawing of a 3d model hovered by the mouse pointer.
...
Was due to a recent change in 3D code.
2021-05-22 20:23:43 +02:00
Jeff Young
ac58a3f9f0
Add preference for 3d-model-highlight-on-rollover.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8349
2021-05-11 20:53:53 +01:00
Wayne Stambaugh
d2a7f81b10
Debugging improvements and clean up.
...
* Remove unused wxLogDebug calls.
* Add add application level character tracing to detect unhandled key
events.
* Catch unhandled exceptions in KiCad main event loop like single top
applications.
2021-05-03 18:08:15 -04:00
Marek Roszko
03cf2b517f
Enum class PAD_ATTR_T
...
Renamed such that python stays the same
2021-05-01 10:51:54 -04:00
Marek Roszko
a69256e15b
Remove extraneous #include
2021-04-30 21:55:48 -04:00
Ian McInerney
ecd9bf696e
Be consistent about using nullptr instead of 0
...
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Mario Luzeiro
e92dc96767
3D-Viewer: fix issue with solder mask
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8272
2021-04-22 06:26:04 +00:00
Mario Luzeiro
cdc8fd3804
3D-Viewer: improve edge texture clamping of end segments
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8245
2021-04-21 06:34:19 +00:00
david-beinder
e0f69ad28b
3D viewer: Fix gap between plating and annulus copper
...
Hide transition by ending layer copper withing the annulus of the cylinder. Also always use hole wall thickness and set more realistic solder mask thickness
2021-04-19 13:19:32 +00:00
Mikolaj Wielgus
744e70df36
3D Viewer: Fix mouse panning in orthographic projection mode
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5561
2021-04-10 17:58:50 +00:00
Dominik Wernberger
e2aa7be4b3
Added a lot of consts and refactored a few lines
2021-03-08 12:49:48 -08:00
kamp
0a9a9d625e
Fix BBOX_3D documentation
2021-02-24 17:45:53 +00:00
Marek Roszko
907e282347
Silence some msvc warnings
...
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Wayne Stambaugh
2d64613bbb
Coverity fixes.
...
Reports 314745, 316271, and 316269.
2021-01-13 11:23:09 -05:00
Wayne Stambaugh
926cc3a00d
3D Viewer: more code cleaning and naming improvements.
2021-01-07 14:33:43 -05:00
jean-pierre charras
86be755c83
Fix compil warning: do not use class instead of struct in forward declarations
2021-01-06 09:29:03 +01:00
Wayne Stambaugh
1c7a5c46e5
3D Viewer: member variable and method naming improvements.
...
A few build improvements thrown in for a good measure.
2021-01-05 17:24:29 -05:00
Wayne Stambaugh
710e621c6a
3D Viewer: remove all instances of "c" prefix from file names.
2021-01-03 17:44:49 -05:00
Wayne Stambaugh
8416c1fc37
3D Viewer: remove all instances of "C" prefix from object names.
2021-01-02 17:45:36 -05:00
Dominik Wernberger
caf300aa33
Fix memory leak
2020-12-24 17:33:33 +00:00
Wayne Stambaugh
f311831c27
Coverity fixes.
...
280252, 314742, 314745, 314747, 314755, 314756, 314757, 314758,
314935, 314936
2020-12-20 13:24:47 -05:00
Ian McInerney
048900dda7
Fixup the 3d Viewer code after the last fixup
2020-12-17 00:30:22 +00:00
Wayne Stambaugh
4d128b819a
3D viewer code cleaning round 3.
2020-12-13 18:02:57 -05:00
Wayne Stambaugh
9e22499350
3D viewer code cleaning round 2.1.
2020-12-12 12:35:31 -05:00
Wayne Stambaugh
1eba0c435b
3D viewer code cleaning round 2.
2020-12-12 12:35:31 -05:00
Wayne Stambaugh
d1fe4a0c98
3D viewer code cleaning round 1.
2020-12-11 08:51:42 -05:00
jean-pierre charras
e6550fb92e
3D viewer: fix a draw issue: missing holes.
...
Fixes #6608
https://gitlab.com/kicad/code/kicad/issues/6608
2020-12-04 16:35:57 +01:00
Jeff Young
7f360a7188
Some renaming in 3D code for better SNR. Also formatting fixes.
2020-11-30 14:38:06 +00:00
Jeff Young
3ca06700fc
Formatting.
2020-11-29 20:00:16 +00:00
Jeff Young
9c7c05c161
Mostly formatting cleanup but a few type-casting cleanups too.
2020-11-24 22:16:41 +00:00
Mario Luzeiro
8b9be2e129
3D-Viewer: fixes generations of layer lists
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6385
2020-11-15 16:55:16 +00:00
Jeff Young
7bd31d5237
Naming conventions.
2020-11-14 18:26:03 +00:00
Jeff Young
bdbb68f813
MODULE -> FOOTPRINT.
2020-11-13 16:04:03 +00:00
Jeff Young
63a54d003e
More module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
522d64968e
Yet more module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
9106cc19bf
Yet another tranche of module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
fc9cf1d827
More module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
52a46341db
More module -> footprint.
2020-11-13 15:16:24 +00:00
Jeff Young
f5443de7f9
D_PAD -> PAD.
2020-11-13 15:16:24 +00:00
Jeff Young
84dd5108ba
Remove some "class_" prefixes from files.
2020-11-13 15:16:23 +00:00
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
a9be08e1ce
3D-Viewer: skip layers not created
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6324
2020-11-10 13:57:52 +00:00
Wayne Stambaugh
4ea3914d4e
Coverity fixes.
...
CIDs: 312996, 305508, 305509, 305510, 312992, 312997, 312994, 312995,
312968, and 306650.
2020-11-10 08:50:16 -05: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
Roberto Fernandez Bautista
1bbc569151
Fix DoRePaint routine in EDA_3D_CANVAS
...
- Check that we aren't already painting (return if we are)
- Check that GLEW functions exist before calling them in 3D canvas and throw exception if they are no longer available
- Catch above exceptions in paint routine and show an infobar message to the user
Fixes https://gitlab.com/kicad/code/kicad/-/issues/6246
2020-11-07 15:39:57 +00:00
Mario Luzeiro
9454f9df92
3D-Viewer: OpenGL, enable by default the AA
...
fixes an issue that disables AA when it back from Raytracing mode
2020-11-06 20:21:40 +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
4b6c602537
3D-Viewer: OpenGL, cut outline on plated pads
2020-11-06 20:21:40 +00:00
Mario Luzeiro
5e371b5f29
3D-Viewer: OpenGL, fix z-fight issue
2020-11-06 20:21:40 +00:00
Mario Luzeiro
78b461a41d
3D-Viewer: OpenGL outline, implement an outline board cut
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
jean-pierre charras
73c7154891
Fix another Coverity warning.
2020-10-27 14:16:38 +01: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
1703729269
Require explicit decl of maxError and errorLocations.
...
This should reduce both performance issues and clearance issues.
2020-10-13 13:49:07 +01:00
Jeff Young
07f139381b
Nullptr safety.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5893
2020-10-06 12:49:29 +01:00
Jeff Young
52794b3456
Nullptr safety.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5893
2020-10-06 12:08:31 +01:00
Mark Roszko
a28a0e14ba
Fix conversion warnings
2020-10-05 10:41:14 +00:00
Mario Luzeiro
cea1a56f5f
3D-Viewer: set default alpha when import from legacy
...
keep the current alpha when import colors from stackup.
request a refresh instead of a reload when using OpenGL render.
Fixes https://gitlab.com/kicad/code/kicad/issues/5717
2020-10-02 23:14:42 +00:00
Jeff Young
5b7c6e100d
Clip tech layers to board in 3D renderer.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4873
2020-10-01 16:50:22 +01: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
Ian McInerney
38584e55dd
Don't process an invalid window position
...
This is used for computing a vector index, so it can't be
negative.
2020-09-30 23:34:04 +01: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
ab57c93c98
3D-Viewer: add selection color as an option
2020-09-28 02:26:25 +00:00
Mario Luzeiro
ec3c20bf84
3D-Viewer: do not use selection while on preview
2020-09-28 02:26:25 +00:00
Mario Luzeiro
6db0c58e8f
3D-Viewer: fix some code style
2020-09-28 02:26:25 +00:00
Mario Luzeiro
5205709399
3D-Viewer: use LAYER_SELECT_OVERLAY color for selection
...
preserve material transparency while rendering as selected
2020-09-28 02:26:25 +00:00