Commit Graph

811 Commits

Author SHA1 Message Date
jean-pierre charras 000ee22e39 Drill dialog: creates the directory, when the path entered in dialog does not exist. 2017-05-01 20:42:18 +02:00
jean-pierre charras afe92c7bfc Pcbnew: Add creation of Drill Files in Gerber X2 format.
Gerbview: add support of drill files in Gerber format.
Fix also an issue in drill dialog: Axis choice is now common to plot a drill files.
2017-05-01 12:43:40 +02:00
jean-pierre charras e6545ec982 Gerbview: evaluate Aperture Macro Parameters using precedence rules for the arithmetic expressions found in AM. 2017-04-10 18:44:32 +02:00
jean-pierre charras f007601507 Gerbview: fix an issue (crash or hang) when a aperture macro definition contains ( and ).
Note: currently Gerbview does not handle yet operator precedence in aperture macro parameters.
2017-04-09 16:42:17 +02:00
jean-pierre charras 9992a07def Gerbview: Fix an issue in aperture macro for a Circle AM primitive inside a macro definition 2017-04-08 17:41:53 +02:00
jean-pierre charras 36255d8523 Gerbview: Fix a few issues in aperture macro definitions. 2017-04-08 15:35:11 +02:00
jean-pierre charras aad80c9bf4 Fix compil issue on Linux 2017-04-08 14:26:32 +02:00
jean-pierre charras ba517db96c Gerbview: fix a subtle issue when reading parameter values in Gerber files.
In Gerber files the char 'X' is used as separator.
But when reading parameter values, the sequence "0xnnn" is a number in hexadecimal format, and the 'X' char is not seen as separator by usual strtod or strtol C functions.
This is now fixed.
2017-04-08 12:53:40 +02:00
jean-pierre charras f16f39fd4c Gerbview: rework on load zip archive: better handling of non ascii7 filenames.
non ascii7 filenames of zip files issues are fixed.
There are still issues with non ascii7 filenames inside the zip archives (especially when a zip archive was created on Windows)
2017-03-31 10:55:13 +02:00
Jon Evans 3ec28e2acf Refactor layer enumerations to all live in the same place 2017-03-30 16:01:48 -04:00
John Beard b8edecc10f Move cursor shape flag into GAL settings
The motivation here is to concentrate display options in the GAL display
settings, ready for removal of legacy canvases. Instead of having the
property as a member of the DRAW_FRAME, with the GAL canvas retreiving
it from there, it is now in the GAL_DISPLAY_OPTIONS struct, and both GAL
and legacy get it from there.

The options for setting cursor shape are then moved out of the general
options dialog, and into the GAL display options widget, where they can
be used in all GAL-aware programs.

GAL cursor shape works on GAL, but not legacy, so the option is now
available on OSX (but only affects GAL, and is labelled as such).
2017-03-22 10:24:48 +01:00
Simon Richter 12c1339296 Remove false "override" comments. 2017-03-06 16:34:56 -05:00
jean-pierre charras 4eeed8d04f Icons options menu: code rework 2017-03-03 14:18:25 +01:00
jean-pierre charras e7e972804a Make show/hide icons in menus a run time option, instead of compil option. 2017-03-02 15:45:54 +01:00
John Beard 1d039cb4c1 Break row indicators out to own class
The introduces INDICATOR_ICON, which is a very simple class holding a
bitmap that can toggle on or off.

The ICON_PROVIDER class then provides icons to INDICATOR_ICONS, which
means the class can be used for more than just row indicators.

A default row icon provider is also provided for use in the standard row
selector.
2017-03-01 09:44:41 +01:00
jean-pierre charras 11dcb76fc9 Add -Wshadow compil option, if exists to warn about shadowed variables.
Swig auto generated .cxx file has a lot of shadowed variables, so this option cannot be used to compil all files.
2017-02-23 13:17:23 +01:00
Maciej Suminski d7bf44eee0 Removed a few more headers from base_struct.h 2017-02-22 17:54:01 +01:00
Maciej Suminski 0dc88bb4cf Changed COLOR4D defines to static consts 2017-02-22 17:35:00 +01:00
Jon Evans a52250a91e Change from EDA_COLOR_T to COLOR4D globally; arbitrary color support
eeschema now supports arbitrary colors for all object types, and
pcbnew does in GAL canvas.  When switching from GAL to legacy canvas,
pcbnew will convert colors to the nearest legacy color.
2017-02-22 17:35:00 +01:00
John Beard a8eea6155a Move bitmaps.h out of base_struct.h
bitmaps.h was included in nearly every file in the project due to it
being included by base_struct.h

Only about 130 files actually use the XPM definitions defined there, and
many of those already included bitmaps.h themselves, or via
menu_helpers.h. However, touching bitmaps.h would result in over 400
rebuilt files for pcbnew alone.

This commit moves the bitmap-related types like BITMAT_DEF out to a new
header, which is still included by base_struct.h, which is less
avoidable for now, it's it's used in the interface.

The icon list is still in bitmaps.h. This has the side effect that's
it's now easier to automatically generate this file.

Many classes in pcbnew and eeschema needed some functions moved
to the implementaitons from the headers too.
2017-02-21 09:50:15 -05:00
Eldar Khayrullin 59876c35ae Gerbview: fix wrong html tag 2017-01-28 10:34:57 +01:00
jean-pierre charras 2f0ab8b13d Gerbview: Load zip archive: skip files which are not gerber or drill files. Better look of messages. 2017-01-26 18:15:46 +01:00
jean-pierre charras aac13e7ae1 More detailed error messages when loading Gerber or drill files and if no room to load some files. 2017-01-26 13:16:49 +01:00
jean-pierre charras 361c0c2e21 Gerbview: better management of zip archive. Better error messages. 2017-01-26 11:36:01 +01:00
jean-pierre charras 6329ca5065 Gerbview: add in file menu an option to load a zip archive containing Gerber and/or drill files. 2017-01-26 10:45:28 +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
jean-pierre charras 4ee344e150 Gerber files: Enable net attributes options in plot Gerber dlg and fix net attribute for "no net" tracks and vias (netcode <= 0). 2016-10-23 19:43:31 +02:00
jean-pierre charras 9fdcba8229 Gerbview: Fix 2 (minor) issues in aperture macro "moire". Add a .gbr test file for this aperture macro. 2016-10-13 10:26:49 +02:00
Cirilo Bernardo 48ed9f080e Add Help Menu item to open browser at kicad-pcb.org/contribute 2016-10-10 19:01:45 -04:00
jean-pierre charras 15517964c9 Fixes: lp:1630105 (Gerbview print dialog does not display graphic layers list on some windows managers like Unity)
https://bugs.launchpad.net/kicad/+bug/1630105
2016-10-04 09:51:35 +02:00
Chris Pavlina 52aa4ecdf4 Unify window title formats
Most window titles are now of the format "Application — file [info]",
with adaptations as necessary. Version information has been removed from
titles.
2016-09-26 17:28:25 -04:00
jean-pierre charras 89914fa9de Fix 2 Coverity warnings. 2016-09-26 19:58:32 +02:00
Simon Richter ad088db6d2 Add more "override" markers. 2016-09-25 13:59:41 -04:00
Simon Richter 59c81976dc Explicitly mark overriding functions. 2016-09-24 14:53:15 -04:00
jean-pierre charras d42fd751f9 Gerbview print: print now the Gerber filename, the number of pages to print, and a page number 2016-09-21 11:34:18 +02:00
Ian Roth ec3109472a Correct page numbers on pcbnew multipage print 2016-09-21 09:04:05 +02:00
Ian Roth 7ad2f37391 Add %L formatter to worksheets to print layer name. 2016-09-10 14:23:59 -04:00
jp-charras c8cf78398b Gerbview: fix a crash when reading polygons with arcs.
Fix a very minor other issue (due to a minor bug in wx 3.1)
Displays the full graphic layer name of the selected item in message panel (instead of just the graphic layer number)
2016-09-07 10:28:16 +02:00
jean-pierre charras 9f46d83175 Gerbview: locate item now does not take in account not visible layers. Remove an unused file
3d viewer: Remove a few ToUTF8() bad  usage (replaced by GetData() )
2016-08-19 09:45:59 +02:00
jean-pierre charras 7909de6127 Gerbview: better management of d_codes list in toolbars. 2016-08-17 10:19:10 +02:00
Simon Richter bfb6e0bbb2 Convert remaining occurences of stri[n]cmp to str[n]casecmp.
This also reverses the substitution logic if strcasecmp is missing (config.h.cmake)
2016-08-16 10:27:09 +02:00
jean-pierre charras f1226afc89 Gerbview: support of %TA.AperFunction (aperture attribute) and better support of %TO (currently work in progress) object attribute. 2016-08-16 12:56:20 +02:00
Chris Pavlina e5a5f9552b Fix RS274X Unicode decoding 2016-08-08 13:21:27 -04:00
jean-pierre charras 984146c37d Gerbview: better support of advanced X2 attributes. 2016-08-01 19:47:35 +02:00
jean-pierre charras ff246f6365 Gerbview: Add %TO (Netlist attribute) support in X2 format. Fix a bug in a not previously very used method. 2016-07-27 15:27:19 +02:00
jean-pierre charras 5a00c7823c Gerbview: Read excellon files: fix incorrect handling of G85 command. 2016-06-19 11:53:40 +02:00
jean-pierre charras dbd9b5e49e Gerbview: minor code cleanup. 2016-06-18 11:37:36 +02:00
jean-pierre charras a907e50424 Gerbview: code cleanup (mainly remove g_GERBER_List global variable) 2016-06-17 20:00:29 +02:00
jean-pierre charras 947c73f23b Gerbview: try to fix a crash (hard to reproduce) which someting happens when closing gerbview. Fix incorrect calculation of bounding boxes. 2016-06-15 10:26:41 +02:00
Chris Pavlina 81144c2476 Move hotkey list from Preferences menu to Help menu 2016-06-11 21:22:13 -04:00
Chris Pavlina 9eef653625 Remove legacy option to zoom to selection on middle mouse button
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.
2016-06-11 19:37:43 -04:00
Chris Pavlina 26607f8ab9 Add zoom-to-selection tool to gerbview 2016-06-10 07:08:16 -04:00
jean-pierre charras f311230874 Gerbview: when running gerbview from a command line, if a filename is given, and if it is a .drl file, it is loaded as drill file (instead of a gerber file, which generate an error message).
Code refactor: remove useless class members,  and move read gerber file and read excellon file from gerbview frame to the corresponding classes
2016-06-05 14:26:39 +02:00
jean-pierre charras 6d1e904334 Code cleanup: Remove outdated decimils to/from iu defines and conversion functions (decimils are no more in use since a long time).
Remove convert_from_iu.h file, only used for one define, and containing brokenand duplicate defines. Only convert_to_biu.h is now used.
2016-06-05 13:49:25 +02:00
jean-pierre charras 2b459acfe9 Fix incorrect handling of Aperture Macros, especially when using exposure OFF in macros.
Aperture macro shapes are now drawn using polygons.
2016-06-03 18:42:24 +02:00
jean-pierre charras 55a44f3cfc Gerbview: rename a file with a better name. Add a test file to test aperture macros which include a negative object (currently incorrectly displayed by Gerbview) 2016-06-03 09:05:25 +02:00
jean-pierre charras 368bd1477b Gerbview: serious code cleanup (with the serious help of Mark Roszko's work on Gerbview) 2016-06-02 11:30:39 +02:00
Simon Richter 96ec9db5d6 Add missing C++ stdlib headers
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
2016-05-28 12:46:29 -04:00
jean-pierre charras 2ff1403212 Gerbview: fix a crash when clicking on a gbr item not on active layer. 2016-05-27 11:27:28 +02:00
jean-pierre charras 4d82be5f0e Gerbview: more code refactoring: remove useless files. Fix a few issues or bugs. 2016-05-27 10:20:17 +02:00
jean-pierre charras 25c808b859 Gerbview: fiw a few issues in print dialog 2016-05-26 20:13:53 +02:00
jean-pierre charras 3c0859686b Gerbview: fix a stupid mistake I made in rev 6829 (crash when reading a gbr file). 3d path config dialog: make it resizable. 2016-05-26 18:58:32 +02:00
jean-pierre charras 54b6f875a6 Gerbview: better BestZoom calculation 2016-05-26 14:42:27 +02:00
jean-pierre charras 130c6e3639 Gerbview: more code refactoring. 2016-05-26 13:57:43 +02:00
jean-pierre charras 3b379787bc Gerbview: move gerber_file_image_list to a separate file 2016-05-26 09:50:49 +02:00
jean-pierre charras 8c8a1238f1 Gerbview: more code cleanup. Rename class GERBER_IMAGE GERBER_FILE_IMAGE, because it handles the gerber image and the gerber file info. 2016-05-25 16:48:38 +02:00
jean-pierre charras 1c21410f1f Gerbview: code cleanup (with the help of Mark Roszko's work) 2016-05-25 11:45:55 +02:00
jean-pierre charras 75c551f305 Gerbview: accept embedded tool definition (i.e. select tool and define it in the same line, outside the header). A few minor other fixes. 2016-05-24 17:56:52 +02:00
jean-pierre charras ac734ab54b Gerbview: Avoid too long filenames in layer manager: the filename length is clamped to 30 chars. 2016-05-23 20:30:23 +02:00
jean-pierre charras dbb78db7ef Gerbview: Shows now in the Layer manager the filename of gerber or drill files loaded.
A fex minor compil warnng fixes
2016-05-23 17:47:16 +02:00
Chris Pavlina 0f407a756c Pull existing settings into Doxygen module 2016-05-12 15:45:47 -04:00
Chris Pavlina 540275fe44 OS X: Disable full-screen cursor
This feature cannot work reliably for reasons explained in lp:1463505. Remove
the option on OS X builds and force cursor to the small one.

https://bugs.launchpad.net/kicad/+bug/1463505

> Bernhard Stegmaier (stegmaier) wrote on 2016-01-14:
>
> As far as I see from the code this is no bug but done on intention.
>
> The reason probably is that on OSX in the legacy canvas you don't have the
> XOR-drawing as on other platforms. To the best of my knowledge, this would
> mean that on every mouse move you would have to repaint the whole window just
> to get rid of the "old" cross.
>
> So, I would say this is a clear "won't fix".
> We could think of just removing/disabling the button in the legacy canvas.
2016-05-10 23:33:24 -04:00
jean-pierre charras 63decd70e6 Minor fixes: Fix a few shadowed local variables, and deprecated warnings is a few dialogs generated by wxFormbuilder (using a very recent wxFormbuilder version, after apr 25, 2016) 2016-05-06 17:15:30 +02:00
jean-pierre charras 8c76b92fa9 Fix a few shadowed local vars which make the code not so easy to analyze. 2016-04-29 13:10:31 +02:00
Simon Wells 145cd47d5c Move copy version information code to about dialog. 2016-03-11 11:40:24 -05:00
jean-pierre charras 99e81aeb9c Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions.
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.
2016-03-11 13:08:34 +01:00
Chris Pavlina c7fecfa69e Fix character encoding of two source files
These had quotes and dashes from Windows-1252, replaced with ASCII
2016-03-01 09:39:17 -05:00
Simon Wells 4d2a05856f Minor CMake configuration file fixes.
* Move add_directory()s in main CMakeList.txt after all find_package()
  macros are run so all flags in the main CMakeList.txt are propagated
  to the sub-folder CMakeList.txt files.
* Remove commented out include of config.h
* Make the link maps only build on linux as -${TO_LINKER},-cref
  -${TO_LINKER},-Map=blah just gives warnings on osx w/ clang
* Make the link maps only build with flag -DKICAD_MAKE_LINK_MAPS is
  defined during CMake configuration as they are highly specific.
* Moved the code for setting link maps into the main CMakeList.txt
  file to avoid duplication.
* Removed -D__ASSERTMACRO__ from osx as its no longer needed
* Removed a couple of other OSX only things that wouldn't work anyway
* Moved set (BU_CHMOD_BUNDLE_ITEMS) to the main CMakeList.txt as
  otherwise it would only work for the KiCad build not the other
  applications
* Made KICAD_SCRIPTING_MODULES enable KICAD_SCRIPTING as currently if
  you have modules enabled without the scripting base it will on build.
  This could be changed to a fatal error saying you need to also enable
  scripting but it seems unnecessary.
* Removed duplication of pcbnew.py install code under modules and
  scripting since you can't have modules without scripting now
2016-02-29 14:08:03 -05:00
Simon Wells 8994bd1041 Remove redundant file
Function is provided by events_called_functions.cpp
2016-02-28 11:29:47 -05:00
Bernhard Stegmaier f8abe9c191 Add support for optional touchpad panning. 2016-02-24 14:53:02 -05:00
jean-pierre charras 90d6e7568e Gerbview: fix Bug #1511654 (incorrect rendering of some filled polygons in some Gerber files) 2016-02-15 14:16:49 +01:00
Simon Richter 23e8c3ebf3 Executable icon resource build configuration fixes.
* The resource setting for bitmap2component is too late in the CMakeLists.txt,
  and is being ignored. Bitmap2component does not have an icon resource on
  Windows.  Moving the entire section resolves the issue.
* The other programs only have the mingw special case listed, not the generic
  declaration for the resource file so added them.
2016-01-28 11:53:24 -05:00
jean-pierre charras 731a87db25 Fix Bug #1536427 ("User (Custom)" size selection in"Page Settings" issue in non English languages).
Remove also a no more in use code
2016-01-21 11:15:13 +01:00
Chris Pavlina c490e7dd06 Fix typing problems with GR_KB_* constants 2016-01-20 07:11:17 -05:00
Simon Richter ff4febc7a8 Clarify atan2 overloads
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.
2016-01-17 10:59:24 -05:00
Simon Wells 96918d4a8a Changed the bundle identifier to org.kicad-pcb.<app> to follow the kicad domain name 2015-10-30 08:43:04 +13:00
jean-pierre charras 014f0eb61f Gerber file X2 attribute: Change the attribute Project Id key word from .TF.JobId to .TF.ProjectId, due to a change between the draft Gerber file format specif and a the final specifs (Revision 2015.08).
Remove a few wxCHECK_VERSION conditional compilation, now useless.
2015-10-14 09:20:28 +02:00
Wayne Stambaugh 74f00d4027 Minor string and coding policy fixes.
* Make the about dialog help string consistent across all menus.
* Improve print preview window and print initialization error messages.
* The usual smattering of coding policy fixes.
2015-10-08 09:52:03 -04:00
Baranovskiy Konstantin 50d8195623 Yet another help menu unification fix. 2015-09-30 10:05:07 -04:00
Wayne Stambaugh 78dc14c078 GerbView: fix path bug due to quoted command paramaters.
* It appears the wxApp leaves the trailing double quote when handling a quoted parameter list
  that was causing the project path passed from KiCad to have a trailing double quote which caused
  a file read error.
* Remvoe all comments from source file gerbview/gerbview_frame.cpp.
* Remove unused and empty function GERBVIEW_FRAME::SetAllVisibles().
* Add path paramters to KiCad executable launcher so we can see the full command string.
2015-09-25 19:34:57 -04:00
Simon Wells 3ef7df3be5 More help menu unification fixes. 2015-09-25 18:22:54 -04:00
Wayne Stambaugh f98ddbe33d Missed file update from previous commit. 2015-09-25 15:41:14 -04:00
Wayne Stambaugh a6a9d8eedf Default and most recently used path fixes. (fixes: 1494210)
* 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.
2015-09-25 15:38:09 -04:00
Simon Wells a285aead3f Fixed order of icons in help menu for gerbview and pagelayout-editor 2015-09-26 05:58:50 +12:00
Simon Wells c0d9fc1b5c Changed about menu items to just say About Kicad as its a common about dialog across the project 2015-09-24 06:59:31 +12:00
Simon Wells bb286d52b1 Created handlers for getting started menu items in gerbview and pl_editor 2015-09-24 06:43:40 +12:00
Simon Wells 1b26ca59b1 Added getting started to the remaining menus and fixed the icons 2015-09-24 06:29:21 +12:00
Simon Wells 58d0abb23a Made help menu items consistent 2015-09-24 04:47:34 +12:00
Simon Wells f88140c95d Fixed RS274X image rotation parsing.
If the image was being rotated by a valid amount but not 270 degrees due to the if statements it would already report that there was an invalid value.

Also due to the strnicmp only checking the first 2 characters which was valid for 0* but not the rest of the numbers, some values would be able to work that shouldn't
2015-09-09 00:21:31 +12:00
jean-pierre charras bb3dc5771c Pcbnew: Fpid parser: Fix crash when reading a .kicad_pcb file containing a valid fpid with a revision value.
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.
2015-08-23 14:35:49 +02:00