Commit Graph

1465 Commits

Author SHA1 Message Date
jean-pierre charras a7b1448ccd Fix a compil warning.
Fix also an incorrect comment.
2023-09-14 15:19:46 +02:00
Jeff Young 8cf291e423 Overhaul 3D degenerate shape protection. 2023-09-14 12:33:54 +01:00
Jeff Young 47dc86c1e2 Run filled-test before degenerate-ring-test.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15642
2023-09-13 23:34:25 +01:00
jean-pierre charras 2c10d5e3a0 Pcbnew: fix some issues with very small arcs (size a few internal units)
these very small arcs do not allow to calculate a reliable center position,
and therefore a reliable radius.
So seeing them as a very small segment fix plotting/drawing issues.
Fixes #15639
https://gitlab.com/kicad/code/kicad/-/issues/15639
2023-09-13 17:54:57 +02:00
Marek Roszko 11de95778b Unwrap the FROM_UTF8 macro in favor of direct function
The extern just gets annoying to try to export the func later. We also yeet TO_UTF8 to string_utils.h for parity.
2023-09-09 00:10:57 -04:00
Marek Roszko 7505fd0f37 Profile can live in core 2023-09-07 07:47:01 -04:00
Marek Roszko 454c5e8eca 3d-viewer should depend on common directly 2023-09-06 20:33:28 -04:00
Marek Roszko a6a20bf8dc Evict the Pgm() dependency in GAL 2023-09-06 20:13:46 -04:00
Jeff Young 70bbaae670 Don't attempt to render degenerate 3D shapes.
Sentry KICAD-382
2023-09-04 22:10:47 +01:00
Jeff Young 4eb51be0a2 Streamline fetching topLevelParent. 2023-09-04 11:12:34 +01:00
Josue Huaroto 4d84bee6f6
Add Zoom level to the 3D viewer in PCB 2023-09-01 17:51:50 +00:00
jean-pierre charras fe18a9bf97 3d_rendering/raytracing/create_scene.cpp: add test missing in commit 22256c97
Fixes #15560
https://gitlab.com/kicad/code/kicad/-/issues/15560
2023-09-01 15:47:02 +02:00
Marek Roszko 60af0448c5 Add missing if intending to border check 2023-08-30 22:51:08 -04:00
Marek Roszko 2e58f4ea60 Fix three spots it always failed to check if the border was enabled 2023-08-30 22:39:07 -04:00
Jeff Young 22256c97f3 Fix logic errors in handling board body visibility.
Also fixes a bug where models were placed above the silk when the
solder paste layer was shown, but on the solder paste layer when
it wasn't shown.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15510

Fixes https://gitlab.com/kicad/code/kicad/-/issues/6770
2023-08-26 17:33:57 +01:00
Jeff Young 725840654f Fix copy/pasta.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15509
2023-08-26 16:35:28 +01:00
Ian McInerney 72daeddca3 Get translation for 3d viewer appearance manager tooltips later
The translation database isn't setup during static variable
initialization, so we can't do translations until just before the
strings are used.
2023-08-23 23:49:44 +01:00
Seth Hillbrand db8e15ce88 Require wxWidgets 3.2
Removes old defines and work arounds for earlier wx versions and adds a
CMake requirement to use at least 3.2 (or the minimum matching wxPython
version)
2023-08-23 22:02:56 +00:00
Jeff Young 0c37e3c443 Remove realistic-mode (and duplicated settings from preferences).
Most of these settings are now available in the appearances panel.
It was concluded in a Zulip discussion that any missing items can
be added back in time if people find they need them (ie: complain).

Also hooks up 3DViewer to the common language framework.
2023-08-23 14:07:58 +01:00
Ian McInerney 2d8b707a3a Remove dummy pad from group before deleting
The dummy pad doesn't need group information, and it asserts when it has
it and is deleted.

Fixes KICAD-3B9
2023-08-21 10:32:50 +01:00
Jeff Young ab06f277c5 Hook up 3D Viewer preferences menu to commands.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15445
2023-08-20 18:10:28 +01:00
Rastersoft 43fe1eec84 Unify mouse movements 2023-08-17 18:20:22 +00:00
jean-pierre charras 53b2fda184 Fix some minor compil and Coverity warnings. 2023-08-17 10:06:17 +02:00
Jeff Young 686704bb31 ADDED: plot control over FP text.
(Also adds said control to "Follow Plot Settings" in 3D viewer.)
2023-08-15 16:56:46 +01:00
Marek Roszko 2e5430a874 Fix MSVC build 2023-08-14 18:33:57 -04:00
Jeff Young f45760062b ADDED: appearances manager for 3D viewer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12413
2023-08-14 18:08:36 +01:00
Ian McInerney a3a701a95e Move preferences to an action instead of a wx event 2023-08-08 00:51:22 +01:00
Jeff Young 5e112ca78e ADDED: parameterize font metrics and allow customization of overbar height. 2023-08-06 20:57:41 +01:00
Jeff Young 0413270012 ADDED: Move Corner To... and Move Midpoint To...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5012
2023-08-05 16:43:55 +01:00
jean-pierre charras a16ab0aae1 Replace SHAPE_T::RECT by SHAPE_T::RECTANGLE: RECT creates a collision name
issue with a Windows header on msys2.
Change very similar to the commit 9a47b344 about class PAD_SHAPE.
No actual code change
2023-07-25 09:11:55 +02:00
Seth Hillbrand 32ad42a435 Add 3dconnexion driver version check
Re-enable 3dconnexion driver by default as we are able to gate the
driver versions

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13362
2023-07-24 18:09:52 +00:00
Josue Huaroto 8a407756c1 Change min and max zoom values 2023-07-22 14:52:54 +00:00
jean-pierre charras 619ec2a559 PANEL_PREVIEW_3D_MODEL: Always shows the footprint not flipped, and rot 0.
Otherwise, setting the 3D shapes rotation/position is not so easy.
2023-07-20 17:33:03 +02:00
jean-pierre charras d7e470dbcc PANEL_PREVIEW_3D_MODEL: add an option and fix an issue:
- added option: display board body or just copper layers
(useful to set the 3D model position)
- fix a bug: do not use 3D viewer settings, and do not modify 3D viewer settings
2023-07-19 12:30:42 +02:00
Jeff Young a85a2b9cbc Add via solder mask to 3D viewer rendering.
(Of course, only when vias are not tented.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15164
2023-07-12 18:28:02 +01:00
Alex Shvartzkop e43c8fcf6b Non-Windows uses libs3d_plugin prefix for S3D plugins.
https://gitlab.com/kicad/code/kicad/-/issues/12871
2023-07-10 20:16:38 +05:00
Alex Shvartzkop 0781d8c175 Filter S3D plugins by name when running from build dir.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12871
2023-07-10 09:32:22 +05:00
Jeff Young df63ca0189 Save a bit of space in FP 3D preview by moving board thickness to dlg.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/13896
2023-07-09 20:36:55 +01:00
Ian McInerney 2fb6f19a84 Separate immediate and delayed action dispatch
Using a boolean argument just leads to a lot of trailing booleans in the
function calls and is not user friendly. Instead, introduce PostAction()
to send an action that runs after the coroutine (equivalent to passing
false or the default argument), and leave RunAction as the immediate
execution function.
2023-06-27 00:57:59 +01:00
Jeff Young 300a60e88e Eradicate a bunch of calls to dyn_cast. 2023-06-25 11:10:05 +01:00
Ian McInerney 6a2dcd1936 Refactor 3D viewer view into enum class 2023-06-20 21:52:50 +01:00
Ian McInerney b04e54dbea Switch TOOL_EVENT and TOOL_ACTION to have a std::any parameter
Using std::any from C++17 allows for proper type handling in the
parameter field, removing the need for casting to void* and then casting
the void* to the desired type.
2023-06-20 21:52:50 +01:00
Mike Williams 993bb84240 PCB_FIELD: bug fixes 2023-06-20 18:34:52 +00:00
Mike Williams 37837dc392 PCB: introduce PCB_FIELD_T 2023-06-20 18:34:52 +00:00
Jon Evans 55c00f1845 ADDED: Initial support for importing Solidworks PCB files 2023-06-19 11:57:33 -04:00
Alex Shvartzkop d3be62f644 Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03:00
Jeff Young 5875f89531 Centralize text size clamping.
Also introduces alg::clamp to improve readability of
std::max( min, std::max( value, max ) )

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14876
2023-06-03 20:29:51 +01:00
Jeff Young b53bc1ae38 Trim solder paste (and other layers) to holes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8484
2023-05-30 00:02:27 +01:00
Jeff Young cb7f314f4b Handle through-hole via walls along with pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14757
2023-05-29 21:59:20 +01:00
Jeff Young 65e53b8ecd Move SHAPE_POLY_SET::Inflate's error spec from a seg-count to a max-deviation.
1) Also reorders parameters to make sure the compiler helps out.

2) This also makes it harder to mess up the discrepency between
   BOX2I/wxRECT/etc::Inflate() and SHAPE_POLY_SET::Inflate.

3) Also fixes a couple of bugs where the corner strategy was passed
   in as a segCount.

4) Also fixes a couple of bugs where the error wasn't forced to the
   outside to match the ERROR_LOCATION.

5) Also fixes a couple of bugs where the seg count was specified
   without regard to an already passed-in max deviation
2023-05-29 15:29:03 +01:00