Commit Graph

407 Commits

Author SHA1 Message Date
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
Alex Shvartzkop 5e14ae9698 Add OpenGL info to About. 2024-05-05 21:30:25 +03:00
Alex Shvartzkop 16e3692e71 Build time optimizations. 2024-04-27 23:49:13 +03: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 f6f0b9a661 ADDED: PCB 3D image raytracing rendering from CLI.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/3691
2024-03-08 14:38:18 +00:00
Alex Shvartzkop f9ad0a434d Fix assert in BOARD_ADAPTER::createLayers. 2024-03-04 15:09:31 +03: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
Alex Shvartzkop 80457d5871 Support transparent background in 3D viewer PNG/clipboard export.
Only really works with realtime renderer currently.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/12060
2024-02-29 17:11:53 +03:00
Jeff Young e445249720 ADDED: PCB tables. 2024-02-24 20:05:51 +00:00
jean-pierre charras 0afac71b27 3D viewer: fix the case of circles having a thickness > radius/2
Fixes #17035
https://gitlab.com/kicad/code/kicad/-/issues/17035
2024-02-20 09:20:33 +01:00
jean-pierre charras 9622918c31 3D view export to PNG/JPEG: ensure highlighted item under cursor is exoperted
not highlighted.
Fixes #14289
https://gitlab.com/kicad/code/kicad/-/issues/14289
2024-02-19 16:28:38 +01:00
jean-pierre charras 4c61a79e47 3D viewer: show "not covered by solder mask" graphic items with the right color.
Previously, only pads and tracks were using the gold color when not covered by
the solder mask layer.
Fixes #16892
https://gitlab.com/kicad/code/kicad/-/issues/16892
2024-02-09 11:35:38 +01:00
Alex Shvartzkop 9b11dfd4d4 Fix 3D viewer getting stuck or rendering twice when dragging, at least on GTK. 2024-02-08 15:19:54 +03:00
Jeff Young fef404352d Remove stale TODOs. 2024-02-05 15:49:57 +00:00
Jeff Young fceace93da Remove dead code. (Coverity) 2024-01-04 16:00:43 +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 df83e24eb7 Cleanup.
It's been a long time since line style was specific to plotting.
2023-11-25 13:12:45 +00: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
Jeff Young f9530d0b3f Remove "Reset View", which does the same as "Home View".
Fixes https://gitlab.com/kicad/code/kicad/-/issues/16115
2023-11-19 14:07:50 +00:00
jean-pierre charras abcbba5635 PCB_TEXTBOX, create 3D shape: fix incorrect transform of the box, round 2:
when the box is a polygon (rotated rect by a non cardinal angle) the polygon
is not filled, so the shape is just a set of thick segments.
So we cannot use PCB_TEXTBOX::TransformShapeToPolygon to create the 3D view
Fixes #16072
https://gitlab.com/kicad/code/kicad/-/issues/16072
2023-11-11 18:11:50 +01:00
jean-pierre charras d8498b62e0 PCB_TEXTBOX::TransformShapeToPolygon(): fix incorrect transform: when it
is a polygon (rotated rect by a non cardinal angle) the polygon is not
filled, so the shape is just a set of thick segments.
Fixes #16072
https://gitlab.com/kicad/code/kicad/-/issues/16072
2023-11-11 16:44:04 +01:00
Alex Shvartzkop 5cd1a4674f Fix a crash in 3D viewer when changing preferences.
It was possible for OnMouseMove to come after ReloadRequest
but before DoRePaint.

Which meant m_3d_render_raytracing->Reload() has't been called yet,
thus the BVH contained invalid data.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16059
2023-11-09 20:52:39 +03:00
Marek Roszko bee6e6be01 AddMenuLanguageList should live in EDA_BASE_FRAME, its only user 2023-10-16 19:49:52 -04:00
Wayne Stambaugh b5eee9dd7e Coverity warning fixes. 2023-10-16 17:04:14 -04:00
Jeff Young d5d07e64c9 Use IsShownOnScreen(), not IsShown(), if you really want to know if its visible. 2023-10-14 23:51:37 +01:00
Jeff Young 62d959ed0e Don't assume an error location for PAD::GetEffectivePolygon().
While ERROR_INSIDE was good for plotting, 3D generation, etc., it's
not good for generating router hulls.

Also reverts part of the change to always use polygons for PNS::SOLIDs.  A single shape in a SHAPE_COMPOUND will be faster (and
more accurate).

Fixes https://gitlab.com/kicad/code/kicad/-/issues/14898
2023-10-13 13:59:26 +01:00
Alex Shvartzkop d7863b09c5 Move CORNER_STRATEGY out of SHAPE_POLY_SET. 2023-10-06 15:42:50 +03: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 a954c1d93c Conversion safety. 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
jean-pierre charras b1ed0529d7 3D viewer: Simplify polygons before triangulation.
It reduce the risk to create bad triangulation.
Fixes #15706
https://gitlab.com/kicad/code/kicad/-/issues/15706
2023-09-21 11:32:32 +02:00
Jeff Young f97af9f254 Experimental feature to render off-board-footprint's pads to silk. 2023-09-20 23:28:50 +01:00
Jeff Young 0126841c44 ADDED: 3D appearance setting for off-board silk. 2023-09-20 23:28:50 +01:00
Jeff Young c0ce543464 Use standard KiCad abbreviations for TH and NPTH. 2023-09-20 14:27:57 +01:00
Marek Roszko ee91b550d8 gl_context_mgr and gl_util belong in the gal folder 2023-09-19 23:06:44 -04:00
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 a6a20bf8dc Evict the Pgm() dependency in GAL 2023-09-06 20:13:46 -04:00