Commit Graph

1511 Commits

Author SHA1 Message Date
Jeff Young 53796f2be6 Selection will always be the same after choice in toolbar popup.
Fixes https://gitlab.com/kicad/code/kicad/issues/12769
2022-10-27 14:28:09 +01:00
Jeff Young ef17ee3384 Tooltips for layer & viewer presets.
Fixes https://gitlab.com/kicad/code/kicad/issues/11778
2022-10-27 14:27:19 +01:00
jean-pierre charras e5182dd749 Fixes in 3D viewer
Fixes #12769
https://gitlab.com/kicad/code/kicad/issues/12769
Fixes #12765
https://gitlab.com/kicad/code/kicad/issues/12765
2022-10-27 11:34:11 +02:00
Wayne Stambaugh f6297d328c Fix 3D viewer canvas timer event clash. 2022-10-22 16:58:04 -04:00
Jeff Young cef7cd8f7c Move default font to RENDER_SETTINGS.
Fixes https://gitlab.com/kicad/code/kicad/issues/12723
2022-10-22 21:32:42 +01:00
Jeff Young d16b23d16e Name shortening and line-break reduction. 2022-10-21 18:41:39 +01:00
Jeff Young b3ddd09c44 Unit-binderize board thickness. 2022-10-02 20:03:00 +01:00
Jeff Young 1fc5ecae6e Minor dialog layout improvements.
Fixes https://gitlab.com/kicad/code/kicad/issues/12497
2022-10-02 11:45:30 +01:00
Kliment 11e20e52e9 Recreate stackup from thickness as necessary and fix unit handling to use EDA_UNIT_UTILS 2022-09-30 19:59:01 +00:00
Simon Schaak 552e8af6af Properly handle limits 2022-09-30 19:59:01 +00:00
Simon Schaak 798cd567d5 Use board stackup information when available 2022-09-30 19:59:01 +00:00
Simon Schaak 589f1058ca Make 3D model preview board thickness adjustable 2022-09-30 19:59:01 +00:00
jean-pierre charras 5b8cf96736 3D viewer: catch an exception thrown when a fp library is not found in table,
when the 3D viewer try to rebuild the 3D shape of a footprint.
Fixes #12524
https://gitlab.com/kicad/code/kicad/issues/12524
2022-09-27 18:32:48 +02:00
Marek Roszko 707a598e5d Prevent a crash due to the 3d preview dummy board stealing setting ownership 2022-09-25 23:04:13 -04:00
Marek Roszko c50b4fb04f Add relative to footprint 3d model path resolution
Fixes https://gitlab.com/kicad/code/kicad/-/issues/2073
2022-09-25 22:56:16 -04:00
Marek Roszko 8e96751af2 Strip out and migrate 3d search paths in favor of env vars
This mainly stops reading/writing 3dresolver.cfg
We still keep some sillyness for kicad2step for now

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9164
2022-09-25 21:29:52 -04:00
Ian McInerney 40ff7cb9bd Fix some UI element spacing in settings panels 2022-09-25 15:41:39 +01:00
jean-pierre charras 22cd2a3428 3D viewer: add option to show/hide fp not in position file.
Previously they were not shown, and this is really bad, because
"not in pos file" does not mean never mounted, and not even not mounted.
2022-09-24 13:58:31 +02:00
Jeff Young 64a6fc0fd4 Push UNITS_PROVIDER down into a low-level mixin.
This allows us to also construct cheap UNIT_PROVIDERs for specific
tasks when necessary.
2022-09-19 17:10:59 +01:00
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Marek Roszko 3d5913c825 Remove convert_to_biu.h, merge contents to base_units.h 2022-09-16 21:09:28 -04:00
Marek Roszko 66e8931405 Remove IU_PER_MM thats standalone 2022-09-16 21:09:27 -04:00
Marek Roszko a8613ee80f Combine Iu2Millimeter & remove PcbMm2iu 2022-09-16 21:09:26 -04:00
Roberto Fernandez Bautista 2a0c31ed97 Don't display footprints not in position files. 2022-09-17 00:21:02 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00:00
Mark Roszko 17bec365db Trim down 3d viewer search paths 2022-09-09 16:57:53 +00:00
Marek Roszko 087550ebd3 Get 3d plugins working for running from build dir 2022-09-08 21:49:10 -04:00
Roberto Fernandez Bautista ad45b81dee Assign default hotkey to Flip Board in 3D viewer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12337
2022-09-02 11:30:06 +02:00
Jeff Young 5679b9dbdc Remove a few EDA_RECT instances. 2022-08-31 01:22:49 +01:00
Marek Roszko 03aa63bd50 Move 5 helpers to EDA_UNIT_UTILS since they aren't iu specific 2022-08-29 20:11:03 -04:00
Jeff Young 48f77973da Another try at getting the Link combobox working on MSW. 2022-08-28 23:25:01 +01:00
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04:00
markus-bonk 66b8ecb467 Use an independent pivot representation for the 3dmouse in the 3dviewer.
CHANGED: Instead of using the target style pivot that is used to move the
look at position, a different pivot is used for the center of rotation
used by the 3dmouse. Both pivots, the camera look at position and the
3dmouse rotation pivot, need not necessarily coincide. A blue ball is used
to represent the pivot.
2022-08-19 23:08:03 +00:00
Jeff Young e015f5b086 Formatting. 2022-08-15 23:48:38 +01:00
Wayne Stambaugh 898ec0d094 Fix wxWidgets 3.1 and later deprecated build warnings.
wxWidgets 3.1 has deprecated wxPATH_NORM_ALL when normalizing file
paths when calling wxFileName::Normalize().  This change keeps the
existing behavior except in places where our own internal
ExpandEnvVarSubstitutions() to expand environment variables.
2022-08-15 08:00:40 -04:00
Jeff Young a9536b5de9 CHANGED netclass assignments now done via canvas or via patterns. 2022-08-14 22:56:29 +01:00
Jeff Young 01b61f5ff1 Minor improvements to status bar messages. 2022-08-01 13:09:51 +01:00
Jeff Young 19b00b5d57 Cleanup. 2022-08-01 13:09:51 +01:00
Jeff Young 6f49b57f9b Cleanup & performance enhancements. 2022-08-01 13:09:51 +01:00
jean-pierre charras 4bfbf91369 3D viewer: Fix incorrect behavior when moving the scene
Fixes #12114
https://gitlab.com/kicad/code/kicad/issues/12114
2022-07-30 13:27:25 +02:00
jean-pierre charras 3245aec5b5 3D viewer, main toolbar: fix incorrect parent for 2 widgets.
Also use SHIFT instead of ALT as modifier to show the viewport list, because
ALT is not usable on Windows, especially combined with TAB
2022-07-29 18:33:38 +02:00
jean-pierre charras 993c446fdf Fix some warnings detected by PVS-STUDIO (most are not used vars) 2022-07-25 18:23:52 +02:00
Jeff Young f41af10007 Clean up hole shapes for safety (smart pointer) and consistency. 2022-07-22 23:06:07 +01:00
luz paz 79fa911e0e Fix various typos
Found via `codespell -q 3 -S *.po,./thirdparty,./Documentation/changelogs -L aactual,acount,aline,alocation,alog,anormal,anumber,aother,apoints,aparent,aray,ba,busses,dout,einstance,leaded,modul,ontext,ot,overide,serie,te,,tesselate,tesselator,tht`
2022-07-21 16:31:41 +00:00
Fabien Corona 976670e987 Move 3D controls to a new class 2022-06-21 23:38:22 +00:00
Alex 58f9b82c1e 3D viewer: Fix GL_INVALID_ENUM error. 2022-06-09 18:35:07 +00:00
Jeff Young bf71cada4e ADDED: User viewports for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/5724
2022-06-06 22:24:02 +01:00
Seth Hillbrand 77cd56fbd3 Fix missing assignment 2022-05-26 08:17:47 -07:00
Seth Hillbrand c0a9a02591 Handle settings sequencing
Avoids crash when window close ordering places 3d viewer after the
common settings are closed
2022-05-25 16:56:54 -07:00
Mario Luzeiro ef4f0b49fc 3D-Viewer, raytracing: implement bevel edges on item layers 2022-05-25 00:11:46 +00:00
Mario Luzeiro 2aa56e2c86 3D-Viewer: assign correct copper material based on render plated option.
change plated material intensity.
2022-05-25 00:11:46 +00:00
Jeff Young fa11e1c097 Take text height into account as well as thickness for knockout margin.
Also centralizes calculation so all clients will get the same answer.

Fixes https://gitlab.com/kicad/code/kicad/issues/11636
2022-05-20 12:29:01 +01:00
Roberto Fernandez Bautista 0e2429b5cc 3D Viewer: Don't render zero-width circles 2022-04-11 21:50:40 +01:00
Marek Roszko 5bb2cdf73d Revert "Stop leaking submenu items"
This reverts commit 34c70a51ea.
2022-04-10 22:33:43 -04:00
Marek Roszko 34c70a51ea Stop leaking submenu items
Our menu bar code is interestingly complex. But we were throwing away newly made menu items to the void in the cases of constructed on the fly submenus
2022-04-10 22:04:48 -04:00
markus-bonk 1a9ef4bd0f Add support for using a SpaceMouse to pan & zoom in the schematic editor. 2022-03-31 19:03:41 +00:00
Mario Luzeiro 7659f3c81b 3D-Viewer: binds the default texture after draw and before end the list
Fixes https://gitlab.com/kicad/code/kicad/issues/2547

Fixes https://gitlab.com/kicad/code/kicad/issues/10741
2022-03-25 21:56:10 +00:00
Wayne Stambaugh 7da7864f5e Fix some Coverity issues. 2022-03-25 15:51:05 -04:00
Jeff Young 65185f53a1 Rotate fp zones before comparing with library versions.
Also includes some performance fixes to not copy around triangulation
data when it's not needed.

Fixes https://gitlab.com/kicad/code/kicad/issues/10143
2022-03-14 15:53:24 +00:00
Jeff Young 32fdab8902 Bubble ESC up from the 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/issues/9984
2022-03-13 23:14:06 +00:00
Jeff Young e03b06927d Fix rotation problems for knockout fp text, and implement 3D rendering.
Fixes https://gitlab.com/kicad/code/kicad/issues/11086
2022-03-12 14:17:52 +00:00
jean-pierre charras d3e9165146 3D viewer: fix overzealous pad filter in BOARD_ADAPTER::addPads()
Fixes #11092
https://gitlab.com/kicad/code/kicad/issues/11092
2022-03-10 12:43:17 +01:00
Jeff Young 0dc857b5ab Clean up pad handling in 3D viewer.
Most importantly, create F_Cu/B_Cu layers if they're otherwise empty
but we have plated pads to render on them.

Fixes https://gitlab.com/kicad/code/kicad/issues/10207
2022-03-06 13:57:12 +00:00
Wayne Stambaugh aa9fa09000 Minor code cleaning. 2022-03-04 10:07:10 -05:00
jean-pierre charras 9fec8aa269 3D viewer: disable thickness rendering on tech layers when disabled for copper.
Building the vertical walls around shapes to show layer tickness is very
time consuming. It can be disabled for copper layers but was always enabled
for other layers.
Now layer thickness is enabled or disabled for all layers.
2022-03-01 11:29:35 +01:00
Jeff Young 8d19b52aed Line stroking for 3D view.
Fixes https://gitlab.com/kicad/code/kicad/issues/10887
2022-02-17 18:02:56 +00:00
Jeff Young 2172810600 Performance: better sharing of zone fills. 2022-02-15 19:19:03 +00:00
Jeff Young 3deaf902bb Retire the V5 zone fill algorithm.
Fixes https://gitlab.com/kicad/code/kicad/issues/10578
2022-02-11 13:10:52 +00:00
jean-pierre charras 59babfa332 3D viewer: fix a sometimes incorrect render engine initialization.
inside the EDA_3D_CANVAS, it was initialized before settings are read,
and can be set to raytracing, although we always start 3D viewer in opengl mode,
thus creating a incorrect (not working) initialization.
2022-02-09 10:10:48 +01:00
Marek Roszko 41f54349a5 Replace inserts/push_backs with emplace in some spots 2022-02-05 19:53:31 -05:00
Jeff Young 7ccac79192 More wxString wide literals. 2022-02-05 21:29:34 +00:00
Jeff Young 9582457fef Be explicit about literal wide-strings. 2022-02-05 20:40:21 +00:00
Marek Roszko 36a5580f56 Use unique_ptr to avoid memory leak in 3d model cache loading
PVS V773
2022-02-05 14:38:07 -05:00
Jeff Young b070914216 Fix cardinal sin of macro definitions. 2022-02-02 18:18:27 +00:00
markus-bonk 53cf899b67 Fix 3dmouse navigation in 3d-viewer orthographic projection.
The zoom level was being incorrectly calculated. When zooming in on a
PCB, the zoom function can become disabled if you get too close. At
which point you need to use the mouse wheel to zoom back out.
2022-02-02 12:51:29 +00:00
Seth Hillbrand 098e8f7d9b Revert "cmake: adding KICAD_MACOSX_APP_BUNDLE option"
This reverts commit ea9f960cc1.

Reverted for updates as this currently breaks kicad-mac-builder
2022-01-31 15:57:56 -08:00
Jeff Young 5739505aa3 TextBoxes for PCBNew. 2022-01-31 20:00:47 +00:00
markus-bonk 14c5f744ff Fix missing navlib pcbcommon dependency declaration.
The 3d-viewer_navlib didn't have a proper dependency chain. It
relies on headers that come from pcbcommon.
2022-01-31 16:07:55 +00:00
markus-bonk a8486c5296 Fix warning: declaration shadows a previous local [-Wshadow]. 2022-01-31 10:41:51 +00:00
jean-pierre charras 98b9600373 nl_3d_viewer_plugin_impl.cpp: remove useless includes 2022-01-29 13:09:35 +01:00
Davide Gerhard ea9f960cc1 cmake: adding KICAD_MACOSX_APP_BUNDLE option
ADDED: with cmake KICAD_MACOSX_APP_BUNDLE option the user can disable
the macOS app bundle creation when compiling on macOS. This permit to
use/install KiCad like any other *nix platform (/usr/bin, /usr/share,
ecc.). By default, cmake build the app bundle.
2022-01-28 15:49:37 -08:00
markus-bonk bb542e5959 Fix compilation when KICAD_USE_3DCONNEXION is undefined. 2022-01-28 12:21:42 +00:00
markus-bonk be58ab679b Fix coding style policy violations and CMake version.
Fix violations of 4.2.2 Function Definitions and 4.2.3 Control
Statements.
Set the minimum CMake version required to build to 3.1.
Removed the Visual Studio solution and project files.
2022-01-28 12:21:42 +00:00
markus-bonk 91d261d735 Fix "Error loading editor" when no 3Dconnexion driver installed. 2022-01-28 12:21:42 +00:00
markus-bonk 87d7bdbd5e * PCB_EDIT_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Added full support for using a 3Dconnexion device in PCB_EDIT_FRAME. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

Use build option KICAD_USE_3DCONNEXION (default = ON) to control whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk aec7802fcf EDA_3D_VIEWER_FRAME: Implement SpaceMouse navigation and command export for 3D-viewer.
Full support for using a 3Dconnexion device in the 3D viewer has been added. Full 3D navigation is available for both the orthographic and perspective projections. Commands are exported and can be assigned to 3D mouse buttons. Any limitations to the functionality are limitations of the installed 3Dconnexion driver for the device and OS.

ADDED: A build option KICAD_USE_3DCONNEXION (default = ON) has been added to the main CMakeLists.txt. The option controls whether the SpaceMouse support is compiled into the solution.
2022-01-28 12:21:42 +00:00
markus-bonk f61c798295 Fix compilation errors in Fedora pipeline. 2022-01-28 12:21:42 +00:00
markus-bonk cd82a927c2 TRACK_BALL: Allow two input devices to simultaneously pan & rotate
Instead of the mouse pan and drag algorithms calculating the new
position or rotation values relative to a starting value, the new values
are calculated relative to the current values. This allows the user to
use a second input device to move or rotate the view at the same time
without its change being undone by the mouse.
2022-01-28 12:21:42 +00:00
markus-bonk 27063688b3 CAMERA: Fix spelling of method MakeRayAtCurrrentMousePosition.
EDA_3D_CANVAS: Fix spelling of method getRayAtCurrrentMousePosition.
2022-01-28 12:21:42 +00:00
markus-bonk 5b9f56613e CAMERA: Make the CAMERA_FRUSTUM structure values for nw, nh, fw and fh consistent.
The CAMERA_FRUSTUM structure values for nw, nh, fw and fh to always mean width and height for both perspective and orthographic views instead of half-width and half-height in perspective.

The orthographic / perspective view toggle has been modified to keep the viewed plane at m_camera_pos_init * m_zoom the same dimensions in both projections.
2022-01-28 12:21:42 +00:00
Jeff Young 0091c76a6f Excise deci-degrees from UNIT_BINDER.
Fixes https://gitlab.com/kicad/code/kicad/issues/10495
2022-01-19 00:10:32 +00:00
Jeff Young b828355206 A bit more angle cleanup. 2022-01-18 09:48:24 +00:00
Jeff Young e61144d45a Finish with EDA_ANGLE. 2022-01-16 21:15:40 +00:00
Jeff Young 07013d00e1 More EDA_ANGLE. 2022-01-14 16:08:19 +00:00
Jeff Young abd3f5bc2b Move footprints to EDA_ANGLE. 2022-01-14 16:08:18 +00:00
jean-pierre charras a6c85a9204 3D viewer: fix a truncation taht created PCB_TEXTs with 0 width (not visible)
Fixes #10377
https://gitlab.com/kicad/code/kicad/issues/10377
2022-01-11 18:34:35 +01:00
jean-pierre charras cd8d6ba079 3D viewer: fix bad rendering of circles and segments due to truncation.
the item radius or thickness was a int. should be a double.
Fixes #10357
https://gitlab.com/kicad/code/kicad/issues/10357
2022-01-11 13:13:51 +01:00
Jeff Young 73a2984963 Fixes for rotated footprint text. 2022-01-10 15:30:19 +00:00
Jeff Young e811a39881 Readability. 2022-01-10 15:05:57 +00:00
Jeff Young 236feeb592 Cleanup GRText APIs, 3D Viewer <-> board APIs, and Plotter APIs.
Also fixes a bug where outline fonts weren't being handled for footprint
text in 3D Viewer, and a copy/paste error in stroke font handling for
both PCB and footprint text in 3D Viewer.

Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 14:17:11 +00:00
Jeff Young 7d032f9c2f Outline font rendering for Cairo, plotter, printer and 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/issues/10319
2022-01-10 01:54:28 +00:00
Jeff Young aef2a3fca4 Default font for eeschema. 2022-01-08 16:47:45 +00:00
jean-pierre charras 0f0a540a65 Panel 3D previewer: for show 3D body shapes, regardless the 3D viewer itself.
the Panel 3D previewer is made to show 3D body shapes, so do not show them
when disabled in the board 3D viewer, is really stupid.
2022-01-06 12:04:28 +01:00
Marek Roszko e4dbfcd92d Swap out some wxSize for VECTOR2I 2022-01-04 20:42:27 -05:00
Simon Richter d25fe17b28 Bump minimum required CMake version to 3.11
Signed-off-by: Marek Roszko <mark.roszko@gmail.com>
2022-01-01 21:35:08 -05:00
Marek Roszko c4c56de708 Neurotically update position wxPoint usages 2022-01-01 11:55:51 -05:00
Ian McInerney 9e6446a8dc Use enums for 3d Viewer settings instead of ints 2021-12-30 23:03:13 +00:00
Jon Evans 595caf30a2 3D viewer: Disable copper thickness in OpenGL mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10153

(cherry picked from commit 517e44e917)
2021-12-30 09:20:47 -05:00
Marek Roszko 2d1357dc54 Swap some of the 3d viewer to VECTOR2I 2021-12-29 14:20:40 -05:00
Jeff Young ccb94fd1a7 APIs for passing KIFONT::FONT pointers around.
Also some clean-up and bug fixes.
2021-12-29 17:32:19 +00:00
jean-pierre charras 49cb9586bd PANEL_PREVIEW_3D_MODEL: fix incorrect values of offset for unit inch and mil.
Fixes #10104
https://gitlab.com/kicad/code/kicad/issues/10104
2021-12-28 10:36:37 +01:00
Mikolaj Wielgus e9c29a4c1f 3D Viewer: Only highlight what is under the cursor
Fixes https://gitlab.com/kicad/code/kicad/issues/10136
2021-12-28 00:50:15 +01:00
Jeff Young fa908e1f98 Dimensions for footprints.
Fixes https://gitlab.com/kicad/code/kicad/issues/8441
2021-12-24 21:10:28 +00:00
Jeff Young b84a85f648 Cleanup dead code and stale TODOs. 2021-12-24 21:10:28 +00:00
Jeff Young dabc75bee8 Source 3D dimensions from board stackup.
Also includes a performance improvemnt by caching the 3D model matrices.
2021-12-24 21:10:28 +00:00
Jeff Young a6dd1bf09b Implement Reset to Defaults for all preferences panels. 2021-12-24 17:38:39 +00:00
Jeff Young 68d2630d08 Flatten a layer of indirection out of 3D config settings. 2021-12-24 13:08:54 +00:00
Jeff Young d28714167c All the preferences, all the time.
Fixes https://gitlab.com/kicad/code/kicad/issues/7877

Fixes https://gitlab.com/kicad/code/kicad/issues/5153
2021-12-24 13:08:44 +00:00
Jeff Young ef10b36948 Add mask-to-copper clearance parameter and rename mask margin. 2021-12-24 12:36:41 +00:00
Jeff Young 815c2c69e7 Support for dielectric colors in board stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/8491
2021-12-24 11:39:50 +00:00
Jeff Young 28b279cb2d Units cleanup.
It's 2021.  Time to move beyond ASCII.  This also makes spacing of
units consistent (space before abbreviated units, no space before
symbolic units).
2021-12-23 22:17:10 +00:00
Jeff Young 92e589b398 Use board maxError value, and return SH_ARC for unfilled circle. 2021-12-23 20:36:11 +00:00
Jeff Young 4b6bf3095a Radial dimensions.
ADDED radial type dimensions.

Fixes https://gitlab.com/kicad/code/kicad/issues/2056
2021-12-23 19:34:54 +00:00
jean-pierre charras 55777fca43 3D viewer: fix a minor cosmetic issue.
Fixes #10002
https://gitlab.com/kicad/code/kicad/issues/10002
2021-12-23 17:57:25 +01:00
Seth Hillbrand e5d6ec836f Remove incorrect leftover comment 2021-12-14 05:58:00 -08:00
Seth Hillbrand 78ff9a857a Jerry-rig HTML-format alpha parsing
On wx3.0, the HTML format #RRGGBBAA cannot handle the alpha channel.
Instead, we route this through a COLOR4D routine when we need to use
these colors

Fixes https://gitlab.com/kicad/code/kicad/issues/9963
2021-12-13 16:04:40 -08:00
Mario Luzeiro f81539cd41 3D-Viewer: do not change the z component of the normal on silkscreen material
Fixes https://gitlab.com/kicad/code/kicad/issues/9823
2021-12-13 12:49:18 +00:00
Seth Hillbrand 4814614d6d Prevent OpenGL from re-using buffer vals
Skip GAL buffer numbers (presumed) when allocating 3d viewer buffers

Fixes https://gitlab.com/kicad/code/kicad/issues/8915
2021-12-01 13:37:24 -08:00
Mikolaj Wielgus c3b792592b Remove uncommented dead code in 3D viewer 2021-11-20 02:45:57 +01:00
david-beinder fd6a75b779 Do not call TransformToPoly for negative sized PADs 2021-11-12 15:40:08 +00:00
Roberto Fernandez Bautista 7fd669b6a8 Use green soldermask and white silkcreen when unspecified
Also - unspecify colour of soldermask by default

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9538
2021-11-07 15:35:14 +00:00
Seth Hillbrand ccd3a1e6a9 3d-viewer: Don't special-case Paste
Paste layers should be clipped in Realistic mode.  Verifying that paste
doesn't extend beyond the board area should be left to DRC, or
non-realistic mode if you need a 3d view of it.

Fixes https://gitlab.com/kicad/code/kicad/issues/9460
2021-10-25 11:18:13 -07:00
Mikolaj Wielgus cf3a979711 3D Viewer: Fix zoom limit calculations
Fixes https://gitlab.com/kicad/code/kicad/issues/9407

Fixes https://gitlab.com/kicad/code/kicad/issues/8805
2021-10-24 18:14:49 +00:00
Mikolaj Wielgus 363214d252 Fix incorrect behavior of BBOX_3D::GetMaxDimension() 2021-10-24 18:14:49 +00:00
Mikolaj Wielgus afccea34a5 Remove default zoom level from camera constructor
Initial distance should be sufficient to determine default zoom.
2021-10-24 18:14:49 +00:00
Jeff Young 1860893d63 Use "Realtime" in the GUI for the non-raytracing renderer. 2021-10-21 17:56:25 +01:00
Jeff Young 6c0110ecd3 Naming conventions.
There's nothing "legacy" about the OpenGL 3D renderer.
2021-10-21 14:30:03 +01:00
Jeff Young 0fd762dc25 Make 3D dialogs easier to find. 2021-10-21 14:30:03 +01:00
Jeff Young 716d75ea0e Minor improvements to 3D preferences pages.
1) Move silkscreen options under the Board Layers section
2) Use more consistent terminology
3) Fix capitalization of controls
2021-10-21 14:30:03 +01:00
Jeff Young 9b9e379aa0 Overhaul arc internal model to not over-specify information. 2021-10-15 12:45:43 +01:00
Jeff Young a41944020d Push most of PCB_SHAPE impl down in to EDA_SHAPE. 2021-10-15 12:45:43 +01:00
Jeff Young 7e8f2cdb94 Simplify highlighting logic.
Fixes https://gitlab.com/kicad/code/kicad/issues/8410
2021-10-14 00:31:52 +01:00
Ian McInerney 961c127ebe Convert mouse coordinates to native pixesl in the 3D viewer
All operations in the camera are done using the native pixel sizes,
so we need to ensure the mouse coordinates are converted to native
pixels to make the mouse operations line up with the view.

Fixes https://gitlab.com/kicad/code/kicad/issues/2561
Fixes https://gitlab.com/kicad/code/kicad/issues/8410
2021-10-10 17:52:12 +01:00
Seth Hillbrand 548e5f49bd Clean up unused variable usage
Unused variables in function calls can be commented out.  Unused
return variables get a new routine `ignore_unused()` that silences the
warnings with zero overhead.
2021-10-05 10:00:30 -07:00
Mikolaj Wielgus 996835826e Do not change FOV when zooming in/out, only move the camera
It's odd to both move the camera and change FOV when one wishes to
enlarge or smallen the models. Let's only move the camera.
2021-09-15 17:58:47 +00:00
Mikolaj Wielgus e8a7e4cbed Change 3D model preview projection toggle tooltip
Isometric projection is a special case of orthographic projection, the
projection where all projection lines are orthogonal to the projection
plane.
2021-09-15 17:53:45 +00:00
Jeff Young b84d1456d5 KIFACE_I -> KIFACE_BASE. 2021-09-14 23:45:14 +01:00
Wayne Stambaugh 41c7089417 Minor dialog layout improvements. 2021-09-07 08:06:02 -04:00
jean-pierre charras 0eb0fa64bb 3D viewer: In menus show Zoom In/out instead of Zoom In/out at Cursor.
Zoom In/out at Cursor does not exist in 3D viewer, and is Zoom In/out when
using F1 or F2 keys.
Fixes #9107
https://gitlab.com/kicad/code/kicad/issues/9107
2021-09-07 10:54:51 +02:00
jean-pierre charras 5e8b23af64 3D viewer: add missing initialization of the line width of the grid.
Fixes #9082
https://gitlab.com/kicad/code/kicad/issues/9082
2021-09-02 18:33:59 +02:00
Seth Hillbrand f95732a4bb Generalize 4670309e
Allows loading of multiple types of .gz extensioned files by extracting
the second extension

Fixes https://gitlab.com/kicad/code/kicad/issues/9047
2021-08-30 14:43:11 -07:00
jean-pierre charras 4670309ec1 kicad2step: fix broken handing of UTF8 filenames.
the conversion between UTF8 std::strings and wxString were missing in some places.
3D model: fix management of file having double ext .stp.gz
Fixes #9038
https://gitlab.com/kicad/code/kicad/issues/9038
2021-08-27 16:58:23 +02:00
jean-pierre charras d98e93de7e 3D viewer: fix color issues when using the colors stackup:
- Add missing Yellow (.gbrjob predefined color) in list
- silkscreen colors: add .gbrjob predefined colors in list
- Use a default body color (FR4) for dielectric material not in known list
2021-08-25 18:33:49 +02:00
Jeff Young e6ca9837a2 Clear numbers from non-numberable pads and don't run DRC on them.
This was also the last straw on the misnamed PAD::GetName() and
PAD::SetName(), which are now PAD::GetNumber() and PAD::SetNumber().

Fixes https://gitlab.com/kicad/code/kicad/issues/9017
2021-08-24 01:03:06 +01:00
Johan Grip b984777b52 Add more items to 3D viewer toolbar 2021-08-21 17:06:42 +00:00
Seth Hillbrand 4cd9278041 Remove most wxFilepicker wildcards from translations
This prevents translation errors from preventing user actions such as
opening the correct file
2021-08-20 12:56:47 -07:00
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
Jeff Young 89d943a90c Transfer custom colours from board stackup to 3D viewer. 2021-08-16 20:05:35 +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 bff247b08a Hook up 3D viewer colors to board stackup.
Fixes https://gitlab.com/kicad/code/kicad/issues/5173
2021-08-14 14:00:17 +01:00
Jeff Young ef9f041279 Don't show 3D color opacities where they're not supported.
Fixes https://gitlab.com/kicad/code/kicad/issues/8938
2021-08-14 14:00:17 +01:00
Jeff Young 77680eba30 Naming conventions. 2021-08-05 14:31:36 +01:00
Jeff Young 78fd268b18 Retire PARAM_OBSOLETE in favour of a schema migration. 2021-08-02 17:38:15 +01:00
Jeff Young 7d501e8a43 Add PARAM_OBSOLETE to clean out old JSON structures.
While not technically necessary, the old structures can be confusing
to users looking at the files.

Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-08-02 12:53:57 +01:00
Jeff Young 4943d2f0a3 More consistent formatting. 2021-08-02 12:53:57 +01:00
Jeff Young 6aaf4413b3 Fix kicad_string.h / string.cpp mismatch.
They don't define a KiCad string class, so the header file name was
somewhat misleading. But the fact that they didn't match definitely
made coding more difficult.
2021-07-29 16:03:25 +01:00
Jeff Young f221220fe2 Rename layer ids file.
It hasn't had anything to do with colors or visibility for some time
now.
2021-07-29 16:03:25 +01:00
Jeff Young 46338403e7 Unwrap some std::library typedefs. 2021-07-28 22:16:38 +01:00
jean-pierre charras dda70622ba 3D viewer: fix missing refresh in raytracing mode when changing items visibility.
Fixes #8866
https://gitlab.com/kicad/code/kicad/issues/8866
2021-07-28 16:00:10 +02:00
Jeff Young 29b23df7a1 Save both front and back soldermask colour preferences.
Fixes https://gitlab.com/kicad/code/kicad/issues/8856
2021-07-27 22:26:13 +01:00
Wayne Stambaugh 37b200cb3e Pass wxString objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 78e5e98ea0 Pass VECTOR2I objects by reference instead of on the stack. 2021-07-27 08:41:27 -04:00
Wayne Stambaugh 89b1fdabe9 Pass COLOR4D object by reference instead of on the stack. 2021-07-26 13:28:56 -04:00
Seth Hillbrand 3e815882c1 Threading additional 3d transform
Transforming solid areas to polygons can be time-intensive for some
boards.  This threads the transformation to all simultaneous builds in
different layers
2021-07-22 12:12:27 -07: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
Jeff Young 0fb864d596 Pull some name changes back from 7.0 to ease merging. 2021-07-21 20:58:59 +01:00
jean-pierre charras 396213fa30 3D viewer: shows 3D shapes hide/show option in main menubar (Preferences)
Although these options are already in Preferences/Preferences/3D Viewer,
a direct access is useful because it avoid rebuilding the 3D scene, not needed
to hide/show 3D shapes.
2021-07-21 17:55:27 +02:00
jean-pierre charras 0525d50c58 3D viewer: avoid recreating the 3D scene when not needed. 2021-07-21 12:37:44 +02:00
jean-pierre charras 1c1f7ac07e 3D viewer: fix a Coverity warning and add more messages when loading a board. 2021-07-19 08:27:01 +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 c794a6ce7a Add pdb install option for msvc 2021-07-14 23:42:45 -04:00
Wayne Stambaugh 01515680b3 Code cleaning. 2021-07-14 15:47:32 -04:00
Marek Roszko 9162013132 Add advanced cfg to force reloading memory cached 3d models 2021-07-11 00:35:38 -04:00
Marek Roszko 7cb0f8f808 Add ADVANCED_CFG to always reload cached 3d models in memory 2021-07-11 00:31:06 -04:00
Marek Roszko 79b90813ec Add ADVANCED_CFG to skip caching 3d models to file 2021-07-11 00:00:06 -04:00
jean-pierre charras 289a35ad81 3D viewer, PANEL_3D_RAYTRACING_OPTIONS: use our DIALOG_COLOR_PICKER to select colors.
Fixes #8689
https://gitlab.com/kicad/code/kicad/issues/8689
2021-07-05 21:01:12 +02:00
Jeff Young ea6769b702 The REPORTER interface is inherently line-based.
Also fixes a bunch of error messages that were similar but not
identical (which just increases translation burden).

Fixes https://gitlab.com/kicad/code/kicad/issues/8723
2021-07-05 13:41:06 +01:00
Jeff Young c11ee69499 Save 3D prefs after editing, and load some of them into FP Props.
Fixes https://gitlab.com/kicad/code/kicad/issues/8712
2021-07-04 13:20:55 +01: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
Wayne Stambaugh b579d004ad 3D Viewer: minor display options panel layout improvements. 2021-06-29 15:49:00 -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 3347531f70 Better zoom defaults for 3D viewer.
Also includes a fix for 3D model viewer in the file dialog for Retina
(and possibly other HIDPI) displays.

Fixes https://gitlab.com/kicad/code/kicad/issues/6144
2021-06-28 19:08:23 +01: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 4aa8318dc2 More error message regularization. 2021-06-27 14:24:02 +01:00
Jeff Young 5c21f93803 Consistency in progress and error messages. 2021-06-26 13:23:43 +01:00
Jeff Young 89718dd3ba Naming conventions. 2021-06-19 19:36:53 +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