Commit Graph

117 Commits

Author SHA1 Message Date
Bernhard Stegmaier 29e1d3d98a Fix Eagle plugin build errors on macOS
Fixes: lp:1738865
* https://bugs.launchpad.net/kicad/+bug/1738865
2017-12-19 13:38:28 +01:00
Maciej Suminski 378846c2e3 Eagle Schematics Importer: support for UTF-8
Fixes: lp:1736083
* https://bugs.launchpad.net/kicad/+bug/1736083
2017-12-17 19:54:21 +01:00
Simon Richter a9ccf1161b Fix quotes in UI messages
This replaces all single and angle bracket quotes in UI messages with
double quotes, for consistency.

Sorry to all translators.
2017-12-15 07:33:07 -05:00
jean-pierre charras a8e98ade49 Fix a very minor coding style issue 2017-11-15 08:10:48 +01:00
Tomasz Włostowski a67d24a34e revert link-time plugin registration causing plugins to be incorrectly enumerated 2017-11-04 21:00:42 +01:00
Tomasz Włostowski 9932ff32ae refactoring: wrapped boost::optional in OPT<> class for the purpose of easier transition to C++17 in the future 2017-11-03 23:59:02 +01:00
Tomasz Włostowski 7a44ab914d refactoring: replaced manual plugin registration with link-time plugin binding 2017-11-03 20:02:06 +01:00
Maciej Suminski e5c4cfc3b0 Eagle board importer: enable rectangle on drawing layers
Now the graphical polygons in footprints are properly handled by the
footprint editor, so there is no reason not to import them.

Coverity CID: 168709
2017-11-01 10:41:57 +01:00
jean-pierre charras 2d6496c7f6 Replace UNIT by EAGLE_UNIT in Eagle plugin to avoid having a lot of useless hits when grep for "UNIT" 2017-10-23 15:37:24 +02:00
Maciej Suminski 0f532c3e8d Eagle PCB import plugin: handle correctly non-consecutive layer numbers 2017-10-20 09:34:33 +02:00
Maciej Suminski 7d7303215b Eagle PCB import plugin: more descriptive warning messages 2017-10-20 09:34:33 +02:00
Maciej Suminski e466bf50ae Eagle PCB import plugin: fix dimensions import 2017-10-20 09:34:33 +02:00
Maciej Suminski ee8012a5cc Eagle import plugin: Code clean-up and formatting 2017-10-20 09:34:33 +02:00
Maciej Suminski 25b8111341 Modified Eagle import plugins to use nanometers as the internal unit 2017-10-20 09:34:33 +02:00
Russell Oliver b796b13a89 Eagle PCB import: Improve error messages for unsupported footprint elements. - Display lines and circles from copper layers on drawings layer - Generate error messages for rectangles and polygons. 2017-10-20 09:34:33 +02:00
Russell Oliver 2a0a999350 Eeschema Eagle Import: Code clean-up and formatting 2017-10-20 09:34:32 +02:00
Maciej Suminski 2adc3d48b4 Eeschema Eagle Import: Assign timestamps for modules 2017-10-20 08:38:39 +02:00
Maciej Suminski cca63801bf Renamed D_PAD::{Set,Get}PadName() to D_PAD::{Set,Get}Name() 2017-09-19 18:23:50 +02:00
Maciej Suminski 90668f9efb Do not destroy the footprint cache in EAGLE_PLUGIN init
EAGLE_PLUGIN::init() is called every time the footprints are enumerated,
so it is incorrect to destroy the cache there.
2017-09-07 13:01:14 +02:00
Dick Hollenbeck 19e6bde09a Rewrite class UTF8 to contain rather than extend std::string storage.
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.
2017-07-26 08:30:12 -04:00
Maciej Suminski a3fc0ef658 Fixed a memleak in Eagle board import plugin 2017-07-10 11:44:56 +02:00
jean-pierre charras 1c5ace4b7a Eagle plugin: avoid hanging if an unexpected keyword is found.
Fixes: lp:1701672
https://bugs.launchpad.net/kicad/+bug/1701672
2017-07-01 16:59:07 +02:00
jean-pierre charras c311e63f0d fix minor issues, and change ZONE_CONTAINER::GetDefaultHatchPitchMils() to ZONE_CONTAINER::GetDefaultHatchPitch()
as using mil in a value has no meaning now in pcbnew
2017-07-01 15:17:30 +02:00
Maciej Suminski f3fbce9560 Code formatting and clean-up 2017-06-23 15:43:13 +02:00
Tomasz Włostowski 586710c6f5 eagle_plugin: correct via size import 2017-06-23 11:12:37 +02:00
Tomasz Włostowski 3b16d3cffe further DLIST/Iterators cleanup, some code formatting 2017-06-23 11:12:37 +02:00
jean-pierre charras 6a63d4fbff pcbnew crash while opening old .brd file
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.
2017-06-19 13:29:57 +02:00
Wayne Stambaugh 3cec63e9b9 Pcbnew: plugin improvements.
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.
2017-06-11 16:21:19 -04:00
Maciej Suminski 6cefb68c7d Fixed a crash on Eagle PCB import with dimensions on unsupported layers 2017-05-08 11:04:10 +02:00
Maciej Suminski 2ac8ab2a8f Eagle layers as enums 2017-05-08 10:26:48 +02:00
Maciej Suminski 99f65f4dbf Added const T& to Eagle PCB import plugin methods 2017-05-04 15:44:14 +02:00
Alejandro García Montoro 9cf934ef17 Moves Eagle XML parser to common, replacing boost with wx.
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.
2017-05-04 15:29:45 +02:00
Lachlan Audas a208ba6566 Fix Eagle plugin board free text rotation import bug.
When using angle's other than 90, 180, and 270, the Eagle plugin did not
correctly set the text angle.
2017-04-14 08:30:57 -04:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
Alejandro García Montoro f68ce306bd CPolyLine -> SHAPE_POLY_SET refactor.
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.
2017-03-24 10:43:47 +01:00
Simon Richter 1502e27695 Remove debug code matching on specific component names 2017-03-03 08:30:48 -05:00
Jon Evans 88f7c55d95 Move ZoomFitScreen and ZoomPreset from PCBNEW_CONTROL to COMMON_TOOLS
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.
2017-03-03 13:28:19 +01:00
Dick Hollenbeck 0c459ced97 EDA_TEXT object refactor.
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.
2017-01-25 08:03:32 -05:00
Wayne Stambaugh 64c892ee23 Make footprint ID into a generic library ID.
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.
2016-11-20 18:35:08 -05:00
jean-pierre charras 19ce3f276c Fixes: lp:1642864 (Pcbnew Eagle import layer 48 incorrectly mapped)
https://bugs.launchpad.net/kicad/+bug/1642864
2016-11-18 13:19:05 +01:00
Maciej Suminski 0cc2c87ef8 Removed BOARD::AppendNet()
It is handled by BOARD::Add() now.
2016-09-12 13:45:57 +02:00
Wayne Stambaugh 4ed346ea64 Eeschema: initial schematic I/O plugin.
* 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.
2016-07-06 05:22:56 -04:00
jean-pierre charras 11c369ee1b Fix minor compil warnings (deprecated warnings and shadowed local vars warnings) 2016-06-07 17:33:12 +02:00
jean-pierre charras 1ae9175671 A few minor fixes for compil warnings (shadowed variables and deprecated auto_ptr) 2016-05-29 17:02:34 +02:00
Chris Pavlina f9386fcbc0 Add support for PCB and footprint format versioning
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.
2016-05-10 15:07:35 -04:00
jean-pierre charras f4cf050669 Eagle plugin: fix typo errors. Use paired fab layers for layers 51 and 52. Not perfect, but better than the old choice (drawing layer) 2015-12-02 12:46:55 +01:00
unknown 42525dda98 Eagle importer support dimensions 2015-12-02 09:47:02 +01:00
unknown 6abffca175 Fix incorrect import of footprint fields NAME and VALUE in Eagle import board. 2015-12-02 09:18:32 +01:00
unknown 4141a250fe Eagle plugin: remve a non-static initializer. 2015-11-15 18:53:26 +01:00
Jon Neal 19075e3434 Pcbnew: fix segfault in eagle plugin when importing zone keepout areas. 2015-11-15 08:29:48 -05:00