Commit Graph

1400 Commits

Author SHA1 Message Date
Seth Hillbrand 72ebe5a429 Avoid drawing null-arcs in 3d viewer
An arc with no radius or no angle is not visible and should be avoided

Fixes https://gitlab.com/kicad/code/kicad/issues/14271
2023-03-13 11:48:05 -07:00
Wayne Stambaugh 66f6168163 Fix mode-less dialog issues.
Don't assume the dialog is mode-less and call Destroy() from within a
dialog method.  This will most assuredly crash if the dialog is shown
modally or quasi-modally.

Don't leak memory for mode-less dialogs created on the stack.  Make sure
when the parent frame window is closed that all mode-less dialog memory
is cleaned up.  Dialogs are not child windows like controls and toolbars
so their memory does not automatically get cleaned up when the parent
window is destroyed.

Do not directly access frame parent window's pointer in dialog destructors.
Apparently the tear down order when destroying mode-less dialogs is not
guaranteed so the parent window may get deleted before the dialog causing
a crash when accessing the parent window pointer from the dialog dtor.

Do not close mode-less dialogs in the parent frame's destructor.  This
doesn't guarantee that the dialog(s) will be destroyed before the parent
but it may reduce some careless mode-less dialog event handling in the
future.
2023-03-13 12:04:01 -04:00
Seth Hillbrand d7a6875b0b 3dviewer: Show footprint board regardless of proj
The settings for the project in terms of visibility should not impact
our ability to preview the 3d model of a footprint

Fixes https://gitlab.com/kicad/code/kicad/issues/14246
2023-03-10 15:18:45 -08:00
Ian McInerney 56b7d570f9 Remove uses of climits header/defines
2 of the 3 includes never used it, and the other could be switched to
  the C++ numeric_limits class.
2023-03-10 17:08:56 +00:00
Ian McInerney a6ebd60c3b CMake: Modernize Boost import to use imported targets 2023-03-10 16:38:35 +00:00
Jeff Young 6a5f305684 Allow others to also process units changed event.
Fixes https://gitlab.com/kicad/code/kicad/issues/14156
2023-03-05 16:06:31 +00:00
Jeff Young 23accffc6d Add Property Inspector support for dimension objects.
Includes changing the class hierarchy so that dimension objects inherit
from PCB_TEXT rather than containing a PCB_TEXT member variable.
2023-03-04 23:16:46 +00:00
Jeff Young 915b352d9b Add UNITS_CHANGED handling to 3D preview controls.
Fixes https://gitlab.com/kicad/code/kicad/issues/14156
2023-03-04 12:11:57 +00:00
Mario Luzeiro 7bc976f3f4 3D-Viewer: sort models and material models when rendering in transparent
Also enables transparency on model preview and small optimizations fixes

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14005
2023-03-02 22:29:08 +00:00
jean-pierre charras 7256a51e8e Fixes in build board outlines as polygon and convert_shape_list_to_polygon:
- Ensure Bezier curves have their polygon build before use it.
- When building board outlines as polygon the same chaining epsilon value
for DRC, export step and 3D view (default 0.01mm).
Fixes #14115
https://gitlab.com/kicad/code/kicad/issues/14115
Fixes #14009
https://gitlab.com/kicad/code/kicad/issues/14009
2023-02-28 16:45:03 +01:00
Ian McInerney 912f1d5cec Modernize setting link map linker flags 2023-02-22 01:44:06 +00:00
Ian McInerney bcb93e9aa7 Modernize setting of compiler definitions in CMake
add_compile_definitions was added in 3.12, and our minimum is now
greater than that.
2023-02-22 01:44:06 +00:00
Jeff Young 7bb006c91d Spacing & font-size issues in 3D model preview dialog.
Fixes https://gitlab.com/kicad/code/kicad/issues/13880
2023-02-21 13:32:01 +00:00
Marek Roszko d55e2049e5 Silence some warnings with static_casts 2023-02-18 23:36:50 -05:00
Marek Roszko aacc9746e3 Yeet the last of wxSize/wxPoint to stop leaking gdicmn everywhere 2023-02-18 22:57:18 -05:00
Marek Roszko 5ccf205788 Try and avoid crashing on gl context creation failure in the 3d viewer
Sentry event id 0ad4afa6b86a4a03ad7f8fdbcdb72f86
2023-02-14 21:19:41 -05:00
aris-kimi dca1281263 Fix some typos 2023-02-14 23:47:05 +02:00
jean-pierre charras 90e759e738 Dialogs: minor cosmetic fixes (reduce a few spaces between widgets) 2023-02-03 16:58:30 +01:00
Jeff Young 203f0f66fb Guard 3D viewer against degenerate shapes.
Fixes https://gitlab.com/kicad/code/kicad/issues/13693
2023-01-29 22:40:12 +00:00
Wayne Stambaugh 68decdd4f2 Fix static event table derived object definitions. 2023-01-28 14:10:06 -05:00
Mike Williams fad589e151 Footprint preview: fix group assert 2023-01-25 12:34:18 -05:00
Marek Roszko b3f55e7f8b Ensure glew is initialized in the 3d model viewer
Fixes KICAD-7M
2023-01-23 22:52:18 -05:00
Seth Hillbrand a9ed47f06c Update KICAD6->KICAD7 2023-01-23 22:21:12 +00:00
Marek Roszko ac94995f70 Some more wxS 2023-01-16 19:07:50 -05:00
Jeff Young 30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00:00
Alex 1dd25dd196 3d-viewer: prevent max zoom+frustum from growing infinitely at reload.
Fixes https://gitlab.com/kicad/code/kicad/issues/13381
2023-01-11 03:30:48 +05:00
Wayne Stambaugh 4687cd1ddb 3D viewer properties dialog layout improvements. 2023-01-08 13:15:33 -05:00
Wayne Stambaugh eba231a8bb 3D model selection dialog layout improvements. 2023-01-08 11:27:01 -05:00
Jeff Young 4794956804 Minor dialog adjustments. 2023-01-07 22:26:43 +00:00
Gary Kim 8e8a3c7bdc
Do not translate name in version info
Leave the application name in version info untranslated when
viewed, copied, or used in a bug report.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/13298
2022-12-31 20:28:45 -05:00
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +00:00
Mario Luzeiro 089d8b9cc1 3D-Viewer: Bind to a texture so glTextEnv will work.
Fixes https://gitlab.com/kicad/code/kicad/issues/11641
2022-12-21 16:02:51 +00:00
Jeff Young 90e8790137 Re-add flush lost in last edit.
Fixes https://gitlab.com/kicad/code/kicad/issues/12731
2022-12-05 22:50:44 +00:00
Jeff Young c771d866f5 Cleanup 3D caches before d'tors run.
Fixes https://gitlab.com/kicad/code/kicad/issues/10973
2022-12-05 22:39:09 +00:00
Jeff Young f805fd267f Divorce UNIT_BINDER from wxFrame.
This allows us to supply Pcbnew or Eeschema as the unitsProvider when
called from the main frame.

Fixes https://gitlab.com/kicad/code/kicad/issues/13066
2022-12-04 11:51:44 +00:00
jean-pierre charras 9e0515a79a 3D viewer: ensure dielectric thickness of all dielectric sub-layers is used.
Previously, when a dielectric layer had sub-layers (i.e.when a dielectric
is made from more than one layer) only the first sub-layer thickness was used.
Fixes #13042
https://gitlab.com/kicad/code/kicad/issues/13042
2022-12-01 20:02:20 +01:00
Jeff Young 78db69bb48 Don't append '+' when modifier used on its own. 2022-10-27 18:03:07 +01:00
Jeff Young 757c33ea13 Fix MRU logic errors.
The most serious was that we were keeping a reference to a string
which changed out from under the reference when it was deleted from
the wxArrayString.

Fixes https://gitlab.com/kicad/code/kicad/issues/12770
2022-10-27 14:28:11 +01:00
Jeff Young f6c441c434 Viewport switcher keys are platform-specific.
Also fixes a regression where ctrl-tab doesn't get recognized.

Fixes https://gitlab.com/kicad/code/kicad/issues/11778

Fixes https://gitlab.com/kicad/code/kicad/issues/10127
2022-10-27 14:28:11 +01:00
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