The 3D viewer does not show the issue on solder paste layer having
negative clearance.
However the bug was here and not seen just because some draw code was different:
The code tried to draw outlines with segments having a negative thickness.
It happens mainly on solder paste layers.
Rotating to 0 when above pi would result in the board spinning back
through pi to get there. This led to jarring motion.
Also fix an issue added in b6f64815 where the board would rotate
2pi when crossing over the 0-2pi boundary.
(Cherry-pick of 4fc9b4e5ab)
The floor render in raytracing creates interesting shadow effects but
significantly increasing the processing time for renders and has the
side effect of making the bottom of the board very dark if you simply
flip it over. Making this option off by default, we allow power users
to turn it on if needed for their renders while speeding up the default
raytrace and preventing new user confusion.
(cherry picked from commit 4fcfd266e0)
Given that we compare the dot product (square of length) to s_min_dot,
it means that s_min_dot also needs to be square, or we wind up
converting line segments into circles that are visually distinct from
circles, leading to gaps in polylines.
(cherry picked from commit 0823692dda)
This allows a setting where the path is not one of the options. This
permits the user to select once to go to any path option (rather than
off the current and then back to currect) when the filetree doesn't
match the dropdown. This also selects the drop down item if it matches
the tree.
so they will not be zero when viewing the board com the top/bot.
This was causing problems with BBox intersect function that was using
invDir values.
Fixes lp:1828747
https://bugs.launchpad.net/kicad/+bug/1828747
In some linux configurations, the canvas refresh must be posted before
being handled. Simply requesting the refresh can queue the event,
preventing an up to date GL canvas from being saved.
Fixes: lp:1819536
* https://bugs.launchpad.net/kicad/+bug/1819536
(cherry picked from commit 707e7b4b65)
Use the icon scaling logic and call a toolbar rebuild when the
common settings change (echos the handling in Pcbnew and friends).
Remove an unused function.
(cherry picked from commit 8548e69382)
The 3D viewer also uses OpenGL, so it also needs to
adjust based on DPI scale factors.
This patch moves the 3D viewer common config code solely
within the 3D viewer, and adds handling of the DPI scale. This
also avoids duplicated logic in PCB_BASE_FRAME::CommonSettingsChanged.
For now, as EDA_3D_VIEWER is not included in the Kiway settings
dispatch, still manually invoke the settings update from
PCB_BASE_FRAME.
The PANEL_3D_PREV gets a similar function to read the config, but
it doesn't have a listener for the update, so it's set just once
at dialog init, just like the existing pan settings.
Fixes: lp:1823681
* https://bugs.launchpad.net/kicad/+bug/1823681
(cherry picked from commit 124dd5e59a)
Libpolygon can provide its own includes via target_include_dirs PUBLIC.
This means any linking targets do not need to specifiy them manually.
As common requires polygon, the polygon dep is also now no longer
required downstream of libcommon, as it's transisitvely implied
by libcommon's target_link_libraries.
This resolves a circular dependency previously detected and also
simplifies CMakeLists.
Add code to parse OpenGL version string and determine if ray tracing is
supported.
Rationalize ray tracing menu and toolbar to have the same behavior so
a single command ID can be used for setting states.
Fixes lp:1797500
https://bugs.launchpad.net/kicad/+bug/1797500
The standard DIM() macro was not typesafe as it happily deferred errors
to runtime that can be caught at compile time. Replacing it with a
generic C++11 constexpr allows for typecasting, comparison and compile
time error checking.
Where we can get away with lower segment counts (localizing an anchor),
we keep the low-def 16 segment count. Intermediate values and values
that are visible to the user are set to high definition. Most are
simply hints to the inflation correction but where they show, the user
show see smooth lines.
The hotkey name "Help (this window)" does not describe what the hotkey
and associated action does. It displays the current hotkey list, so the
action name should reflect that behavior
Currently, the plugindir in the plugin manager is constructed as
{CMAKE_INSTALL_PREFIX}/bin/../{CMAKE_INSTALL_LIBDIR}/kicad/..., while
CMakes install uses {CMAKE_INSTALL_LIBDIR}/kicad/...
In case CMAKE_INSTALL_LIBDIR is a relative path "install" prefixes it
with CMAKE_INSTALL_PREFIX and both paths happen to match, otherwise
the constructed path ends up as e.g. "/usr/bin/../usr/lib/kicad/...".
For these cases where an absolute path is wanted CMake provides the
CMAKE_INSTALL_FULL_<dir> variants which works the same as
CMAKE_INSTALL_<dir> when used as DIRECTORY for install.
The middle layer of the 3d contours does not need threading as it does
not have substantial calculations. It also contains has a few
wx*Asserts that may not be called from other than the main thread.
Rather than remove useful error checking, we remove excess threading.
Fixes: lp:1802940
* https://bugs.launchpad.net/kicad/+bug/1802940
Append the appropriate file extension to the file name if the file name
does not have a file extension. This is a know issue with the GTK+ file
dialog.
Make the last 3D viewer screenshot last file used code more coherent.
Add the 3D viewer main frame trace string to the trace environment
variables doxygen group.
Doxygen comment and other minor code cleaning.
Fixes lp:1804980
https://bugs.launchpad.net/bugs/1804980