kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #05566
Re: [PATCH] Ortographic mode for 3D viewer and minor cleanup
On 10/04/2010 06:40 AM, Alex G wrote:
Alex,
congrats on your patch getting accepted and applied!
I have just a few comments below that will make your next patch even better.
Thanks,
Dick
> === modified file '3d-viewer/3d_canvas.cpp'
> --- 3d-viewer/3d_canvas.cpp 2010-07-20 10:30:40 +0000
> +++ 3d-viewer/3d_canvas.cpp 2010-10-04 11:25:25 +0000
> @@ -57,6 +57,7 @@
> m_init = FALSE;
> m_gllist = 0;
> m_Parent = parent;
> + m_ortho = false;
>
> #if wxCHECK_VERSION( 2, 9, 0 )
>
> @@ -498,32 +499,44 @@
> glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
> }
>
> - /* set viewing projection */
> + // set viewing projection
>
> - // Ratio width / height of the window display
> - double ratio_HV = (double) size.x / size.y;
> glMatrixMode( GL_PROJECTION );
> glLoadIdentity();
>
> #define MAX_VIEW_ANGLE 160.0 / 45.0
> if( g_Parm_3D_Visu.m_Zoom > MAX_VIEW_ANGLE )
> g_Parm_3D_Visu.m_Zoom = MAX_VIEW_ANGLE;
> - gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 10 );
> -
> -// glFrustum(-1., 1.1F, -1.1F, 1.1F, ZBottom, ZTop);
> -
> - /* position viewer */
>
Looks like you had one to many spaces on these lines, should have been 4.
> +
> + if( ModeIsOrtho() )
> + {
> + // OrthoReductionFactor is chosen so as to provide roughly the same size as Perspective View
> + const double orthoReductionFactor = 400/g_Parm_3D_Visu.m_Zoom;
> + // Initialize Projection Matrix for Ortographic View
> + glOrtho(-size.x/orthoReductionFactor, size.x/orthoReductionFactor, -size.y/orthoReductionFactor, size.y/orthoReductionFactor, 1, 10);
> + }
> + else
> + {
> + // Ratio width / height of the window display
> + double ratio_HV = (double) size.x / size.y;
> +
> + // Initialize Projection Matrix for Perspective View
> + gluPerspective( 45.0 * g_Parm_3D_Visu.m_Zoom, ratio_HV, 1, 10 );
> + }
> +
> +
> + // position viewer
> glMatrixMode( GL_MODELVIEW );
> glLoadIdentity();
> glTranslatef( 0.0F, 0.0F, -( ZBottom + ZTop) / 2 );
>
> - /* clear color and depth buffers */
> + // clear color and depth buffers
> glClearColor( g_Parm_3D_Visu.m_BgColor.m_Red,
> g_Parm_3D_Visu.m_BgColor.m_Green,
> g_Parm_3D_Visu.m_BgColor.m_Blue, 1 );
> glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
>
> - /* Setup light souces: */
> + // Setup light souces:
> SetLights();
> }
>
>
> === modified file '3d-viewer/3d_frame.cpp'
> --- 3d-viewer/3d_frame.cpp 2010-05-01 12:46:33 +0000
> +++ 3d-viewer/3d_frame.cpp 2010-10-04 11:26:20 +0000
> @@ -292,6 +292,10 @@
> case ID_MOVE3D_DOWN:
> m_Canvas->SetView3D( WXK_DOWN );
> return;
> +
> + case ID_ORTHO:
> + m_Canvas->ToggleOrtho();
> + return;
>
> case ID_TOOL_SCREENCOPY_TOCLIBBOARD:
> case ID_MENU_SCREENCOPY_PNG:
>
> === modified file '3d-viewer/3d_toolbar.cpp'
> --- 3d-viewer/3d_toolbar.cpp 2010-02-08 18:15:42 +0000
> +++ 3d-viewer/3d_toolbar.cpp 2010-10-04 11:29:07 +0000
> @@ -88,6 +88,9 @@
>
> m_HToolBar->AddTool( ID_MOVE3D_DOWN, wxEmptyString, wxBitmap( down_xpm ),
> _( "Move down" ) );
>
Spelling error in ortographic
> +
> + m_HToolBar->AddTool( ID_ORTHO, wxEmptyString, wxBitmap( ortho_xpm ),
> + _( "Enable/Disable ortographic projection" ) );
>
> m_HToolBar->Realize();
> }
>
> === modified file '3d-viewer/3d_viewer.h'
> --- 3d-viewer/3d_viewer.h 2010-08-19 14:21:05 +0000
> +++ 3d-viewer/3d_viewer.h 2010-10-04 11:29:07 +0000
> @@ -53,6 +53,7 @@
> ID_MOVE3D_RIGHT,
> ID_MOVE3D_UP,
> ID_MOVE3D_DOWN,
> + ID_ORTHO,
> ID_MENU3D_BGCOLOR_SELECTION,
> ID_MENU3D_AXIS_ONOFF,
> ID_MENU3D_MODULE_ONOFF,
> @@ -137,6 +138,9 @@
> private:
> bool m_init;
> GLuint m_gllist;
>
Please put a blank line above comments if comments are only thing on
that line and they are not a comment continuation.
> + /// Tracks whether to use Orthographic or Perspective projection
> + //TODO: Does this belong here, or in WinEDA3D_DrawFrame ???
> + bool m_ortho;
> #if wxCHECK_VERSION( 2, 9, 0 )
> wxGLContext* m_glRC;
> #endif
> @@ -181,6 +185,12 @@
> void Draw3D_Via( SEGVIA* via );
> void Draw3D_DrawSegment( DRAWSEGMENT* segment );
> void Draw3D_DrawText( TEXTE_PCB* text );
> +
> + /// Toggles ortographic projection on and off
> + void ToggleOrtho(){ m_ortho = !m_ortho ; Refresh(true);};
>
needed a blank line here, above the single line comment.
> + /// Returns the orthographic projection flag
> + bool ModeIsOrtho() { return m_ortho ;};
> +
>
> //int Get3DLayerEnable(int act_layer);
>
> @@ -223,7 +233,7 @@
> /** function ReloadRequest
> * must be called when reloading data from Pcbnew is needed
> * mainly after edition of the board or footprint beeing displayed.
> - * mainly for the mudule editor.
> + * mainly for the module editor.
> */
> void ReloadRequest( )
> {
>
> === modified file 'bitmaps/CMakeLists.txt'
> --- bitmaps/CMakeLists.txt 2010-09-29 18:19:26 +0000
> +++ bitmaps/CMakeLists.txt 2010-10-04 11:20:18 +0000
> @@ -285,6 +285,7 @@
> Options_Vias.xpm
> opt_show_polygon.xpm
> Orient.xpm
> + ortho.xpm
> Pad_Sketch.xpm
> pad.xpm
> pads_mask_layers.xpm
>
> === added file 'bitmaps/ortho.xpm'
> --- bitmaps/ortho.xpm 1970-01-01 00:00:00 +0000
> +++ bitmaps/ortho.xpm 2010-10-02 21:40:50 +0000
> @@ -0,0 +1,20 @@
> +/* XPM */
> +const char *ortho_xpm[]={
> +"16 15 2 1",
> +"# c #000000",
> +". c #ffffff",
> +"................",
> +"................",
> +"......####......",
> +".....##..##.....",
> +".....#....#.....",
> +"....#......#....",
> +"....#......#....",
> +"....#......#....",
> +"....#......#....",
> +"....#......#....",
> +".....#....#.....",
> +".....##..##.....",
> +"......####......",
> +"................",
> +"................"};
>
> === modified file 'common/base_screen.cpp'
> --- common/base_screen.cpp 2010-09-23 14:04:08 +0000
> +++ common/base_screen.cpp 2010-10-04 10:51:55 +0000
> @@ -15,7 +15,7 @@
>
> /* Implement wxSize array for grid list implementation. */
> #include <wx/arrimpl.cpp>
> -WX_DEFINE_OBJARRAY( GridArray );
> +WX_DEFINE_OBJARRAY( GridArray )
>
> BASE_SCREEN* ActiveScreen = NULL;
>
>
> === modified file 'common/class_undoredo_container.cpp'
> --- common/class_undoredo_container.cpp 2009-08-27 13:51:02 +0000
> +++ common/class_undoredo_container.cpp 2010-10-04 10:52:13 +0000
> @@ -44,7 +44,7 @@
> PICKED_ITEMS_LIST::PICKED_ITEMS_LIST()
> {
> m_Status = UR_UNSPECIFIED;
> -};
> +}
>
> PICKED_ITEMS_LIST::~PICKED_ITEMS_LIST()
> {
> @@ -321,7 +321,7 @@
>
>
> /** function RemovePicker
> - * remùove one entry (one picker) from the list of picked items
> + * rem�ove one entry (one picker) from the list of picked items
> * @param aIdx = index of the picker in the picked list
> * @return true if ok, or false if did not exist
> */
>
> === modified file 'common/dcsvg.cpp'
> --- common/dcsvg.cpp 2010-04-20 11:23:59 +0000
> +++ common/dcsvg.cpp 2010-10-04 10:52:32 +0000
> @@ -55,7 +55,7 @@
> static inline double DegToRad( double deg )
> {
> return (deg * M_PI) / 180.0;
> -};
> +}
>
> wxString wxColStr( wxColour c )
> {
> @@ -180,17 +180,17 @@
> {
> // quarter 640x480 screen display at 72 dpi
> Init( f, 320, 240, 72.0 );
> -};
> +}
>
> wxSVGFileDC::wxSVGFileDC( wxString f, int Width, int Height )
> {
> Init( f, Width, Height, 72.0 );
> -};
> +}
>
> wxSVGFileDC::wxSVGFileDC( wxString f, int Width, int Height, float dpi )
> {
> Init( f, Width, Height, dpi );
> -};
> +}
>
> wxSVGFileDC::~wxSVGFileDC()
> {
> @@ -217,7 +217,7 @@
> CalcBoundingBox( x1, y1 );
> CalcBoundingBox( x2, y2 );
> return;
> -};
> +}
>
> void wxSVGFileDC::DoDrawLines( int n, wxPoint points[], wxCoord xoffset, wxCoord yoffset )
> {
>
> === modified file 'common/dialog_about/AboutDialog_main.cpp'
> --- common/dialog_about/AboutDialog_main.cpp 2010-09-03 14:33:09 +0000
> +++ common/dialog_about/AboutDialog_main.cpp 2010-10-04 10:35:03 +0000
> @@ -26,7 +26,7 @@
>
>
> #include <wx/arrimpl.cpp>
> -WX_DEFINE_OBJARRAY( Contributors );
> +WX_DEFINE_OBJARRAY( Contributors )
>
> // Helper functions:
> static wxString HtmlHyperlink( const wxString& url, const wxString& description = wxEmptyString );
>
> === modified file 'eeschema/class_pin.h'
> --- eeschema/class_pin.h 2010-09-24 16:00:40 +0000
> +++ eeschema/class_pin.h 2010-10-04 10:39:27 +0000
> @@ -63,7 +63,7 @@
> LOWLEVEL_IN = 4,
> LOWLEVEL_OUT = 8,
> CLOCK_FALL = 0x10, /* this is common form for inverted clock in Eastern Block */
>
No need for this edit, last enum can have a trailing comma just fine. I
write code like that.
> - NONLOGIC = 0x20,
> + NONLOGIC = 0x20
> };
>
>
> @@ -74,7 +74,7 @@
> PIN_RIGHT = 'R',
> PIN_LEFT = 'L',
> PIN_UP = 'U',
>
ditto, leave the comma in, this edit is noise.
> - PIN_DOWN = 'D',
> + PIN_DOWN = 'D'
> };
>
>
>
> === modified file 'eeschema/class_schematic_items.cpp'
> --- eeschema/class_schematic_items.cpp 2010-09-05 17:01:48 +0000
> +++ eeschema/class_schematic_items.cpp 2010-10-04 10:40:30 +0000
> @@ -221,7 +221,7 @@
> rect.Inflate( ( GetPenSize() + m_Size.x ) / 2 );
>
> return rect;
> -};
> +}
>
>
> /** Function HitTest
>
> === modified file 'eeschema/files-io.cpp'
> --- eeschema/files-io.cpp 2010-07-14 13:24:36 +0000
> +++ eeschema/files-io.cpp 2010-10-04 10:41:40 +0000
> @@ -190,7 +190,7 @@
> {
> wxString prompt;
>
> - prompt.Printf( _( "Component library <%s> failed to load.\n\n\Error: %s" ),
>
The space between \n E is not needed, removing the \ before the E was a
good edit.
> + prompt.Printf( _( "Component library <%s> failed to load.\n\n Error: %s" ),
> GetChars( fn.GetFullPath() ),
> GetChars( errMsg ) );
> DisplayError( this, prompt );
>
> === modified file 'eeschema/pinedit.cpp'
> --- eeschema/pinedit.cpp 2010-07-12 14:07:09 +0000
> +++ eeschema/pinedit.cpp 2010-10-04 10:42:05 +0000
> @@ -279,7 +279,7 @@
> DrawPanel->CursorOn( DC );
>
> m_drawItem = NULL;
> -};
> +}
>
>
> /**
>
> === modified file 'eeschema/template_fieldnames.h'
> --- eeschema/template_fieldnames.h 2010-08-09 02:03:16 +0000
> +++ eeschema/template_fieldnames.h 2010-10-04 10:39:29 +0000
> @@ -35,7 +35,7 @@
> FIELD5,
> FIELD6,
> FIELD7,
> - FIELD8,
> + FIELD8
> };
>
>
>
> === modified file 'gerbview/class_aperture_macro.h'
> --- gerbview/class_aperture_macro.h 2010-10-03 15:39:06 +0000
> +++ gerbview/class_aperture_macro.h 2010-10-04 10:43:04 +0000
> @@ -54,7 +54,7 @@
> AMP_OUTLINE = 4, // Free polyline (n corners + rotation)
> AMP_POLYGON = 5, // Closed regular polygon(diameter, number of vertices (3 to 10), rotation)
> AMP_MOIRE = 6, // A cross hair with n concentric circles + rotation
>
More noise, and more noise many times below that I do not mention again.
> - AMP_THERMAL = 7, // Thermal shape (pos, outer and inner diameter, cross hair thickness + rotation)
> + AMP_THERMAL = 7 // Thermal shape (pos, outer and inner diameter, cross hair thickness + rotation)
> };
>
>
>
> === modified file 'gerbview/gerbview.h'
> --- gerbview/gerbview.h 2010-10-01 19:11:30 +0000
> +++ gerbview/gerbview.h 2010-10-04 10:43:01 +0000
> @@ -65,7 +65,7 @@
> GERB_INTERPOL_LINEAR_01X,
> GERB_INTERPOL_LINEAR_001X,
> GERB_INTERPOL_ARC_NEG,
>
Noise.
> - GERB_INTERPOL_ARC_POS,
> + GERB_INTERPOL_ARC_POS
> };
>
>
> @@ -144,7 +144,7 @@
> FILE* m_FilesList[12]; // Files list
> int m_FilesPtr; // Stack pointer for files list
>
> - int m_Selected_Tool; // Pour editions: Tool (Dcode) selectionné
>
selection spelling
> + int m_Selected_Tool; // Pour editions: Tool (Dcode) selectionn�
>
> int m_Transform[2][2]; // The rotation/mirror transformation matrix.
> bool m_360Arc_enbl; // Enbl 360 deg circular interpolation
>
> === modified file 'gerbview/wxGerberFrame.h'
> --- gerbview/wxGerberFrame.h 2010-09-28 14:42:05 +0000
> +++ gerbview/wxGerberFrame.h 2010-10-04 10:43:10 +0000
> @@ -28,7 +28,7 @@
> ID_INC_LAYER_AND_APPEND_FILE,
> ID_GERBVIEW_SHOW_SOURCE,
> ID_GERBVIEW_EXPORT_TO_PCBNEW,
> - ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS,
> + ID_GERBVIEW_POPUP_DELETE_DCODE_ITEMS
> };
>
>
>
> === modified file 'include/appl_wxstruct.h'
> --- include/appl_wxstruct.h 2010-02-28 13:44:29 +0000
> +++ include/appl_wxstruct.h 2010-10-04 10:35:03 +0000
> @@ -19,7 +19,7 @@
> APP_TYPE_PCBNEW,
> APP_TYPE_CVPCB,
> APP_TYPE_GERBVIEW,
> - APP_TYPE_KICAD,
> + APP_TYPE_KICAD
> };
>
> class wxConfigBase;
> @@ -227,6 +227,6 @@
> * of the application pointer all over the place or worse yet in a global
> * variable.
> */
> -DECLARE_APP( WinEDA_App );
> +DECLARE_APP( WinEDA_App )
>
> #endif /* APPL_WXSTRUCT_H */
>
> === modified file 'include/base_struct.h'
> --- include/base_struct.h 2010-09-28 14:42:05 +0000
> +++ include/base_struct.h 2010-10-04 10:33:37 +0000
> @@ -544,7 +544,7 @@
> NO_FILL, // Poly, Square, Circle, Arc = option No Fill
> FILLED_SHAPE, /* Poly, Square, Circle, Arc = option Fill
> * with current color ("Solid shape") */
> - FILLED_WITH_BG_BODYCOLOR, /* Poly, Square, Circle, Arc = option Fill
>
comment start is off by one:
> + FILLED_WITH_BG_BODYCOLOR /* Poly, Square, Circle, Arc = option Fill
> * with background body color, translucent
> * (texts inside this shape can be seen)
> * not filled in B&W mode when plotting or
>
> === modified file 'include/bitmaps.h'
> --- include/bitmaps.h 2010-09-24 16:00:40 +0000
> +++ include/bitmaps.h 2010-10-04 11:29:40 +0000
> @@ -93,6 +93,7 @@
> extern const char* directory_xpm[];
> extern const char* display_options_xpm[];
> extern const char* down_xpm[];
> +extern const char* ortho_xpm[];
> extern const char* drag_module_xpm[];
> extern const char* drag_outline_segment_xpm[];
> extern const char* drag_pad_xpm[];
>
> === modified file 'include/dsnlexer.h'
> --- include/dsnlexer.h 2010-08-09 02:03:16 +0000
> +++ include/dsnlexer.h 2010-10-04 10:39:30 +0000
> @@ -65,7 +65,7 @@
> DSN_RIGHT = -4, // right bracket, ')'
> DSN_LEFT = -3, // left bracket, '('
> DSN_STRING = -2, // a quoted string, stripped of the quotes
> - DSN_EOF = -1, // special case for end of file
> + DSN_EOF = -1 // special case for end of file
> };
>
>
>
> === modified file 'include/macros.h'
> --- include/macros.h 2010-08-03 02:13:33 +0000
> +++ include/macros.h 2010-10-04 10:33:41 +0000
> @@ -102,18 +102,18 @@
> #include "boost/typeof/typeof.hpp"
>
> // we have to register the types used with the typeof keyword with boost
> -BOOST_TYPEOF_REGISTER_TYPE( wxPoint );
> -BOOST_TYPEOF_REGISTER_TYPE( wxSize );
> -BOOST_TYPEOF_REGISTER_TYPE( wxString );
> +BOOST_TYPEOF_REGISTER_TYPE( wxPoint )
> +BOOST_TYPEOF_REGISTER_TYPE( wxSize )
> +BOOST_TYPEOF_REGISTER_TYPE( wxString )
> class DrawSheetLabelStruct;
> -BOOST_TYPEOF_REGISTER_TYPE( DrawSheetLabelStruct* );
> +BOOST_TYPEOF_REGISTER_TYPE( DrawSheetLabelStruct* )
> class EDA_BaseStruct;
> -BOOST_TYPEOF_REGISTER_TYPE( EDA_BaseStruct* );
> +BOOST_TYPEOF_REGISTER_TYPE( EDA_BaseStruct* )
> class D_PAD;
> -BOOST_TYPEOF_REGISTER_TYPE( D_PAD* );
> -BOOST_TYPEOF_REGISTER_TYPE( const D_PAD* );
> +BOOST_TYPEOF_REGISTER_TYPE( D_PAD* )
> +BOOST_TYPEOF_REGISTER_TYPE( const D_PAD* )
> class BOARD_ITEM;
> -BOOST_TYPEOF_REGISTER_TYPE( BOARD_ITEM* );
> +BOOST_TYPEOF_REGISTER_TYPE( BOARD_ITEM* )
>
> #define EXCHG( a, b ) { BOOST_TYPEOF( a ) __temp__ = (a); \
> (a) = (b); \
> @@ -136,7 +136,7 @@
> #endif /* !defined( __WXMAC__ ) */
>
> menu->Append( l_item );
> -};
> +}
>
> static inline void ADD_MENUITEM_WITH_HELP( wxMenu* menu, int id,
> const wxString& text,
> @@ -152,7 +152,7 @@
> #endif /* !defined( __WXMAC__ ) */
>
> menu->Append( l_item );
> -};
> +}
>
> #ifdef __WINDOWS__
> static inline void ADD_MENUITEM_WITH_SUBMENU( wxMenu* menu, wxMenu* submenu,
> @@ -198,7 +198,7 @@
> #endif /* !defined( __WXMAC__ ) */
>
> menu->Append( l_item );
> -};
> +}
>
> static inline void ADD_MENUITEM_WITH_HELP_AND_SUBMENU( wxMenu* menu,
> wxMenu* submenu,
> @@ -217,7 +217,7 @@
> #endif /* !defined( __WXMAC__ ) */
>
> menu->Append( l_item );
> -};
> +}
>
> #endif
>
>
> === modified file 'include/param_config.h'
> --- include/param_config.h 2010-06-17 16:30:10 +0000
> +++ include/param_config.h 2010-10-04 10:35:03 +0000
> @@ -21,7 +21,7 @@
> PARAM_LIBNAME_LIST,
> PARAM_WXSTRING,
> PARAM_COMMAND_ERASE,
> - PARAM_FIELDNAME_LIST,
> + PARAM_FIELDNAME_LIST
> };
>
> #define MAX_COLOR 0x8001F
>
> === modified file 'include/wxstruct.h'
> --- include/wxstruct.h 2010-09-23 14:04:08 +0000
> +++ include/wxstruct.h 2010-10-04 10:33:45 +0000
> @@ -480,7 +480,7 @@
> int aPrintMask, bool aPrintMirrorMode,
> void * aData = NULL);
>
> - DECLARE_EVENT_TABLE();
> + DECLARE_EVENT_TABLE()
> };
>
>
>
> === modified file 'kicad/commandframe.cpp'
> --- kicad/commandframe.cpp 2010-09-26 05:35:29 +0000
> +++ kicad/commandframe.cpp 2010-10-04 10:54:50 +0000
> @@ -28,7 +28,7 @@
> wxDefaultPosition, wxDefaultSize,
> wxTE_MULTILINE | wxSUNKEN_BORDER | wxTE_READONLY );
>
> -};
> +}
>
> void RIGHT_KM_FRAME::OnSize( wxSizeEvent& event )
> {
>
> === modified file 'kicad/kicad.h'
> --- kicad/kicad.h 2010-07-21 09:12:25 +0000
> +++ kicad/kicad.h 2010-10-04 10:54:41 +0000
> @@ -50,7 +50,7 @@
> ID_SELECT_PREFERED_PDF_BROWSER,
> ID_SELECT_DEFAULT_PDF_BROWSER,
> ID_SAVE_AND_ZIP_FILES,
> - ID_READ_ZIP_ARCHIVE,
> + ID_READ_ZIP_ARCHIVE
> };
>
>
> @@ -133,7 +133,7 @@
> TREE_NET,
> TREE_UNKNOWN,
> TREE_DIRECTORY,
> - TREE_MAX,
> + TREE_MAX
> };
>
> /** class RIGHT_KM_FRAME
>
> === modified file 'pcbnew/build_BOM_from_board.cpp'
> --- pcbnew/build_BOM_from_board.cpp 2010-01-28 13:10:46 +0000
> +++ pcbnew/build_BOM_from_board.cpp 2010-10-04 10:55:50 +0000
> @@ -44,7 +44,7 @@
> };
> WX_DECLARE_LIST( cmp, CmpList );
>
> -WX_DEFINE_LIST( CmpList );
> +WX_DEFINE_LIST( CmpList )
>
> void WinEDA_PcbFrame::RecreateBOMFileFromBoard( wxCommandEvent& aEvent )
> {
>
> === modified file 'pcbnew/deltrack.cpp'
> --- pcbnew/deltrack.cpp 2010-02-19 13:23:58 +0000
> +++ pcbnew/deltrack.cpp 2010-10-04 11:04:42 +0000
> @@ -204,9 +204,12 @@
> next_track = tracksegment->Next();
> tracksegment->SetState( BUSY, OFF );
>
These were my printf()s and I can assure you that nobody else needs them
except me. I like printf() as a better IO model than std::out <<
So please don't do this in the future. Check out the new richio.h
design which uses Printf() type formatting. I prefer it, easier to
format numbers, etc.
>
> - D( printf( "%s: track %p status=\"%s\"\n", __func__, tracksegment,
> - CONV_TO_UTF8( TRACK::ShowState( tracksegment->GetState( -1 ) ) )
> - ); )
> + //D( printf( "%s: track %p status=\"%s\"\n", __func__, tracksegment,
> + // CONV_TO_UTF8( TRACK::ShowState( tracksegment->GetState( -1 ) ) )
> + // ); )
> + D( std::cout<<__func__<<": track "<<tracksegment<<" status=" \
> + <<CONV_TO_UTF8( TRACK::ShowState( tracksegment->GetState( -1 ) ) ) \
> + <<std::endl;)
>
> GetBoard()->m_Track.Remove( tracksegment );
>
>
> === modified file 'pcbnew/dialog_design_rules.cpp'
> --- pcbnew/dialog_design_rules.cpp 2010-09-02 13:10:48 +0000
> +++ pcbnew/dialog_design_rules.cpp 2010-10-04 10:59:07 +0000
> @@ -52,7 +52,7 @@
> GRID_VIASIZE,
> GRID_VIADRILL,
> GRID_uVIASIZE,
> - GRID_uVIADRILL,
> + GRID_uVIADRILL
> };
>
> const wxString DIALOG_DESIGN_RULES::wildCard = _( "* (Any)" );
>
> === modified file 'pcbnew/specctra.h'
> --- pcbnew/specctra.h 2010-08-09 02:03:16 +0000
> +++ pcbnew/specctra.h 2010-10-04 10:59:55 +0000
> @@ -477,7 +477,7 @@
> T_write_resolution,
> T_x,
> T_xy,
> - T_y,
> + T_y
> };
>
>
>
> === modified file 'pcbnew/tr_modif.cpp'
> --- pcbnew/tr_modif.cpp 2009-11-20 14:55:20 +0000
> +++ pcbnew/tr_modif.cpp 2010-10-04 11:01:03 +0000
> @@ -86,7 +86,8 @@
> /* Flags for cleaning the net. */
> for( pt_del = BufDeb; pt_del; pt_del = pt_del->Next() )
> {
> - D( printf( "track %p turning off BUSY | EDIT | CHAIN\n", pt_del ); )
> + //D( printf( "track %p turning off BUSY | EDIT | CHAIN\n", pt_del ); )
> + D( std::cout<<"track "<<pt_del<<" turning off BUSY | EDIT | CHAIN"<<std::endl; )
> pt_del->SetState( BUSY | EDIT | CHAIN, OFF );
> if( pt_del == BufEnd ) // Last segment reached
> break;
>
> === modified file 'polygon/PolyLine.cpp'
> --- polygon/PolyLine.cpp 2009-11-16 12:10:37 +0000
> +++ polygon/PolyLine.cpp 2010-10-04 10:53:37 +0000
> @@ -1193,7 +1193,7 @@
> if( GetClosed() ) // If not closed, the poly is beeing created and not finalised. Not not hatch
> {
> enum {
> - MAXPTS = 100,
> + MAXPTS = 100
> };
> int xx[MAXPTS], yy[MAXPTS];
>
>
> === modified file 'polygon/kbool/src/booleng.cpp'
> --- polygon/kbool/src/booleng.cpp 2009-09-17 17:48:40 +0000
> +++ polygon/kbool/src/booleng.cpp 2010-10-04 10:39:33 +0000
> @@ -164,13 +164,13 @@
> Write_Log( "FATAL ERROR: ", title );
> Write_Log( "FATAL ERROR: ", text );
> throw Bool_Engine_Error( " Fatal Error", "Fatal Error", 9, 1 );
> -};
> +}
>
> void Bool_Engine::info( string text, string title )
> {
> Write_Log( "FATAL ERROR: ", title );
> Write_Log( "FATAL ERROR: ", text );
> -};
> +}
>
> void Bool_Engine::SetMarge( double marge )
> {
>
> === modified file 'polygon/kbool/src/graph.cpp'
> --- polygon/kbool/src/graph.cpp 2009-09-17 17:48:40 +0000
> +++ polygon/kbool/src/graph.cpp 2010-10-04 10:39:33 +0000
> @@ -88,7 +88,7 @@
> kbLink* kbGraph::GetFirstLink()
> {
> return ( kbLink* ) _linklist->headitem();
> -};
> +}
>
>
> void kbGraph::Prepare( int intersectionruns )
> @@ -2275,7 +2275,7 @@
>
> // make a link between the last and the first to close the graph
> AddLink( _last_ins, _first );
> -};
> +}
>
> //make the graph clockwise orientation,
> //return if the graph needed redirection
>
>
Follow ups
References