Commit Graph

4500 Commits

Author SHA1 Message Date
Maciej Suminski 141252b73f Added GetSettings() method for obtaining current rendering settings used by PAINTER class. 2013-04-04 11:23:23 +02:00
Maciej Suminski 7c4ac2e3a4 Added GetMinDepth()/GetMaxDepth() methods (useful for displaying things on the top or on the bottom). 2013-04-04 11:21:35 +02:00
Maciej Suminski 46b731b2d3 common/painter.cpp: Removed unnecessary header inclusion, added variable initialization
common/view/view.cpp: Added line to comply with coding style
2013-04-04 11:18:47 +02:00
Maciej Suminski bd2c878b35 Added painting of DIMENSION & PCB_TARGET items. Removed unnecessary header inclusion. 2013-04-03 11:19:13 +02:00
Maciej Suminski 84ee9591d1 Added loading layer visibility settings when loading a board. Minor code cleaning. 2013-04-03 11:19:08 +02:00
Maciej Suminski d3004fc833 Showing module's value and reference text on proper layers. 2013-04-02 11:03:15 +02:00
Maciej Suminski 395c5fc922 Added possibility to show/hide layers using right sidebar (PCB layer widget) in the GAL rendered view. 2013-04-02 11:02:35 +02:00
Maciej Suminski c20de314cc Introduction of Graphics Abstraction Layer based rendering for pcbnew.
New classes:
    - VIEW - represents view that is seen by user, takes care of layer ordering & visibility and how it is displayed (which location, how much zoomed, etc.)
    - VIEW_ITEM - Base class for every item that can be displayed on VIEW (the biggest change is that now it may be necessary to override ViewBBox & ViewGetLayers method for derived classes).
    - EDA_DRAW_PANEL_GAL - Inherits after EDA_DRAW_PANEL, displays VIEW output, right now it is not editable (in opposite to usual EDA_DRAW_PANEL).
    - GAL/OPENGL_GAL/CAIRO_GAL - Base Graphics Abstraction Layer class + two different flavours (Cairo is not fully supported yet), that offers methods to draw primitives using different libraries.
    - WX_VIEW_CONTROLS - Controller for VIEW, handles user events, allows zooming, panning, etc.
    - PAINTER/PCB_PAINTER - Classes that uses GAL interface to draw items (as you may have already guessed - PCB_PAINTER is a class for drawing PCB specific object, PAINTER is an abstract class). Its methods are invoked by VIEW, when an item has to be drawn. To display a new type of item - you need to implement draw(ITEM_TYPE*) method that draws it using GAL methods.
    - STROKE_FONT - Implements stroke font drawing using GAL methods.
                          
Most important changes to Kicad original code:
    * EDA_ITEM now inherits from VIEW_ITEM, which is a base class for all drawable objects.
    * EDA_DRAW_FRAME contains both usual EDA_DRAW_PANEL and new EDA_DRAW_PANEL_GAL, that can be switched anytime.
    * There are some new layers for displaying multilayer pads, vias & pads holes (these are not shown yet on the right sidebar in pcbnew)
    * Display order of layers is different than in previous versions (if you are curious - you may check m_galLayerOrder@pcbnew/basepcbframe.cpp). Preserving usual order would result in not very natural display, such as showing silkscreen texts on the bottom.
    * Introduced new hotkey (Alt+F12) and new menu option (View->Switch canvas) for switching canvas during runtime.
    * Some of classes (mostly derived from BOARD_ITEM) now includes ViewBBox & ViewGetLayers methods.
    * Removed tools/class_painter.h, as now it is extended and included in source code.
                         
Build changes:
    * GAL-based rendering option is turned on by a new compilation CMake option KICAD_GAL.
    * When compiling with CMake option KICAD_GAL=ON, GLEW and Cairo libraries are required.
    * GAL-related code is compiled into a static library (common/libgal).
    * Build with KICAD_GAL=OFF should not need any new libraries and should come out as a standard version of Kicad
                            
Currently most of items in pcbnew can be displayed using OpenGL (to be done are DIMENSIONS and MARKERS).
More details about GAL can be found in: http://www.ohwr.org/attachments/1884/view-spec.pdf
2013-04-02 08:54:03 +02:00
Maciej Suminski 3efdcb95cd Added template RTREE and class VIEW_RTREE (R-tree for fast spatial indexing of VIEW items; for future usage in GAL) 2013-03-28 17:48:29 +01:00
Maciej Suminski 4b11862ecc Added class COLOR4D that contains color representation with 4 components (RGBA) (for future usage in GAL) 2013-03-28 17:42:15 +01:00
Maciej Suminski c5e9b187ae Added template MATRIX3x3 for handling general 3x3 matrices (for future usage in GAL) 2013-03-28 17:38:33 +01:00
Maciej Suminski 04fc574229 Replacement of classes BOX2 and VECTOR2 with their extended versions
include/vector2d.h: Removed old version
include/math/math_util.h: rescale() for VECTOR2
include/math/vector2d.h: New version of VECTOR2
include/math/box2.h: New version of BOX2
common/drawframe.cpp: Refactorization of code, so it is compatible with new classes
include/plot_common.h, pcbnew/basepcbframe.cpp: Changed header inclusion path
CMakeLists.txt: Added definition to turn on WX_COMPATIBILITY for replacement classes
2013-03-28 17:30:09 +01:00
Andrey Fedorushkov ff0ddbcac0 eeschema: fix build when KICAD_GOST ON (insert in bzr4019) 2013-03-24 00:37:48 +04:00
jean-pierre charras d1604137cc Pcbnew, ModEdit: fix issue when setting anchor position, and minor code cleaning. 2013-03-23 14:30:00 +01:00
Wayne Stambaugh 969efff611 Encapsulation, bug, context menu string, and, coding policy fixes.
* Complete encapsulation of the ZONE_CONTAINER class.
* Fixed a bug in the EDA_TEXT::Format() default effects behavior due to
  improper conversion to internal units and missing test for default
  thickness.
* Improved grammar of some Pcbnew context menu strings.
* Moved some more cleverly hidden BOARD object methods into class_board.cpp.
* Lots of coding policy and documentation fixes.
2013-03-20 10:50:12 -04:00
Dick Hollenbeck 293f7cca28 Consistent with my email posting from a day or two ago, remove the translated
standard layer name support from BOARD::GetLayerName().  This function evolved
in a contorted direction over time, and was being asked to return one of 3
different kinds of layer names, even though it only took a boolean to control
that choice.  

Users are better served by forcing them to get to know the concise new 
English Standard layer names.  This is because these concise names show up
in the "pretty" footprint/module files as the standard representation of
both feature and copper layers.

Change the name of BOARD::GetDefaultLayerName() to GetStandardLayerName().
Drop boolean argument to both BOARD::GetStandardLayerName() and 
BOARD::GetLayerName().
2013-03-19 23:46:32 -05:00
Carl Poirier 45a48cfcb2 Add library column to component and module select dialog. 2013-03-18 21:25:19 -04:00
Wayne Stambaugh 822cc6a781 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
Miguel Angel Ajo 658f02a6b9 checkcoding.py refactor from Edwin van den Oetelaar, some extra refactorings by me, improvement suggestions from Carl Poirier 2013-03-18 12:22:31 +01:00
jean-pierre charras 8d675d9bc0 Pcbnew: fix Bug #1156193 . Fix compil issues when KICAD_SCRIPTING_WXPYTHON is not enabled and KICAD_SCRIPTING is enabled 2013-03-17 20:04:42 +01:00
Miguel Angel Ajo fdf135d877 ReloadPlugins() python function, and mtime stored in the KICAD_PLUGINS dictionary 2013-03-17 03:03:18 +01:00
Miguel Angel Ajo a2bb144556 New register() method in plugins, used by the loader to handle runtime plugin reloading 2013-03-17 02:18:09 +01:00
Miguel Angel Ajo c867ed9de4 Refactoring python to wxArrayString, and better exception error reporting 2013-03-17 02:14:46 +01:00
Miguel Angel Ajo 39ef596bdc Fix wxString.Print call to be compatible with wx2.8, thanks to Барановский Константин and Edwin van den Oetelaar for submiting same patch, same hour, are you twins? ;) 2013-03-17 00:51:43 +01:00
jean-pierre charras a9bcaa1493 Pcbnew: designe rule dialog: fix incorect size of track list grid 2013-03-16 12:12:18 +01:00
Miguel Angel Ajo f05163fbeb Allow plugins to be reloaded without closing/opening pcbnew, next step is plugin editor, just a few lines away... 2013-03-16 04:27:48 +01:00
Miguel Angel Ajo 7ad3e0c544 Also check coding style of new files, not only modified ones 2013-03-16 00:28:35 +01:00
Miguel Angel Ajo 24882a9324 tool for checking coding style 2013-03-16 00:21:53 +01:00
Miguel Angel Ajo 9bb6ead2b1 LOCALE_IO toggle implementation for locale switches on scripting; code cleanups to comply with kicad coding style policy 2013-03-15 17:35:24 +01:00
Miguel Angel Ajo d6bcbc5cdf Fixed wxGrid re-creation and missing icon for dialog 2013-03-15 15:50:54 +01:00
Miguel Angel Ajo dc4b261c68 wxT added to the locales fix, message box on python exceptions inside wizard, added some missing copyright notices 2013-03-15 14:27:18 +01:00
Miguel Angel Ajo 9262f13eef Fix for locales that set , as a decimal point (which is incompatible with python scripting), also fixed the m_Reference encapsulation in module to Reference() 2013-03-15 01:56:36 +01:00
Dick Hollenbeck 82998d0cc0 EAGLE_PLUGIN now establishes (trace_min), (via_min_size), (via_min_drill), and Default Net's (clearance)
by groking the eagle *.brd info.  This makes it more probable that fewer DRC errors come about on first 
DRC attempt.
2013-03-14 17:54:47 -05:00
jean-pierre charras 8949cfe584 3D viewer: fix very minor issues (better rendering of 3D view). 2013-03-14 17:11:05 +01:00
jean-pierre charras c10d1fe279 Very minor fixes, mainly for the stable version 2013-03-13 20:15:09 +01:00
jean-pierre charras 9ed5ee8310 Last (minor) fixes for the stable version 2013-03-13 20:06:46 +01:00
Wayne Stambaugh 7b266ef475 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
Dick Hollenbeck 09f1a4fbb8 EAGLE_PLUGIN cu layer map fix broke footprint library loading 2013-03-13 11:38:54 -05:00
Dick Hollenbeck c7f55381a5 EAGLE_PLUGIN cu layer map fix 2013-03-13 11:17:16 -05:00
jean-pierre charras 81f35ffe73 Pcbnew: fix a bug in autoplac.cpp 2013-03-12 17:37:41 +01:00
jean-pierre charras 597b362603 Pcbnew: Fix many minor issues in print dialog, mainly in modedit. 2013-03-12 16:17:44 +01:00
Miguel Angel Ajo 0163e4b4e4 Reverted back the ( i ) parameters for python, applied the PyGILState_Ensure from Dick into his PyLOCK class 2013-03-12 01:37:45 +01:00
jean-pierre charras 98a77ee649 Pcbnew: print dialog: code cleanup and bug fixes (added some fixes from Sergey A. Borshch) 2013-03-11 20:30:58 +01:00
Dick Hollenbeck c9edd2c8de improvements to python's GIL acquisition and release, but not done yet, since I think the GIL needs to be acquired even when not involving wxPython. 2013-03-11 03:09:48 -05:00
jean-pierre charras 379ad3a8e7 Kicad manager: fix bug: .kicad_pcb files not saved in zip file 2013-03-10 20:55:21 +01:00
jean-pierre charras aca64b5dda Pcbnew: fix issues: Ensure pads type connector have a drill size= 0, like SMD pads. Ensure keepout zones have no net. 2013-03-10 14:59:47 +01:00
Miguel Angel Ajo d34639b79b Project templates now can find the system templates from KICAD environment variable 2013-03-10 02:35:24 +01:00
jean-pierre charras 0d4b157207 Pcbnew: Partial merge from pcad2kicad (from Alexander Lunev). Fix an old bug related to pads with offset: sometimes the connection to a zone was not detected. 2013-03-09 20:36:31 +01:00
jean-pierre charras 58160d9624 Pcbnew: fix bug in export vrml (bad Z position of 3D shapes). Very minor code cleaning. 2013-03-08 08:29:30 +01:00
Wayne Stambaugh 57e34dfb3c Documentation and coding policy fixes.
* Fix all Doxygen warnings except polygon files.
* Add footprint library table tasks to TODO.txt.
* Add definition to drag.h to prevent nesting.
* Coding policy fixes.
2013-03-07 12:12:59 -05:00