* Split and rewrite the preview window and canvas.
* Create a new class for handling the board information.
* Adds new render targets: openGL, legacy, and ray tracing.
* Render targets take full advantage of the new 3D plugins system and 3D cache
for a fast 3D model loading.
* Faster board loading.
* New OpenGL render is faster than the old one.
* New ray tracing render target with a post processing shader.
* Use of new 3D plugins (WRL, X3D, STEP and IGES) and 3D model caching.
* Preview of 3D model while browsing the file name.
* 3D preview of the footprint while adding / align 3D shapes.
* Render of 3D models according to attributes: Normal, Normal+Insert, Virtual.
* Pivot rotation centered in one point over the PCB board.
* Shortcuts keys improved for XYZ orientation..
* Animated camera.
* Switched hashtables.h over to std::undordered_map from boost version.
* Added new macros DECL_VEC_FOR_SWIG() and DECL_MAP_FOR_SWIG() in macros.h.
These along with future DECL_HASH_FOR_SWIG() unify the declaration to swig
and C++ so that the resultant type name is common in both languages, and
the types AGREE.
* Fixed swigging of NETINFO_ITEM and NETINFO_LIST via magic.
* Newly exposed (python wrapped) are: D_PADS, TRACKS (was TRACK_PTRS),
NETNAME_MAP, NETCODE_MAP, wxString (without constructor purposely, read
comment in wx.i), MARKERS, ZONE_CONTAINERS, NETCLASSPTR, KICAD_T types.
* std::vector<SOMETHING*> tends to end up named SOMETHINGS in C++ and python.
Having the name consistent between like types is helpful, and between
languages. std::map<> ends up as SOMETHING_MAP.
* NETINFO_LIST::m_netNames and NETINFO_LIST::m_netCodes are now std::map
instead of hashtables, because swig does not yet support std::unordered_map.
* You can now get to any netclass or net info. NETNAMES_MAP and NETCODES_MAP
are traversable basically the same as a python dictionary using a python
string (not wsString) as the key! The wxString typemap converts python
string to wxString before the lookup happens. Iteration also works.
* Add SCH_PLUGIN::Save() for current file format and code for saving all
SCH_XXX objects.
* Add function to SCH_FIELD to get the position of the field in the component
not the position added to the component position which is what GetPosition()
does. This was required because saving the component field expects position
of the field sans the position of the component.
* Remove public members from BITMAP_BASE object and fix all associated
code.
* Fix the never ending coding policy violations found making these 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.
It is especially true in some Window Managers like KDE, but can be true in any WM, when initializations are made by TransferDataToWindow() method, called by the default wxInitDialogEvent handler.
This feature was not reliably available: neither pl_editor nor GAL supported
it. It has been replaced over the past few commits with a new zoom-to-selection
tool available in all applications and modes.
This makes sure that the declaration is always the same within a single
module, so all users have the same idea of whether the symbol is imported.
In all dynamically linked objects, all users should be aware that the
symbol is imported, while in the statically linked bitmap2component
program, no import/export decorations should be used.
This function has two conflicting definitions in the "kicad" executable and
the other wrapper programs. As the kifaces can be loaded from either, this
silently assumes compatible data layout for the PGM_KICAD and PGM_BASE
types when passed by reference, which is valid only when the compiler is
aware of the cast.
If the return type is encoded in the symbol name (such as when using the
MSVC compiler), this also causes an error during linking, as the symbol
names no longer match.
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.
It should help if (or when) the internal angle unit used in kicad will be changed from 0.1 degree (a relic of code written for PCs without fpu) to degree ( a more natural unit).
Fix erroneous optimization in VECTOR2<T>::Rotate (which was made for angles in degrees): Angles are in radians, and only 0 rd rotation is skipped ( case very frequent, especially in eeschema)
* Add event handler to check all button clicks for default command event
IDs and handle them appropriately by either calling EndQuasiModal() or
passing the event up the event handler chain to allow the default dialog
handlers to perform their magic.
* Add event handler to handle the close window event properly.
* Add scope brackets so the wxBusyCursor will stop being displayed when
the footprint library loading is complete in CvPcb.
The new (eeschema, so far) hotkeys editor uses the right-click menu for the
reset command, so the reset-to-default function that was added in 6652
(git:0cd7476) was not accessible from eeschema.
* remove duplicate code between draw functions and STROKE_FONT used in GAL. Use only STROKE_FONT methods in draw, plot and test DRC function for texts. It remove slightly different shapes between GAL and other calculations.
* fix incorrect bounding box for texts with overbar. Especially noticeable for texts with overbar inside a copper zone in Pcbnew.
* fix a few minor other bugs related to graphic texts.
- When the Kicad manager is iconized, all other child frames are iconized (normal wxWidgets behavior)
- For viewer frames in modal mode, there is a more annoying issue: they have the wxFLOAT_ON_PARENT frame style on unix, and wxSTAY_ON_TOP on Windows.
wxFLOAT_ON_PARENT frame style is incorrect (although on most WM it works) because the parent frame (Kicad manager Frame) is not the caller. It is usually a main editor frame.
It does not work on Windows (wx STAY_ON_TOP is used).
* Now each editor frame has a null parent.
Therefore iconizing the Kicad manager frame does not iconize other frames.
* Viewer frames have null parent in normal mode and the caller parent in modal mode (therefore wxFLOAT_ON_PARENT frame style is always and correctly used)
* References to opened/closed main frames are no more managed by the (complicated) kicad code. Instead of, a non critical and more easy to understand code just uses FindWindowByName to know if a main window exists or not.
These changes do not fix all issues about Kicad frames brought to the foreground or the background, but it fixes a few issues, and AFAIK do not add other issues.
The functions involved in the problem were PGM_BASE::GetEditorName and
EDA_BASE_FRAME::OnSelectPreferredEditor:
1) OnSelectPreferredEditor showed a dialog to allow the user selecting the
editor, but before that called GetEditorName to get the name of the current
editor (to show as a default in the choose file dialog).
2) The problem was when there was no editor, GetEditorName showed its own
dialog.
3) So the user was seeing first the dialog from (2) and then the dialog from
(1).
4) As GetEditorName is used in many other places the solution I did was to add
to it an optional parameter that tells it what to do if no editor is set. To
avoid modifying other code that relies on the current behaviour, this parameter
has a default value that causes to show the dialog. But now when
OnSelectPreferredEditor calls it, it passes the parameter that causes it to
return an empty string if no editor was set.
5) Also, I found a second bug while doing it which allowed in the first dialog
to select an unexistent file (the dialog was missing the wxFD_FILE_MUST_EXIST
flag).
6) Lastly, to avoid having duplicated code (the one that showed the same dialog
and that configured the wildcard was in two methods) I created a single
function that now both functions call: PGM_BASE::AskUserForPreferredEditor.
This way we also will have consistency in the behaviour of both dialogs and
there is a single place where it needs to be modified.
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
In the C++ standard, this function is only defined for floating point
types, and integers cannot be implicitly converted. Using explicit
conversions avoids a GCC specific extension to the standard library.
* Dick Hollenbeck also contributed commit r6440. I inadvertently forgot to set
the Bazaar author tag before I committed it. My apologies.
* Switch to static linking of libcurl and on linux and windows and also
statically link in only required portions of openssl.
* Add the required thread locks which openssl needs.
* Remove the get curl version call from BASEFRAME since it pulls in curl and
openssl into every derived wxFrame class link image.
* Remove curl function from PGM_BASE, switch to atexit() instead. Anything in
PGM_BASE made the singletops bigger.
* Tested on Linux, Windows, and OSX.
* Prevent libcurl from inadvertently being initialized twice.
* Dynamically load libcurl only when required.
* Reduce the number of worker threads when loading footprint libraries to
prevent issues with the GitHub plugin.
* Replace the wxListCtrl with a wxTreeListCtrl, allowing expandable categories
in a future change.
* Clean up the code to make HOTKEY_LIST_CTRL function a bit better on its own.
* Migrate the hotkey dialog to TransferData{To,From}Window, use matching
TransferData{To,From}Control methods on HOTKEY_LIST_CTRL so it is easy to
embed.
1. Fixed an assumption somebody originally made in the plugin that std::string had contiguous storage. This is not specced behavior pre C++11 so we gamble by calling .reserve() which should give a far better guarantee.
2. Added copy to clipboard information for curl
3. Removed some openssl references in compiling.md
4. Renamed struct vars to be uppercase to match "public var" code style policy
* Create base class EDA_PATTERN_MATCH to hand multiple pattern matching methods.
* Create classes for regular expression and wildcard pattern matching.
* Add new pattern matching semantics to component select dialog.
* Thanks to Henner Zellar <h.zeller@acm.org> for improvments to the original patch.
non-transformed S3DMODEL for rendering.
+ S3D_CACHE now caches S3DMODEL and returns a pointer to a single
instance of the S3DMODEL for repeated calls to Prepare()
+ Beginning the VRML Plugin
In polygon calculations (combining polygons, fracture) the mode of calculation (fast or strictly simple polygon option) as no more a default value, because choosing the best mode is better to optimize the calculation time.
'GetVersion'.
+ Introduced normal calculations. This is buggy due to multiple equal
face normals distorting the vertex normal; this will be fixed by
removing the redundant face normals from the calculations.
* Rename Eda_FileSelector to EDA_FILE_SELECTOR.
* Add optional pointer to wxString to save the most recently used path to EDA_FILE_SELECTOR.
* Rename Eda_DirectorySelector to EDA_PATH_SELECTOR.
* Replace wxGetCwd() with wxStandardPaths::GetDocumentsDir(). This fixes the windows issue
where wxGetCwd() returns the path where the executable files are located.
* Add code to handle most recently used path to EDA_BASE_FRAME.
* Fix string formatting error in kicad/files-io.cpp.
* Remove setting and restoring current working directory when launching GerbView. Setting the CWD
has no effect on the launched executable which starts with it's own CWD.
* Allow project path to be passed to GerbView when launched from KiCad.
* Note: this is a work in progress. Do not expect every path and/or file selection dialog to properly
update the most recently used path. The correct solution to this problem requires a much more
well though out solution which will not happen until after the next stable release.
* SearchHelpFileFullPath(): clean up platform specific path code, add executable path sans bin
directory on non-osx platforms, and move KICAD path variable to the beginning of the search
list.
* Minor search stack debug output improvements.
* Push center on zoom, use middle mouse button to pan, limit panning, and
pan while moving object settings from schematic editor to symbol library
editor and symbol library viewer child windows.
* Push center on zoom, use middle mouse button to pan, limit panning, and
pan while moving object settings from board editor to footprint library
editor and footprint library viewer child windows.
PAD_SHAPE_T and PAD_ATTR_T still have a double definition (new names and old names) to be sure python scripts are nor broken by the change.
PAD_DRILL_SHAPE_T does not have a double definition, because it is unlikely oblong holes are used in python scripts.
Double definitions will be removed in the (next) future.
Fix an issue when a .kicad_pcb file contains an incorrect fpid ( containing a '/ ' in footprint section ) . After saving the board the file was no more readable, due to a broken fpid saved in file
(can happens in old .kicad_pcb files, coming from the bzr 4022 stable version, and/or in files converted from an other EDA tool like altium)
Fix 2 very minor coverity warnings.
* Remove ENVIRONMENT_VARIABLE_CHAR_VALIDATOR::OnChar() because it was skipping
the filtering of the first character. Not sure what was going but this seemed to fix the issue.
* Added environment variable name test to DIALOG_ENV_VAR_CONFIG::TransferDataFromWindow
because apparently validators do not get called in wxGrids even whe the extend window style
wxWS_EX_VALIDATE_RECURSIVELY is set.
* Set the default button using wxFormBuilder since the OK button is not part of a wxStdDialogButtonSizer.
* Minor improvements to the HTML help dialog.
* Fix assertion when calling HTML help dialog. Apparently any dialog derived from DIALOG_SHIM must
have a KIWAY top level window as a parent.
In 3D viewer, this option can take a *very long* calculation time (minutes instead of seconds, or hangs) and they are now using aFastMode = true to do polygon calculations, especially for zones inside zones belong to the same net but having different priority (which creates weak polygons).
aFastMode = false is the default for other calculations (zone filling) as before.
* Adds a "Grid Reference Point" to the VRML export; this allows a user to specify the (X,Y) coordinate which will be the origin point on the output
* Adds a "Grid Reference Point" to the IDF export; this is similar in purpose to the corresponding VRML export feature.
* Replace module nomenclature with footprint for improved consistency.
* Replace abbreviations in control text.
* Replace exchange nomenclature with change.
* Add code to allow each editing window it's own undo/redo count.
* Add code to allow for infinite undo/redo when count is set to 0.
* Add edit control to all editing windows general options dialog for
user configuration of undo/redo count.
* Add code to save and restore undo/redo count for each editing window.
Also add PAD_SHAPE_<PADSHAPE> equiv to PAD_<PADSHAPE> and PAD_ATTRIB_PAD_<PADATTRIB> equiv to PAD_<PADATTRIB>
(<PADSHAPE> = ROUND, RECT... and <PADATTRIB> =SMD, CONN ... )
* Update cross-hair position when using mouse wheel to pan.
* Add ugly hack when mouse cursor enters canvas to force the cross-hair visibility counter
back to zero. There was a bug on Windows when using the middle mouse button to pan
and the user released the middle mouse button off of the canvas, the cross-hair would no
longer be displayed until the window was closed and reopened.
Now all are calculated using the top to bottom draw Y axis. This is perhaps not a good idea, but at least it will be easy to change, later.
Code cleaning relative to these bounding boxes.
* Remove global s_NetObjectslist.
* Separate out non-owning version of NETLIST_OBJECTS_LIST into NETLIST_OBJECTS.
* Fix double free pertaining to ~NETLIST_READER().
* Remove all file-io from CvPCB.
* Remove exe launcher cvpcb, retain only cvpcb.kiface, since cvpcb.kiface has no file i/o.
* Add void CVPCB_MAINFRAME::KiwayMailIn( KIWAY_EXPRESS& mail ) and teach it to use old
netlist loading code with a STRING_LINE_READER LINE_READER.
* Fix BEGIN_EVENT_TABLE( CVPCB_MAINFRAME, KIWAY_PLAYER )