The currentVariant variable was only used for the DNP condition
that was removed in commit 40205eb181. Remove the now-unused
declarations to fix -Wunused-variable warnings.
There are some headers which don't need to include pad.h (which brings
padstack.h) - they just need forward defines.
While pad.h is not an especially heavy include on the scale of things,
footprint is quite heavy. And both reduce inclusion load and
reduce the number of files needlessly sensitive to changes in headers.
This lightens the load when including forwards for PCB_TRACK and
friends as we don't need all the transitive includes. Sometimes
you just need the enums - many users just wanted VIATYPE, or
just needed a forward.
And reduces transitive code churn when something is changed in the
header - this reduces the files affected by a change in
pcb_track.h from nearly 400 to under 200.
DNP footprints have a control layer for if they should be shown, which
is handled by the IsFootprintShown() method, so we shouldn't gate them
unconditionally just because of their DNP property.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23316
The knockout branch in addText() unconditionally cast aOwner to
PCB_TEXT*, but aOwner can be a PCB_TEXTBOX (or PCB_TABLECELL) which
does not inherit from PCB_TEXT. The invalid static_cast caused a crash
when opening the 3D viewer for boards with knockout textboxes.
Use dynamic_cast to dispatch to the correct TransformTextToPolySet
implementation for both PCB_TEXT and PCB_TEXTBOX hierarchies.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23230
This allows us to pick GLX on X11 and EGL on Wayland
at runtime when building with wxWidgets 3.3.2+
GLEW only allowed to choose between GLX/EGL at compile time.
This also removes KICAD_USE_EGL option, KiCad will use
whatever wxWidgets was built with.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/20647
The off-screen framebuffer used for image export (File > Export Image
and Edit > Copy 3D Image to Clipboard) was missing a stencil buffer
attachment. The OpenGL renderer's DrawCulled() uses stencil operations
to cut through-holes and vias out of copper layers and the board body.
Without a stencil buffer, these operations silently became no-ops,
leaving the exported image with no visible holes.
Change the depth-only renderbuffer (GL_DEPTH_COMPONENT24) to a combined
depth+stencil renderbuffer (GL_DEPTH24_STENCIL8) so that stencil-based
hole cutting works correctly in exported images.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23137
The TransparencyControl function was squaring the gray color value to
make dark solder masks more opaque, but this made the default green mask
(gray ~0.13) nearly completely opaque, hiding copper traces underneath.
The squaring was unnecessary since truly dark colors already produce
near-zero transparency from the existing cubic formula. The specular
floor, dynamic shininess, and reflection scaling from the same commit
already properly handle dark solder mask appearance.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/23103
FreeBSD uses libspnav, just like a Linux does, so all the
conditional code addressing the spnav APIs should be used
on FreeBSD, too.
Unfortunately, the logic was not consistent in all places:
sometimes we had "#ifdef", sometimes "#if defined" and
sometimes it was negated as "#ifndef". To make the intention
clearer across both Linux and FreeBSD, I unified all places
to a "#if defined(__linux__) || defined(__FreeBSD__)".
If we get another OS latching onto the same logic, we should
introduce a simple flag for this, but for only two OSes I
decided against adding central logic for this.
This breaks the view_item.h -> inspectable.h -> property.h chain that
pulled wx/propgrid/property.h into 150-200 TUs. The lean inspectable.h
now includes only wx/any.h, wx/string.h, wx/variant.h.
Headers using DECLARE_ENUM_TO_WXANY (board_item.h, sch_item.h) retain
their property.h include since the macro requires it.
Break the most expensive header include chains that contaminate the
largest number of translation units
New lightweight headers for extractdded types:
font_metrics.h, mouse_drag_action.h, board_project_settings_params.h,
common_settings_internals.h, wx_infobar_message_type.h,
zone_layer_properties_grid.h
Pan Y now correctly maps to Z, pan Z maps to Y. Removed
negation from rotation Y axis and reduced rotation speed
divisor from 5.0 to 20.0 for better control sensitivity.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22833
The rotation axes from libspnav were incorrectly swapped: rx was being
applied to camera Y rotation and ry to camera X rotation. This caused
SpaceMouse movements to produce unexpected rotations in the 3D Viewer.
The fix properly maps each libspnav rotation axis to its corresponding
camera rotation, with Y negated to account for the coordinate system
difference between libspnav (Y-away) and KiCad's 3D viewer (Y-towards).
Fixes https://gitlab.com/kicad/code/kicad/-/issues/22833
On GTK, wxFileDialog defaults to local_only mode which hides GVFS-mounted
filesystems like Google Drive, SMB shares, and external drives mounted
through GVFS. This adds a platform-specific function that disables
local_only mode to show these network/virtual filesystems.
Apply AllowNetworkFileSystems to all file dialogs across KiCad
to ensure directories on network filesystems are visible when
browsing for files.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/14372
NPTH holes were not showing barrel walls because their polygons were
stored in m_NPTH_ODPolys but the barrel wall generation in generateHoles()
only used m_TH_ODPolys. Add NPTH polygons to the outer polygon set before
generating through-hole geometry.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/21181
Dark solder mask colors like black were rendering poorly with excessive
copper show-through and washed-out appearance due to high reflectivity.
The material properties were originally tuned for green solder mask.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/11597
If a via has a backdrill option set, a start and/or end layer can be undefined
(i.e. < 0 ). It can happens with 2 layers boards.
In this case the 3d viewer crashed when calling LAYER_RANGE().
The backdrill code is now skipped if a undefined layer is found.
Recent issue conversations are suggesting that it's no possible for
footprints to contain null fields. Rather than blindly dereferencing
field pointers in loops, check to make sure the field pointer is not
null before dereferencing.
- Allow setting backdrill (from B.Cu up) and tertiary drill (from F.Cu
down) width and target layer (backdrill is inclusive)
- Allow setting post machining options (counterbore, countersink)
- Update properties for vias and THT pads
- Add output for Excellon and Gerber drill files as separated files for
different drill depths
- Add drill map output calling out post-machined holes
- Add STEP export support
- Add 3d-viewer support
- Add 2581 support using backdrill property. Post machining called out
in comments
- Add ODB++ support using separate drill file for each depth
- Add DRC check for tracks connected to pad layers that are backdrilled
or post-machined
Fixes https://gitlab.com/kicad/code/kicad/-/issues/18836