The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.
There is still some debugging output in test code that really needs to
be moved into a unit test.
Add debugging output section to the coding policy regarding debugging
output.
It's currently only supported in the Footprint Editor. It could be
easily added to the board editor (all the code is there), but the board
editor is a little short on room in the drawing tools toolbar.
- Better code and messages.
- Speedup calculations when removing cutouts and holes from main board.
- Do not stop step generation when trying to load a 3D modele having issues.
* 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 Boost::boost style library dependencies don't work
on some CMake versions (couldn't find library -lBoost::boost)
Use ${Boost_INCLUDE_DIRS} in the target_include_dirs() instead.
This adds a test to the recent GetLayerName function, and moves
it to the base.h file for re-use for any code that needs a
layer name.
This test covers the case that caused lp:1824750 [1].
[1]: https://bugs.launchpad.net/kicad/+bug/1824750
The SEXPR class is a useful general-purpose S-Expression library
class and can (maybe) be used else where. It also should get
test coverage, as even if noone else uses it, it's critical for the
kicad2step exporter.
Also add some test coverage for some kicad2step routines. For now,
they're not useful outside kicad2step, but they are at least a useful
reference for S-Expression parsing.
This is not technically correct (the Boost dependency is introduced through
libcommon), but less invasive as it doesn't pull in libcommon on the linker
command line.
More recent Kicad_pcb files have quoted layer names (i.e.
strings, not symbols). The importer in K2S doesn't handle that,
so it chokes on elements like (layer "Edge.Cuts").
Fixes: lp:1824750
* https://bugs.launchpad.net/kicad/+bug/1824750
The bitmap definitions (BITMAP_DEF and so on) do not
have any dependencies on other libs, including WX. This
means the bitmaps library can be isolated from the other
dependencies.
Common now depends on bitmaps, and libraries that depend
on common can pick it up from the common target_link_libraries,
as it is PUBLIC. This means a lot of targets no longer
need manual bitmap linkage.
This avoids a circular dependency that was previously reported
by static analysis.
Avoiding pulling in WX and other headers into the include
tree of each bitmap .cpp is a huge speed up (around 10x) in
compilation, and the generated static library is also 10x
smaller (20MB vs 200MB)
Add common as a link library to pnsrouter,connectivity.
THese library do still use common code (including bitmaps,
via base_screen.h) and this allows them to pick up the libcommon
includes correctly.
Fixes a crash when typing fast in the place footprint filter box.
Also adds a bunch more checking to GAL locking, including making
sure the same person unlocks as locked, and preventing piece-meal
calls (the RAII objects must be used).
This prevents deadlocks when exceptions are thrown and the context
ends up not getting unlocked.
It also removes an earlier hack to try and minimize this which
didn't work anyway.
The addition of very small segments in OCE triggers sliver
removal/cleanup in the BREP generation that can get stuck in a very long
loop during STEP export of boards. These were introduced to ensure
closure of boards with small gaps that were too big for OCE to consider
joined.
Removing the small segments allows STEP export to proceed in a
reasonable time. This also decreases the default minimum gap size that
kicad2step uses to determine curve matching. This prevents mis-matching
small curves
Fixes: lp:1784626
* https://bugs.launchpad.net/kicad/+bug/1784626
STEP exporter keeps outline contiguous by storing the last point
coordinates and using them as the starting point for the next segment. It
might create a problem for arcs, as one of the arc end points may become
translated (changed to the last outline point), while the remaining
points (center and the other endpoint) are kept original. For large
deltas it renders an arc invalid, as it cannot pass through a modified
endpoint anymore.
To fix this, short segments are added to link the last outline point
with an arc endpoint, but only if the distance between the two is below
a certain threshold. This way the outline is kept contiguous and the arc
end point is unmodified, warranting its correctness.
Fixes: lp:1774351
* https://bugs.launchpad.net/kicad/+bug/1774351
OpenCascade 7.3 deprecates some TK libraries that were not required by
KiCad, therefore we should not include them in the compile.
Also correct missing compiles for STEP import/export induced by 584409b2e when using OCCT. There is no effect on OCE to this change.
The opencascade patch intrusively checked against libraries but broke
some build scripts. This restores the default cmake OCE behavior that was
changed by 2bab30d9a and makes the OpenCascade search truly secondary.
- Display offset units in 3D preview window (inches or mm)
- Fix offset in 3D renderer
- Fix offset in Raytracing renderer
- Fix offset in STEP export
- Fix offset in VRML export
- Display offset units in 3D preview window (inches or mm)
- Fix offset in 3D renderer
- Fix offset in Raytracing renderer
- Fix offset in STEP export
- Fix offset in VRML export
- Use simple filename matching
- If a STEP file is found, use that instead
- Similar behaviour to the infamous StepUp tool
Fixes lp:1710796
https://bugs.launchpad.net/kicad/+bug/1710796
The file filter wild card was defined incorrectly causing the file picker
to not display *.stp and *.step file extensions. Change the wildcard per
wxFileDialog documentation.
Prevent the file extension from being forced to .stp even when the user
defined a different extension in the file picker.
Override TransferDataFromWindow to test for file existence and warn user
only once if a file overwrite can occur.
Minor STEP export dialog string and layout improvements.
Make kicad2step honor user's file extension rather than always setting it
to .stp.
Fixes lp:1709636
https://bugs.launchpad.net/kicad/+bug/1709636
This tool is currently very rudimentary. I pushed it because I need to
collect responses from it from users with diverse graphics
configurations, so I want the tool to be in the nightly builds.
This affects no KiCad code.
Set BRL precision to 10 nanometers to prevent floating point round errors
from creating arcs that leave gaps in the board outlines. Note: it may
be prudent to make this setting 100 nanometers if there are gerber export
issues.
Fixes lp:1652406
https://bugs.launchpad.net/kicad/+bug/1652406
The filepos type is not necessarily an integer type, because it also needs
to save the multibyte character state in case we're reading from a stream
with shift states.
The convention of using -1 as a special value is from Unix ftell(), and not
portable. Instead, the stream's failbit needs to be examined after the call
to tellg().
* Remove download and build Boost from source and all CMake boost source build
dependencies.
* Make FindCairo.cmake use pkg-config when it's available not just all
platforms except windows.
* Add version checking to FindCairo.cmake.
* Change find GML version to 0.9.5.1 which is the current version in Ubuntu
14.04 LTS.
* Update required Cairo version to 1.12.1.