Commit Graph

56 Commits

Author SHA1 Message Date
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
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
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 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
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
Jeff Young e9cd9ee8ff Actionize the rest of the 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/2228
2020-03-19 15:10:32 +00:00
Jon Evans e59a3d981e Implement a new settings framework across all of KiCad
CHANGED: Settings are now stored in versioned sub-directories
ADDED: First-run dialog for migrating settings from a previous version
CHANGED: Settings are now stored as JSON files instead of wxConfig-style INI files
CHANGED: Color settings are now all stored in a separate settings file
CHANGED: The symbol editor and footprint editor now have their own settings files
CHANGED: Color settings are no longer exposed through BOARD object
CHANGED: Page layout editor now uses Eeschema's color scheme

Settings are now managed through a central SETTINGS_MANAGER held by PGM_BASE.
Existing settings will be migrated from the wxConfig format on first run of each application.
Per-application settings are now stored in one class for each application.
2020-02-19 23:44:56 -05:00
Ian McInerney 56f6b529c8 Simplify 3D object cache class structure
Remove the CACHE_WRAPPER whose sole purpose was to allow the
cache to be stored in the project, and instead just have the cache
inherit the proper class.
2020-01-15 23:32:05 +00:00
Ian McInerney 13b6028e1b Refactor all math into a new kimath library
* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions

This is part of cleaning the build system for #1906.
2020-01-07 17:12:59 +00:00
Jeff Young e6d5110ccf Implement I18N for ACTIONs.
It's a bit of a hack because they're statically initialized and
so we can't make use of the _() macro.  We do still want it in the
code, however, because the string harvesting is based off of it.

Fixes: lp:1833000
* https://bugs.launchpad.net/kicad/+bug/1833000
2019-06-17 10:45:23 +01:00
Jeff Young a3f3fb39de Convert 3DViewer to new hotkey architecture. 2019-06-10 23:46:01 +01:00
Jeff Young c2662b0e11 Retire EDA_DRAW_PANEL and legacy_wx/EDA_DRAW_FRAME. 2019-05-31 21:55:30 +01:00
John Beard e6a6266f3d Build: libpolygon provides its own includes
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.

As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.

This resolves a circular dependency previously detected and also
simplifies CMakeLists.
2019-02-04 19:29:31 -08:00
Tomasz Wlostowski e439b17fa1 eeschema-gal: make sure all other Kicad apps compile after eeschema gal hacks 2018-10-09 11:08:52 +01: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
Jeff Young 8f0aa68ab8 Fold 3D Search Paths dialog into Configure Paths.
Use in-place editing for both.

Fixes: lp:1743823
* https://bugs.launchpad.net/kicad/+bug/1743823

(cherry picked from commit 33622cd)
2018-07-17 15:11:01 +01:00
jean-pierre charras 8fcdc4f6c3 3D viewer: fixes about hotkeys and menubar.
Move code to specific files 3d_menubar.cpp and hotkeys.cpp like in other tools.
2018-04-15 14:07:33 +02:00
jean-pierre charras 5d08f1a0d9 Breaks the large create_layer_items.cpp file into 2 smaller specialized files, to make changes in 3D shapes calculations more easy. 2018-01-28 14:05:17 +01:00
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
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
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
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
Mario Luzeiro 995fde8d9c (forget to staged modified files) 2016-10-09 11:33:53 -04:00
Mrio Luzeiro d8eab321f7 3D Viewer: complete refactor of the 3D viewer.
* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
  for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
2016-07-19 13:35:25 -04:00
Simon Richter 48ad75719c Remove redundant old copy of cimage class (3d-viewer/CImage.cpp and 3d-viewer/CImage.h) 2016-05-30 08:31:32 +02:00
Cirilo Bernardo 3eca3fe75d Implemented new 3D file selector with preview 2016-01-25 15:55:36 +11:00
Cirilo Bernardo 7848b2a52e Implemented new 3D searchpath configurator 2016-01-18 16:59:06 +11:00
Cirilo Bernardo f4414e8325 Change 3D cache manager to use boost SHA-1 digest rather than in-tree MD5 2016-01-14 13:49:40 +11:00
Cirilo Bernardo 14bee875cf Replaced platform-dependent dynamic loading code with wxPluginManager 2016-01-11 15:47:08 +11:00
Cirilo Bernardo a2fe783f53 Finished refactor and introduction of generic Plugin scheme 2015-12-14 14:51:28 +11:00
Cirilo Bernardo 3ff8ca0caf Refactored to use new generic plugin base 2015-12-14 08:45:22 +11:00
Mario Luzeiro 69cc788e8e + Removed glm source from kicad tree (Maciej / Cirilo)
+ Added renderer for 3D model preview (Mario)
+ Added 3d_cache including name resolver and modifications to 3D model dialogs (Cirilo)
2015-12-08 18:31:57 +11:00
jean-pierre charras b9f1ada90b Use Clipper lib in 3D viewer, in calculations that crashed the 3D viewer when using boost:: polygon. Work in Progress. 2015-07-04 18:38:08 +02:00
unknown eee901ff57 3D-viewer: Fixes and enhancements. Add comments in header files. Fix some coding style issues. 2015-03-28 12:33:56 +01:00
Mario Luzeiro d80a3d651e 3d-viewer: fixes and enhancements. 2015-03-15 16:51:56 +01:00
Henri Valta bfab279a43 Fix parallel build issue when KICAD_SKIP_BOOST=ON. 2014-10-07 14:10:01 -04:00
jean-pierre charras 5f63becff1 3D viewer: move helper functions from 3d_draw.cpp to 3d_draw_helper_functions.cpp. Add comments in .h sources. Better management of background color. coding style fixes. 2014-08-04 13:28:29 +02:00
Brian Sidebotham 7b936f4d0c 3D-Viewer now requires GLEW include - add GLEW_INCLUDE_DIR 2014-08-01 22:27:20 +01:00
unknown 7a4ea8955e 3D viewer enhancements (better render + better vrml reader) from Mario Luzeiro 2014-07-30 11:01:25 +02:00
Dick Hollenbeck 0be3992913 Lay basis for a more full featured usage of boost, including compiled libraries such as unit_test_framework, system, etc. Move headers now into boost_root/include/boost/. 2013-08-20 13:03:21 -05:00
jean-pierre charras 0f885e7f31 3D viewer: Add more options, to show/hide technical layers. 2013-05-16 21:04:21 +02:00
jean-pierre charras 5874ac0f6f Commit patch for x3d file reader (with minor changes). Commit other minor patches and fixes 2013-03-27 19:34:23 +01:00
jean-pierre charras 31ff1bac4f 3D viewer:
*  serious code cleanup (remove duplicate code)
  *  shows (option in 3D preference menu) the copper items (tracks, zones...)  in 3D, using 35 microns copper thickness.
      However, because there are a lot more3D data to show (roughly 4 times more), this is slower.
2012-08-26 15:59:55 +02:00
Dick Hollenbeck b90d657cb8 fix bug 921553 2012-02-08 09:06:06 -06:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
charras 07767585c3 better code compatibility with others compilers (MSVC) 2008-10-30 20:12:29 +00:00
f3nix 422ffdabc1 CMake:
* Require CMake version 2.6.1 on Windows and version 2.6.0 for other systems.
* Update FindSubversion to version from CMake 2.6.1 (localization issue solved).
* Remove FindwxWidgetsCVS and use the default one (some issues solved upstream).
* Formatting style changes.
2008-09-07 19:32:07 +00:00
f3nix 07a0e142ed Lowercase CMake commands. 2008-03-11 15:57:54 +00:00
f3nix af1c15646f CMake:
* Change tabs to spaces.
* Make Boost required.
2008-01-30 09:42:19 +00:00
f3nix 338e0db75a Debug build should be easier now. See how-to-build-kicad.txt. Tested on linux only. 2008-01-06 12:03:13 +00:00