* Split up the thirdparty code into the thirdparty folder (#3637)
* Create a new kimath static library containing all the math functions
This is part of cleaning the build system for #1906.
The 3d viewer is the last component to not use the action framework, so
we descope the common defines to its canvas. Once the 3d viewer is
converted, we can remove these entirely.
This corrects an issue with fill segments-per-circle and moves the error
to segmetns calculation down in a number of functions to expose the
single value for approximation
This removes the remaining hard-coded segments counts and replaces them
with the relative error calculation where the segments per arc is
determined by the maximum error we allow (smaller arcs = fewer segments)
Provide a toolkit-agnostic interface for "busy indicators", which
allows the 3D viewer to show a busy cursor, without the canvases
having to to know how a wxCursore works.
The motivation here is to decouple the 3D renderers from the WX
GUI system, as they can then be used when when there is not an
active window (e.g. for offscreen rendering).
Otherwise, attempting to use a wxBusyCursor without a GUI
available is an instant segfault.
For legacy boards, the setting is picked up from the board outline
thickness. If the board outline has mixed thicknesses, then the
max is used and a warning is displayed.
Fixes: lp:1797787
* https://bugs.launchpad.net/kicad/+bug/1797787
Allows 0 to 4 chamfered corners, not only one.
A custom shape allow this kind of shape. However because it is a primitive,
it is easier to edit and it support thermal reliefs.
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.
Importing Eagle files allowed for invalid zone values for clearance and
minimum width that triggered asserts in the 3d-viewer.
Fixes: lp:1801188
* https://bugs.launchpad.net/kicad/+bug/1801188
This was due to clicking on the preview canvas does dot give the focus to the canvas on Windows.
Now the focus is set when clicking on this canvas.
Fixes: lp:1794090
https://bugs.launchpad.net/kicad/+bug/1794090
This commit finishes the removal of OpenMP from the KiCad codebase.
Removed in this commit are the OpenMP calls in 3d-viewer and
qa/polygon_triangulation as well as all references in CMakeLists.txt
std::thread is used instead for multithreaded computation
Previous commit mistakenly included the full clearance for the rounded
rectangle circle. The CFILLEDCIRCLE2d takes the radius rather than the
diameter.
Apply same logic of using a filled circle to represent a zero-length
element as a filled circle with radius of the line.
Fixes: lp:1785823
* https://bugs.launchpad.net/kicad/+bug/1785823
Replaces Poly2Tri with updated code to process polygons faster and more
robustly. Notably, we can now handle overlapping holes in the polygons,
allowing us to cache the triangulation of complex boards
Also fixes:
- forcing the annotation scope to "full schematic" when run
as a prerequisite to Generate Netlist.
- a long-standing bug where displaying extra items in a dialog
would mess up the height of the HTML_REPORT_PANEL (becasue
we were setting the html window's height rather than its
parent flexgrid.
- initializing the annotation radio buttons to safe values
(full schematic and keep existing)
Fixes: lp:1750062
* https://bugs.launchpad.net/kicad/+bug/1750062
- support for background color setting
- removed several global config settings (such as g_Drc_On)
- wrapped most of global config settings in PCB_GENERAL_SETTINGS class
- reorganized PCB general options dialog to clearly mark which options concern only the legacy canvas
- new GAL feature for legacy users: double-click (or E) to change track width available as an option.
Fixes: lp:1530543
* https://bugs.launchpad.net/kicad/+bug/1530543
Fixes: lp:1707145
* https://bugs.launchpad.net/kicad/+bug/1707145
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas. When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h
Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.
This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.
The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.
Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
Make all EDA_TEXT data private and rename accessors to avoid function
name collisions in derived classes.
Overload EDA_TEXT's SetTextAngle() and SetEffects() in TEXTE_PCB.
Add support for preserving Reference text position, size, orientation
during a netlist import into a BOARD, as well as the one off footprint
update dialog.
Additionally, fix an unreported bug allowing zoom level to get stuck at
MAX_ZOOM.
Fixes: lp:1625754 (3dviewer zoom not limited with Use touchpad to pan)
https://bugs.launchpad.net/kicad/+bug/1625754
* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.