Commit Graph

76 Commits

Author SHA1 Message Date
Marek Roszko f8e33be07f Break out the boundary violating parts of gal into common through subclassing 2023-09-23 09:37:47 -04:00
Jeff Young da1405ec6a Draw off-board pads when drawing off-board silk. 2023-09-22 20:57:31 +01:00
Jeff Young c1a988e3ff Handle plated vs non-plated copper for copper other than pads.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/5569
2023-09-22 18:48:29 +01:00
Jeff Young cce366bc1d Tidy up 3D renderer display options. 2023-09-22 18:48:29 +01:00
Jeff Young 78f70b45e6 Minor readability improvements. 2023-09-22 18:48:29 +01:00
jean-pierre charras 1f99a5caa6 3D viewer: do not rebuild the board 3D shape when footprint 3D models visibility
has changed: the 3D models visibility does not change the board shape.
2023-09-22 18:32:20 +02:00
Jeff Young 8d06a794f4 Simplify code.
DrawAllCameraCulled() can handle up to 4 knockout lists, and any
of them can be null, so don't dance around how we call it.
2023-09-21 14:02:23 +01:00
Jeff Young 0126841c44 ADDED: 3D appearance setting for off-board silk. 2023-09-20 23:28:50 +01: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
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
jean-pierre charras 53b2fda184 Fix some minor compil and Coverity warnings. 2023-08-17 10:06:17 +02: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
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 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 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 6a2dcd1936 Refactor 3D viewer view into enum class 2023-06-20 21:52:50 +01:00
Alex Shvartzkop d3be62f644 Adapt panels to PAGED_DIALOG sizing algorithm.
Also some cosmetic fixes (GTK).
2023-06-16 19:12:37 +03: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
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 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
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
jean-pierre charras 90e759e738 Dialogs: minor cosmetic fixes (reduce a few spaces between widgets) 2023-02-03 16:58:30 +01:00
Mike Williams fad589e151 Footprint preview: fix group assert 2023-01-25 12:34:18 -05:00
Jeff Young 30c9deb9d5 Flat(er) look for paged dialogs. 2023-01-11 01:11:25 +00: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
Jeff Young 4c63b4e061 Class name <-> file name sync. 2022-12-29 18:05:57 +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
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
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
Jeff Young 45d6b4a9fc Readability improvements. 2022-09-19 11:18:20 +01:00
Mark Roszko b00178adb3 Nuke base_units from orbit 2022-09-16 04:38:10 +00: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
Marek Roszko bf964d8678 Commonize page_info by simply making the Iu scale a parameter on call. 2022-08-27 13:36:00 -04: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
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