Commit Graph

1256 Commits

Author SHA1 Message Date
Wayne Stambaugh 0593663462 Fix 3D viewer canvas timer event clash.
Manual cherry-pick of commit f6297d328c.
2022-10-23 07:53:51 -04:00
jean-pierre charras 578c0ef0f0 3D viewer: add missing initialization of FL_SOLDERPASTE in BOARD_ADAPTER.
Fixes #12631
https://gitlab.com/kicad/code/kicad/issues/12631
2022-10-13 10:08:24 +02:00
Mark Roszko 437cd8b1e5 Trim down 3d viewer search paths
(cherry picked from commit 17bec365db)
2022-09-09 17:05:47 +00:00
Roberto Fernandez Bautista 7640246097 Assign default hotkey to Flip Board in 3D viewer
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12337


(cherry picked from commit ad45b81dee)
2022-09-02 09:30:43 +00:00
Wayne Stambaugh cfde5300d7 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.

(cherry picked from commit 898ec0d094)
2022-08-17 14:07:06 -04:00
Alex bb8719b9d5 3D viewer: Fix GL_INVALID_ENUM error.
(cherry picked from commit 58f9b82c1e)
2022-06-09 11:36:11 -07:00
Seth Hillbrand 37c5885946 Fix missing assignment
(cherry picked from commit 77cd56fbd3)
2022-05-26 08:20:42 -07:00
Seth Hillbrand 592c2c6872 Handle settings sequencing
Avoids crash when window close ordering places 3d viewer after the
common settings are closed

(cherry picked from commit c0a9a02591)
2022-05-25 16:58:10 -07:00
Jeff Young 0fc4ccf8d9 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

(cherry picked from commit 0dc857b5ab)
2022-04-03 15:51:33 +01:00
Mario Luzeiro 2567f45c1d 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

(cherry picked from commit 7659f3c81b)
2022-03-25 16:22:57 -07:00
Jeff Young 3720a52ecb Bubble ESC up from the 3D preview.
Fixes https://gitlab.com/kicad/code/kicad/issues/9984

(cherry picked from commit 32fdab8902)
2022-03-16 16:21:24 +00:00
Seth Hillbrand 861589d837 Use wxEmptyString instead of wxT( "" )
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Mark Roszko f5a56c1ebc Use unique_ptr to avoid memory leak in 3d model cache loading
PVS V773
2022-02-05 20:20:45 +00:00
Jeff Young 4657614e4f More wxString wide literals. 2022-02-04 23:12:09 +00:00
Jeff Young d295025964 Be explicit about literal wide-strings. 2022-02-04 20:21:07 +00:00
Seth Hillbrand ad726dc6e4 Rework cd8d6ba0 for 6.0.1
Addresses https://gitlab.com/kicad/code/kicad/-/issues/10357 as well as
a few additional rounding points in 3d viewer based on master commit
2022-01-11 13:49:57 -08:00
jean-pierre charras 3c2bb97eae PANEL_PREVIEW_3D_MODEL: fix incorrect values of offset for unit inch and mil.
From master commit 49cb9586
2021-12-31 10:05:56 +01:00
Jon Evans 517e44e917 3D viewer: Disable copper thickness in OpenGL mode
Fixes https://gitlab.com/kicad/code/kicad/-/issues/10153
2021-12-30 09:20:09 -05:00
jean-pierre charras ee1b327162 3D viewer: fix a minor cosmetic issue. Fixes #10002 https://gitlab.com/kicad/code/kicad/issues/10002 2021-12-23 18:36:24 +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