Commit Graph

83 Commits

Author SHA1 Message Date
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
Dick Hollenbeck 1f3b3d681c fix some compiler warnings 2013-04-18 12:03:47 -05:00
Lorenzo Marcantonio 20eaf66d5b Hunted down hardcoded pixel size thresholds for drawing
Dynamic contrast for netname and pin numbers ('halo' text)
Handle netname drawing even on diagonal tracks
2013-04-09 19:16:53 +02:00
Lorenzo Marcantonio 204d085b64 More cleanup on layer code usage
Better description for entities on right click menu and panel
Typo fixes and some comment reformats
2013-04-07 13:55:18 +02:00
Lorenzo Marcantonio 00f0e27851 Factored layer utility functions: classification, layer flip and mask flip 2013-04-05 21:04:58 +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
Wayne Stambaugh 42d7bf6c8e Pcbnew encapsulation and code cleaning.
* Encapsulate most of the MODULE class.
* Start encapsulating the DIMENSION class.
* Lay some groundwork for EDA_TEXT encapsulation.
* Move cleverly hidden MODULE functions into class_module.cpp.
* Use std::swap to exchange TEXTE_PCB values for undo/redo.
* Remove unused members from MODULE class.
* The usual coding policy and documentation fixes.
2013-03-13 14:53:58 -04:00
Wayne Stambaugh f8a56d446f Base object decoupling improvements.
* Improve MSG_PANEL_ITEM to handle message panel information.
* Create containers for passing message panel items between objects and
  the message panel.
* Rename EDA_ITEM::DisplayInfo to EDA_ITEM::GetMsgPanelInfo.
* Remove all direct manipulation of EDA_DRAW_FRAME from all objects derived
  from EDA_ITEM.
2013-01-12 12:32:24 -05:00
Wayne Stambaugh 7c86749ca6 Add Pcbnew GEDA PCB module plugin support.
* Create new GEDA PCB plug in.
* Add support for opening GEDA PCB footprints with module editor.
* Make import footprint file dialog remember last selected footprint
  type during current session.
* Update module editor file import to use new GEDA PCB plug in.
* Let IO_MGR know about GEDA PCB plug in.
* Create a WHITESPACE_FILTER_READER to simplify parsing GEDA PCB footprint
  files.
2012-12-28 15:52:12 -05:00
jean-pierre charras b660b033ad All: remove macros MAX, MIN, ABS from macros.h and replace these macros by std::max, std::min and std::abs (mainly found in old code). 2012-09-22 13:19:37 +02:00
Lorenzo Marcantonio e771112259 Enforced EDA_COLOR_T type and minor const-ification 2012-09-02 14:06:47 +02:00
Lorenzo Marcantonio 082d901d60 Encapsulated drawmode as an enum for type checking 2012-09-01 15:38:27 +02:00
jean-pierre charras 0459b4dafa Pcbnew: fix incorrect detection of arcs having angles != 90 degrees 2012-07-05 11:29:42 +02:00
jean-pierre charras 7f07b48e88 Pcbnew: Update incorrect or incomplete copyrights in many files.
Minor code cleaning in autoroute files.
2012-06-08 11:56:42 +02:00
jean-pierre charras 808020b1eb Eeschema, Libedit: Fix bug that can crashes Eeschema: In libedit 2 mandatory fields could be deleted. Fixed now.
Very minor other fixes.
2012-05-31 15:47:02 +02:00
Dick Hollenbeck aac1010636 more eagle_plugin work 2012-05-22 12:51:18 -05:00
jean-pierre charras e96f1aeb3d Remove valeur_param(), that does not work in Kicad Nanometer 2012-04-27 16:15:11 +02:00
Wayne Stambaugh d8b60a14e1 Pcbnew s-expression file format improvements.
* Move board item object Format() functions into PCB_IO object.
* Change file format to use layer names instead of numbers.
* Change file extension to kicad_pcb.
2012-04-22 11:16:39 -04:00
jean-pierre charras 5d5eb7d38c Fix a serious bug in EDA_RECT::Intersects
Kicad manager: code cleaning. Dead code removed and minor fixes. support of new .kicad_brd extension.
2012-04-16 14:56:01 +02: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
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
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
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
jean-pierre charras fda20d28d8 Pcbnew: Allows an offset for SMD type (and CONNECTOR type) pads. 2012-03-20 21:22:38 +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
Wayne Stambaugh 6375497825 Hit test method rationalization and other minor improvements.
* All objects derived from EDA_ITEM now have consistent hit test method
  definitions.
* Remove double function calls from all classes derived from SCH_ITEM.
* Lots of Doxygen comment fixes.
2012-03-15 10:31:16 -04:00
jean-pierre charras 75d2dc7311 Pcbnew: Hight contrast mode: commit last patch from Miguel Angel Ajo Pelayo, which also fixes an old bug.
All: prepare better compatibility with wxWidgets 2.9.4. Works fine with 2.8.x (I hope...)
2012-02-28 21:14:17 +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 5289c22087 Pcbnew object improvements.
* Remove unnecessary copy constructors from board and module library
  objects.
* Add doClone() method to board and library objects.
* Add comment to class definitions where the default copy constructor
  generated by the compiler was adequate.
* Replace copy method with clone method where applicable.
* Remove DuplicateStruct() function.
* Remove track object copy function.
2012-01-14 14:50:32 -05:00
Wayne Stambaugh b774d96fb0 Minor coding policy and code readability improvements. 2012-01-03 12:14:17 -05:00
Wayne Stambaugh 8985a1807b Encapsulation and other minor improvements.
* EDA_DRAW_PANEL completely encapsulated.
* Moved OSX m_overlay member from EDA_DRAW_PANEL to EDA_DRAW_FRAME where
  it is used.
* Doxygen comment warning fixes.
2011-12-29 15:11:42 -05:00
Wayne Stambaugh 6c28cdc62c More encapsulation work and other minor improvements.
* EDA_RECT and EDA_ITEM completely encapsulated.
* Removed unnecessary EDA_ITEM member m_Selected and replaced functionality
  with SELECTED flag bit.
2011-12-21 08:42:02 -05:00
Dick Hollenbeck 463c17b807 fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses. 2011-12-14 11:25:42 -06:00
Dick Hollenbeck 96bb90dee1 kicad_plugin 2011-12-13 22:29:25 -06:00
Dick Hollenbeck b979d1e0b9 plugin work, accessors 2011-12-12 02:37:05 -06:00
Dick Hollenbeck c4979318d2 more plugin work 2011-12-06 23:28:49 -06:00
Dick Hollenbeck 343e55b09a First working copy of KICAD_PLUGIN::Load() 2011-12-02 15:56:47 -06:00
Dick Hollenbeck 1b5edd6d4c KICAD_PLUG work 2011-12-01 16:50:41 -06:00
Dick Hollenbeck 8f79b14680 This patch restores some of the goodness in Vladimir's rev 3239, and in particular
the GetPosition() and SetPosition() changes.  It also starts towards making m_Orientation
and m_Thickness fields private with accessors, but does not complete this latter goal.
2011-11-29 11:25:30 -06:00
jean-pierre charras 4e626d44b9 Make some messages translatable. 2011-10-22 20:21:57 +02:00
Wayne Stambaugh c2f1113e5d Fix Pcbnew KICAD_T enum names for consistency. 2011-10-01 15:24:27 -04:00
Wayne Stambaugh de96452c41 Minor common PCB library code fixes.
* More common header file compiler fixes.
* Translate French code naming and comments.
* Remove global variable ScreenPcb.
* Dead code removal.
2011-09-24 14:33:28 -04:00
Marco Mattila 2d761f302b Fix drawsegment bounding box and hittest issues in pcbnew. 2011-09-24 01:40:36 +03: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
Wayne Stambaugh 0c44335795 Lots and lots of PCBNew code cleaning and fix build bug introduced in r3108.
* Changed <wx-2.8/xml/xml.h> to "xnode.h" in pcbnew_config.cpp to fix bug
  when building against wxWidgets 2.9 and above.
* Convert broken wxXmlNode code to use XNODE.
* Overloaded XNODE constructor for creating child nodes.
* Translate French naming conventions.
* Translate French comments.
* Remove tabs from several source files.
* Coding style policy and Doxygen comment fixes.
2011-09-07 15:41:04 -04:00
Wayne Stambaugh ebc7259a91 Rename WinEDA_App class to EDA_APP and remove redundant includes. 2011-09-06 10:09:40 -04:00
Marco Mattila 1a97b31d9a Combine DRAWSEGMENT and EDGE_MOD code in pcbnew. 2011-08-09 02:50:55 +03:00
Wayne Stambaugh 2fb2ab0d37 Refactor PCBNew selection clarification menu text code.
* Move menu text code from base board item object to the appropriate
  object.
* Add helper to get board layer to base board item object.
2011-07-14 11:42:44 -04:00
Wayne Stambaugh a367dea4db Fix most GCC 4.6 compiler warnings and minor bug fix.
* Remove most (not all) variables that were initialized but never used that
  cause GCC 4.6 to generate a warning.
* Fix bug in schematic library editor best zoom calculation.
2011-05-13 09:15:28 -04:00
Wayne Stambaugh 67f70fe079 Coding style and Doxygen comment fixes.
* Rename EDA_Rect class to EDA_RECT.
* Rename EDA_TextStruct class to EDA_TEXT.
* Remove duplicate Doxygen comments from sch_sheet_path.cpp.
2011-03-29 15:33:07 -04:00