Commit Graph

380 Commits

Author SHA1 Message Date
Dick Hollenbeck 205aa43379 Fix FP_LIB_TABLE::ROW operator=(), was not copying "description" field.
Remove tooltips from fp_lib_table wxGrid, were annoying and munging wxGrid's grid.
Change initial size of DIALOG_FP_LIB_TABLE.
2013-10-04 10:58:32 -05:00
Dick Hollenbeck e45ed220f9 DIALOG_FP_LIB_TABLE does not use wxSplitterWindow, it would not obey.
Paste popup menu in this dialog now allows pasting a (fp_lib_table)
s-expression element holding (lib) elements.  This provides an 
opportunity for GITHUB library publishers to put the table description
into their README.md file as a (fp_lib_table) element where it can
be quickly copied to clipboard and pasted into the fp lib table dialog.
This is a paste operation, and overwrites from the initial cursor position.
2013-10-03 17:12:56 -05:00
Dick Hollenbeck 65b0343be1 fix: https://answers.launchpad.net/kicad/+question/233824 2013-10-02 15:25:44 -05:00
Dick Hollenbeck 8c87d71e74 Make environment variable wxGrid/table read-only in the fp lib table dialog.
Fix throwing of IO_ERROR in plugin.cpp by converting function name to wxString.GetData().
Switch to const PROPERTIES* in GITHUB PLUGIN functions.
2013-09-30 16:26:49 -05:00
jean-pierre charras a0fbe422c7 Eeschema: Rework on netlist generator: code cleaning and enhancement.
Mainly, fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.

Netlist generation code still needs some code enhancement (mainly removing the global g_NetObjectslist variable).
2013-09-25 21:37:28 +02:00
Dick Hollenbeck f72394cc6b Make PLUGIN::Footprint*() API functions take 'const' PROPERTIES*.
Add const PROPERTIES* to FootprintDelete().
Add {Get,Set}Properties() to FP_LIB_TABLE::ROW.
Touch up fp table dialog.
2013-09-25 14:17:06 -05:00
jean-pierre charras daeeee5617 Eeschema: Rework on netlist generator: code clenenig and enhancement.
Fix an annoying issue about not named nets:
now, these nets are named from the component references and pin names which are connected.
therefore, unless the net or the footprint references are modified, the net name is not modified between 2 netlist calculations.
2013-09-25 21:09:57 +02:00
Wayne Stambaugh 4afae65110 Fix debug build error in pcbnew/dialogs_fp_lib_table.cpp. 2013-09-25 09:51:54 -04:00
Dick Hollenbeck 74ce031e62 Set PROPERTIES* into FP_LIB_TABLE::ROW, which is a parsed (binary) form of the 'options'.
Write parser and formatter for options.  Write dialog verification used before saving
FP_LIB_TABLEs, triggered from OK button in table editor.
Switch PROPERTY's value column to std::string from wxString.
Add event handler to fp lib table dialog for upcoming options dialog.
2013-09-24 16:23:13 -05:00
Dick Hollenbeck 153aee8eda GITHUB_PLUGIN now works and can be used under Linux immediately.
Other platforms to follow as volunteers test support and get openssl in 
place.
2013-09-21 22:57:40 -05:00
Wayne Stambaugh 0f4ba09545 Pcbnew footprint library table fixes.
* Make footprint viewer work properly with library table.
* Fix bug in Eagle plugin when enumerating footprints.
* Add missing P-CAD plugin from footprint library table editing dialog.
* Fix bug in FOOTPRINT_INFO::LoadLibraries when error occur loading footprints
  from libraries.
2013-09-21 20:28:02 -04:00
jean-pierre charras 0ae31f3ecb Pcbnew: better dialogs to select the active layer or a layer pair. Add an option (hotkey+popup menu) to place a via and select the new active layer
(useful for boards having more than 2 layers)
Eeschema:fix compatibility with old schematic files, when they  contain ERC markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc:  fix comments and messages for some drc tests.
Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs)
2013-09-20 12:52:33 +02:00
jean-pierre charras bb39956057 Fix minor bugs in cleanup dialog options and plot solder mask function (thanks to Lorenzo to locate these bugs) 2013-09-18 21:21:11 +02:00
Wayne Stambaugh ce409e3699 CvPcb footprint library table implementation.
* Add code to CvPcb to handle assigning component footprints from the
  footprint library table instead of the search path method.
* Add code to CvPcb to allow editing of the footprint library table.
* CvPcb footprint and component panes display fully qualified FPID names.
* Make CvPcb library pane display footprint library table nicknames instead
  of library file names.
* Add code to FP_LIB_TABLE object to test the paths in the table against the
  list of libraries loaded from the project file.
* Add code to FP_LIB_TABLE to convert assigned footprints in a NETLIST from
  legacy format to footprint library table format.
* Split out COMPONENT_NET, COMPONENT, and NETLIST objects from netlist_reader
  files and create new pcb_netlist files.
* Fix minor wxListView scroll bar sizing issues.
* Add new token and code to save and load FPID nickname in board file.
* Add new token and code to save and load FPID nickname in s-expression net
  list file.
* Add WX_STRING_REPORT object to dump strings to a wxString object.
2013-09-14 16:33:22 -04:00
jean-pierre charras c029dc398b Eeschema: fix compatibility with old schematic files, which can contain markers.
Pcbnew: better test for allowed layers when creating/editing Dimensions and some other Graphic items
Drc: fix comments and messages for some drc tests.
To do: fix issues in active layer selection when creating a track and layer pair selection dialog
2013-09-11 17:30:21 +02:00
Wayne Stambaugh 230c5f8f5a Convert footprint definitions from wxString to FPID.
* Use FPID instead of wxString in MODULE object.
* Use FPID instead of wxString when loading and saving files.
* Use FPID in COMPONENT object.
* Add wxString helper functions and comparison operators to FPID.
* Add fp_lib token to pcb and netlist file formats.
* Add code to load and save FPIDs to pcb file format.
* Fix segfault when deleting invalid footprint library tables in Pcbnew
  in non footprint library table build.
* Fix bug when counting the number of mod files in
  EDA_APP::SetFootprintLibTablePath();
2013-09-08 14:31:21 -04:00
jean-pierre charras 36ae78ff94 pcbnew: fix wxWidgets 2.8 compatibility issue (temporary fix, still have a minor cosmetic issue), and add missing file. 2013-09-03 21:37:52 +02:00
jean-pierre charras ede208f3cb Pcbnew: use pcb layer box selector in dialog graphic item properties and pcb text properties. 2013-09-03 14:48:38 +02:00
jean-pierre charras 902e5ccee5 pcb layer box selector: ajust size when modifying the layer names, to show the full name. 2013-09-02 17:26:52 +02:00
jean-pierre charras 684bfad0af Cleaning code for PCB_LAYER_BOX_SELECTOR class, and use it in edit dimension dialog. 2013-09-01 20:38:11 +02:00
jean-pierre charras eb1f89d02e add missing files 2013-08-30 21:37:56 +02:00
jean-pierre charras 90029a4e1f Pcbnew: enhancements for blind/buried vias placement ( separate keys to add a buried via or a through via), and save" blind/buried vias allowed" option in .kicad_pcb file
Minor code cleaning.
Allows compiling under wxMSW-2.8.12, only for test purposes, because there are serious bugs for Kicad under wxWidgets version < 2.9.3.  (compil warning generated for these versions)
2013-08-28 19:32:49 +02:00
jean-pierre charras 90b820a52c Pcbnew: enhancements for blind/buried vias palcement, and save blind/buried vias allowed option in .kicad_pcb file 2013-08-28 18:14:39 +02:00
jean-pierre charras 9af4ea4014 Add pl_editor_doc.icns, from Orson. Fix Bug #1217504 (bad look of Module Properties Dialog, 3D fields).
Add Dick's workaround in plot_board_layers.cpp to try to avoid crash in solder mask calculations, due to a bug in boost::polygon, in resize function.
2013-08-28 09:23:14 +02:00
jean-pierre charras 8cca89ffbe Pcbnew: read netlist enhancements: add option to remove single pads nets, add enforce tests to report non existing netnames in zones.
Fix also some very minor errors in comments.
2013-08-24 10:08:55 +02:00
jean-pierre charras 4428d69a63 Pcbnew: Fix a bug when reading a netlist which forces pcbnew to read lib files to find a footprint even if the right footprint is already loaded (which explains the long time to load netlists)
Netlist dialog: add option to report only most important messages. Useful for large boards.
class REPORTER: add features to allow a basic message filtering (flags to report all/warning/error messages)
Fix Bug #1214599 ( tools are deselected on Move command )
2013-08-23 08:38:57 +02:00
jean-pierre charras d04ab1fe75 Pl_Editor: fix minor issues in multi-lines texts
Others: fix very minor issues.
2013-08-18 17:49:04 +02:00
jean-pierre charras 336d1b23f9 Pcbnew: fix Bug #1211468
Pl_Editor: fix copyright in files. Enhancement when creating new items.
2013-08-13 19:51:22 +02:00
jean-pierre charras e89db97dd4 Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parmeters dialog under Windows, due to an incorrect Printf format. 2013-08-05 15:43:15 +02:00
jean-pierre charras d68c727b0f Pcbnew: add hotkey Z to reset grid origin.
Save grid origin in .kicad_pcb files only if not 0,0 (to keep compatibility with previous versions of pcbnew, mainly the stable version)
Very minor other fixes (set modify flag when grid origin is moved from the dialog grid)
2013-08-03 18:16:57 +02:00
Dick Hollenbeck efb34166ea *) retain grid origin in the BOARD and save it in legacy and kicad board files.
*) add hotkey for setting the grid origin as 'S', in board editor, module editor.
*) re-position the function interface for cursor movement from BASE_SCREEN into
   class EDA_DRAW_FRAME.  This is a prelude to getting rid of BASE_SCREEN or
   splitting it up.
2013-08-03 00:15:23 -05:00
jean-pierre charras 50743cf3ba Initial release of pl_editor, the page layout and title block editor. 2013-07-19 20:27:22 +02:00
Dick Hollenbeck 34e6314a3e dialog information hiding, initial Fit() 2013-07-09 00:48:26 -05:00
jean-pierre charras 781cc00aca Pcbnew: netlist dialog: add silent mode option, and tool tip to the 2 options (dry run and silent mode)
dialog_display_info_HTML_base: derived now from dialog_shim.
2013-06-19 18:11:12 +02:00
Dick Hollenbeck 0f1f0f92f1 downloads-by-cmake now configurable, fix wx2.8 compiler errors 2013-06-05 09:24:03 -05:00
jean-pierre charras 57b30ad254 Pcbnew: Fix Bug #1185556. fix issue about Solder Paste Ratio value which was accepting only one digit in mantissa in 3 dialogs (now 6 digits in all dialogs).
fix potential issue in .kicad_pcb file creation, in some places where a %g or %.16g format was used:
al least under Mingw/gcc4.7.2, the floating number was written using scientific notation, not accepted by the S-expr reader.
2013-05-30 21:32:00 +02:00
Dick Hollenbeck 8ccf0320b4 1) Add "rules" to base of tree for copying into BZR_HOME/rules.
File "rules" has instructional text as comments near top.

2) Convert all text files in repo to LF line ending form.
   Any checkout done with "rules" in play will convert the working
   tree to native line ending, while keeping repo as LF line ending.
2013-05-25 23:36:44 -05:00
Wayne Stambaugh f78497bf4f Decouple PLOT_CONTROLLER from UI dependencies. 2013-05-10 15:22:29 -04:00
Lorenzo Marcantonio d00c83cde9 Migrated the interfaces accepting angles to the double type
The plan goes like this:
- eeschema still uses int in decidegrees
- all the other things internally use double in decidegrees (or radians
  in temporaries)
- in pcbnew UI the unit is *still* int in decidegrees

The idea is to have better precision everywhere while keeping the user with int i
angles. Hopefully, if a fractional angle doesn't come in from the outside, everything
should *look* like an integer angle (unless I forgot something and it broke)

When the time comes, simply updating the UI for allowing doubles from the user should
be enough to get arbitrary angles in pcbnew.
2013-05-05 09:17:48 +02:00
Lorenzo Marcantonio cb49ca5ae2 More int casts to rounding conversions 2013-05-04 13:57:09 +02:00
Lorenzo Marcantonio 78e41187b3 Moved utilities for angles in trigo.h
New conversion routines and sin/cos implementation for angles in decidegrees
2013-05-02 20:06:58 +02:00
jean-pierre charras 4ac7dd5845 3D viewer: Modify yhe way board items shapes are built:
* All items shapes  are converted to polygons.
* Polygons are merged layer by layer (for calculation time reasons,zones are not merged)
* for copper layers, vias and pads holes are substracted from polygons (but, for calculation time reasons,  not inside zones areas).
* the look is better, mainly when displaying the copper thickness
* solder and paste layers are now shown in 3D viewer.
* the code was seriously cleaned (but still needs to be enhanced).
* Note this is a work in progress which needs refinements.
2013-05-01 21:01:14 +02:00
Lorenzo Marcantonio 0e903dba5b Angle and distances cleanup (preparing for angles in doubles)
- Removed spurious int casts (these are truncated anyway and will break
  doubles)

- Applied the Distance, GetLineLength, EuclideanNorm, DEG2RAD, RAD2DEG
  ArcTangente and NORMALIZE* functions where possible

- ArcTangente now returns double and handles the 0,0 case like atan2, so
  it's no longer necessary to check for it before calling

- Small functions in trigo moved as inline
2013-05-01 19:32:36 +02:00
Wayne Stambaugh 4a9681d5c7 More post Pcbnew NETLIST_READER change clean up.
* Fix both legacy and s-expression netlist readers when footprints are
  assigned in the netlist.
* Add some helper functions to NETLIST for detecting when footprints are set
  or not set and when they have been changed while loading the .cmp file.
* Rename a few functions to improve their readability.
2013-04-28 16:20:40 -04:00
Lorenzo Marcantonio 3c5c795c1f Message fix: SMD is an acronym, should be upper case 2013-04-28 15:34:59 +02:00
jean-pierre charras 2080739f76 Pcbbnew: fix bug Bug #1172892 (bad drill map file names, when a point is used inside a board file name) 2013-04-28 11:10:54 +02:00
Wayne Stambaugh 81271ad41a Post Pcbnew NETLIST_READER change clean up.
* Tweak the NETLIST_READER code to allow for component footprint names that
  are not found in any library to generate a warning instead of an error and
  update the board accordingly.
* Don't display undo warning in netlist dialog when dry run option selected.
* Rename netlist_reader_common.cpp to netlist_reader.cpp
* Rename netlist_reader_firstformat.cpp to legacy_netlist_reader.cpp
* Rename netlist_reader_kicad.cpp to kicad_netlist_reader.cpp
* Remove cvpcb/read_write_cmpfile.cpp and move the single function it
  contained into cvframe.cpp
* Remove cvpcb/loadcmp.cpp and move the single function it contained into
  class_DisplayFootprintsFrame.cpp.
* Remove cvpcb/readschematicnetlist.cpp and move the single function it
  contained into cvframe.cpp.
* Remove cvpcb/setvisu.cpp and move the few functions it contained into
  the appropriate source file.
2013-04-26 11:11:52 -04:00
Wayne Stambaugh 61b4f8a9eb Pcbnew NETLIST_READER improvements.
* Create separate NETLIST object to hold contents of netlist files.
* Read entire netlist and footprint link files before making applying
  changes to board.
* Add BOARD::ReplaceNetlist() function to eliminate the calls between the
  NETLIST_READER, PCB_EDIT_FRAME, and BOARD objects.
* Change placement of new components below the center of the current board
  or in the center of the page if the BOARD is empty.
* Add dry run option to netlist dialog to print changes to message control
  without making changes.
* Add button to netlist dialog to allow saving contents of message control
  to a file.
* Eliminate the need to compile netlist_reader_*.cpp in both CvPcb and Pcbnew.
* Add netlist_reader_*.cpp to the pcbcommon library.
* Remove redundant load component link file code from CvPcb.
* Modify CvPcb new to work with the new NETLIST_READER object.
* Add compare() function and < and == operators to FPID object.
* Add REPORTER class to hide an underlying string writing implementation for
  use in low level objects.  Thank you Dick for the idea.
* Lots of minor coding policy, Doxygen comment, and missing license fixes.
2013-04-25 12:29:35 -04:00
jean-pierre charras 00ee6c7b3b Pcbnew, dialog SVG export: Fix Pcbnew crash when opening the dialog. 2013-04-25 09:05:33 +02:00
jean-pierre charras 0d41a7a523 All: fix some issues in messages to translate. Remove fully outdated files 2013-04-10 09:23:20 +02:00