131 Commits

Author SHA1 Message Date
Jeff Young
0495828a55 Honour front/back layer types for user layer.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21284
2025-07-17 09:35:21 +01:00
Jeff Young
044ac6e8e5 Prefer board's errorMax to a constant. 2025-06-27 22:59:12 -06:00
Jeff Young
18e107529a Don't force callers of GetAppSettings to implement exception processing. 2025-06-14 20:25:59 +01:00
Damjan
2c92f95a1c 3d-viewer: Navigation gizmo for 3D viewer
ADDED: Blender-like navigational gizmo - new feature

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16956
2025-06-09 10:29:34 -07:00
Jeff Young
2e87a04358 Differentiate between FP previews and FP editor for 3D viewer settings.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21053
2025-06-03 16:11:28 +01:00
Jeff Young
824c7ecfa7 Improve readability.
Also drops a parameter that hasn't been implemented
since early 2022.
2025-03-19 08:55:32 +00:00
Jeff Young
6307f0aee8 Use board layer names when available.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20360
2025-03-17 21:23:56 +00:00
Jeff Young
142f8265c5 Simplify (and fix) plated copper differentiation.
Also a few fixes for 3D rendering textboxes and
tables.
2025-03-17 20:11:20 +00:00
Wayne Stambaugh
cf4369a2ef Fix Coverity issue #545180.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545180
2025-03-17 15:16:49 -04:00
Wayne Stambaugh
19b0ac6ec4 Revert "Fix Coverity issue #545181."
This reverts commit 31d3c17d996de75f9755115a7b8d3db21b0a48dc.
2025-03-17 15:12:48 -04:00
Wayne Stambaugh
31d3c17d99 Fix Coverity issue #545181.
https://scan8.scan.coverity.com/#/project-view/22886/10844?selectedIssue=545181
2025-03-17 15:09:30 -04:00
Jeff Young
533551f014 Don't bleed settings between 3D viewer and 3D footprint preview.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17353
2025-03-16 11:52:56 +00:00
Jeff Young
f33f10bb38 User-defined layers for 3D viewer. 2025-03-15 16:14:33 +00:00
Jeff Young
241962a84d When following board or plot settings, write results to current config.
Also adds migration from older layer numbers to strings.
This may require users to dump their 9.0 settings files
(which will have the wrong layer numbers in them), but
those files are often useless anyway as they'll already
have messed up colours if they were migrated from 8.0.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/18709
2025-03-08 19:11:23 +00:00
Jeff Young
9be7464681 Keep user-defined common layers order.
(And use it when plotting.)

(And don't shadow it with a second variable.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20214
2025-03-04 23:39:19 +00:00
Jeff Young
7cfa826c9a Put non-sided layers on front, not back of board.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20201
2025-03-03 21:38:14 +00:00
Jeff Young
9d901188cb Use specific thickness for mask layers.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19024
2025-02-24 11:08:29 +00:00
Jeff Young
3a4aec7267 Account for solder mask thickness from board stackup.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/19024
2025-02-24 11:08:29 +00:00
Wayne Stambaugh
42a1d1cf0b Include folder and 3D viewer code housekeeping. 2025-01-11 07:25:14 -05:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Ian McInerney
c0622eaa45 Avoid copies when using auto 2024-12-31 00:18:10 +00:00
Seth Hillbrand
e9bc8cfe9d Give Clipper1 a Viking funeral
Clears out the last spot where we were only using Clipper1 (how'd I
miss that?) and remove all calls to the Clipper1 structures
2024-12-23 17:12:09 -08:00
Jeff Young
753d385473 Reduce dependency on dynamic_cast.
Also switches to checking __clang__ instead of __WXMAC__.
2024-12-08 21:46:54 +00:00
jean-pierre charras
56b50e1600 Fix compil warnings and minor Coverity warnings (uninitialized variables). 2024-10-02 09:33:54 +02:00
Mike Williams
867cb58175 feature removal: remove Show Hidden Text
Does not work properly since 8.0 introduction of footprint fields.

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/18656
2024-09-19 15:41:44 -04:00
Jon Evans
1895ec58a0 Fix various compile warnings 2024-09-18 18:51:02 -04:00
jean-pierre charras
4c33d39c3a 3D viewer: fix incorrect Z position of some back layers. 2024-09-16 13:02:37 +02:00
jean-pierre charras
02ec8acdb3 3D viewer: fix some issues after layer numbering changes (round 2). 2024-09-13 10:09:18 +02:00
jean-pierre charras
36b6720feb 3D viewer: fix some issues after layer numbering changes.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18684
2024-09-12 09:50:00 +02:00
Seth Hillbrand
5e0abadb23 Reorganize layer numbering
F_Cu = 0
B_Cu = 2
Remaining internal copper layers are even and incrementing

Non-copper layers are odd and incrementing.

This means that we can no longer do things like:
for( PCB_LAYER_ID layer = F_Cu; layer <= B_Cu; ++layer)
Instead, we have the class LAYER_RANGE:
for( PCB_LAYER_ID layer : LAYER_RANGE( F_Cu, B_Cu) )

Similarly, gt/lt tests should not refer to the integer value of the
layer.  We have functions such as IsCopperLayer to test whether a layer
is copper or not.

When using the connectivity RTree, the third dimension is layer, so we
provide B_Cu with the special INT_MAX value, ensuring that elements
between F_Cu and B_Cu will be identified.  There is a new, special
function GetBoardLayer() for interfacing with CN_ITEMS

Similarly, PNS layers remain unchanged and sequential.  A set of
interface functions is provided to map PNS layers to Board layers and
back.  This allows the PNS_LAYER_RANGE to function as expected
2024-09-06 23:07:58 +00:00
Jeff Young
94f995c49e Reduce dependency on dynamic_cast.
(Especially where it is no-worky on MacOS.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17245
2024-09-04 17:24:49 +01:00
jean-pierre charras
1f608ec2b0 3D viewer: add option to use board editor copper colors for copper layers.
This is useful to analyze multilayers boards
2024-08-24 10:16:18 +02:00
Seth Hillbrand
cc850d0da0 Split out LSEQ/LSET from LAYER_ID
Separate the layer grouping classes for easier modification
2024-07-08 20:59:46 -07:00
Alex Shvartzkop
18fde2b9cb Fix background transparency option in kicad-cli pcb render.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17865
2024-05-15 14:46:53 +03:00
Jeff Young
8184ed64e7 Explicit control over hidden text in bounding boxes.
In particular, don't consider hidden text when plotting,
and only when AsItemCheckboxes is checked for printing.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/17958
2024-05-06 21:36:19 +01:00
Jeff Young
3b3de58e5e Make sure color settings are saved when modified.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17864
2024-04-27 13:30:45 +01:00
jean-pierre charras
8754f6867f 3D viewer: fix some graphic issues:
Avoid issue when a copper layers thickness is 0 (min value is now 1 micrometer)
Fix incorrect rendering of plated graphic items and vias (vertical walls not drawn)
2024-03-28 14:52:31 +01:00
Jeff Young
c8d897ed0f Fix copy/pasta in GetLayerColors().
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17374
2024-03-10 21:10:18 +00:00
Alex Shvartzkop
85b1978408 Use 64-bit type to represent microseconds.
int and long are 32-bit on Windows, causing overflows.
2024-03-03 21:40:26 +03:00
Jeff Young
8dddd9cc2c Separate "use board stackup colors" into separate checkbox.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17085
2024-03-01 23:45:06 +00:00
Jeff Young
fef404352d Remove stale TODOs. 2024-02-05 15:49:57 +00:00
jean-pierre charras
427de4cda6 BOARD::GetBoardPolygonOutlines(): add option to add NPTH as board holes.
Used in 3D viewer to truncate plated holes intersecting NPTH.
Fixes #16325
https://gitlab.com/kicad/code/kicad/-/issues/16325
2023-12-13 08:31:29 +01:00
Jeff Young
2ec3cd91fa Nullptr safety. 2023-11-20 13:47:24 +00:00
Jeff Young
af9fc5be2f Hack to keep 3D Viewer's "home" zoom from being too small. 2023-11-19 14:07:50 +00:00
Wayne Stambaugh
b5eee9dd7e Coverity warning fixes. 2023-10-16 17:04:14 -04:00
Marek Roszko
37479c4154 HIDPI_GL_3D_CANVAS needs CAMERA so move it over 2023-09-23 20:06:57 -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
78f70b45e6 Minor readability improvements. 2023-09-22 18:48:29 +01: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