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
ae26c92a16
Remove modal message box when catching exceptions in EDA_3D_CANVAS::DoRePaint
...
Rely on the wxInfobar instead
2020-11-07 15:39:57 +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
Marek Roszko
08ca80a2d8
Smooth out redrawing of toolbars by not letting wx pointlessly calculate both orientations
...
Monkey patch
Fix #5705
2020-11-05 20:56:14 -05:00
Oleg Endo
a238209f3f
Add group-by-suffix display option in net inspector
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2469
2020-11-04 02:49:19 +00:00
Ian McInerney
3d47eb0d49
Fix localization of the menu strings with accelerator strings
...
The accelerator strings really shouldn't be part of the translation,
and some translations have cause the accelerator keys to be incorrectly
handled. It is simpler to make it separate and just join them to the
translated string.
Make all accelerator modifiers use lowercased Ctrl instead of CTRL
to be the same as the other modifiers.
Fixes https://gitlab.com/kicad/code/kicad/issues/5992
2020-11-04 01:31:52 +00:00
Jeff Young
5a644aa3fb
QuasiModal needs to be used for any dialog hosting a help window.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5897
2020-10-28 23:07:15 +00:00
Marek Roszko
04697c5fe8
Avoid 3d viewer stealing back focus/activation
...
Fix #6184
2020-10-27 19:35:55 -04: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
jean-pierre charras
c092e3f8b7
Fix a few minor Coverity warnings
2020-10-26 10:46:08 +01:00
Marek Roszko
91e5611341
Move dialog_configure_paths.h and dialog_edit_library_tables.h to dialogs folder
2020-10-25 20:01:12 -04:00
Marek Roszko
eeac3cb4d5
Nix some more common.h includes
2020-10-24 00:38:25 -04:00
Marek Roszko
304e5faf36
Move wxStringSplit to kicad_string
2020-10-24 00:17:07 -04:00
Jeff Young
cce557b9ad
Redo the board-edge-building logic to return better error reports.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/6119
2020-10-22 21:29:04 +01: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
Seth Hillbrand
4085757aeb
Remove beginning/ending spaces in translations
...
Adding space padding makes translations more difficult by increasing
string counts
2020-10-20 12:08:04 -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
jean-pierre charras
f6b4b66a86
Avoid include wx/wx.h in many files that do not actually use this include.
...
Including wx.h includes the full set of wxWidgets include files, that is not good,
and can create some conflicts with some Windows headers on msys2.
2020-10-18 18:21:34 +02:00
Ian McInerney
06f01d0d8a
Add platform-specific code to allow wxChoice to ellipsize
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5377
2020-10-17 23:20:13 +01:00
Jeff Young
92d84b0d67
Naming updates.
2020-10-15 01:35:16 +01: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
Mario Luzeiro
d31c5c41e6
3D-Viewer: add an infobar to the panel preview
2020-10-06 10:42:46 +00:00
Mario Luzeiro
1cbe8fcc1f
3D-Viewer: check for minimum required version of OpenGL
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5286
2020-10-06 10:42:46 +00:00
Jeff Young
37906511f5
Class renaming.
...
DRAWSEGMENT -> PCB_SHAPE
EDGE_MODULE -> FP_SHAPE
TEXTE_PCB -> PCB_TEXT
TEXTE_MODULE -> FP_TEXT
2020-10-05 11:55:33 +01:00
Mark Roszko
a28a0e14ba
Fix conversion warnings
2020-10-05 10:41:14 +00:00
Jeff Young
7a4900b8dc
PCB_LINE_T -> PCB_SHAPE_T and PCB_MODULE_EDGE_T -> PCB_FP_SHAPE_T
...
Also updated footprint text and zone types for consistencey.
2020-10-04 16:49:04 +01:00
jean-pierre charras
bda275de46
more cleanup about removing useless include
2020-10-03 11:48:16 +02: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
Ian McInerney
a5ed5e5675
Handle single line segments on footprint edgecuts
...
Also, only display an infobar message for footprints when
there is no footprint loaded (instead of if the outline
isn't closed).
Fixes https://gitlab.com/kicad/code/kicad/issues/4866
2020-09-30 23:34:04 +01:00
Ian McInerney
78c43158f4
Annotate the board class with if it is for a footprint edit/view
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
Jeff Young
d3f8f2b81e
Remove confusion between pad->IsOnLayer and pad->IsPadOnLayer
2020-09-30 11:50:51 +01: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
Mario Luzeiro
10676eb926
3D-Viewer: only show intersection information while using opengl
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
a1e94c2583
3D-Viewer: request a redraw when a footprint is selected in pcbnew
2020-09-28 02:26:25 +00:00
Mario Luzeiro
fe51cc947c
3D-Viewer: render 3D shapes in green if footprint is 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
Ian McInerney
fc565edb33
Add a palette to the toolbars to display groups of actions
...
This adds a palette to toolbar items that displays groups
of actions when long-pressed on a button.
2020-09-27 01:00:44 +01:00
jean-pierre charras
0b03d8a5ff
Fix a few Coverity warnings.
2020-09-20 16:30:23 +02:00
jean-pierre charras
6ec6baf401
3d viewer: save color settings.
...
The call to SaveColorSettings() was not at the right place, and the new
color settings never saved.
Fixes #5529
https://gitlab.com/kicad/code/kicad/issues/5529
2020-09-17 17:15:25 +02:00
Jon Evans
e9b627bfd8
ADDED: Center marker dimension type
2020-09-16 20:55:11 -04:00
Jon Evans
75ffce1a0b
ADDED: Leader dimension object
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5555
2020-09-15 23:37:38 -04:00
jean-pierre charras
98339cd5eb
3d viewer: fix incorrect calculation of pad hole size of vertical shape.
...
Fixes #5627
https://gitlab.com/kicad/code/kicad/issues/5627
2020-09-15 10:17:31 +02:00
Jon Evans
b11e315d10
Refactor DIMENSION to hide internal details; add some new properties
...
This is a board file format change to account for the new properties.
Also, we now only store the critical information about the dimension's
geometry in the board, rather than storing every drawn line.
The DIMENSION object is now an abstract base, and ALIGNED_DIMENSION
is the implementation that exists today (we will add more dimension
types in the future)
2020-09-11 21:12:36 -04:00
Jeff Young
e2bc7557cc
Clean up arc/circle polygonization.
...
1) For a while now we've been using a calculated seg count from a given
maxError, and a correction factor to push the radius out so that all
the error is outside the arc/circle. However, the second calculation
(which pre-dates the first) is pretty much just the inverse of the first
(and yields nothing more than maxError back). This is particularly
sub-optimal given the cost of trig functions.
2) There are a lot of old optimizations to reduce segcounts in certain
situations, someting that our error-based calculation compensates for
anyway. (Smaller radii need fewer segments to meet the maxError
condition.) But perhaps more importantly we now surface maxError in the
UI and we don't really want to call it "Max deviation except when it's
not".
3) We were also clamping the segCount twice: once in the calculation
routine and once in most of it's callers. Furthermore, the caller
clamping was inconsistent (both in being done and in the clamping
value). We now clamp only in the calculation routine.
4) There's no reason to use the correction factors in the 3Dviewer;
it's just a visualization and whether the polygonization error is
inside or outside the shape isn't really material.
5) The arc-correction-disabling stuff (used for solder mask layer) was
somewhat fragile in that it depended on the caller to turn it back on
afterwards. It's now only exposed as a RAII object which automatically
cleans up when it goes out of scope.
6) There were also bugs in a couple of the polygonization routines where
we'd accumulate round-off error in adding up the segments and end up with
an overly long last segment (which of course would voilate the error
max). This was the cause of the linked bug and also some issues with vias
that we had fudged in the past with extra clearance.
Fixes https://gitlab.com/kicad/code/kicad/issues/5567
2020-09-11 11:23:49 +01: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
f0edbd088c
3D-Viewer: fixing z-fight issues
2020-09-08 21:02:20 +00:00
Mario Luzeiro
e288218c4f
3D-Viewer: subtract pads poly to F_Cu and B_Cu poly layers
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
1ab968e72f
3D-Viewer: render different materials plated and non plated copper
...
implement on OpenGL
2020-09-08 21:02:19 +00:00
Mario Luzeiro
3544bc09fd
3D-Viewer: remove not used inner holes containers
2020-09-08 21:02:19 +00:00
Jeff Young
2251716784
Don't show 3D models with their show flag set to false.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5548
2020-09-08 20:42:09 +01:00
qu1ck
636285311e
Make DRAWSEGMENT::GetRectCorners return vector
...
... instead of modifying the argument.
This will make the method usable in python API and will not incur
permormance penalty because named return value optimization (NRVO)
is a thing since C++11.
But even if copy is not elided vector is moved instead of copied.
https://en.cppreference.com/w/cpp/language/copy_elision
2020-09-07 05:33:10 +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
7c9bb9ab07
3D-Viewer: add color to "Clear Color" action in the color picker
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
Jeff Young
56a531109a
Don't try and shrink shapes generated from pads.
...
It ends up being different from shrinking the final outline.
2020-08-28 20:48:47 +01:00
Jeff Young
b65bb8e7a8
Fix some out-of-order parameters that compiler didn't catch.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5363
2020-08-28 15:17:45 +01:00
Jeff Young
ebb9a636fa
Handle differential x:y clearance for solder mask.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/5363
2020-08-28 14:00:37 +01:00
Jeff Young
2c4269d03e
When inflating dummy pad make sure to reset clearance to zero.
...
And, the inflate-dummy-pad hack doesn't work for custom pad shapes,
so turn it off there.
Fixes https://gitlab.com/kicad/code/kicad/issues/5363
2020-08-28 11:05:58 +01:00
Jeff Young
9e12ea9bb6
Cleanup some dead code and make better use of iterators.
...
Also applies coding style around auto and lambdas.
2020-08-28 11:05:58 +01:00
Jeff Young
e7db43285f
ADDED new footprint fabrication attributes.
...
This commit also adds mapping of the new symbol properties
"exclude from BOM" and "exclude from board" to be correctly
handled in Update Board from Schematic.
Fixes https://gitlab.com/kicad/code/kicad/issues/2399
Fixes https://gitlab.com/kicad/code/kicad/issues/4643
Fixes https://gitlab.com/kicad/code/kicad/issues/2233
2020-08-28 11:05:58 +01:00
Mario Luzeiro
744a8f011e
3D-Viewer: add button to reset light defaults
...
Fixes https://gitlab.com/kicad/code/kicad/issues/
Fixes https://gitlab.com/kicad/code/kicad/issues/
2020-08-19 01:57:22 +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
Jeff Young
66ff16dd3d
Better board-edge error reporting.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4950
2020-08-17 23:55:31 +01:00
jean-pierre charras
5b365053db
Fix a few I18n issues.
...
Especially, only ASCII7 chars can be used in messages.
Do not mark debug messages as I18n strings
2020-08-17 09:18:49 +02:00