Also a rationalization of text polygon generators, with the "standard"
version inherited from BOARD_ITEM now giving the bounding box. This
requires callers who want the (much) more expensive stroke-based one
to call it explicitly (and brings PCB_TEXT in line with the was FP_TEXT
already was.
Fixes https://gitlab.com/kicad/code/kicad/issues/6525
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.
This introduces layer handling to a lot of the geometry routines.
Many of them don't do much with it now, but it does help multi-layer
zones and will help when padstacks are implemented.
This means that utility programs no longer have to be manually
added to the COMBINED_UTILITY, they self-register their
information at static init time. This is basically the same concept
as the Boost test registration.
All utilities need to do now is register their UTILITY_PROGRAM info
struct with the UTILITY_REGISTRY::Register method. No headers required.
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)
Move into own include directory for clarity. Also allows qa_utils
to use its own private headers in qa/qa_utils without exposing them
through the target_include_directories directive.
Several pcbnew_tools utilities read a file from the command line.
Instead of replicating this code, centralise the code in
qa_pcbnew_utils, which allows simpler reuse.
THe utilities are:
* polygon_triangulation
* polygon_generator
* drc_tool
pcb_parser keeps its own function, as that is the focus of the tool,
and its likely to have its own instrumention.
This also adds the ability to read from stdin for the above tools,
which means fuzz testers could theoretically work with them, and it
also can make life easier if you can pipe a board to the executable
directly.
This program has been disabled for some time, but it's not
broken (even if the CMake was!).
Merging into the pcbnew_tools QA program reduces the CMake burden
and puts this tool in the same place as the others.