Commit Graph

82 Commits

Author SHA1 Message Date
Wayne Stambaugh 652b969193 GTK+ file dialog wildcard improvements.
The GTK+ file dialog is case sensitive however it does support regular
expressions.  Most of the file dialog wildcards are lower case so only
files with the lower case extensions will show up in the file dialog.
This code adds a method to convert file extensions of any case to the
appropriate (sch -> [sS][cC][hH]) regular expression on GTK+ builds so
all file extension case combinations will show up in the file dialog.

A note to developers: make sure to add a file extension when setting
when setting the default file argument.  If you do don't set an
extension, the GTK+ file dialog will happily append the regular
expression as the file extension which is surely not what you want.

There are still a few known places (mostly gerbview) where there are
some complex wildcard code that has not been converted.

Fixes lp:1720542

https://bugs.launchpad.net/kicad/+bug/1720542
2017-11-11 19:32:26 -05:00
Jon Evans e5df4304a6 Minor tweaks to GerbView for performance 2017-09-25 13:39:38 +02:00
Jon Evans 915e51e1f0 GerbView GAL support part 1: changes to existing files
- New GAL draw layers for GerbView
- Improved bounding boxes for Gerber shapes
- Switched to use of SHAPE_POLY_SET for polygons
- Add GAL methods to support selection and rendering
- Add GUI support of editing GAL options
- Rename get/setActiveLayer to Get/SetActiveLayer to match convention
2017-09-25 13:35:01 +02:00
jean-pierre charras 50164e9968 Add Gerber job file writer in Pcbnew, and a basic reader in Gerbview. Currently disabled
Fix also very minor issues in Gerbview
2017-08-30 11:04:33 +02:00
jean-pierre charras b8183a1aa5 Fix Coverity warnings 2017-05-30 09:07:18 +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
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
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 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
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 8c76b92fa9 Fix a few shadowed local vars which make the code not so easy to analyze. 2016-04-29 13:10:31 +02: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
jean-pierre charras f3765a32d8 Fix minor issues. Fix some outdated and broken BOM python scripts. Add info in BOM python scripts.
BOM dialog: remove a not very useful button, and merge its function with an other (not perfect, need more work)
Add message box to show info added in BOM python scripts (See scripts/bom-in-python/README-bom.txt about this info)
2014-12-03 17:22:06 +01:00
jean-pierre charras 555ce68efe Gerbview: Add support for recent File Format Attribute metadata, both for X2 Gerber file format and X1 (R274X) format.
Pcbnew already uses this attribute when creating Gerber files.
Because Gerber files using this attribute identify the board layers stackup, Gerbview (if this attribute is defined) can sort gerber images stach up like the board.
(in layer manager, just right click to access to the sort menu)
2014-11-22 12:52:57 +01:00
jean-pierre charras a82127277c Gerbview: fix scaling error in x.6 file format. Minor cleaning code.
Better separation between Pcbnew code and Gerber code.
Update export to Pcb code (uses now the version 4  kicad_pcb file format).
2014-07-14 20:59:41 +02:00
jean-pierre charras b50872edca Gerber output: Some changes after evaluation of Gerber files by Ucamco (the manager of GERBER format):
* default file ext is now .gbr (the "official extension")
* some outdated commands remoded.
* mainly use mm and 4.5 format instead of inches and 3.4 format. this is mandatory,
  because the 3.4 format (comming from old pcbned internal units) creates truncations in coordinates.
  (with serious issues in polygons which can appear self-intersecting afer truncation)
2014-06-30 12:00:21 +02:00
jean-pierre charras 013296cb1a Make gerbview compilable and working (does not use now layers and layer masks from Pcbnew).
Export to Pcbnew is broken, but it is a very rarely used feature. It will be fixed later.
2014-06-27 19:07:42 +02:00
jean-pierre charras cfa67aa218 Pcbnew: plot dialog: remove obscure and useless option about texts which are not value or reference.
cosmetic enhancement in dialog.
page layout: fix bug Bug #1320839 (canvas refresh countinously called when moving an item)
2014-05-19 20:24:07 +02:00
jean-pierre charras 820153c7d4 Gerbview: remove fully outdated code (about reading DCode files) and fix erroneous comments. 2013-06-28 12:49:43 +02:00
Lorenzo Marcantonio 9fd79dfa91 Implemented the LAYER_NUM typedef (LAYER was already taken as a class name...) to represent a layer number. 2013-03-31 15:27:46 +02:00
Lorenzo Marcantonio fef8347176 Script plotting patch 2012-08-29 18:59:50 +02:00
jean-pierre charras ba689c10e3 Kicad project manager: add .cmp, .drl .pos and .rpt files management.
Code cleaning and other minor fixes.
2012-02-16 21:03:33 +01:00
Dick Hollenbeck b8a0ab4c52 switch to <> for includes from "" per conversation with Jean-Pierre and Wayne, adjust search paths 2012-01-22 22:33:36 -06:00
Wayne Stambaugh c2e5fcaec8 More encapsulation improvements.
* EDA_DRAW_FRAME completely encapsulated.
* Encapsulate the the low hanging fruit in EDA_DRAW_PANEL.
2011-12-22 08:28:11 -05:00
Wayne Stambaugh 4b853dedb4 Application name capitalization fixes.
* Correct all user strings and comments for the correct capitalization of
  application names according to JP.  They are KiCad, Pcbnew, CvPcb,
  Eeschema, and GerbView.
* Add a note the the user interface policy about the correct capitalization.
2011-09-30 14:15:37 -04:00
Wayne Stambaugh b9b341dce2 PCB common library global variable removal and other minor fixes.
* Move auto save time global variables into PCB_EDIT_FRAME object.
* Move footprint library name list global variable int PCB_EDIT_FRAME
  object.
* Improve library back up and temporary file error message strings and make
  them translatable.
* PCBNew string unification.
* Translate French code names and comments.
* Coding style policy and Doxygen comment fixes.
2011-09-26 16:32:56 -04:00
Wayne Stambaugh edd35b4e90 PCB common library header rationalization.
* All header files used to create the PCB common library now compile as
  stand alone code.  This prevents the need to define them in a specific
  order to make source code compile properly.  It should also now be
  possible to relocate the source code to build the common PCB library
  to a separate folder.
2011-09-23 09:57:12 -04:00
jean-pierre charras 3b55948db2 fix an issue created by commit 2954. Gerbview: display now an indicator of layers in use. minor code cleanup. 2011-04-05 19:49:14 +02:00
jean-pierre charras 59534f519c Gerbview: Add drill file history and minor enhancements. 2011-03-17 20:14:45 +01:00
jean-pierre charras ffbce6de84 Gerbview: Added: read Excellon files created by Pcbnew. The full Excellon command set is not supported, but drill files created by Pcbnew are supported. 2011-03-16 21:51:20 +01:00
jean-pierre charras a97f5c2530 Gerbview: code cleanup and very minor fix. 2011-03-14 22:19:13 +01:00
jean-pierre charras 81509a1160 Gerbview: code cleanup and a minoe enhancement. Kicad: minor code cleanup 2011-03-13 19:03:43 +01:00
jean-pierre charras f6669b7845 Gerbview: code cleanup: remove dead code and obsolete options. Coding policy class naming fixes.
others: fix minor issues.
2011-03-12 10:50:21 +01:00
Wayne Stambaugh bd99012ad0 Fix load gerber file path bug, fixes lp:712104. 2011-03-02 10:24:39 -05:00
jean-pierre charras ec400bf7c7 Eeschema, Pcbnew: fix minor issues about mouse cursor position, when loading files or entering sheets. 2011-03-01 19:45:21 +01:00
Wayne Stambaugh c02d90e9a7 Use wxUpdateUIEvent in CVPcb and other minor changes.
* CVPcb now uses wxUpdateUIEvent instead of set toolbars.
* Removed duplicate event handlers in CVPcb that were factored into
  EDA_DRAW_FRAME.
* Fix definition of GeneralControle() in CVPcb that prevented it from being
  called.
* Remove rarely used and scary refresh code GeneralControle() method in all
  main frame windows.
* Factor zoom menu and tool bar command IDs down to EDA_DRAW_FRAME.
2011-02-21 16:07:00 -05:00
Wayne Stambaugh bdca3c5efb All control state handling is now performed in wxUpdateUIEvent handlers.
* Old control state handling code completely removed in all applications.
* Factor common control state handlers into EDA_DRAW_FRAME.
* Replaced EDA_ITEM test for newness with IsNew() method.
* Factor vertical right toolbar command handlers out of giant edit command
  switch statement in EESchema and PCBNew.
2011-02-21 08:54:29 -05:00
Wayne Stambaugh e01f89670b GerbView rendering bug fix and other minor improvements.
* Fix rendering bug in GerbView caused by wxDC scaling change caused by
  setting the wxDC clipping region.
* Eliminate the need to have optional background erasing as the change
  above fixed that problem as well.
* Default cursor handling improvements.
2011-02-08 09:48:38 -05:00
Wayne Stambaugh d657b43052 Use wxDC for all coordinate manipulations.
* Remove all occurrences if #ifdef USE_WX_ZOOM and all associated code within
  the #else/#endif block ( old zoom code ).
* Removed the build option for USE_WX_ZOOM from CMakeList.txt and config.h.in.
* Removed all scaling code in base screen object.
* Fixed buffered paint and buffered client DC on Windows.  Buffering works
  properly on Linux and Windows.
* Modified kicad_device_context.h to automatically uses buffering on platforms
  where double buffering is supported natively.
* Remove all of the scaled versions of the drawing functions in gr_basic.cpp
  and any support code.
* Removed all traces of ActiveScreen global variable from eeschema and
  gerbview.
* Renamed Recadre_Trace to RedrawScreen in draw frame object.
* Renamed PostDirtyRect to RefreshDrawingRect in draw panel object.
* Lots of code cleaning an Doxygen comment improvements.
2011-01-30 17:22:38 -05:00
Wayne Stambaugh e560573c5e Schematic object encapsulation and other minor improvements.
* Encapsulate file name member of base screen object.
* Encapsulate associated screen member of schematic sheet object.
* Create add screen method to schematic sheet object to simplify setting
  the associated screen.
* Move the change file name code in the schematic sheet object to the edit
  sheet method in the schematic editor frame object to eliminate message
  dialogs.
* Improve reference counting in schematic screen object.
* Add helper type definitions for changing schematic object storage to C++
  containers.
2011-01-20 11:34:57 -05:00
jean-pierre charras b8eba35cba Gerbview: remove flicker when refresh screen, and loadind files. Fix very minor bugs.
Minor cosmetic enhancements.
commint forgoten files in boost lib.
2010-12-17 21:34:29 +01:00
jean-pierre charras 8faf1e7296 Gerbview:
Added: in file dialog, multiple file selection.
    Added: Draw mode selector (in left toolbar):
        Raw mode:
            a Gerber image is drawn on screen without buffering.
            Artifacts happen if there are negative items drawn, if more than one  Gerber file is shown.
        Stacked mode:
            each Geber image is drawn in a buffer and after drawn on screen
            No artifact with negative items.
            Each Gerber image covers previous images.
        OR mode (transparency mode):
            each Geber image is drawn in a buffer and after drawn on screen
            No artifact with negative items.
            Each Gerber image is "ORed" with previous images, like in Pcbnew.
    Try to optimize Draw function in buffered modes.
        (Useful for PC that have problems with "blit" graphic function)
    Fix minor issues.
2010-12-15 21:15:24 +01:00
jean-pierre charras bfeaeafe50 Gerbview: enhancements. 2010-10-17 18:42:06 +02:00
jean-pierre charras 035979d39f More work on Gerbview: code cleaning and cosmetic enhancements. 2010-10-06 19:28:07 +02:00
jean-pierre charras 0687921fa9 Gerbview: display now an error report after loading a gerber file. 2010-10-05 21:54:27 +02:00
jean-pierre charras 1ab68d8fb8 fixed very minor things. 2010-06-19 12:58:50 +02:00