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
Ian McInerney
45fb030b9b
Rename and shorten the names in ACTION_CONDITIONS
2020-08-16 19:10:25 +00:00
Ian McInerney
f34ffd3906
Migrate more 3d viewer actions to the tool framework
2020-08-16 19:10:25 +00:00
Ian McInerney
72a1c71e07
Implement a framework to handle wxUpdateUIEvents for tool actions
...
This allows for the tool framework to keep track of a universal
set of conditions for the UI state (enabled/checked/shown) for
controls of actions. It removes the need for the main menubar
menus to be CONDITIONAL_MENUs and be rebuilt on each open,
and instead makes the updates of the check and enabling of
items handled in the native wxWidgets way.
This commit switchs the 3d viewer and kicad project manager window
over to this system.
2020-08-16 19:10:25 +00:00
Mario Luzeiro
78ac675316
3D-Viewer: parameterize raytracing lights, add it to options dialog
...
Remove some hacks related to postprocessing (not need now because the
previous postprocessing improvements, light parametrization could be
used for tune or future parameters could be implemented)
2020-08-15 09:41:34 +01:00
jean-pierre charras
ffabc17372
style cleanup and a few comments added.
2020-08-13 14:17:53 +02:00
Jeff Young
393bb0fd83
Fix assert where geometry routine wasn't ready to handle layers.
...
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
2020-08-12 22:20:08 +01:00
Jeff Young
463100d67f
Remove a long-standing hack to keep divots out of adjacent zones.
...
The new algorithm unions any adjacent zones before doing the
chamfer/fillet and then subtracts the other zones back out afterwards.
Fixes https://gitlab.com/kicad/code/kicad/issues/3812
2020-08-12 22:20:08 +01:00
jean-pierre charras
29d6fe88f0
3D viewer: do not show via/pad shapes of pads not connected on copper layers.
...
Show the same vias/pad shapes as plot functions.
2020-08-11 11:26:00 +02:00
Peter Montgomery
4d460ec073
Delete 3D cache files with GUI settable number of days
...
KiCad stores 3D cache files but never gets rid of any of them.
This patch adds a new function called 'CleanCacheDir()'. Any cache
files older than the passed 'number of days' parameter are deleted.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1928
2020-08-09 10:41:45 +00:00
Tomasz Wlostowski
89a953e039
Migrated GetEffectiveShape(s) to SHAPE_COMPOUND
2020-07-29 23:14:03 +02:00
Jeff Young
bf445c1a95
Performance enhancements.
...
1) cache pad polygon outlines
huge improvement in connectivity performance and a decent
improvement in DRC performance
2) don't pre-allocate CONTEXT stack
significant improvement in DRC rule performance
2) don't keep re-encoding strings
decent improvement in DRC rule performance
2020-07-25 13:03:33 +01:00
Jeff Young
73c6fc8b8b
Make opacity box line up with scale, rotation and offset boxes.
2020-07-25 13:03:33 +01:00
Ian McInerney
50b2271f84
Fix missing variable initialization
2020-07-18 23:56:39 +01:00
Jeff Young
3fd0a3f842
Update text variables even when they're changed from other binary.
...
For instance, you might have PCBNew open but change the variable
value through EEschema > Schematic Setup.
Fixes https://gitlab.com/kicad/code/kicad/issues/4918
2020-07-17 21:05:11 +01:00
Joshua Redstone
ad99d85390
3d-viewer: add option to clip silkscreen around via annular ring
...
Add more conservative clipping of silkscreen layers around vias.
Clips at outside of annular ring rather than outside of copper plating.
2020-07-16 22:36:06 +00:00
Mario Luzeiro
779ed40588
3D-Viewer: improve SSAO
...
Implement blur based on depth weights.
Improve occlusion based on direct light/shadow it receives.
Improve occlusion mixing with the final color by using multiply instead
of subtract.
Remove debug and test code.
2020-07-16 11:23:02 +00:00
jean-pierre charras
55f4c2b167
Removing creation of a wxPaintEvent instance (step 2), not allowed in 3.1.4 wxWidgets:
...
Remove wxPaintEvent creation in 3D viewer
2020-07-14 15:52:01 +02:00
Seth Hillbrand
e19a7910f8
Revert "Revert "Set DoubleBuffering to reduce flicker""
...
This reverts commit c18cab6154
.
2020-07-13 20:19:10 -07:00
Mario Luzeiro
74c6f6ab82
3D-Viewer: set missing scale and position to the list
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4826
2020-07-11 16:55:49 +00:00
Mario Luzeiro
ef7d7477d0
3D-Viewer: Remove not used list
2020-07-11 16:55:49 +00:00
Seth Hillbrand
c18cab6154
Revert "Set DoubleBuffering to reduce flicker"
...
This reverts commit 106259f6e6
.
In its place, we set double buffering to only menubars in an attempt to
find a soluton to #4785
Fixes https://gitlab.com/kicad/code/kicad/issues/4863
2020-07-11 09:43:30 -07:00
jean-pierre charras
eab98eee1d
3D viewer: use the full board bounding box to define the visible area.
...
Remove also a printf now useless, used for debug.
Fixes #4815
https://gitlab.com/kicad/code/kicad/issues/4815
2020-07-07 11:40:35 +02:00
Jeff Young
d85a707385
Move rest of DRC to SHAPE collision architecture.
2020-07-06 20:00:50 +01:00
Seth Hillbrand
3bf7cf2b54
Add VSYNC to 3d viewer
2020-07-03 21:43:49 -07:00
Seth Hillbrand
a210fd570f
Set VSYNC to adaptive (if available)
...
Swap syncs can limit the redraw rate as the screen waits for previously
issued syncs. Setting this to -1 allows for adaptive swapping
(resorting to unsynced if it falls behind) if it is supported by the
card but will fall back to unsynced (0) if the adaptive is not
supported.
Fixes https://gitlab.com/kicad/code/kicad/issues/4226
2020-07-03 13:27:48 +00:00
Jon Evans
c0aa6965de
Migrate PcbNew project settings to new framework
...
Various architecture upgrades to support this.
Creating a BOARD now requires a valid PROJECT, which caused
some (mostly transparent) changes to the Python API internals.
ADDED: Project local settings file
CHANGED: Board design settings are no longer stored in PCB file
CHANGED: Net classes are no longer stored in PCB file
CHANGED: Importing board settings now reads boards, not just projects
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2578
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4070
2020-07-02 22:08:54 -04:00
Seth Hillbrand
d663be853f
Explicitly add signed/unsigned comparison to warnings
2020-07-02 10:54:34 -07:00
Jeff Young
40a72d9530
Add SH_RECT handling to 3D shape conversion.
...
Also add some debugging for not-implemented shape cases in other
places to catch simmilar issues in future.
Fixes https://gitlab.com/kicad/code/kicad/issues/4757
2020-06-30 18:32:31 +01:00
Ian McInerney
3bb44f3804
Don't install the import library for the 3dsg library
...
No one on Windows should be linking to it outside of
the build process, so there is no need for it in the
installer
Fixes https://gitlab.com/kicad/code/kicad/issues/1842
2020-06-30 15:38:41 +01:00
Jon Evans
0d4ee39f75
CHANGED: Copper zones can be on more than one layer
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/1963
2020-06-28 08:52:37 -04:00
Ian McInerney
fb10406e67
Add right-click context menus for toolbar items
2020-06-26 21:29:03 +00:00
Ian McInerney
52856a8ce4
Move scaled toolbar separator into ACTION_TOOLBAR
...
* Ensure all separators are scaled separators
* Clean up toolbar creation functions
2020-06-26 21:29:03 +00:00
Jeff Young
d01b29ab37
Cleanup pad geometry handling.
...
There were a lot of plotters, exporters, etc. that were rolling their
own implementations.
This also introduces a lazily-built set of SHAPE objects for doing
collision detection and some forms of rendering (and later DRC).
2020-06-22 22:28:37 +01:00
Jeff Young
970921f88b
Support for filled DRAWSEGMENT::S_RECT and S_CIRCLE.
...
One more step in unifying pad primitives and draw segments.
2020-06-20 14:34:53 +01:00
Ian McInerney
5649558cff
Move DPI_SCALING into the GAL from common
...
It should be owned by the GAL, since it is used
with the OpenGL canvas infrastructure.
2020-06-19 17:02:46 +01:00
Seth Hillbrand
08c61e6788
Ensure triangulation follows moving zone
...
Dragging filled zones in OpenGL was extremely slow due to the
invalidated triangulation cache. Moving the zone should also move the
triangles and keep the cache valid.
2020-06-17 19:43:11 -07:00
Jeff Young
aeed8e6e2c
Finish implementation of DRAWSEGMENT::C_RECT.
...
It's currently only supported in the Footprint Editor. It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
2020-06-15 20:51:31 +01:00
Jeff Young
f84406009b
Push a couple of layers of indirection out of grid settings.
2020-06-13 11:35:56 +01:00
Electro707
4a3743e7dd
3D viewer flip action
2020-06-08 21:35:40 +00:00
Ian McInerney
a9fa592f5f
Fix button size on 3d preview panel
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4626
2020-06-07 15:47:34 +01:00
Ian McInerney
6083c0849f
Make the 3d viewer rotation increment configurable
...
ADDED: Setting for the 3d viewer rotation increment
Fixes https://gitlab.com/kicad/code/kicad/issues/4618
2020-06-07 11:44:07 +01:00
Ian McInerney
9d0ea66a96
Don't use the accelerator table in the menubars
...
It seems that the accelerator table causes issues with
keyboard events on MSW.
Fixes https://gitlab.com/kicad/code/kicad/issues/1941
2020-06-06 22:50:35 +00:00
Ian McInerney
4357c1d3b3
Coverity and compiler warning fixes
...
* Initialize variables
* Test dynamic casts
Fixes https://gitlab.com/kicad/code/kicad/issues/4620
2020-06-05 12:50:56 +01:00
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
Wayne Stambaugh
0032845f9e
Fix clipped bitmap buttons with GTK on Linux.
...
A note to developers, please do not set the minimum and/or size of bitmap
buttons. It causes bitmaps to get clipped using GTK on Linux. If the
bitmap button size is not acceptable, then supply an appropriately sized
bitmap rather than attempt to force the wxWidgets sizing mechanism to do
what you want. This almost always causes platform differences that do
not work well.
2020-06-03 14:01:44 -04:00
Érico Rolim
e9e72bd8e4
Fix sg_version detection for cross compilation
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4525
2020-05-28 13:05:49 +00:00
Jon Evans
a52435bbb0
ADDED: New mouse settings panel, expanded mouse settings
...
You can now choose the behavior of dragging with the
middle and right mouse buttons.
You can also choose which modifier keys to use for
panning and zooming with the scroll wheel or trackpad.
You can also customize the zoom speed, which makes
it possible to have a good zoom experience on a wider
range of input devices.
You can also now zoom by dragging with the right or
middle button if desired.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3885
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4348
2020-05-24 14:38:28 -04: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
2215d8a96b
3d viewer: ensure the opengl engine is selected on start.
...
(the ray tracing engine is too time consuming to be select on start)
2020-05-16 13:18:56 +02: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
Simon Richter
632494cba7
Add missing includes
...
A few more instances of missing <algorithm> for std::max
2020-05-10 00:24:11 +02:00
jean-pierre charras
c78e7c5485
Fix compil issues (warnings and missing include)
2020-05-09 08:59:00 +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
Mario Luzeiro
5a7f875602
3D-Viewer: implements opacity property for 3D models
...
fixes #2087
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
jean-pierre charras
a43e4fa163
3D Viewer: Animation Speed setting looks wonky (GTK only)
...
Fixes #4317
https://gitlab.com/kicad/code/kicad/issues/4317
2020-05-05 10:41:35 +02:00
Wayne Stambaugh
63291141df
Pcbnew: minor footprint properties dialog layout improvements.
2020-05-03 11:45:18 -04:00
Jeff Young
874f13e29e
Fix some issues with rotated oval pads.
2020-05-01 18:49:42 +01:00
jean-pierre charras
262283995c
string fix
2020-04-30 21:03:03 +02:00
jean-pierre charras
93b9be7ebe
DLG_SELECT_3DMODEL rework: better dialog (use split window) and fix a few issues.
2020-04-30 19:49:41 +02:00
Jeff Young
d2046b17d7
More shrinking of Footprint Properties.
2020-04-27 00:24:57 +01:00
Ian McInerney
d006acecf4
More window sizing fixes
...
* Push all sizing operations into EDA_BASE_FRAME
* Save the unmaximized window size when maximizing
so that we can then save it in the config if the
window is maximized. Otherwise the config ends up
with the maximized size saved, and weird behavior
occurs when unmaximizing on the next opening.
2020-04-27 00:14:12 +01:00
Emery Burhan
e20e45fa54
3d_viewer: Added Animation Speed option
...
ADDED: Option to set the speed of and enable/disable 3d viewer animations
2020-04-24 23:58:50 +00: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
Ian McInerney
ff67d6300d
Hide more OpenGL deprecation warnings on OSX
2020-04-24 23:28:31 +01:00
jean-pierre charras
cf66aac15d
3d viewer: fix compil issue (missing include in c3d_render_ogl_legacy.cpp)
2020-04-24 08:24:59 +02:00
Mario Luzeiro
b0bf9f7b57
3D-Viewer: use wxStaticBoxSizer for options, fix coding style
2020-04-23 17:28:56 +01:00
Mario Luzeiro
67fe304f1f
change the default display tab
2020-04-23 09:29:39 +00:00
Mario Luzeiro
00da17bc7d
3D-Viewer: Add new options: Anti-aliasing quality, "While moving"
...
Create new window options with tabs for 3D-Viewer. Remove
"showCopperThickness" option from menus and place it on OpenGL options.
2020-04-23 09:29:39 +00: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
c08a6adb2a
Implement GUI and file R/W for 3D model opacity.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/2087
2020-04-19 18:24:39 +01:00
Ian McInerney
e528769637
Move TOOLS_HOLDER into tools/ folder
...
Also clean up some compiler warnings
2020-04-19 01:51:49 +01:00
Ian McInerney
7bda8178d1
Move library includes to main CMake file
...
Placing them behind the SYSTEM directive tells CMake to tell
the compiler they are system libraries, so it shouldn't show
warnings created from them.
2020-04-19 01:11:56 +01:00
Jeff Young
2b6089240a
Change super/subscript syntax to ^{foo} and _{foo}.
2020-04-18 21:04:41 +01:00
Oleg Endo
ae6fbc9c60
Improve 3D viewer rendering performance
...
* Use GL vertex buffers and index buffers for 3D model rendering
* Use material or average vertex color for bounding boxes instead of red
* Reinstate bounding box rendering with GL vertex/index buffers
* Use compact vertex/index data representation
- 8-bit normals
- 8-bit colors
- 16-bit or 32-bit indices, depending on model size
This should improve performance a bit on lower end GPUs with less memory
and bandwidth.
Fixes #4112
2020-04-17 16:10:04 +00:00
Jeff Young
9c8941e040
Remove a bunch of globals.
2020-04-16 17:34:46 +01:00
Simon Richter
99c1d7cf96
Add noexcept to some functions in the 3d viewer.
2020-04-16 16:11:21 +00:00
Jeff Young
6e800bddae
Rationalize penWidth processing as first step in removing some globals.
2020-04-13 20:58:13 +01: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
191d4daf53
Fix crash on OSX. (It appears the DC isn't used anyway.)
2020-04-10 22:49:56 +01:00
jean-pierre charras
2c8ada42a0
Arc shaped track segments: fix 3D viewer and track to polygon converter.
2020-04-09 10:37:17 +02:00
jean-pierre charras
2401917776
Fix a bug I added in commit b1b8a320
.
...
Fixes #4170
https://gitlab.com/kicad/code/kicad/issues/4170
2020-04-07 16:36:38 +02:00
Ian McInerney
cb380cda0c
Fix some build warnings
2020-04-06 00:31:45 +01:00
Jeff Young
cc9ac37a0e
Add text variable support to envVar processing.
2020-04-05 20:52:26 +01:00
jean-pierre charras
b1b8a32078
fix a few Coverity warnings and compil minor warnings.
2020-04-03 09:54:47 +02:00
jean-pierre charras
00d9e77e7f
3D viewer: fix a minor problem: to many rotations when typing Shift+z or Shift+y
...
more than once.
Fixes #4135
https://gitlab.com/kicad/code/kicad/issues/4135
2020-03-31 17:35:45 +02:00
Jeff Young
42a876d963
Fix a duplicate definition of the TOOL_DISPATCHER.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4110
2020-03-28 18:44:34 +00: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
jean-pierre charras
04d6ea982d
3D viewer: fix an issue with solder paste layer having negative clearance.
...
The code tried to draw outlines with segments having a negative thickness.
It happens mainly on solder paste layers.
Fixes #4090
https://gitlab.com/kicad/code/kicad/issues/4090
2020-03-26 13:46:14 +01:00
Jeff Young
ba36fc0009
Fix some Coverity issues.
2020-03-25 14:38:43 +00:00
jean-pierre charras
5f7bcb9c34
3D viewer: fix a minor issue in solder paste rect pads:
...
the solder paste mask clearance was no taken in account for rect and trap shapes.
2020-03-25 13:04:30 +01: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
jean-pierre charras
cc47062b17
Fix a few Coverity issues
2020-03-23 16:17:22 +01:00
Wayne Stambaugh
d8e99dc5be
3D Viewer: fix broken check for write image permission check.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/4081
2020-03-21 16:19:55 -04:00