Commit Graph

3604 Commits

Author SHA1 Message Date
Alexander Zakamaldin 8c9150c223 fix 2011-12-16 12:15:24 -06:00
Dick Hollenbeck af4e13e528 improvements, hopefully 2011-12-16 11:03:25 -06:00
Wayne Stambaugh 8951032d07 More encapsulation work and other minor improvements.
* EDA_DRAW_FRAME completely encapsulated except for DrawFrame member.
* Moved members specific to Pcbnew from EDA_DRAW_FRAME to PCB_BASE_FRAME
  or PCB_EDIT_FRAME as appropriate.
* Replace EDA_TOOLBAR with wxAuiToolBar as EDA_TOOL bar provided no
  additional functionality and made code less readable.
* Remove EDA_TOOLBAR class definition from wxstruct.h and delete file
  wineda_toolbar.cpp.
* Rename tool bar members to something more descriptive since the
  horizontal and vertical references wont mean anything once the
  tool bars are movable.
* Lots of dead code removal.
2011-12-16 08:32:23 -05:00
Dick Hollenbeck a5a64daf75 fix bugs in kicad_plugin.cpp.
KICAD_PLUGIN::Load() is solid now, except for missing globals, which
still need to get moved into the class BOARD.

Same for KICAD_PLUGIN::Save(), only missing globals, which once they
are in the BOARD class, will be added.
2011-12-15 20:39:59 -06:00
Dick Hollenbeck b3e7510d31 plugin testing has started 2011-12-15 10:48:36 -06:00
Dick Hollenbeck 4bc6b69a96 legacy pcbnew plugin touch ups 2011-12-14 20:24:52 -06:00
Guillaume Simard 00b0d03dee fix 2011-12-14 16:35:03 -06:00
Guillaume Simard 1c24f3b14a Make CvPcb correctly preview the selected component footprint if one has already been assigned. 2011-12-14 15:23:32 -05:00
Wayne Stambaugh 65383f28a2 More EDA_DRAW_FRAME encapsulation work. 2011-12-14 15:03:15 -05:00
Dick Hollenbeck ef1c63169e fix EDA_ITEM::Show() prototype bug, fix KICAD_PLUGIN::Save() problem with netclasses. 2011-12-14 11:25:42 -06:00
jean-pierre charras 7cf1f011ef Pcbnew: fix issue when creating new tracks: sometimes a ratsnest remains active although a track exists. 2011-12-14 12:31:49 +01:00
Dick Hollenbeck 4aeeaed4c7 minor 2011-12-14 01:03:55 -06:00
Dick Hollenbeck ebe2f2b950 ++common
* changed all the RotatePoint() functions in trigo.{h,cpp} to take a double as the
    angle, which is still in tenths of degrees for now.
  * EDA_TEXT::m_Orient is now double, still in tenths of degrees (for a short while),
    but the double means parsing files and saving them use a different format string.
++pcbnew
  * DRAWSEGMENT::GetStart() and GetEnd() do not operate for S_ARC like they used to.
    They are now simply accessors for m_Start and m_End.  Use DRAWSEGMENT::GetArcStart()
    and GetArcEnd() and GetCenter() for arcs.  specctra_export.cpp was the only
    source file dependent on the old behavior.
  * DIMENSION::m_Text is now contained, not dynamically allocated.
  * more kicad_plugin work.
2011-12-13 22:43:51 -06:00
Dick Hollenbeck 9998946886 kicad_plugin 2011-12-13 22:29:25 -06:00
Guillaume Simard 0b16a37675 Add undo/redo support for Pcbnew auto place, auto move, and auto route features. 2011-12-13 15:42:42 -05:00
jean-pierre charras f860b5a058 pcbnew/class_track.h: remove duplicate class members. 2011-12-13 21:28:25 +01:00
Wayne Stambaugh 4f982ee3d1 Add Eeschema replace code.
* Enable replace toolbar button and menu entry.
* Improve find replace logging granularity.
* Fix find and replace dialog control hiding and disabling.
* Minor improvements to the SCH_FIND_REPLACE_DATA object.
* Move find collector list iterator into the collector object.
* Add visibility override flag to EDA_ITEM to temporarily show items that
  are hidden during find and replace.
2011-12-13 10:37:33 -05:00
Wayne Stambaugh 5f4acdee0e Fix infinite recursion bug in SCH_COMPONENT::SetTimeStamp(). 2011-12-12 15:59:43 -05:00
Wayne Stambaugh e640cc187b Fix a minor bug in my last commit that caused the debug build to fail. 2011-12-12 10:16:05 -05:00
Wayne Stambaugh d52fa9bcfc Encapsulate LABEL_OBJECT class and message panel window member of EDA_DRAW_FRAME. 2011-12-12 09:02:37 -05:00
Dick Hollenbeck 3029f0dd16 kicad_plugin work, and accessors along with making some fields protected or private 2011-12-12 02:39:41 -06:00
Dick Hollenbeck 9f69d80b12 plugin work, accessors 2011-12-12 02:37:05 -06:00
Dick Hollenbeck 573e154c18 ++PCBNew
* added BOARD::GetPad(int), made BOARD::m_NetInfo private, and contained
    within the BOARD, not dynamically allocated and owned via pointer.
  * added BOARD::GetPadCount()
  * changed NETINFO_LIST::GetCount() to GetNetCount()
  * added BOARD::GetNetCount()
  * more kicad_plugin work.
2011-12-09 23:47:13 -06:00
Dick Hollenbeck ad49eea20d more kicad_plugin work, make BOARD::m_NetInfo private 2011-12-09 23:33:24 -06:00
jean-pierre charras 1dfb8ee3ce Pcbnew: GPcb footprint import: fix incorrect pad size. 2011-12-09 18:43:34 +01:00
Wayne Stambaugh bca57a4330 Encapsulate SCH_EDIT_FRAME and LIB_EDIT_FRAME classes. 2011-12-09 11:37:11 -05:00
jean-pierre charras ea483333f4 Pcbnew: GPcb module import: fix incorrect position and size of texts. 2011-12-09 17:17:38 +01:00
jean-pierre charras 9f2d83c148 Pcbnew: fix bad initialization of default track width and vias sizes when starting pcbnew with no board loaded. 2011-12-09 11:36:00 +01:00
Wayne Stambaugh 4a59e203cb Encapsulate LIB_PIN class and begin encapsulating SCH_EDIT_FRAME class. 2011-12-08 16:05:43 -05:00
jean-pierre charras 697137585e Pcbnew: bug fix: some Global Design Rules not copied to the board after change. 2011-12-08 20:55:10 +01:00
jean-pierre charras 8031ec9d89 All: fix hotkey issue with wxWidgets-2.9.3 (Window only): hotkey events called twice.
* Fix compil issue about automatically created pcb_plot_params.h :
     pcb_plot_params.* moved from pcbnew to common because item_io.cpp (using this file) is compiled in common.
2011-12-08 19:23:44 +01:00
Wayne Stambaugh 54310ba2bc Encapsulate SCH_POLYLINE, SCH_SHEET, and SCH_TEXT classes. 2011-12-08 10:45:01 -05:00
Marco Mattila 60a894bded Fix thermal relief gap calculation for circular pads in pcbnew. 2011-12-08 01:58:43 +02:00
unknown f40cbb06d6 OSX: PCB Calculator correction 2011-12-07 22:06:02 +01:00
Wayne Stambaugh 01576229fe Encapsulate SCH_JUNCTION, SCH_LINE, and SCH_NO_CONNECT classes. 2011-12-07 15:19:29 -05:00
Wayne Stambaugh 6ad505b6e4 Encapsulate SCH_FIELD class. 2011-12-07 13:47:59 -05:00
jean-pierre charras 9c79b55078 All: fix a collision name between accessor function GetTimeStamp and GetTimeStamp in common.cpp.
In common.cpp GetTimeStamp is renamed GetNewTimeStamp (a better name).
Pcbnew: prepare work to calculate connections between pads that inteserct and therefore can be connected without any track (composite pads).
2011-12-07 16:49:32 +01:00
Wayne Stambaugh aac231c39a Encapsulate SCH_BUS_ENTRY class. 2011-12-07 09:08:52 -05:00
Dick Hollenbeck 6b577e1516 Collect all the PCBNew Save() and ReadDesc...() functions into new file item_io.cpp,
which should eventually go away in favor of kicad_plugin.cpp.
Add CMake options USE_NEW_PCBNEW_LOAD and USE_NEW_PCBNEW_SAVE, which should not be
used yet, and both default to OFF accordingly.
2011-12-06 23:39:18 -06:00
Dick Hollenbeck 79b4503d01 more plugin work 2011-12-06 23:28:49 -06:00
Wayne Stambaugh 1673a59a65 Encapsulate DANGLING_END_ITEM class. 2011-12-06 16:02:21 -05:00
Wayne Stambaugh ae395070d9 Zero memory to duplicate behavior changed when C malloc() was replaced by C++ new(). 2011-12-06 09:46:48 -05:00
jean-pierre charras eced38791a Pcbnew: remove global variables (g_TabOneLayerMask and g_ViaType_Name) 2011-12-06 09:35:13 +01:00
Dick Hollenbeck 7d3c3cc1e3 fix compile of kicad_plugin.cpp with wxWidgets 2.9.x 2011-12-06 00:19:36 -06:00
Dick Hollenbeck a26fdf3b54 Fix problem with BOARD bounding box in saved *.brd files,
and TEXTE_MODULE size in kicad_plugin.
Link in io_mgr and kicad_plugin but do not call them yet
2011-12-05 11:22:19 -06:00
Dick Hollenbeck b162585beb fix formatting problems that came about from incompatible tabbing in Lorenzo's patch 2011-12-05 01:03:57 -06:00
Dick Hollenbeck 77fb880f2d ++PCBNew
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes
    having a BOARD being edited by more than one editor, it was a bad design.
    And this meant removing m_PcbFrame from BOARD.
  * removed BOARD::SetWindowFrame(), since BOARD::m_PcbFrame gone.
  * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp
  * Added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance
  * A couple of dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed,
    such as dialog_mask_clearance, dialog_drc, etc.
  * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it
    with build_version.h's #define BOARD_FILE_VERSION, although there may be a
    better place for this constant.
  * Made the public functions in PARAM_CFG_ARRAY be type const.
    void SaveParam(..) const and void ReadParam(..) const
  * PARAM_CFG_BASE now has virtual destructor since we have various ways of
    destroying the derived classes and boost::ptr_vector must be told about this.
  * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use
    an automatic PARAM_CFG_ARRAY which is on the stack.
  * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array,
    since it has to access the current BOARD and the BOARD can change.
    Remember BOARD_DESIGN_SETTINGS are now in the BOARD.
  * Made the m_BoundingBox member private, this was a brutally hard task,
    and indicative of the lack of commitment to accessors and object oriented
    design on the part of KiCad developers.  We must do better.
    Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox().
  * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
2011-12-05 00:28:17 -06:00
Dick Hollenbeck 46222d488e ++PCBNew
* Removed Pcb_Frame argument from BOARD() constructor, since it precludes
    having a BOARD being edited by more than one editor, it was a bad design.
    And this meant removing m_PcbFrame from BOARD.
  * removed BOARD::SetWindowFrame(), and BOARD::m_PcbFrame
  * Removed the global BOARD_DESIGN_SETTINGS which was in class_board.cpp
  * added BOARD_DESIGN_SETTINGS to the BOARD class, a full instance
  * a couple dialogs now only change BOARD_DESIGN_SETTINGS when OK is pressed,
    such as dialog_mask_clearance, dialog_drc, etc.
  * Removed common/pcbcommon.cpp's int g_CurrentVersionPCB = 1 and replaced it
    with build_version.h's #define BOARD_FILE_VERSION, although there may be a
    better place for this constant.
  * Made the public functions in PARAM_CFG_ARRAY be type const.
    void SaveParam(..) const and void ReadParam(..) const
  * PARAM_CFG_BASE now has virtual destructor since we have various way of
    destroying the derived class and boost::ptr_vector must be told about this.
  * Pass const PARAM_CFG_ARRAY& instead of PARAM_CFG_ARRAY so that we can use
    an automatic PARAM_CFG_ARRAY which is on the stack.\
  * PCB_EDIT_FRAME::GetProjectFileParameters() may no longer cache the array,
    since it has to access the current BOARD and the BOARD can change.
    Remember BOARD_DESIGN_SETTINGS are now in the BOARD.
  * Made the m_BoundingBox member private, this was a brutally hard task,
    and indicative of the lack of commitment to accessors and object oriented
    design on the part of KiCad developers.  We must do better.
    Added BOARD::GetBoundingBox, SetBoundingBox(), ComputeBoundingBox().
  * Added PCB_BASE_FRAME::GetBoardBoundingBox() which calls BOARD::ComputeBoundingBox()
2011-12-05 00:15:33 -06:00
jean-pierre charras c0abe47d87 Pcbnew:
Enhanced algorithms to calculate board connections:
    Previously, a track was seen connected to a pad only if the track end is
    exactly on the pad position.
    Now a track is seen connected to a pad if the track end is inside the pad shape.
    Algorithm to calculate pads connections to track is still very fast.
    However some other functions (drag pads, track len calculation ...)
    still need the track end exactly on the pad position.
Dead code removal.
2011-12-04 18:57:03 +01:00
jean-pierre charras d6321ab2a1 Pcbnew: fix Bug #899373 2011-12-03 15:04:17 +01:00