This places the arc approximation setting in the kicad_pcb file and uses
it for all parts of the board rendering where arcs are converted to
segments. This allows the user to customize their speed vs. accuracy
tradeoff. The default setting of maximum error of 0.005mm is acceptable
for small boards on moderate systems.
Sometimes we want to inflate a polygon without adding rounded edges.
This add the option using the jtMiter setting.
This is used in the Eagle parser to expand the Eagle zones for KiCad.
Eagle Zones are drawn on the polygon edge, so they extend out from the
outline. KiCad zones are drawn inside the polygon. We need to both
increase the zone size and decrease the minimum pen width to account for
this.
Fixes: lp:1817312
* https://bugs.launchpad.net/kicad/+bug/1817312
Eagle parsing allows pin 1 to be different from the other pins in the
package but this is set by a tag marking the pin as "first" rather than
the actual number of the pin.
Fixes: lp:1829251
* https://bugs.launchpad.net/kicad/+bug/1829251
Some how a board object was required to fetch the line width when a
footprint is being parsed. The problem is that there is no board
defined when loading Eagle footprint libraries so there was a nullptr
segfault as a result. When there is no board defined, use the default
KiCad layer line widths.
Fixes lp:1829243
https://bugs.launchpad.net/kicad/+bug/1829243
Circles and Squares are handled correctly. Octagons are converted to
circles. Pad 1 is identified by the "1" string in the Eagle name.
Fixes: lp:1784126
* https://bugs.launchpad.net/kicad/+bug/1784126
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.
It is very difficult to select 0-width lines and they aren't physical on
the board. Items with this setting in Eagle should revert to the
default in KiCad.
Fixes: lp:1808584
* https://bugs.launchpad.net/kicad/+bug/1808584
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
Unplated holes in Ealge can either be free floating or part of a larger
footprint. We handle both in the same packageHole routine by either
offsetting the hole in a centered footprint or offsetting the footprint
in a centered hole.
Fixes: lp:1791287
* https://bugs.launchpad.net/kicad/+bug/1791287
Eagle files that are edited may be missing required data. While we do
not need to handle these files, we do need to prevent segfaults in KiCad
when reading them.
This removes the existing constructors so that all parsing must
be explicit and callers are made aware that they need to think
about illegal characters, malformed ids, etc.
Fixes: lp:1783474
* https://bugs.launchpad.net/kicad/+bug/1783474
In fact radius is not used initialized, as the scope where it is
used (while loop) is dependent on the preceding if( w.curve ) clause
that initializes 'radius' variable.
- changed EAGLE_UNIT enum names from EAGLE_* to EU_*
- renamed ToNanoMeters() to ConvertToNm() and added a comment
- added ToMils() and ToNanoMeters() method
Eagle tracks can have curves. We approximate this using the
segments_per_360 define. This results in 32 segments for a 360-degree
curve. We could increase this value for curved tracks to get closer
tracking with the Eagle layout if needed.
Fixes: lp:1753289
* https://bugs.launchpad.net/kicad/+bug/1753289
Remove a throw in the Eagle importer which just threw a wedge
in the works, and return a default modTime when the file hasn't
been set yet.
Give the gEDA importer the multi-file cache management performance
improvements from the kicad_plugin.
Fixes: lp:1752719
* https://bugs.launchpad.net/kicad/+bug/1752719
This removes a line that deletes the templates created from the eagle
library every time EAGLE_PLUGIN::init( const PROPERTIES* aProperties )
is called, which seems quite often. The templates are deleted though if
the library path for the plugin is changed or the file has been
modified.
Fixes: lp:1731802
* https://bugs.launchpad.net/kicad/+bug/1731802
This forces the compiler class specific features rather than borrowing
from the base class's std::string. In some cases prior to this,
wxString( std::string ) was being called rather than UTF8::operator
wxString() leading to garbled wxStrings.
Added function UTF8::wx_str() which is of great convenience also.
Implicit conversions still work as before, and hopefully more reliably.
Fixes: lp:1698697
https://bugs.launchpad.net/kicad/+bug/1698697
The incorrect method ZONE_CONTAINER::AppendCorner() is also fixed:
It was expecting the corner must be added to the main outline, but this is a false expectation:
it can be added to a hole inside the zone outline.
Allow partial library reads in libraries that support footprint per file.
This includes the KiCad and GEDA footprint libraries.
Allow for partially cached libraries rather than ignoring all valid files
when an error occurs.
All E'STRUCTS' are moved to common except for ERULES (which is
specific to pcbnew and needs its internal units), still in
pcbnew/eagle_plugin.{h,cpp}
In order to get rid of another boost dependency, this also changes
the parsing of the XML from Boost.PropertyTree to wxXml.
To replace boost::optional, an OPTIONAL_XML_ATTRIBUTE class has
been implemented. This could be replaced with std::optional when
C++17 is ready.
Removes the need of using the legacy code in polygon/PolyLine.{h,cpp},
refactoring all CPolyLine instances with SHAPE_POLY_SET instances.
The remaining legacy methods have been ported to SHAPE_POLY_SET;
mainly: Chamfer, Fillet, {,Un}Hatch.
The iteration over the polygon vertices have been simplified using the
family of ITERATOR classes.
BOARD::GetBoundingBox() now directly calls BOARD::ComputeBoundingBox()
and there is a new method BOARD::GetBoardEdgesBoundingBox() used for
call sites that needed to use ComputeBoundingBox( true ) in the past.
This allows COMMON_TOOLS to implement ZoomFitScreen without knowledge
of the BOARD class.
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.
Rename FPID to LIB_ID as is now used as a generic library identifier and
is no longer specific to footprints.
Remove all mention of footprint from the new LIB_ID doxygen comments and
code.
Rename files fpid.h and fpid.cpp to lib_id.h and lib_id.cpp.
Rename fp_lib_table.keywords file to lib_table.keywords and adjust CMake
build dependencies accordingly.
Update all source files effected by the code and file name changes.
Update .gitignore for file name changes.
* Factor out PROPERTIES object from the PCB plugin code and move it into
common so it can be used by both the Pcbnew and Eeschema plugins.
* Add schematic I/O plugin manager for loading and saving schematic and
component library files.
* Add initial attempt at a parser for current schematic file format. This
parser will be infinitely more strict than the current parser which is very
forgiving in what it parses.
* Make minor changes to the base bitmap class to support the new parser.
* Add find root sheet support to sheet object to allow fetching the root
sheet from any sheet in the stack.
Currently, kicad_pcb files have a (version ...) tag, but it is ignored. This
commit does the following:
1. Parse the version. If it's later than the last supported version, present an
alternative error message suggesting an upgrade if the file does not load
correctly. The version will be interpreted as an integer YYYYMMDD to suggest
a KiCad release date.
2. Accept a (version ...) tag also in kicad_mod files, but do not write them
yet. If no version tag is present in these files, assume the version to be that
of the current format version at the time of this commit.
This is meant to be merged to the 4.x stable series, and preps for KiCad 5
which will start emitting version tags also in footprints - users with what
will then be 'old stable' will not get a parse error when we introduce this for
footprints, and we can safely increment the format version later.