1. 09 Apr, 2013 3 commits
  2. 02 Apr, 2013 1 commit
    • Maciej Suminski's avatar
      Introduction of Graphics Abstraction Layer based rendering for pcbnew. · e262b321
      Maciej Suminski authored
      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
      e262b321
  3. 19 Feb, 2013 1 commit
  4. 12 Feb, 2013 2 commits
  5. 02 Feb, 2013 2 commits
    • Emmeran's avatar
      added option to allow zooming around the crosshair instead of the center; can... · 0bdf5bac
      Emmeran authored
      added option to allow zooming around the crosshair instead of the center; can be enabled via options or by holding alt while using the mousewheel
      0bdf5bac
    • jean-pierre charras's avatar
      Changes for CvPcb to eeschema stuff file: the stuff file generation from CvPcb... · 619125f9
      jean-pierre charras authored
      Changes for CvPcb to eeschema stuff file: the stuff file generation from CvPcb is removed. Eeschema now imports footprints names from the .cmp usual file created by CvPcb or by Pcbnew (Why to use 2 file formats for the same thing?) .
      Pcbnew: in netlist dialog: The user now can choose between the netlist and the .cmp file to import footprints names.
      Therfore no need to delete the .cmp file when exists to use only the netlist.
      This is useful for users who use CvPcb only once to fill footprints fields in schematic, and after edit/modify the footprints fields in schematic outside CvPcb.
      619125f9
  6. 12 Jan, 2013 1 commit
    • Wayne Stambaugh's avatar
      Base object decoupling improvements. · f8a56d44
      Wayne Stambaugh authored
      * 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.
      f8a56d44
  7. 29 Dec, 2012 1 commit
  8. 06 Dec, 2012 1 commit
  9. 19 Nov, 2012 2 commits
  10. 09 Oct, 2012 1 commit
  11. 04 Oct, 2012 1 commit
  12. 27 Sep, 2012 1 commit
  13. 26 Sep, 2012 2 commits
  14. 22 Sep, 2012 1 commit
  15. 12 Sep, 2012 3 commits
  16. 11 Sep, 2012 1 commit
  17. 02 Sep, 2012 2 commits
  18. 01 Sep, 2012 1 commit
  19. 04 Aug, 2012 1 commit
  20. 31 May, 2012 1 commit
  21. 25 May, 2012 1 commit
    • jean-pierre charras's avatar
      Pcbnew: fix crash in legacy_plugin.cpp when reading old lib files. · e6ec9f0a
      jean-pierre charras authored
       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.
      e6ec9f0a
  22. 10 May, 2012 1 commit
  23. 05 May, 2012 1 commit
  24. 01 May, 2012 1 commit
  25. 25 Apr, 2012 1 commit
  26. 19 Apr, 2012 1 commit
    • Dick Hollenbeck's avatar
      // Dick Hollenbeck's KiROUND R&D · c24863c0
      Dick Hollenbeck authored
      // This provides better project control over rounding to int from double
      // than wxRound() did.  This scheme provides better logging in Debug builds
      // and it provides for compile time calculation of constants.
      
      
      #include <stdio.h>
      #include <assert.h>
      #include <limits.h>
      
      //-----<KiROUND KIT>------------------------------------------------------------
      
      /**
       * KiROUND
       * rounds a floating point number to an int using
       * "round halfway cases away from zero".
       * In Debug build an assert fires if will not fit into an int.
       */
      
      #if defined( DEBUG )
      
      // DEBUG: a macro to capture line and file, then calls this inline
      
      static inline int KiRound( double v, int line, const char* filename )
      {
          v = v < 0 ? v - 0.5 : v + 0.5;
          if( v > INT_MAX + 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' > 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          else if( v < INT_MIN - 0.5 )
          {
              printf( "%s: in file %s on line %d, val: %.16g too ' < 0 ' for int\n", __FUNCTION__, filename, line, v );
          }
          return int( v );
      }
      
      #define KiROUND( v )    KiRound( v, __LINE__, __FILE__ )
      
      #else
      
      // RELEASE: a macro so compile can pre-compute constants.
      
      #define KiROUND( v )  int( (v) < 0 ? (v) - 0.5 : (v) + 0.5 )
      
      #endif
      
      
      //-----</KiROUND KIT>-----------------------------------------------------------
      
      // Only a macro is compile time calculated, an inline function causes a static constructor
      // in a situation like this.
      // Therefore the Release build is best done with a MACRO not an inline function.
      int Computed = KiROUND( 14.3 * 8 );
      
      
      int main( int argc, char** argv )
      {
          for( double d = double(INT_MAX)-1;  d < double(INT_MAX)+8;  d += 2.0 )
          {
              int i = KiROUND( d );
      
              printf( "t: %d  %.16g\n", i, d );
          }
      
          return 0;
      }
      c24863c0
  27. 17 Apr, 2012 1 commit
  28. 11 Apr, 2012 1 commit
  29. 09 Apr, 2012 1 commit
  30. 07 Apr, 2012 1 commit
  31. 15 Mar, 2012 1 commit