Commit Graph

2854 Commits

Author SHA1 Message Date
Russell Oliver 246e1fcd9c Eeschema Eagle Import: Save imported library to disk. 2017-10-20 08:38:38 +02:00
Russell Oliver e7377c0a26 Eeschema Eagle Import: dynamically size sheet based on positions of wires and junctions within the sheet. 2017-10-20 08:38:38 +02:00
Russell Oliver 512b574132 Eeschema Eagle Import: Import Busses. 2017-10-20 08:38:38 +02:00
Russell Oliver b8f98eaffe Eeschema Eagle Plugin: Code Cleanup 2017-10-20 08:38:38 +02:00
Russell Oliver 3741793f77 Eeschema Eagle Plugin: Set Component Orientation 2017-10-20 08:38:38 +02:00
Russell Oliver 2523c6b5d7 Eeeschema Eagle Plugin: Set footprint field using Eagle device package value. 2017-10-20 08:38:38 +02:00
Russell Oliver 812cae5409 Eeschema: Eagle Import: Add schematic text. Parse eagle vector text ratio to determine if text is bold. 2017-10-20 08:38:38 +02:00
Maciej Suminski 0d76b2947f Store imported Eagle symbols in a library 2017-10-20 08:38:38 +02:00
Maciej Suminski 3298387f7b Assert for non-standard rotation during Eagle schematics import 2017-10-20 08:38:38 +02:00
Maciej Suminski deaa1d1477 Fixed crashes when importing an Eagle schematic
If release() is called on a unique_ptr, one needs to be sure
that is not dereferenced anymore.
2017-10-20 08:38:38 +02:00
Maciej Suminski d6383893a2 eeschema: Iterate through plugins when determining file format. 2017-10-20 08:38:38 +02:00
Russell Oliver c274a21548 WIP: Symbols are imported and displayed, and save to cache file on schematic save. 2017-10-20 08:38:38 +02:00
Russell Oliver b9edfe4fe4 WIP: Refactor symbol importation to account for multiple gates and device connect pin maps. 2017-10-20 08:38:38 +02:00
Russell Oliver f9845bfa12 Add Eagle plugin implementation notes. 2017-10-20 08:38:38 +02:00
Russell Oliver 55d6f4e0fc WIP: Eagle symbol importation 2017-10-20 08:38:38 +02:00
Russell Oliver 4e69acbb49 Eeschema: Add CheckHeader function to SCH_PLUGIN and cycle through plugins when loading files. 2017-10-20 08:38:38 +02:00
Maciej Suminski e03bc32e49 Eagle plugin: Code formatting 2017-10-20 08:38:38 +02:00
Maciej Suminski f049b01a59 Eagle plugin: Added 'static' and 'const T&' as applicable 2017-10-20 08:38:38 +02:00
Maciej Suminski c72b2155a6 Eagle plugin: changed #define to constexpr 2017-10-20 08:38:38 +02:00
Maciej Suminski 7d2320b5ad Eagle plugin: check before dereferencing optional attributes 2017-10-20 08:38:38 +02:00
Russell Oliver 7ea33f76b4 Eeschema: Determine file plugin to use from first line of file. 2017-10-20 08:38:38 +02:00
Russell Oliver 75d9185e4a Eeschema: Eagle Plugin: Add loadSymboltext, and position default symbol texts. 2017-10-20 08:38:38 +02:00
Russell Oliver 04c7fbebdc Eeschema: Eagle Plugin: Handle pin rotation. 2017-10-20 08:38:38 +02:00
Russell Oliver 739754cfd6 Eeschema: Eagle plugin: Save symbols to schematic library cache file. Remove unneeded variable. Fix add extension to filename 2017-10-20 08:38:38 +02:00
Russell Oliver ea8f7ed02d Eeschema: Eagle plugin> work on schematic and symbol elements 2017-10-20 08:38:37 +02:00
Russell Oliver e92c8c1d6c Eeschema: Handle multiple sheets in Eagle plugin. 2017-10-20 08:38:37 +02:00
Maciej Suminski c727423979 Work in progress
- !! Eeschema uses Eagle plugin for loading schematics (i.e. it does not
use KiCad format anymore)
- Fixed build errors
- Fixed a few crashes
- Code formatting
2017-10-20 08:38:37 +02:00
Maciej Suminski f5b2a2ea57 Code formatting and cleanup 2017-10-20 08:38:37 +02:00
Alejandro García Montoro 404457f455 Eeschema Eagle plugin 2017-10-20 08:38:37 +02:00
Alejandro García Montoro df708f8ada Starts the loading layout 2017-10-20 08:38:37 +02:00
Alejandro García Montoro 75b0549f6f Testing the structure 2017-10-20 08:38:37 +02:00
Alejandro García Montoro 2403f2b558 Adds necessary structure to implement and test Eagle schematich plugin 2017-10-20 08:38:37 +02:00
Ingo Kletti df15e63d41 Fix Unit naming typo in eeschema spice model config 2017-10-16 20:07:26 +02:00
Maciej Suminski 609da9b61d Add missing sentinels for KICAD_T[] in SCH_EDIT_FRAME::OnLeftClick() 2017-10-15 18:11:31 +02:00
jean-pierre charras e0b9a21417 Modify a few messages to make translations more easy. 2017-10-12 10:39:32 +02:00
Seth Hillbrand f685cfaf3d Eeschema: Add collision-based selection code to circles and text 2017-10-10 20:54:31 +02:00
jean-pierre charras 47f37efdec Fix a compil issue on Linux 2017-10-10 08:37:50 +02:00
jean-pierre charras e626136e29 Eeschema: boom generator: ugly fix on Windows to allow xsltproc.exe working from the command line created from bom dialog.
(On windows, xsltproc.exe does not accept '\' in output filename, only '/' like on Unix, so this separator is converted when possible)
Minor code cleanup
2017-10-09 20:57:41 +02:00
jean-pierre charras 835c19f1e2 Fix dcm files not working with lib file in version 2.4
Fixes: lp:1722107
https://bugs.launchpad.net/kicad/+bug/1722107
2017-10-09 13:10:29 +02:00
jean-pierre charras 4905bbe500 hotkey management: enhancements in code to know if a hotkey was handled by an event or not.
No actual change in key management: in legacy it was partially existing, and not yet used in GAL mode.
2017-10-06 09:23:13 +02:00
jean-pierre charras 06a59022e4 minor fixes (compil warning and a very minor fix) 2017-10-02 20:39:09 +02:00
Maciej Suminski 85faa0e101 Added a dialog to select fields to be updated 2017-10-02 15:57:23 +02:00
Maciej Suminski e29d77c891 'Update Field Values' tool for eeschema 2017-10-02 15:57:23 +02:00
Maciej Suminski d90ac8299d Added 'Update Fields' button in schematic component properties 2017-10-02 15:57:23 +02:00
Oliver Walters 948dfe88ce Added option to not test other pins when setting pin parameters
- On loading from file, other pins are not LINKED and thus can be ignored
- 90% reduction in library load time when launching eeschema
2017-09-28 13:10:08 -04:00
Wayne Stambaugh ded4ad9b17 Pcbnew: delete objects from removed layers.
This fixes potential DRC false positive bugs that occur when inner layers
are removed from the board but the actual objects on contained on those
layers remain in the board.

Since Pcbnew does not handle odd number layers, this is not a perfect fix.
When the user chooses the front or back layer only options from the layer
setup dialog, objects on the copper layers will not be removed.  This will
not cause the false positive issue described above.

Get rid of dialog OK and cancel button event handlers and use the proper
TranferData(To/From)Window for handling control data.

Add PCB_LAYER_COLLECTOR for collecting board objects by layer.  Factor out
redundant [] operators into base PCB_COLLECTOR object.

Fixes lp:893950

https://bugs.launchpad.net/kicad/+bug/893950
2017-09-28 13:01:09 -04:00
Maciej Suminski 068a29952c Changed AUI toolbars background from gradient to solid
Based on patches from Windsor Schmidt <windsor.schmidt@gmail.com>
2017-09-27 23:23:06 +02:00
Wayne Stambaugh 39b27e39a9 Eeschema: silently save project file after schematic plot setting changes.
Don't prompt the user to save the project file after the schematic plot
settings change.  It is not done this way anywhere else in KiCad.

Fixes lp:1478131

https://bugs.launchpad.net/kicad/+bug/1478131
2017-09-26 08:32:04 -04:00
Wayne Stambaugh 427e5ec461 Eeschema: fix crash when undo called during item edit.
Add EDA_DRAW_FRAME::isBusy() method to test if the current item is being
edited or a block operation is in progress.

Ignore undo and redo commands when editor is busy.

Fixes lp:1718656

https://bugs.launchpad.net/kicad/+bug/1718656
2017-09-21 12:37:52 -04:00
Wayne Stambaugh cb764d73c5 Minor trace logging improvements.
Make all trace environment variable strings upper case and prefix with
KICAD_TRACE_ for consistency.

Add Doxygen group for the trace environment variable strings.
2017-09-21 08:58:41 -04:00
Wayne Stambaugh 6816b0dc99 Schematic hierarchy selection dialog fixes.
Derive the dialog from DIALOG_SHIM and show dialog quasi-modally to prevent
other KiCad main frame window events from being blocked.

Remove redundant storing of parent window pointer.

Verify parent window pointer is actually a SCH_EDIT_FRAME since the dialog
directly accesses parent object methods.

Replace static event table with dynamic event handling.

Fixes lp:1718241

https://bugs.launchpad.net/kicad/+bug/1718241
2017-09-20 08:45:30 -04:00
jean-pierre charras 4122aa1c01 Fix translation (I18n) problems 2017-09-20 09:32:37 +02:00
Simon Richter 40ffb364df Avoid converting fixed string to UTF-8
This fixes a build error on MSVC. The code may actually be legal, but a
proof of that would require a lengthy dissertation on argument promotion
rules for the ternary operator, and the simplest rule of promoting both
cases to a wxString rvalue is not likely to be what is intended here.

Fortunately, this expression can be simplified.
2017-09-20 08:57:35 +02:00
Maciej Suminski 1edaa8090d Turned LIB_ITEMS_CONTAINER into a template 2017-09-20 08:39:14 +02:00
Maciej Suminski 55bc8da726 LIB_ITEMS_CONTAINER code formatting 2017-09-20 08:39:14 +02:00
Bernhard Stegmaier 0be357ec3e LIB_ITEMS_CONTAINER reimplemented using C-style array of boost::ptr_vector
Fixes: lp:1714974
* https://bugs.launchpad.net/kicad/+bug/1714974
2017-09-20 08:39:14 +02:00
Maciej Suminski d6f3961804 pcbnew & eeschema file format version bump 2017-09-19 18:22:56 +02:00
Maciej Suminski 85be485c34 Enable long names for pin numbers and pads
- pad names are stored as wxString instead of a char[4] & integer union
- removed pad name to string conversion functions
- fixed pad & pin properties dialog restrictions regarding the name
length
2017-09-19 18:19:49 +02:00
Fabrizio Tappero d2d665e540 library option reviewed and renamed, minor menu text changes 2017-09-19 08:11:24 -04:00
Maciej Suminski 0083ce1bdc Disable enforced slash as the path separator in NETLIST_EXPORTER
It causes issues with files that are stored on network resources and
pointed to using the Windows UNC format.
2017-09-19 12:08:10 +02:00
Wayne Stambaugh 3d1bebe9f8 Fix tooltip in the edit library symbol properties dialog. 2017-09-18 13:18:49 -04:00
Maciej Suminski 25abe30c72 Code formatting 2017-09-18 11:25:32 +02:00
Kristoffer Ödmark 5e70810161 Disabled the automatic schematic-cross probing due to performance reasons. Added sheet-context menu entry for the cross-probing instead. 2017-09-18 11:16:18 +02:00
Oliver Walters f299266107 Added button logos to DIALOG_EDIT_COMPONENT_IN_SCHEMATIC dialog 2017-09-14 08:49:55 -04:00
Oliver Walters f529e3100c Altered text buttons to image buttons
- Used same tooltip messages
- Added "MoveFieldDown" button / function
2017-09-14 08:47:43 -04:00
Jean-Samuel Reynaud 50c9d8f77d Fix duplicated pin in case of multipart symbol creation.
Fixes lp:1509936

https://bugs.launchpad.net/kicad/+bug/1509936
2017-09-13 11:41:31 -04:00
Maciej Suminski 4a6777e0d1 Validate LIB_ITEMS::ITERATOR after erase operation 2017-09-08 08:52:01 +02:00
Maciej Suminski 4cd319b0c7 Make LIB_ITEMS::ITERATOR operator++ and end() coherent
Previous operator++() could move LIB_ITEMS::ITERATOR past the iterator
returned by LIB_ITEMS::ITERATOR::end(), potentially leading to a
segfault.
2017-09-08 08:51:59 +02:00
Seth Hillbrand 3b086360b8 Fixed a condition in LIB_ITEMS_LIST::operator[]
Fixes: lp:1714110
* https://bugs.launchpad.net/kicad/+bug/1714110
2017-09-07 00:44:40 +02:00
Seth Hillbrand 1fe91e6252 Eeschema: handle disambiguation cancel in library editor right-click
Fixes: lp:1714608
* https://bugs.launchpad.net/kicad/+bug/1714608
2017-09-02 14:52:18 -04:00
Seth Hillbrand 1c617b9f56 Prevent duplicate objects during block copy in symbol library editor.
Fixes lp:1714109

https://bugs.launchpad.net/kicad/+bug/1714109
2017-08-31 12:26:39 -04:00
Jean-Samuel Reynaud 21c104fcc7 Fix incorrect (missing) initialisation of m_cur_grid in symbols libraries table dialog box 2017-08-31 09:49:28 +02:00
Wayne Stambaugh 3bcc3dc4f9 Add delete block hotkey to schematic editor. 2017-08-29 15:16:56 -04:00
jean-pierre charras 758445e33e Fix a compil warning and a wxASSERT in COLOR4D_PICKER_DLG_BASE 2017-08-28 17:40:26 +02:00
jean-pierre charras e3c64f1f06 Slightly modify keywords used to store color config of Eeschema and Pcbnew, to avoid this config destroyed each time a stable version is run. 2017-08-27 09:06:26 +02:00
Maciej Suminski da88ed02e5 Fix bom2grouped_scv BOM template
For empty or undefined fields the quotation mark was not closed.
2017-08-25 17:06:32 +02:00
Wayne Stambaugh ee43728b18 Fix bug when adding symbol library with $ as first character of path name.
Test the result of wxFileName::MakeRelativeTo() before testing to see if
the resulting relative path starts with '.'.  When a library with relative
path that contains a path name with $ as the first character,
MakeRelativeTo() calls Normalize() which attempts to do an environment
variable substitution that concatenates consecutive paths i.e. the path
/foo/$bar ends up being foo$bar which is obviously incorrect.  This fix
is only a fix for absolute paths and files that contain path names that
begin with $.  This still does not resolve the issue when adding a
library file relative to one of the search paths that contains a path
name that begins with a $.  Fixing this would potentially break paths
that are expecting environment variable substitution.

Fixes lp:1712361

https://bugs.launchpad.net/kicad/+bug/1712361
2017-08-24 11:37:10 -04:00
Wayne Stambaugh 17b8342dc0 Disable drawing schematic sheet bounding box. 2017-08-24 08:22:03 -04:00
Wayne Stambaugh 33048e709a Better fix for schematic sheet re-sizing bug.
Use sheet pin direction to calculate sheet minimum height and width.

Remove sheet pin offsetting as the new sheet height and width calculation
prevents invalid minimums.
2017-08-23 18:33:27 -04:00
Wayne Stambaugh e176fc181d Fix schematic sheet resizing bug.
Calculate the proper minimum height when resizing sheets to prevent resized
sheet height from always increasing.

Prevent the sheet pins from being drawn in the corners of the sheet when
updating the edge constraints on resize.  This ensures that the sheet pin
is always drawn within the bounds of the sheet.  Please note that this fix
may not be 100% accurate as is assumes the default grid size of 50 mils.
This may not be what the user expected but it guarantees that wires will
connect to the pin properly.

Fixes lp:1699796

https://bugs.launchpad.net/kicad/+bug/1699796
2017-08-23 13:19:31 -04:00
Maciej Suminski 57619956e8 One more fix for LIB_BEZIER::Save() 2017-08-23 16:04:23 +02:00
Maciej Suminski d4fddf1929 Fix eeschema crash when saving LIB_BEZIER objects 2017-08-22 13:29:53 +02:00
Chris Pavlina a20cce0753 Show component history at the top and preselect it
This was the behavior before the factoring out of COMPONENT_TREE. Moving
the history at the top just required inserting it at the right point;
fixing preselect involved wxEVT_INIT_DIALOG not propagating to the
panel. Simple solution was to move the parts of that event handler to
the constructor as they didn't have to be in an event handler anyway.

Fixes: lp:1707538
* https://bugs.launchpad.net/kicad/+bug/1707538
2017-08-19 00:41:21 -06:00
Maciej Suminski 352919658d Refactored LIB_PART data storage
Instead of keeping all items in a boost::ptr_vector(), LIB_ITEMs are now
stored in an integer (KICAD_T) to LIB_ITEMS map.

The map allows to quickly access a subset of items of given type.
As the items are stored per type, there is no need to call
LIB_ITEMS::sort() to assure the correct drawing order. As a result,
libraries load faster.

To retain the old interface, there is a LIB_ITEMS_LIST wrapper for
the map, allowing the developers to access the items as if it was a flat
list-like structure.
2017-08-16 16:05:22 +02:00
Wayne Stambaugh 0e41632105 Fix build error.
Bind() and Unbind() require class specification when passing a pointer to a
class member.
2017-08-12 12:10:47 -04:00
Wayne Stambaugh f781691049 Eeschema: add symbol library table editor dialog.
Create a new dialog to edit global and project specific symbol library
tables.

Add menu entries for new symbol library table editor in schematic editor
and symbol library editor main frame menus.

Add command event handler for symbol library table editor dialog to
SCH_BASE_FRAME so it is accessible from derived frames.

Fix bug in default environment variables initialization.  A test for
existing user defined environment variables was preventing any new
default environment variables added to the list from being initialized.
2017-08-12 08:10:34 -04:00
jean-pierre charras 6bdc9cd25e fix a minor issue in dialog netlist, and add comments in code. 2017-08-11 09:44:06 +02:00
jean-pierre charras 4e96f9990d Use the new color4Dpicker to choose a color in Eeschema.
However, the opacity is not modifiable because the wxDC used in Eeschema does not know the alpha channel.
2017-08-06 10:42:11 +02:00
Wayne Stambaugh 7bf9f8e1c7 Eeschema: add global symbol library configuration dialog.
Create a dialog to give the user options to configure the global symbol
library table the first time Eeschema is run when no global symbol library
table exists.
2017-08-04 15:51:53 -04:00
jean-pierre charras 8dacd0582a Make a few internal error strings not translatable 2017-08-04 20:43:31 +02:00
Wayne Stambaugh 34abef3f5a Fix build error caused in previous commit. 2017-08-01 17:21:03 -04:00
Wayne Stambaugh 863db59a3d Eeschema: improve schematic symbol message panel information.
Add information when dummy symbol is used for library symbols that could
not be found to give the user some useful information to help track down
the broken link rather than display an empty message panel.
2017-08-01 15:34:59 -04:00
jean-pierre charras 58c32367ee filter useless autosave tests, and optimization of autosave test in Eechema 2017-07-26 18:06:04 +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
Dick Hollenbeck 4e7de8a761 Reverse commit 4011ed4e31.
This commit was too broad and not cognizant of the purpose of the class
UTF8.

Add MAYBE_VERIFY_UTF8() macro, which can trap non-UTF8 encoded strings in
debug builds.

Use that macro conditionally in class UTF8 to trap non-UTF8 encoded strings
being put into UTF8 instances.
2017-07-26 08:26:56 -04:00
Oliver Walters c27f5b725d Improved various error messages
- Moved developer "jargon" to details pane
- Changed error messages to "WHAT" rather than "WHY" or "WHERE"
2017-07-25 07:37:14 -04:00
Oliver Walters a0a3ca6646 Added extra information to error and info messages
Optional extra information string which is displayed in a drop-down "details" box
2017-07-25 07:37:13 -04:00
jean-pierre charras cb2f3d6304 fix minor typo 2017-07-22 13:46:18 +02:00
jean-pierre charras f042fcddd0 Change the way power symbols are annotated before creating a netlist or running ERC.
Now only not annotated symbols (or duplicate references) are modified.
2017-07-21 18:41:04 +02:00
Fabrizio Tappero f453cec938 Changed all Rotate 90 deg CW with Rotate Clockwise. Changed all Rotate 90 deg CCW with Rotate Counterclockwise 2017-07-21 10:28:44 -04:00