Commit Graph

1886 Commits

Author SHA1 Message Date
Miguel Angel Ajo 55c0eafd6f merged testing branch 2012-04-14 23:18:27 +02:00
Wayne Stambaugh 57d75a75a8 More internal unit improvements.
* Move all convert from internal to user units functions into separate file.
* Remove internal units parameter from all moved conversion functions.
* Revise all source code that calls the moved conversion functions.
* Compile these conversion routines separately for the appropriate pcb or
  schematic internal units.
* Move internal units specific status bar update code into the appropriate
  application for updating the status bar.
* Move millimeter user units rounding function to common.cpp.
2012-04-13 14:51:24 -04:00
Wayne Stambaugh bed96be750 Internal unit improvements and Pcbnew s-expression file format changes.
* Move EDA_TEXT object into separate header and source file.
* Compile EDA_TEXT class separately for BOARD_ITEM and SCH_ITEM units.
* Compile PAGE_INFO  class separately for BOARD_ITEM and SCH_ITEM units.
* Minor formatting tweaks to Pcbnew s-expression file.
* Move internal unit formatting functions into BOARD_ITEM and SCH_ITEM.
2012-04-12 17:31:31 -04:00
Dick Hollenbeck b4bb924eab fix comment 2012-04-11 18:51:16 -05:00
Dick Hollenbeck 1121b9cc3c * Coding standards, private functions are lowercase.
* Fix bug in PCBNEW dialog_pad_properties.cpp that I introduced several days ago.
  The m_Master_Pad stuff is stored in the PCB_EDIT_FRAME's BOARD_DESIGN_SETTINGS,
  not in the FOOTPRINT_EDIT_FRAME's BOARD_DESIGN_SETTINGS (i.e. not stored in 
  the module editor's dummy BOARD).  Now we properly initialize the
  DIALOG_PAD_PROPERTIES::m_Pad_Master reference to the correct master pad
  dope, instead of to the dummy module BOARD's master pad, which is not used.
2012-04-11 18:30:06 -05:00
jean-pierre charras f0dc54340d All: new middle mouse pan feature, from lajos kamocsay (and jp charras for some enhancements).
If enable in preference menu, allow the pan with drag mouse with middle button down.
both unlimited and limited pan is allowed.
2012-04-11 20:54:20 +02:00
Dick Hollenbeck a0c80381f2 improve comments in specctra stuff 2012-04-11 09:49:11 -05:00
jean-pierre charras 36dac0c14d Pcbnew nanometer: fix hatch lines issue in polyline.cpp
Some minor code cleaning.
2012-04-11 11:47:57 +02:00
Dick Hollenbeck e730219b31 add PCNBEW nanometer support to specctra round-tripper, use micro-meters to do it. 2012-04-10 11:28:26 -05:00
Dick Hollenbeck 6652845683 remove #include <auto_ptr.h> 2012-04-09 08:56:30 -05:00
jean-pierre charras 8f62c6aa05 Move AddMenuItem inline functions outside wxstruct.h in a new file (menu_helpers.h)
Enhancements in AddMenuItem (that accepts now a menu type)
Partial use of the Edwin van den Oetelaar's patch (patch not fully working or correct)
2012-04-09 11:16:47 +02:00
Miguel Angel Ajo a201522f6b lajos kamocsay compilation patches 2012-04-09 08:53:24 +02:00
Miguel Angel Ajo 0cdc5c59ab detect building status of the swig .py file (on parallel make builds). Fix unit conversion returns (From_xxx) to integer, what's all the wxPoint/wxRect/wx.. expect. Extended createPcb.py example 2012-04-09 08:19:57 +02:00
Dick Hollenbeck 9e980d916f Add DMils2iu() for scaling deci-mils to internal units.
Instrument saveNETCLASS() with fmtBIU().
Can now round trip to mm board file using LEGACY_PLUGIN in DEBUG build.
2012-04-08 18:32:32 -05:00
Dick Hollenbeck 149f6d807d *) Change LEGACY_PLUGIN to respect saving and loading of UNDEFINED_DRILL_DIAMETER.
*) Allow building without defining 
        USE_NEW_PCBNEW_LOAD & USE_NEW_PCBNEW_SAVE.
	pcbnew/files.cpp would not link.
2012-04-08 14:01:54 -05:00
Miguel Angel Ajo 946ddbaa08 Fix units.i and add some extra wrappers wxSizeMM, wxSizeMils wxRectMM wxRectMils 2012-04-08 16:59:12 +02:00
Miguel Angel Ajo be15057977 Fixed wxSize bug, wxPoint(double,double) support, units. Fixed GetBoard wasn't accessible at every build. Extended example for board creation (now adds pads). Also fixed the _pcbnew loading from pcbnew which should only go to the internal _pcbnew and not the _pcbnew.so/dso. Right installation path for _pcbnew.so (in linux only) 2012-04-08 16:25:49 +02:00
Wayne Stambaugh 9c16a218c0 Pcbnew s-expression file format changes.
* Save dialog now supports saving boards to new file format.
* Add CMake option to build s-expression file save.
* Add check to main CMakeList.txt file to make sure nanometers are
  enables when the new file format is built.
* Minor tweaks to object format functions for improved output.
* Rename kicad_plugin.h/cpp to legacy_plugin.h/cpp.
2012-04-07 14:05:56 -04:00
jean-pierre charras d739f03c5f Remove old xpm icons files 2012-04-07 13:09:57 +02:00
Miguel Angel Ajo 7c8bfab5ca TODO.txt updated 2012-04-06 22:42:39 +02:00
Miguel Angel Ajo 485ec24f61 Add method for MODULE in python that takes care of memory handling 2012-04-06 22:38:32 +02:00
Miguel Angel Ajo b54acf607a example for pcb creation in scripting 2012-04-06 21:48:00 +02:00
Miguel Angel Ajo 96c1a50e00 BOARD::Add now it's wrapped in python and clears the .thisown flag on python to avoid GC from deleting the object later (BOARD will do) 2012-04-06 21:46:45 +02:00
Dick Hollenbeck 1effb1fefc USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE are enabled by default.
This uses the new LEGACY_PLUGIN, so we can force more usage & testing of it
before ioascii.cpp and item_io.cpp are deleted, along with 
BOARD_ITEM::Save() and BOARD_ITEM::ReadDescr() associated functions.
2012-04-06 14:31:28 -05:00
Miguel Angel Ajo 173b869dcb Compilation cleanup, TODO.txt update about library creation 2012-04-06 20:13:03 +02:00
jean-pierre charras 571bca200b Pcbnew: fix Bug #975014 2012-04-06 20:03:16 +02:00
Miguel Angel Ajo 3f761c890c Added wxRect and wxSize wrappers to wx.i 2012-04-05 23:41:45 +02:00
Dick Hollenbeck f8490ff4af Remove g_PcbPlotOptions, use wxformbuilder to subclass DIALOG_SHIM on several dialogs 2012-04-05 13:27:56 -05:00
jean-pierre charras 7ce97878e8 pcb_calculator: enhancement in Regulators page dialog:
* support for 3 terminal regulators
* add a data file management to store parameters for regulators ( name, vref value, Iadj value, type)
Needs some refinements, but it is already very useable.

 Commit dialog page setting patch from Alexander Zakamaldin
2012-04-02 20:11:00 +02:00
Wayne Stambaugh d7feb9ab45 Initial Pcbnew s-expression file format commit.
* Add s-expression Format() function to all objects derived from
  BOARD_ITEM.
* Add s-expression Format() function to base objects as required.
* Add functions to convert coordinates from base internal units
  (nanometers) to millimeter string for writing to s-expression
  file.
* Add temporary dummy conversion functions to prevent link errors
  until schematic and board object and action code can be separated
  into DSO/DLL.
* Add CMake build option to build Pcbnew with nanometer internal
  units.
2012-04-01 16:51:56 -04:00
Wayne Stambaugh 45445dd88f Minor code improvements and coding policy fixes.
* BLOCK_SELECTOR class is not longer derived from EDA_ITEM.
* Encapsulate BLOCK_SELECTOR class member variables and add access methods.
* Move HandleBlockBegin() function from block_commande.cpp to drawframe.cpp.
* Remove virtual methods from top level derived objects per future
  coding policy change.
* Remove Doxygen copydoc statement from objects derived from EDA_ITEM
  since the comments are automatically copied to the derived object.
* Removed copy and pasted Doxygen comments from objects derived from
  EDA_ITEM.
2012-03-26 19:47:08 -04:00
Alexander Zakamaldin 625e964c8d Alexander's patches, with refinements 2012-03-26 16:45:05 -05:00
jean-pierre charras cf9864766b class EDA_RECT: is no more derived from EDA_ITEM, just from EDA_RECT (reason: does not use anything in EDA_ITEM)
issue in cast to wxRect fixed (EDA_RECT accepts negative size, but not wxRect, so the wxRectcast  is normalized now).
This fixes some bugs.
A minor other bug fix in Pcbnew.
2012-03-24 15:25:30 +01:00
Dick Hollenbeck b01bcda079 Backout my usage of DIALOG_EXTEND_WITH_SHIM in favor of wxFormbuilder's
subclass DIALOG_SHIM support.
Tried dialog_drc but it has nesting problems due to use of DRCLISTBOX, which
needs to be put into its own header file to untangle.
2012-03-22 13:36:20 -05:00
jean-pierre charras fda20d28d8 Pcbnew: Allows an offset for SMD type (and CONNECTOR type) pads. 2012-03-20 21:22:38 +01:00
jean-pierre charras f49c27798e Update some icons with new icons from Fabrizio Tappero.
Remove 2 duplicate icons.
Minor cosmetic enhancements and fixes in popup menus.
2012-03-20 15:17:58 +01:00
Miguel Angel Ajo 6d643f70b5 Fixed Board.Save, listPcb.py +x and updated TODO.txt 2012-03-20 07:34:23 +01:00
Dick Hollenbeck df494fc83e start toying with DIALOG_SHIM 2012-03-19 15:57:19 -05:00
Dick Hollenbeck 87aa22f13f quiet warnings, add Clamp() 2012-03-19 11:29:24 -05:00
Miguel Angel Ajo cd93e14d7d fixed DEBUG build dependency... 2012-03-19 16:39:50 +01:00
Miguel Angel Ajo 9ebe983eaa * cleanups: board.i board_item.i separated from pcbnew.i
* dlist.i empty list fixed (Segfault)
* units.i: FromMM FromMils ToMM ToMils
* added a little example (listPcb.py) that shows most items in a board
2012-03-19 12:21:29 +01:00
Miguel Angel Ajo 9398eb9767 std::vector and std::string items
DLIST iterator code, now we can do:

    for module in pcb.m_Modules:
    	print module.GetReference()

instead of:

    module = pcb.m_Modules

    while module:
	print module.GetReference()
	module = module.Next()

or even:
    module_list = list(pcb.m_Modules)
2012-03-19 09:36:38 +01:00
Miguel Angel Ajo 7a25604161 fixed ident tabs 2012-03-19 08:40:43 +01:00
Miguel Angel Ajo b28dbd31c3 Cast() method to cast down classes from BOARD_ITEM to all childs 2012-03-18 22:35:51 +01:00
Miguel Angel Ajo c0be31aeda Fixed some indent, and added some conditional compiles on pcbnew.cpp 2012-03-18 10:09:51 +01:00
Miguel Angel Ajo 06c570bab3 * More cleanup (common wrappers moved to scripting, instead of pcbnew/scripting)
* Added a first test 'testLoadSave.py'
2012-03-17 18:30:03 +01:00
Miguel Angel Ajo f422350605 pcbnew_scripting_helpers.cpp/h to handle generic scripting tools
CMakeLists.txt options to build scripting or scripting modules
2012-03-17 16:17:13 +01:00
Wayne Stambaugh 058e17edf7 Minor code and Doxygen comment improvements.
* Remove double Clone() function calls from all classes derived from
  EDA_ITEM.
* Lots of Doxygen comment warning fixes.
2012-03-17 10:39:27 -04:00
Joe Ferner ffbbd64c73 Joe Ferner's merge 2012-03-16 22:01:53 -05:00
Dick Hollenbeck 5080d4cc3e cleanups 2012-03-16 21:11:44 -05:00