Commit Graph

122 Commits

Author SHA1 Message Date
Lorenzo Marcantonio 85c5aa22c6 Constification of HitTest and GetParent
In particular HitTest for zones *do not* select the nearest vertex/edge as a side effect
2014-05-04 19:08:36 +02:00
Lorenzo Marcantonio 7b4b3297db - Better way to iterate on vias in the track list (GetFirstVia)
- Converted the Next/Prev C casts to static casts and removed the type
  unsafe ones
- Splitted as virtual the VIA::Flip member instead of using RTTI
- Heavily refactored the 'unconnected track' cleanup routine
- Misc constification
2014-04-30 21:16:22 +02:00
Dick Hollenbeck 6bfff89fe5 merge tip in, resolve. 2014-03-20 01:24:33 -05:00
Dick Hollenbeck 2c67c3ff80 * KIWAY Milestone A): Make major modules into DLL/DSOs.
!   The initial testing of this commit should be done using a Debug build so that
    all the wxASSERT()s are enabled.  Also, be sure and keep enabled the
    USE_KIWAY_DLLs option.  The tree won't likely build without it.  Turning it
    off is senseless anyways.  If you want stable code, go back to a prior version,
    the one tagged with "stable".

*   Relocate all functionality out of the wxApp derivative into more finely
    targeted purposes:
    a) DLL/DSO specific
    b) PROJECT specific
    c) EXE or process specific
    d) configuration file specific data
    e) configuration file manipulations functions.

    All of this functionality was blended into an extremely large wxApp derivative
    and that was incompatible with the desire to support multiple concurrently
    loaded DLL/DSO's ("KIFACE")s and multiple concurrently open projects.
    An amazing amount of organization come from simply sorting each bit of
    functionality into the proper box.

*   Switch to wxConfigBase from wxConfig everywhere except instantiation.
*   Add classes KIWAY, KIFACE, KIFACE_I, SEARCH_STACK, PGM_BASE, PGM_KICAD,
    PGM_SINGLE_TOP,
*   Remove "Return" prefix on many function names.
*   Remove obvious comments from CMakeLists.txt files, and from else() and endif()s.
*   Fix building boost for use in a DSO on linux.
*   Remove some of the assumptions in the CMakeLists.txt files that windows had
    to be the host platform when building windows binaries.
*   Reduce the number of wxStrings being constructed at program load time via
    static construction.
*   Pass wxConfigBase* to all SaveSettings() and LoadSettings() functions so that
    these functions are useful even when the wxConfigBase comes from another
    source, as is the case in the KICAD_MANAGER_FRAME.
*   Move the setting of the KIPRJMOD environment variable into class PROJECT,
    so that it can be moved into a project variable soon, and out of FP_LIB_TABLE.
*   Add the KIWAY_PLAYER which is associated with a particular PROJECT, and all
    its child wxFrames and wxDialogs now have a Kiway() member function which
    returns a KIWAY& that that window tree branch is in support of.  This is like
    wxWindows DNA in that child windows get this member with proper value at time
    of construction.
*   Anticipate some of the needs for milestones B) and C) and make code
    adjustments now in an effort to reduce work in those milestones.
*   No testing has been done for python scripting, since milestone C) has that
    being largely reworked and re-thought-out.
2014-03-19 19:42:08 -05:00
Maciej Suminski f0251ebdb6 Merge selection tool branch. 2014-03-11 20:45:01 -04:00
jean-pierre charras 4fd3dbb5a5 Finishing work on a better 3D viewer. this also fix bugs like Bug #1129630 . 2014-03-09 19:43:53 +01:00
Maciej Suminski e4efe212d6 Added MODULE::RunOnChildren(). 2013-12-18 13:39:11 +01:00
Maciej Suminski 08fd9d8cbd Overridden ViewUpdate() for MODULE class, so it handles its pads, drawings and texts. 2013-12-02 14:35:05 +01:00
jean-pierre charras 5f01f123de All: GetBoundingBox returns now a const EDA_RECT.
Pcbnew: Code cleaning and bug fix in autoplace functions
Dialog exchange footprints has now a separate button to update the .cmp file, only on request.
2013-11-24 18:48:14 +01:00
jean-pierre charras e9713bb291 Pcbnew: Block selection enhancement, from Bug #593997 (whishlist)
1. block created from-left-to-right selects only 100%inside selection objects (as it now does)
2.block created from-right-to-left selects all overlapping objects inside selection
From the patch sent by mathieulj (mathieulj), and some fixes and code cleaning.
2013-09-21 20:09:41 +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
Dick Hollenbeck e513380a85 Add script to make a footprint library table from the KiCad Bazaar library repository, either in s-expr or CSV format. Add also the generation of such tables as of today. 2013-06-25 10:56:12 -05:00
Dick Hollenbeck 1f9ee2e45e Support for 'initial single line comments' in the pretty footprint format.
This is limited to round tripping the lines of commented text in the
loading and saving to disk through PCBIO::Format() and PCBIO::Parse().
No editing of the comments is given.
2013-06-23 14:18:33 -05:00
Wayne Stambaugh ecbe947bc6 CvPcb pin count filtering improvement. (fixes lp:1188325)
* Add option to MODULE::GetPadCount() to exclude non-plated through holes.
2013-06-07 09:17:52 -04:00
Lorenzo Marcantonio af5a9a8de9 Removed Show code from BOARD_ITEM derived classes (as requested by Dick) 2013-05-05 12:23:18 +02:00
jean-pierre charras b2a76062c7 All: use CPOLYGONS_LIST, a typedef of std::vector<CPolyPt> to handle a Corners Polygons List.
This is a starting point of some code enhancements relative to polygons in Pcbew and 3D viewer.
2013-05-03 19:51:10 +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
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
Lorenzo Marcantonio e0303a4558 - New typedef LAYER_MSK to encapsulate a layer bitmap
- Renamed ReturnMaskLayer to GetLayerMask (since it's a plain getter)
2013-03-30 18:24:04 +01:00
jean-pierre charras 21d1402c03 Pcbnew, ModEdit: fix issue when setting anchor position, and minor code cleaning. 2013-03-23 14:30:00 +01:00
Wayne Stambaugh 7d0ec1a138 More encapsulation work.
* Complete encapsulation of the MODULE class.
* Complete encapsulation of the EDA_TEXT class.
* Encapsulate most of the ZONE_CONTAINER class.
* Add pcbcommon library as a dependency for reSWIGging the scripting
  support.  This should cover most dependency cases.
2013-03-18 15:36:07 -04: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
jean-pierre charras 840e38de59 Pcbnew: fix link issue (undefined Read_GPCB_Descr symbol) in scripting mode. 2013-01-04 23:00:05 +01:00
Wayne Stambaugh 63b884558a Doxygen warning fixes. 2012-12-18 08:54:44 -05:00
jean-pierre charras 4a26d543d5 Pcbnew: Add a minimal test for illegal chars in footprints libname (like space and dir separtor)
Also a minor cosmetic enhancement
2012-12-10 12:18:42 +01:00
jean-pierre charras bb6795ddf1 Pcbnew: drag functions: serious cleanup and better code. Use now the connectivity functions to find tracks connected to pads,
and therefore  tracks are now dragged when a end point is inside a pad, not necessary on the pad position.
However, drag functions still need more cleanup.
2012-09-11 09:33:17 +02:00
Lorenzo Marcantonio 7d154606be Substituted the few remaining uses of long instead of time_t 2012-09-05 14:13:33 +02:00
Lorenzo Marcantonio 082d901d60 Encapsulated drawmode as an enum for type checking 2012-09-01 15:38:27 +02:00
Miguel Angel Ajo db427cb2cd merge with lp:kicad 2012-06-25 22:51:19 +02:00
Wayne Stambaugh 2d0d805014 Add Pcbnew s-expression file parser.
* Add s-expression file parser object and keyword files.
* Fix minor issues with s-expression file formatting.
* Fix a minor bug the zone container fill state parsing in the legacy plugin.
* Move EDA_TEXT visibility definition to eda_text.h.
* Add minor BOARD_ITEM object improvements to support s-expression file
  parser.
2012-06-09 13:00:13 -04:00
Miguel Angel Ajo 30e251bfba merge 1 with tip 2012-06-03 22:06:51 +02:00
jean-pierre charras e6ec9f0a32 Pcbnew: fix crash in legacy_plugin.cpp when reading old lib files.
fix a compil warning.
CvPcb: fix regressions :
 Shows now a void field instead of the dummy footprint name $nonane (whenthere is  no footprint selected in netlist).
 The active footprint selection changes only if a new component is selected from the component file,
 and does not change just when the next component is automatically selected, after a footprint selection.
 Speed up delete association and auto associe.
2012-05-25 08:58:52 +02:00
Dick Hollenbeck aac1010636 more eagle_plugin work 2012-05-22 12:51:18 -05:00
Miguel Angel Ajo d719282aaf wxArrayString typemaps, class missing yet 2012-04-23 08:59:37 +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
Miguel Angel Ajo 5157657eba merged to last testing, also added automatic file extension detection on save/load 2012-04-22 13:14:58 +02:00
Dick Hollenbeck 3341669fc6 more footprint support for LEGACY_PLUGIN 2012-04-16 20:35:43 -05:00
Dick Hollenbeck a42490e0f3 work on footprint plugin API 2012-04-15 22:18:41 -05:00
Dick Hollenbeck f8490ff4af Remove g_PcbPlotOptions, use wxformbuilder to subclass DIALOG_SHIM on several dialogs 2012-04-05 13:27:56 -05: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
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
Marco Mattila a731a6b712 Add more pad local copper zone settings in pcbnew. Tune the pad properties dialog a little. 2012-03-08 22:44:03 +02:00
Marco Mattila b536b1cf82 Add module and pad local parameters for pad-zone connections (thermal, solid etc.) in pcbnew. 2012-02-25 01:23:46 +02:00
Dick Hollenbeck 107ef8f102 see CHANGELOG.txt 2012-02-19 22:33:54 -06:00
Dick Hollenbeck 5208bf9976 * remove global g_Pad_Master global and put it into BOARD_DESIGN_SETTINGS
which is in turn already within BOARD.
  * encapsulate class D_PAD with accessors, making data private.
  * make D_PAD::GetBoundingRadius() do its longer calculation lazily, based on
    m_boundingRadius == -1.
2012-02-18 22:10:49 -06:00
Dick Hollenbeck 9e2eb0c856 see CHANGELOG.txt 2012-02-18 22:02:19 -06:00
jean-pierre charras 827352511a Layers manager: add in popup menu option to hide all coppers layers but active layer.
Design rules: increase number of vias and tracks sizes
Pcbnew: netlist reader: change from my recent commits to keep netnames in pads for footprints not in netlist
(allow an user to place some footprints by hand, set pads netnames and do not lost these netnames when loading a netlsit)
Fix other very minor issues.
2012-02-17 20:43:43 +01:00