From 325d5a6bcdf1b204fbb2fe6c72057b1a65b9bbbd Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 Aug 2013 00:15:23 -0500 Subject: [PATCH 01/42] *) retain grid origin in the BOARD and save it in legacy and kicad board files. *) add hotkey for setting the grid origin as 'S', in board editor, module editor. *) re-position the function interface for cursor movement from BASE_SCREEN into class EDA_DRAW_FRAME. This is a prelude to getting rid of BASE_SCREEN or splitting it up. --- common/base_screen.cpp | 26 +- common/base_units.cpp | 23 +- common/block_commande.cpp | 36 +- common/drawframe.cpp | 82 ++++- common/drawpanel.cpp | 56 ++-- common/pcb.keywords | 1 + common/zoom.cpp | 18 +- cvpcb/class_DisplayFootprintsFrame.cpp | 16 +- eeschema/block.cpp | 20 +- eeschema/block_libedit.cpp | 12 +- eeschema/bus-wire-junction.cpp | 10 +- eeschema/busentry.cpp | 10 +- eeschema/controle.cpp | 47 ++- eeschema/dialogs/dialog_erc.cpp | 4 +- eeschema/edit_bitmap.cpp | 6 +- eeschema/edit_label.cpp | 8 +- eeschema/find.cpp | 9 +- eeschema/getpart.cpp | 2 +- eeschema/hierarch.cpp | 4 +- eeschema/hotkeys.cpp | 28 +- eeschema/libeditframe.cpp | 10 +- eeschema/onrightclick.cpp | 12 +- eeschema/pinedit.cpp | 16 +- eeschema/sch_base_frame.cpp | 17 +- eeschema/schedit.cpp | 20 +- eeschema/schframe.cpp | 2 +- eeschema/sheet.cpp | 19 +- eeschema/symbdraw.cpp | 26 +- eeschema/symbedit.cpp | 6 +- eeschema/viewlib_frame.cpp | 14 +- gerbview/block.cpp | 13 +- gerbview/class_gbr_layout.h | 4 +- gerbview/controle.cpp | 14 +- gerbview/gerbview_frame.cpp | 23 +- gerbview/gerbview_frame.h | 14 +- gerbview/hotkeys.cpp | 44 +-- gerbview/locate.cpp | 2 +- include/class_base_screen.h | 226 ++++++------- include/class_board_design_settings.h | 2 + include/class_drawpanel.h | 74 +++-- include/class_sch_screen.h | 12 +- include/hotkeys_basic.h | 1 + include/sch_base_frame.h | 11 +- include/wxBasePcbFrame.h | 7 +- include/wxstruct.h | 135 ++++++-- pagelayout_editor/class_pl_editor_layout.h | 2 +- pagelayout_editor/controle.cpp | 21 +- pagelayout_editor/events_functions.cpp | 10 +- pagelayout_editor/hotkeys.cpp | 6 +- pagelayout_editor/pl_editor_frame.cpp | 73 +++-- pagelayout_editor/pl_editor_frame.h | 17 +- pcbnew/autorouter/automove.cpp | 18 +- pcbnew/autorouter/autoplac.cpp | 96 +++--- pcbnew/basepcbframe.cpp | 42 ++- pcbnew/block.cpp | 46 +-- pcbnew/block_module_editor.cpp | 46 +-- pcbnew/class_board.h | 22 +- pcbnew/controle.cpp | 28 +- pcbnew/cross-probing.cpp | 4 +- pcbnew/dialogs/dialog_SVG_print.cpp | 6 +- .../dialog_edit_module_for_BoardEditor.cpp | 20 +- .../dialog_edit_module_for_Modedit.cpp | 34 +- pcbnew/dialogs/dialog_gendrill.cpp | 2 +- pcbnew/dialogs/dialog_set_grid.cpp | 6 +- pcbnew/dimension.cpp | 8 +- pcbnew/edgemod.cpp | 10 +- pcbnew/edit.cpp | 30 +- pcbnew/edit_pcb_text.cpp | 8 +- pcbnew/editedge.cpp | 54 +-- pcbnew/editrack.cpp | 28 +- pcbnew/edtxtmod.cpp | 18 +- pcbnew/export_gencad.cpp | 8 +- pcbnew/footprint_wizard_frame.cpp | 36 +- pcbnew/gen_modules_placefile.cpp | 2 +- pcbnew/highlight.cpp | 2 +- pcbnew/hotkeys.cpp | 25 +- pcbnew/hotkeys_board_editor.cpp | 34 +- pcbnew/hotkeys_module_editor.cpp | 11 +- pcbnew/kicad_plugin.cpp | 8 +- pcbnew/legacy_plugin.cpp | 23 +- pcbnew/librairi.cpp | 2 +- pcbnew/loadcmp.cpp | 6 +- pcbnew/magnetic_tracks_functions.cpp | 3 +- pcbnew/mirepcb.cpp | 12 +- pcbnew/modedit.cpp | 308 +++++++++--------- pcbnew/modedit_onclick.cpp | 39 ++- pcbnew/moduleframe.cpp | 14 +- pcbnew/modules.cpp | 4 +- pcbnew/modview_frame.cpp | 18 +- pcbnew/move-drag_pads.cpp | 3 +- pcbnew/move_or_drag_track.cpp | 36 +- pcbnew/muonde.cpp | 11 +- pcbnew/onleftclick.cpp | 10 +- pcbnew/onrightclick.cpp | 16 +- pcbnew/pad_edition_functions.cpp | 2 +- pcbnew/pcb_parser.cpp | 76 +++-- pcbnew/plot_board_layers.cpp | 2 +- pcbnew/xchgmod.cpp | 26 +- pcbnew/zones_by_polygon.cpp | 16 +- scripts/lib_convert.py | 4 +- 100 files changed, 1373 insertions(+), 1181 deletions(-) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index efd6b3efe3..a47f21386d 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -288,10 +288,10 @@ GRID_TYPE& BASE_SCREEN::GetGrid( size_t aIndex ) } -wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, - wxRealPoint* aGridSize ) const +wxPoint BASE_SCREEN::getNearestGridPosition( const wxPoint& aPosition, + const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const { - wxPoint pt; + wxPoint pt; wxRealPoint gridSize; if( aGridSize ) @@ -299,13 +299,13 @@ wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, else gridSize = GetGridSize(); - wxPoint gridOrigin = m_GridOrigin; - - double offset = fmod( gridOrigin.x, gridSize.x ); + double offset = fmod( aGridOrigin.x, gridSize.x ); int x = KiROUND( (aPosition.x - offset) / gridSize.x ); + pt.x = KiROUND( x * gridSize.x + offset ); - offset = fmod( gridOrigin.y, gridSize.y ); + offset = fmod( aGridOrigin.y, gridSize.y ); + int y = KiROUND( (aPosition.y - offset) / gridSize.y ); pt.y = KiROUND ( y * gridSize.y + offset ); @@ -313,19 +313,19 @@ wxPoint BASE_SCREEN::GetNearestGridPosition( const wxPoint& aPosition, } -wxPoint BASE_SCREEN::GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize ) const +wxPoint BASE_SCREEN::getCursorPosition( bool aOnGrid, const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const { if( aOnGrid ) - return GetNearestGridPosition( m_crossHairPosition, aGridSize ); + return getNearestGridPosition( m_crossHairPosition, aGridOrigin, aGridSize ); return m_crossHairPosition; } -wxPoint BASE_SCREEN::GetCrossHairScreenPosition() const +wxPoint BASE_SCREEN::getCrossHairScreenPosition() const { wxPoint pos = m_crossHairPosition - m_DrawOrg; - double scalar = GetScalingFactor(); + double scalar = GetScalingFactor(); pos.x = KiROUND( (double) pos.x * scalar ); pos.y = KiROUND( (double) pos.y * scalar ); @@ -334,10 +334,10 @@ wxPoint BASE_SCREEN::GetCrossHairScreenPosition() const } -void BASE_SCREEN::SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid ) +void BASE_SCREEN::setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid ) { if( aSnapToGrid ) - m_crossHairPosition = GetNearestGridPosition( aPosition ); + m_crossHairPosition = getNearestGridPosition( aPosition, aGridOrigin ); else m_crossHairPosition = aPosition; } diff --git a/common/base_units.cpp b/common/base_units.cpp index e0d602812e..76dcc5d8c1 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -34,6 +34,7 @@ * depending on the application. */ +#include #include #include #include @@ -187,7 +188,7 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed ) /* Convert a value to a string using double notation. - * For readability, the mantissa has 3 or more digits (max 8 digits), + * For readability, the mantissa has 3 or more digits, * the trailing 0 are removed if the mantissa has more than 3 digits * and some trailing 0 * This function should be used to display values in dialogs because a value @@ -198,23 +199,19 @@ void StripTrailingZeros( wxString& aStringValue, unsigned aTrailingZeroAllowed ) */ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymbol ) { - wxString stringValue; - double value_to_print; - - value_to_print = To_User_Unit( aUnit, aValue ); + double value_to_print = To_User_Unit( aUnit, aValue ); #if defined( EESCHEMA ) - stringValue.Printf( wxT( "%.3f" ), value_to_print ); -#else - #if defined( USE_PCBNEW_NANOMETRES ) - stringValue.Printf( wxT( "%.8f" ), value_to_print ); - #else - stringValue.Printf( wxT( "%.4f" ), value_to_print ); - #endif + wxString stringValue = wxString::Format( wxT( "%.3f" ), value_to_print ); // Strip trailing zeros. However, keep at least 3 digits in mantissa // For readability StripTrailingZeros( stringValue, 3 ); + +#else + std::string s = Double2Str( value_to_print ); + wxString stringValue = FROM_UTF8( s.c_str() ); + #endif if( aAddUnitSymbol ) @@ -269,8 +266,6 @@ double From_User_Unit( EDA_UNITS_T aUnit, double aValue ) } - - int ReturnValueFromString( EDA_UNITS_T aUnits, const wxString& aTextValue ) { double value; diff --git a/common/block_commande.cpp b/common/block_commande.cpp index cc0ae64629..19a7a0ccfa 100644 --- a/common/block_commande.cpp +++ b/common/block_commande.cpp @@ -42,8 +42,8 @@ BLOCK_SELECTOR::BLOCK_SELECTOR() : EDA_RECT() { - m_state = STATE_NO_BLOCK; /* State (enum BLOCK_STATE_T) of block. */ - m_command = BLOCK_IDLE; /* Type (enum BLOCK_COMMAND_T) of operation. */ + m_state = STATE_NO_BLOCK; // State (enum BLOCK_STATE_T) of block. + m_command = BLOCK_IDLE; // Type (enum BLOCK_COMMAND_T) of operation. m_color = BROWN; } @@ -62,24 +62,24 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame ) case BLOCK_IDLE: break; - case BLOCK_MOVE: /* Move */ - case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ + case BLOCK_MOVE: // Move + case BLOCK_PRESELECT_MOVE: // Move with preselection list msg = _( "Block Move" ); break; - case BLOCK_DRAG: /* Drag */ + case BLOCK_DRAG: // Drag msg = _( "Block Drag" ); break; - case BLOCK_COPY: /* Copy */ + case BLOCK_COPY: // Copy msg = _( "Block Copy" ); break; - case BLOCK_DELETE: /* Delete */ + case BLOCK_DELETE: // Delete msg = _( "Block Delete" ); break; - case BLOCK_SAVE: /* Save */ + case BLOCK_SAVE: // Save msg = _( "Block Save" ); break; @@ -87,20 +87,20 @@ void BLOCK_SELECTOR::SetMessageBlock( EDA_DRAW_FRAME* frame ) msg = _( "Block Paste" ); break; - case BLOCK_ZOOM: /* Window Zoom */ + case BLOCK_ZOOM: // Window Zoom msg = _( "Win Zoom" ); break; - case BLOCK_ROTATE: /* Rotate 90 deg */ + case BLOCK_ROTATE: // Rotate 90 deg msg = _( "Block Rotate" ); break; - case BLOCK_FLIP: /* Flip */ + case BLOCK_FLIP: // Flip msg = _( "Block Flip" ); break; case BLOCK_MIRROR_X: - case BLOCK_MIRROR_Y: /* mirror */ + case BLOCK_MIRROR_Y: // mirror msg = _( "Block Mirror" ); break; @@ -185,15 +185,15 @@ void DrawAndSizingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoin if( aErase ) block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() ); - block->SetLastCursorPosition( aPanel->GetScreen()->GetCrossHairPosition() ); - block->SetEnd( aPanel->GetScreen()->GetCrossHairPosition() ); + block->SetLastCursorPosition( aPanel->GetParent()->GetCrossHairPosition() ); + block->SetEnd( aPanel->GetParent()->GetCrossHairPosition() ); block->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, block->GetColor() ); if( block->GetState() == STATE_BLOCK_INIT ) { if( block->GetWidth() || block->GetHeight() ) - /* 2nd point exists: the rectangle is not surface anywhere */ + // 2nd point exists: the rectangle is not surface anywhere block->SetState( STATE_BLOCK_END ); } } @@ -203,14 +203,14 @@ void AbortBlockCurrentCommand( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { BASE_SCREEN* screen = aPanel->GetScreen(); - if( aPanel->IsMouseCaptured() ) /* Erase current drawing on screen */ + if( aPanel->IsMouseCaptured() ) // Erase current drawing on screen { - /* Clear block outline. */ + // Clear block outline. aPanel->CallMouseCapture( aDC, wxDefaultPosition, false ); aPanel->SetMouseCapture( NULL, NULL ); screen->SetCurItem( NULL ); - /* Delete the picked wrapper if this is a picked list. */ + // Delete the picked wrapper if this is a picked list. if( screen->m_BlockLocate.GetCommand() != BLOCK_PASTE ) screen->m_BlockLocate.ClearItemsList(); } diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 56ac99c931..a05a9d8fc3 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -114,26 +114,18 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent, m_snapToGrid = true; m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); - - //#define ZOOM_DISPLAY_SIZE 60 - //#define COORD_DISPLAY_SIZE 165 - //#define DELTA_DISPLAY_SIZE 245 - //#define UNITS_DISPLAY_SIZE 65 - #define FUNCTION_DISPLAY_SIZE 110 - CreateStatusBar( 6 ); // set the size of the status bar subwindows: wxWindow* stsbar = GetStatusBar(); - int dims[] = { - // balance of status bar on far left is set to a default or whatever is left over. + // remainder of status bar on far left is set to a default or whatever is left over. -1, - // When using GetTextSize() remember the width of '1' is not the same + // When using GetTextSize() remember the width of character '1' is not the same // as the width of '0' unless the font is fixed width, and it usually won't be. // zoom: @@ -148,7 +140,9 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( wxWindow* aParent, // units display, Inches is bigger than mm GetTextSize( _( "Inches" ), stsbar ).x + 10, - FUNCTION_DISPLAY_SIZE, + // Size for the panel used as "Current tool in play": will take longest string from + // void PCB_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) in pcbnew/edit.cpp + GetTextSize( wxT( "Add layer alignment target" ), stsbar ).x + 10, }; SetStatusWidths( DIM( dims ), dims ); @@ -381,7 +375,7 @@ void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event ) */ m_LastGridSizeId = id - ID_POPUP_GRID_LEVEL_1000; screen->SetGrid( id ); - screen->SetCrossHairPosition( screen->RefPos( true ) ); + SetCrossHairPosition( RefPos( true ) ); Refresh(); } @@ -409,7 +403,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event ) return; GetScreen()->SetZoom( selectedZoom ); - RedrawScreen( GetScreen()->GetScrollCenterPosition(), false ); + RedrawScreen( GetScrollCenterPosition(), false ); } } @@ -495,7 +489,7 @@ wxPoint EDA_DRAW_FRAME::GetGridPosition( const wxPoint& aPosition ) const wxPoint pos = aPosition; if( m_currentScreen != NULL && m_snapToGrid ) - pos = m_currentScreen->GetNearestGridPosition( aPosition ); + pos = GetNearestGridPosition( aPosition ); return pos; } @@ -878,7 +872,7 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) // Calculate the scroll bar position in internal units to place the // center position at the center of client rectangle. - screen->SetScrollCenterPosition( centerPositionIU ); + SetScrollCenterPosition( centerPositionIU ); double posX = centerPositionIU.x - clientRectIU.width /2.0 - screen->m_DrawOrg.x; double posY = centerPositionIU.y - clientRectIU.height/2.0 - screen->m_DrawOrg.y; @@ -931,3 +925,61 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) screen->m_ScrollbarPos.x, screen->m_ScrollbarPos.y, noRefresh ); } + +//-----< BASE_SCREEN API moved here >-------------------------------------------- + +wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const +{ + return GetScreen()->getCrossHairPosition(); +} + + +void EDA_DRAW_FRAME::SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid ) +{ + GetScreen()->setCrossHairPosition( aPosition, GetGridOrigin(), aSnapToGrid ); +} + + +wxPoint EDA_DRAW_FRAME::GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize ) const +{ + return GetScreen()->getCursorPosition( aOnGrid, GetGridOrigin(), aGridSize ); +} + + +wxPoint EDA_DRAW_FRAME::GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize ) const +{ + return GetScreen()->getNearestGridPosition( aPosition, GetGridOrigin(), aGridSize ); +} + + +wxPoint EDA_DRAW_FRAME::GetCrossHairScreenPosition() const +{ + return GetScreen()->getCrossHairScreenPosition(); +} + + +void EDA_DRAW_FRAME::SetMousePosition( const wxPoint& aPosition ) +{ + GetScreen()->setMousePosition( aPosition ); +} + + +wxPoint EDA_DRAW_FRAME::RefPos( bool useMouse ) const +{ + return GetScreen()->refPos( useMouse ); +} + + +const wxPoint& EDA_DRAW_FRAME::GetScrollCenterPosition() const +{ + return GetScreen()->getScrollCenterPosition(); +} + + +void EDA_DRAW_FRAME::SetScrollCenterPosition( const wxPoint& aPoint ) +{ + GetScreen()->setScrollCenterPosition( aPoint ); +} + +//------------------------------------------------- + diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 1e47b8e8c5..521c73e771 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -181,7 +181,7 @@ void EDA_DRAW_PANEL::DrawCrossHair( wxDC* aDC, EDA_COLOR_T aColor ) if( m_cursorLevel != 0 || aDC == NULL || !m_showCrossHair ) return; - wxPoint cursor = GetScreen()->GetCrossHairPosition(); + wxPoint cursor = GetParent()->GetCrossHairPosition(); GRSetDrawMode( aDC, GR_XOR ); @@ -297,7 +297,7 @@ wxPoint EDA_DRAW_PANEL::GetScreenCenterLogicalPosition() void EDA_DRAW_PANEL::MoveCursorToCrossHair() { - MoveCursor( GetScreen()->GetCrossHairPosition() ); + MoveCursor( GetParent()->GetCrossHairPosition() ); } @@ -433,10 +433,10 @@ void EDA_DRAW_PANEL::OnScroll( wxScrollWinEvent& event ) double scale = GetParent()->GetScreen()->GetScalingFactor(); - wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition(); + wxPoint center = GetParent()->GetScrollCenterPosition(); center.x += KiROUND( (double) ( x - tmpX ) / scale ); center.y += KiROUND( (double) ( y - tmpY ) / scale ); - GetParent()->GetScreen()->SetScrollCenterPosition( center ); + GetParent()->SetScrollCenterPosition( center ); Scroll( x, y ); event.Skip(); @@ -609,7 +609,7 @@ void EDA_DRAW_PANEL::DrawBackGround( wxDC* DC ) DrawAuxiliaryAxis( DC, GR_COPY ); if( GetParent()->m_showGridAxis ) - DrawGridAxis( DC, GR_COPY ); + DrawGridAxis( DC, GR_COPY, GetParent()->GetGridOrigin() ); } @@ -645,7 +645,7 @@ void EDA_DRAW_PANEL::DrawGrid( wxDC* aDC ) if( screenGridSize.x < MIN_GRID_SIZE || screenGridSize.y < MIN_GRID_SIZE ) return; - org = screen->GetNearestGridPosition( org, &gridSize ); + org = GetParent()->GetNearestGridPosition( org, &gridSize ); // Setting the nearest grid position can select grid points outside the clip box. // Incrementing the start point by one grid step should prevent drawing grid points @@ -740,7 +740,7 @@ void EDA_DRAW_PANEL::DrawGrid( wxDC* aDC ) void EDA_DRAW_PANEL::DrawAuxiliaryAxis( wxDC* aDC, GR_DRAWMODE aDrawMode ) { - wxPoint origin = GetParent()->GetOriginAxisPosition(); + wxPoint origin = GetParent()->GetAuxOrigin(); if( origin == wxPoint( 0, 0 ) ) return; @@ -768,33 +768,30 @@ void EDA_DRAW_PANEL::DrawAuxiliaryAxis( wxDC* aDC, GR_DRAWMODE aDrawMode ) } -void EDA_DRAW_PANEL::DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode ) +void EDA_DRAW_PANEL::DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aGridOrigin ) { - BASE_SCREEN* screen = GetScreen(); - - if( !GetParent()->m_showGridAxis - || ( screen->m_GridOrigin.x == 0 && screen->m_GridOrigin.y == 0 ) ) + if( !GetParent()->m_showGridAxis || ( !aGridOrigin.x && !aGridOrigin.y ) ) return; - EDA_COLOR_T color = GetParent()->GetGridColor(); - wxSize pageSize = GetParent()->GetPageSizeIU(); + EDA_COLOR_T color = GetParent()->GetGridColor(); + wxSize pageSize = GetParent()->GetPageSizeIU(); GRSetDrawMode( aDC, aDrawMode ); // Draw the Y axis GRDashedLine( &m_ClipBox, aDC, - screen->m_GridOrigin.x, + aGridOrigin.x, -pageSize.y, - screen->m_GridOrigin.x, + aGridOrigin.x, pageSize.y, 0, color ); // Draw the X axis GRDashedLine( &m_ClipBox, aDC, -pageSize.x, - screen->m_GridOrigin.y, + aGridOrigin.y, pageSize.x, - screen->m_GridOrigin.y, + aGridOrigin.y, 0, color ); } @@ -846,7 +843,7 @@ void EDA_DRAW_PANEL::OnMouseLeaving( wxMouseEvent& event ) cross_hair_pos.x = dc.DeviceToLogicalX( cross_hair_pos.x ); cross_hair_pos.y = dc.DeviceToLogicalY( cross_hair_pos.y ); - GetScreen()->SetCrossHairPosition( cross_hair_pos ); + GetParent()->SetCrossHairPosition( cross_hair_pos ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED, ID_POPUP_ZOOM_CENTER ); cmd.SetEventObject( this ); @@ -876,7 +873,7 @@ void EDA_DRAW_PANEL::OnMouseWheel( wxMouseEvent& event ) } INSTALL_UNBUFFERED_DC( dc, this ); - GetScreen()->SetCrossHairPosition( event.GetLogicalPosition( dc ) ); + GetParent()->SetCrossHairPosition( event.GetLogicalPosition( dc ) ); wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); @@ -970,7 +967,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) DC.SetBackground( *wxBLACK_BRUSH ); // Compute the cursor position in drawing (logical) units. - screen->SetMousePosition( event.GetLogicalPosition( DC ) ); + GetParent()->SetMousePosition( event.GetLogicalPosition( DC ) ); int kbstat = 0; @@ -986,7 +983,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) // Calling Double Click and Click functions : if( localbutt == (int) ( GR_M_LEFT_DOWN | GR_M_DCLICK ) ) { - GetParent()->OnLeftDClick( &DC, screen->RefPos( true ) ); + GetParent()->OnLeftDClick( &DC, GetParent()->RefPos( true ) ); // inhibit a response to the mouse left button release, // because we have a double click, and we do not want a new @@ -1003,7 +1000,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) m_ignoreNextLeftButtonRelease = false; if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK && !ignoreEvt ) - GetParent()->OnLeftClick( &DC, screen->RefPos( true ) ); + GetParent()->OnLeftClick( &DC, GetParent()->RefPos( true ) ); } else if( !event.LeftIsDown() ) @@ -1027,7 +1024,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) m_PanStartCenter.y *= ppuy; } else - m_PanStartCenter = GetParent()->GetScreen()->GetScrollCenterPosition(); + m_PanStartCenter = GetParent()->GetScrollCenterPosition(); m_PanStartEventPosition = event.GetPosition(); @@ -1101,10 +1098,10 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) double scale = GetParent()->GetScreen()->GetScalingFactor(); - wxPoint center = GetParent()->GetScreen()->GetScrollCenterPosition(); + wxPoint center = GetParent()->GetScrollCenterPosition(); center.x += KiROUND( (double) ( x - tmpX ) / scale ) / ppux; center.y += KiROUND( (double) ( y - tmpY ) / scale ) / ppuy; - GetParent()->GetScreen()->SetScrollCenterPosition( center ); + GetParent()->SetScrollCenterPosition( center ); Refresh(); Update(); @@ -1164,7 +1161,7 @@ void EDA_DRAW_PANEL::OnMouseEvent( wxMouseEvent& event ) * (a filter creates a delay for the real block command start, and * we must remember this point) */ - m_CursorStartPos = screen->GetCrossHairPosition(); + m_CursorStartPos = GetParent()->GetCrossHairPosition(); } if( m_enableBlockCommands && !(localbutt & GR_M_DCLICK) ) @@ -1323,17 +1320,14 @@ void EDA_DRAW_PANEL::OnKeyEvent( wxKeyEvent& event ) INSTALL_UNBUFFERED_DC( DC, this ); - BASE_SCREEN* Screen = GetScreen(); - // Some key commands use the current mouse position: refresh it. pos = wxGetMousePosition() - GetScreenPosition(); // Compute the cursor position in drawing units. Also known as logical units to wxDC. pos = wxPoint( DC.DeviceToLogicalX( pos.x ), DC.DeviceToLogicalY( pos.y ) ); - Screen->SetMousePosition( pos ); + GetParent()->SetMousePosition( pos ); GetParent()->GeneralControl( &DC, pos, localkey ); - } diff --git a/common/pcb.keywords b/common/pcb.keywords index 1a7d902e68..93809b5d3a 100644 --- a/common/pcb.keywords +++ b/common/pcb.keywords @@ -76,6 +76,7 @@ fp_poly fp_text full general +grid_origin gr_arc gr_circle gr_curve diff --git a/common/zoom.cpp b/common/zoom.cpp index 2c25c7a19f..13db514edb 100644 --- a/common/zoom.cpp +++ b/common/zoom.cpp @@ -57,7 +57,7 @@ void EDA_DRAW_FRAME::RedrawScreen( const wxPoint& aCenterPoint, bool aWarpPointe void EDA_DRAW_FRAME::RedrawScreen2( const wxPoint& posBefore ) { wxPoint dPos = posBefore - m_canvas->GetClientSize() / 2; // relative screen position to center before zoom - wxPoint newScreenPos = m_canvas->ToDeviceXY( GetScreen()->GetCrossHairPosition() ); // screen position of crosshair after zoom + wxPoint newScreenPos = m_canvas->ToDeviceXY( GetCrossHairPosition() ); // screen position of crosshair after zoom wxPoint newCenter = m_canvas->ToLogicalXY( newScreenPos - dPos ); AdjustScrollBars( newCenter ); @@ -80,9 +80,9 @@ void EDA_DRAW_FRAME::Zoom_Automatique( bool aWarpPointer ) screen->SetScalingFactor( bestzoom ); if( screen->m_FirstRedraw ) - screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); + SetCrossHairPosition( GetScrollCenterPosition() ); - RedrawScreen( screen->GetScrollCenterPosition(), aWarpPointer ); + RedrawScreen( GetScrollCenterPosition(), aWarpPointer ); } @@ -120,19 +120,19 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) int id = event.GetId(); bool zoom_at_cursor = false; BASE_SCREEN* screen = GetScreen(); - wxPoint center = screen->GetScrollCenterPosition(); + wxPoint center = GetScrollCenterPosition(); switch( id ) { case ID_OFFCENTER_ZOOM_IN: - center = m_canvas->ToDeviceXY( screen->GetCrossHairPosition() ); + center = m_canvas->ToDeviceXY( GetCrossHairPosition() ); if( screen->SetPreviousZoom() ) RedrawScreen2( center ); break; case ID_POPUP_ZOOM_IN: zoom_at_cursor = true; - center = screen->GetCrossHairPosition(); + center = GetCrossHairPosition(); // fall thru case ID_ZOOM_IN: @@ -141,14 +141,14 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) break; case ID_OFFCENTER_ZOOM_OUT: - center = m_canvas->ToDeviceXY( screen->GetCrossHairPosition() ); + center = m_canvas->ToDeviceXY( GetCrossHairPosition() ); if( screen->SetNextZoom() ) RedrawScreen2( center ); break; case ID_POPUP_ZOOM_OUT: zoom_at_cursor = true; - center = screen->GetCrossHairPosition(); + center = GetCrossHairPosition(); // fall thru case ID_ZOOM_OUT: @@ -161,7 +161,7 @@ void EDA_DRAW_FRAME::OnZoom( wxCommandEvent& event ) break; case ID_POPUP_ZOOM_CENTER: - center = screen->GetCrossHairPosition(); + center = GetCrossHairPosition(); RedrawScreen( center, true ); break; diff --git a/cvpcb/class_DisplayFootprintsFrame.cpp b/cvpcb/class_DisplayFootprintsFrame.cpp index 7f006ca337..b868985389 100644 --- a/cvpcb/class_DisplayFootprintsFrame.cpp +++ b/cvpcb/class_DisplayFootprintsFrame.cpp @@ -339,8 +339,8 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); - pos = screen->GetNearestGridPosition( pos ); - oldpos = screen->GetCrossHairPosition(); + pos = GetNearestGridPosition( pos ); + oldpos = GetCrossHairPosition(); gridSize = screen->GetGridSize(); switch( aHotKey ) @@ -371,7 +371,7 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi break; case ' ': - screen->m_O_Curseur = screen->GetCrossHairPosition(); + screen->m_O_Curseur = GetCrossHairPosition(); break; case WXK_NUMPAD8: /* cursor moved up */ @@ -399,14 +399,14 @@ void DISPLAY_FOOTPRINTS_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPositi break; } - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); - if( oldpos != screen->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = screen->GetCrossHairPosition(); - screen->SetCrossHairPosition( oldpos ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos ); m_canvas->CrossHairOff( aDC ); - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) diff --git a/eeschema/block.cpp b/eeschema/block.cpp index ad288b2538..ffe41aa98c 100644 --- a/eeschema/block.cpp +++ b/eeschema/block.cpp @@ -215,7 +215,7 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) block->SetState( state ); block->SetCommand( command ); m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand ); - GetScreen()->SetCrossHairPosition( block->GetEnd() ); + SetCrossHairPosition( block->GetEnd() ); if( block->GetCommand() != BLOCK_ABORT ) m_canvas->MoveCursorToCrossHair(); @@ -237,8 +237,8 @@ bool SCH_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) { // Compute the rotation center and put it on grid: wxPoint rotationPoint = block->Centre(); - rotationPoint = GetScreen()->GetNearestGridPosition( rotationPoint ); - GetScreen()->SetCrossHairPosition( rotationPoint ); + rotationPoint = GetNearestGridPosition( rotationPoint ); + SetCrossHairPosition( rotationPoint ); SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint ); RotateListOfItems( block->GetItems(), rotationPoint ); OnModify(); @@ -433,8 +433,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) { /* Compute the rotation center and put it on grid */ wxPoint rotationPoint = block->Centre(); - rotationPoint = GetScreen()->GetNearestGridPosition( rotationPoint ); - GetScreen()->SetCrossHairPosition( rotationPoint ); + rotationPoint = GetNearestGridPosition( rotationPoint ); + SetCrossHairPosition( rotationPoint ); SaveCopyInUndoList( block->GetItems(), UR_ROTATED, rotationPoint ); RotateListOfItems( block->GetItems(), rotationPoint ); OnModify(); @@ -452,8 +452,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) { /* Compute the mirror center and put it on grid */ wxPoint mirrorPoint = block->Centre(); - mirrorPoint = GetScreen()->GetNearestGridPosition( mirrorPoint ); - GetScreen()->SetCrossHairPosition( mirrorPoint ); + mirrorPoint = GetNearestGridPosition( mirrorPoint ); + SetCrossHairPosition( mirrorPoint ); SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_X, mirrorPoint ); MirrorX( block->GetItems(), mirrorPoint ); OnModify(); @@ -471,8 +471,8 @@ void SCH_EDIT_FRAME::HandleBlockEndByPopUp( int Command, wxDC* DC ) { /* Compute the mirror center and put it on grid */ wxPoint mirrorPoint = block->Centre(); - mirrorPoint = GetScreen()->GetNearestGridPosition( mirrorPoint ); - GetScreen()->SetCrossHairPosition( mirrorPoint ); + mirrorPoint = GetNearestGridPosition( mirrorPoint ); + SetCrossHairPosition( mirrorPoint ); SaveCopyInUndoList( block->GetItems(), UR_MIRRORED_Y, mirrorPoint ); MirrorY( block->GetItems(), mirrorPoint ); OnModify(); @@ -519,7 +519,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx } /* Repaint new view. */ - block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() ); + block->SetMoveVector( aPanel->GetParent()->GetCrossHairPosition() - block->GetLastCursorPosition() ); block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() ); for( unsigned ii = 0; ii < block->GetCount(); ii++ ) diff --git a/eeschema/block_libedit.cpp b/eeschema/block_libedit.cpp index 5f099321b1..b1eb193217 100644 --- a/eeschema/block_libedit.cpp +++ b/eeschema/block_libedit.cpp @@ -99,8 +99,8 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) GetScreen()->m_BlockLocate.SetState( state ); GetScreen()->m_BlockLocate.SetCommand( command ); m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand ); - GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(), - GetScreen()->m_BlockLocate.GetBottom() ) ); + SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(), + GetScreen()->m_BlockLocate.GetBottom() ) ); m_canvas->MoveCursorToCrossHair(); } @@ -171,7 +171,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) SaveCopyInUndoList( m_component ); pt = GetScreen()->m_BlockLocate.Centre(); - pt = GetScreen()->GetNearestGridPosition( pt ); + pt = GetNearestGridPosition( pt ); NEGATE( pt.y ); if ( m_component ) @@ -183,7 +183,7 @@ bool LIB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) m_component->MirrorSelectedItemsH( pt ); else if( block_cmd == BLOCK_MIRROR_X) m_component->MirrorSelectedItemsV( pt ); - else if( block_cmd == BLOCK_ROTATE) + else if( block_cmd == BLOCK_ROTATE ) m_component->RotateSelectedItems( pt ); } @@ -275,7 +275,7 @@ void LIB_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) SaveCopyInUndoList( m_component ); pt = GetScreen()->m_BlockLocate.Centre(); - pt = GetScreen()->GetNearestGridPosition( pt ); + pt = GetNearestGridPosition( pt ); NEGATE( pt.y ); if ( m_component ) @@ -342,7 +342,7 @@ void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& } // Repaint new view - block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() ); + block->SetMoveVector( parent->GetCrossHairPosition() - block->GetLastCursorPosition() ); GRSetDrawMode( aDC, g_XorMode ); block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() ); diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 3419efcd9e..72890bee3e 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -81,8 +81,9 @@ static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi } } - wxPoint endpos = aPanel->GetScreen()->GetCrossHairPosition(); - SCH_EDIT_FRAME * frame = ( SCH_EDIT_FRAME * ) aPanel->GetParent(); + SCH_EDIT_FRAME* frame = (SCH_EDIT_FRAME*) aPanel->GetParent(); + + wxPoint endpos = frame->GetCrossHairPosition(); if( frame->GetForceHVLines() ) /* Coerce the line to vertical or horizontal one: */ ComputeBreakPoint( (SCH_LINE*) s_wires.GetLast()->Back(), endpos ); @@ -105,7 +106,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) { SCH_LINE* segment; SCH_LINE* nextSegment; - wxPoint cursorpos = GetScreen()->GetCrossHairPosition(); + wxPoint cursorpos = GetCrossHairPosition(); // We should know if a segment is currently in progress segment = (SCH_LINE*) GetScreen()->GetCurItem(); @@ -426,8 +427,9 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC ) if( m_itemToRepeat->Type() == SCH_COMPONENT_T ) // If repeat component then put in move mode { - wxPoint pos = GetScreen()->GetCrossHairPosition() - + wxPoint pos = GetCrossHairPosition() - ( (SCH_COMPONENT*) m_itemToRepeat )->GetPosition(); + m_itemToRepeat->SetFlags( IS_NEW ); ( (SCH_COMPONENT*) m_itemToRepeat )->SetTimeStamp( GetNewTimeStamp() ); m_itemToRepeat->Move( pos ); diff --git a/eeschema/busentry.cpp b/eeschema/busentry.cpp index a9f6f70755..2e83b8866e 100644 --- a/eeschema/busentry.cpp +++ b/eeschema/busentry.cpp @@ -45,10 +45,9 @@ static int s_LastShape = '\\'; SCH_BUS_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusBusEntry( wxDC* aDC ) { - SCH_SCREEN* screen = GetScreen(); - // Create and place a new bus entry at cursor position - SCH_BUS_BUS_ENTRY* busEntry = new SCH_BUS_BUS_ENTRY( screen->GetCrossHairPosition(), s_LastShape ); + SCH_BUS_BUS_ENTRY* busEntry = new SCH_BUS_BUS_ENTRY( GetCrossHairPosition(), s_LastShape ); + busEntry->SetFlags( IS_NEW ); GetScreen()->SetCurItem( busEntry ); addCurrentItemToList( aDC ); @@ -57,10 +56,9 @@ SCH_BUS_BUS_ENTRY* SCH_EDIT_FRAME::CreateBusBusEntry( wxDC* aDC ) SCH_BUS_WIRE_ENTRY* SCH_EDIT_FRAME::CreateBusWireEntry( wxDC* aDC ) { - SCH_SCREEN* screen = GetScreen(); - // Create and place a new bus entry at cursor position - SCH_BUS_WIRE_ENTRY* busEntry = new SCH_BUS_WIRE_ENTRY( screen->GetCrossHairPosition(), s_LastShape ); + SCH_BUS_WIRE_ENTRY* busEntry = new SCH_BUS_WIRE_ENTRY( GetCrossHairPosition(), s_LastShape ); + busEntry->SetFlags( IS_NEW ); GetScreen()->SetCurItem( busEntry ); addCurrentItemToList( aDC ); diff --git a/eeschema/controle.cpp b/eeschema/controle.cpp index 3573aad8bb..0ae2642e9a 100644 --- a/eeschema/controle.cpp +++ b/eeschema/controle.cpp @@ -56,7 +56,7 @@ SCH_ITEM* SCH_EDIT_FRAME::LocateAndShowItem( const wxPoint& aPosition, const KIC wxString msg; LIB_PIN* Pin = NULL; SCH_COMPONENT* LibItem = NULL; - wxPoint gridPosition = GetScreen()->GetNearestGridPosition( aPosition ); + wxPoint gridPosition = GetNearestGridPosition( aPosition ); // Check the on grid position first. There is more likely to be multiple items on // grid than off grid. @@ -222,9 +222,9 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH snapToGrid = true; if( snapToGrid ) - pos = screen->GetNearestGridPosition( pos ); + pos = GetNearestGridPosition( pos ); - oldpos = screen->GetCrossHairPosition(); + oldpos = GetCrossHairPosition(); gridSize = screen->GetGridSize(); switch( aHotKey ) @@ -261,14 +261,14 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH } // Update cursor position. - screen->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); - if( oldpos != screen->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = screen->GetCrossHairPosition(); - screen->SetCrossHairPosition( oldpos, false); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos, false); m_canvas->CrossHairOff( aDC ); - screen->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) @@ -304,7 +304,6 @@ void SCH_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { wxRealPoint gridSize; - SCH_SCREEN* screen = GetScreen(); wxPoint oldpos; wxPoint pos = aPosition; @@ -320,10 +319,10 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH snapToGrid = true; if( snapToGrid ) - pos = screen->GetNearestGridPosition( pos ); + pos = GetNearestGridPosition( pos ); - oldpos = screen->GetCrossHairPosition(); - gridSize = screen->GetGridSize(); + oldpos = GetCrossHairPosition(); + gridSize = GetScreen()->GetGridSize(); switch( aHotKey ) { @@ -359,14 +358,14 @@ void LIB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH } // Update the cursor position. - screen->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); - if( oldpos != screen->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = screen->GetCrossHairPosition(); - screen->SetCrossHairPosition( oldpos, false ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos, false ); m_canvas->CrossHairOff( aDC ); - screen->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) @@ -403,8 +402,8 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH wxPoint oldpos; wxPoint pos = aPosition; - pos = screen->GetNearestGridPosition( pos ); - oldpos = screen->GetCrossHairPosition(); + pos = GetNearestGridPosition( pos ); + oldpos = GetCrossHairPosition(); gridSize = screen->GetGridSize(); switch( aHotKey ) @@ -441,14 +440,14 @@ void LIB_VIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH } // Update cursor position. - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); - if( oldpos != screen->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = screen->GetCrossHairPosition(); - screen->SetCrossHairPosition( oldpos ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos ); m_canvas->CrossHairOff( aDC ); - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) diff --git a/eeschema/dialogs/dialog_erc.cpp b/eeschema/dialogs/dialog_erc.cpp index 9b0b7e4d44..3bc9498da5 100644 --- a/eeschema/dialogs/dialog_erc.cpp +++ b/eeschema/dialogs/dialog_erc.cpp @@ -205,7 +205,7 @@ void DIALOG_ERC::OnLeftClickMarkersList( wxCommandEvent& event ) } m_lastMarkerFound = marker; - m_parent->GetScreen()->SetCrossHairPosition( marker->m_Pos ); + m_parent->SetCrossHairPosition( marker->m_Pos ); m_parent->RedrawScreen( marker->m_Pos, false); } @@ -218,7 +218,7 @@ void DIALOG_ERC::OnLeftDblClickMarkersList( wxCommandEvent& event ) // (NULL if not found) if( m_lastMarkerFound ) { - m_parent->GetScreen()->SetCrossHairPosition( m_lastMarkerFound->m_Pos ); + m_parent->SetCrossHairPosition( m_lastMarkerFound->m_Pos ); m_parent->RedrawScreen( m_lastMarkerFound->m_Pos, true); // prevent a mouse left button release event in // coming from the ERC dialog double click diff --git a/eeschema/edit_bitmap.cpp b/eeschema/edit_bitmap.cpp index 4ff2aeac24..e3fdd42c99 100644 --- a/eeschema/edit_bitmap.cpp +++ b/eeschema/edit_bitmap.cpp @@ -93,7 +93,7 @@ static void moveBitmap( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosit } // Draw the bitmap at it's new position. - image->SetPosition( screen->GetCrossHairPosition() ); + image->SetPosition( aPanel->GetParent()->GetCrossHairPosition() ); image->Draw( aPanel, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); } @@ -116,7 +116,7 @@ SCH_BITMAP* SCH_EDIT_FRAME::CreateNewImage( wxDC* aDC ) return NULL; } - wxPoint pos = GetScreen()->GetCrossHairPosition(); + wxPoint pos = GetCrossHairPosition(); SCH_BITMAP* image = new SCH_BITMAP( pos ); @@ -149,7 +149,7 @@ void SCH_EDIT_FRAME::MoveImage( SCH_BITMAP* aImageItem, wxDC* aDC ) SetUndoItem( aImageItem ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( aImageItem->GetPosition() ); + SetCrossHairPosition( aImageItem->GetPosition() ); m_canvas->MoveCursorToCrossHair(); m_canvas->CrossHairOn( aDC ); diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index b29ccaef2c..855a313bca 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -77,20 +77,20 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType ) switch( aType ) { case LAYER_NOTES: - textItem = new SCH_TEXT( GetScreen()->GetCrossHairPosition() ); + textItem = new SCH_TEXT( GetCrossHairPosition() ); break; case LAYER_LOCLABEL: - textItem = new SCH_LABEL( GetScreen()->GetCrossHairPosition() ); + textItem = new SCH_LABEL( GetCrossHairPosition() ); break; case LAYER_HIERLABEL: - textItem = new SCH_HIERLABEL( GetScreen()->GetCrossHairPosition() ); + textItem = new SCH_HIERLABEL( GetCrossHairPosition() ); textItem->SetShape( lastGlobalLabelShape ); break; case LAYER_GLOBLABEL: - textItem = new SCH_GLOBALLABEL( GetScreen()->GetCrossHairPosition() ); + textItem = new SCH_GLOBALLABEL( GetCrossHairPosition() ); textItem->SetShape( lastGlobalLabelShape ); break; diff --git a/eeschema/find.cpp b/eeschema/find.cpp index 0349a84603..e81ba6c3ff 100644 --- a/eeschema/find.cpp +++ b/eeschema/find.cpp @@ -90,7 +90,7 @@ void SCH_EDIT_FRAME::OnFindDrcMarker( wxFindDialogEvent& event ) m_CurrentSheet->UpdateAllScreenReferences(); } - sheetFoundIn->LastScreen()->SetCrossHairPosition( lastMarker->GetPosition() ); + SetCrossHairPosition( lastMarker->GetPosition() ); RedrawScreen( lastMarker->GetPosition(), warpCursor ); @@ -213,7 +213,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, if( centerAndRedraw ) { - GetScreen()->SetCrossHairPosition(pos); + SetCrossHairPosition( pos ); RedrawScreen( pos, aWarpMouse ); } @@ -226,7 +226,7 @@ SCH_ITEM* SCH_EDIT_FRAME::FindComponentAndItem( const wxString& aReference, if( aWarpMouse ) m_canvas->MoveCursor( pos ); - GetScreen()->SetCrossHairPosition(pos); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( &dc ); } @@ -351,7 +351,8 @@ void SCH_EDIT_FRAME::OnFindSchematicItem( wxFindDialogEvent& aEvent ) SetScreen( sheet->LastScreen() ); } - sheet->LastScreen()->SetCrossHairPosition( data.GetPosition() ); + // careful here + SetCrossHairPosition( data.GetPosition() ); RedrawScreen( data.GetPosition(), warpCursor ); diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 78ef00e207..6fbf348769 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -231,7 +231,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC, SCH_COMPONENT* component; component = new SCH_COMPONENT( *Entry, m_CurrentSheet, unit, convert, - GetScreen()->GetCrossHairPosition(), true ); + GetCrossHairPosition(), true ); // Set the m_ChipName value, from component name in lib, for aliases // Note if Entry is found, and if Name is an alias of a component, diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 07c9b5aa8b..7ac4adbca1 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -284,12 +284,12 @@ void SCH_EDIT_FRAME::DisplayCurrentSheet() { Zoom_Automatique( false ); screen->m_FirstRedraw = false; - screen->SetCrossHairPosition( screen->GetScrollCenterPosition() ); + SetCrossHairPosition( GetScrollCenterPosition() ); m_canvas->MoveCursorToCrossHair(); } else { - RedrawScreen( screen->GetScrollCenterPosition(), true ); + RedrawScreen( GetScrollCenterPosition(), true ); } // Now refresh m_canvas. Should be not necessary, but because screen has changed diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index b5c5dc454f..4afdebe397 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -74,14 +74,14 @@ */ -/* local variables */ -/* Hotkey list: */ +// local variables +// Hotkey list: /** * Common commands */ -/* Fit on Screen */ +// Fit on Screen #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomAuto( wxT( "Fit on Screen" ), HK_ZOOM_AUTO, WXK_HOME, ID_ZOOM_PAGE ); #else @@ -92,7 +92,7 @@ static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, GR_KB_CTRL + '0' static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4, ID_POPUP_ZOOM_CENTER ); -/* Refresh Screen */ +// Refresh Screen #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3, ID_ZOOM_REDRAW ); #else @@ -100,14 +100,14 @@ static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, GR_KB_CTRL ID_ZOOM_REDRAW ); #endif -/* Zoom In */ +// Zoom In #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1, ID_POPUP_ZOOM_IN ); #else static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, GR_KB_CTRL + '+', ID_POPUP_ZOOM_IN ); #endif -/* Zoom Out */ +// Zoom Out #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2, ID_POPUP_ZOOM_OUT ); #else @@ -115,13 +115,13 @@ static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, GR_KB_CTRL + '-', I #endif static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); -static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), - HK_RESET_LOCAL_COORD, ' ' ); +static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); -/* Undo */ + +// Undo static EDA_HOTKEY HkUndo( wxT( "Undo" ), HK_UNDO, GR_KB_CTRL + 'Z', (int) wxID_UNDO ); -/* Redo */ +// Redo #if !defined( __WXMAC__ ) static EDA_HOTKEY HkRedo( wxT( "Redo" ), HK_REDO, GR_KB_CTRL + 'Y', (int) wxID_REDO ); #else @@ -358,8 +358,8 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, DisplayHotkeyList( this, s_Schematic_Hokeys_Descr ); break; - case HK_RESET_LOCAL_COORD: /* Reset the relative coord */ - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + case HK_RESET_LOCAL_COORD: // Reset the relative coord + GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; case HK_ZOOM_IN: @@ -561,8 +561,8 @@ void LIB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, DisplayHotkeyList( this, s_Libedit_Hokeys_Descr ); break; - case HK_RESET_LOCAL_COORD: /* Reset the relative coord */ - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + case HK_RESET_LOCAL_COORD: // Reset the relative coord + GetScreen()->m_O_Curseur = GetCrossHairPosition(); break; case HK_ZOOM_IN: diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 24eef58c2c..6cb15a3e6e 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -218,7 +218,7 @@ LIB_EDIT_FRAME::LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, GetScreen()->m_Center = true; - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); LoadSettings(); @@ -402,7 +402,7 @@ double LIB_EDIT_FRAME::BestZoom() BoundaryBox = m_component->GetBoundingBox( m_unit, m_convert ); dx = BoundaryBox.GetWidth(); dy = BoundaryBox.GetHeight(); - GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) ); + SetScrollCenterPosition( wxPoint( 0, 0 ) ); } else { @@ -411,7 +411,7 @@ double LIB_EDIT_FRAME::BestZoom() dx = pageInfo.GetSizeIU().x; dy = pageInfo.GetSizeIU().y; - GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) ); + SetScrollCenterPosition( wxPoint( 0, 0 ) ); } size = m_canvas->GetClientSize(); @@ -753,7 +753,7 @@ void LIB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) STATUS_FLAGS oldFlags = m_drawItem->GetFlags(); m_drawItem->ClearFlags(); m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform ); - ( (LIB_POLYLINE*) m_drawItem )->DeleteSegment( GetScreen()->GetCrossHairPosition( true ) ); + ( (LIB_POLYLINE*) m_drawItem )->DeleteSegment( GetCrossHairPosition( true ) ); m_drawItem->Draw( m_canvas, &dc, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform ); m_drawItem->SetFlags( oldFlags ); m_lastDrawItem = NULL; @@ -1139,7 +1139,7 @@ LIB_ITEM* LIB_EDIT_FRAME::LocateItemUsingCursor( const wxPoint& aPosition, if( item == NULL ) return NULL; - wxPoint pos = GetScreen()->GetNearestGridPosition( aPosition ); + wxPoint pos = GetNearestGridPosition( aPosition ); if( item == NULL && aPosition != pos ) item = locateItem( pos, aFilterList ); diff --git a/eeschema/onrightclick.cpp b/eeschema/onrightclick.cpp index 85fb879095..c6f9661197 100644 --- a/eeschema/onrightclick.cpp +++ b/eeschema/onrightclick.cpp @@ -663,8 +663,8 @@ void SCH_EDIT_FRAME::addJunctionMenuEntries( wxMenu* aMenu, SCH_JUNCTION* aJunct void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame ) { SCH_SCREEN* screen = frame->GetScreen(); - wxPoint pos = screen->GetCrossHairPosition(); - wxString msg; + wxPoint pos = frame->GetCrossHairPosition(); + wxString msg; if( Wire == NULL ) { @@ -691,9 +691,9 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame ) AddMenuItem( PopMenu, ID_POPUP_SCH_DELETE_CONNECTION, _( "Delete Connection" ), KiBitmap( delete_connection_xpm ) ); - SCH_LINE* line = screen->GetWireOrBus( screen->GetCrossHairPosition() ); + SCH_LINE* line = screen->GetWireOrBus( frame->GetCrossHairPosition() ); - if( line && !line->IsEndPoint( screen->GetCrossHairPosition() ) ) + if( line && !line->IsEndPoint( frame->GetCrossHairPosition() ) ) AddMenuItem( PopMenu, ID_POPUP_SCH_BREAK_WIRE, _( "Break Wire" ), KiBitmap( break_line_xpm ) ); @@ -713,8 +713,8 @@ void AddMenusForWire( wxMenu* PopMenu, SCH_LINE* Wire, SCH_EDIT_FRAME* frame ) void AddMenusForBus( wxMenu* PopMenu, SCH_LINE* Bus, SCH_EDIT_FRAME* frame ) { - wxPoint pos = frame->GetScreen()->GetCrossHairPosition(); - wxString msg; + wxPoint pos = frame->GetCrossHairPosition(); + wxString msg; if( Bus == NULL ) { diff --git a/eeschema/pinedit.cpp b/eeschema/pinedit.cpp index 56f5f5c5ac..eee9cf5dca 100644 --- a/eeschema/pinedit.cpp +++ b/eeschema/pinedit.cpp @@ -210,7 +210,7 @@ void LIB_EDIT_FRAME::PlacePin() return; } - newpos = GetScreen()->GetCrossHairPosition( true ); + newpos = GetCrossHairPosition( true ); // Test for an other pin in same new position: for( Pin = m_component->GetNextPin(); Pin != NULL; Pin = m_component->GetNextPin( Pin ) ) @@ -308,7 +308,7 @@ void LIB_EDIT_FRAME::StartMovePin( wxDC* DC ) startPos.x = OldPos.x; startPos.y = -OldPos.y; // m_canvas->CrossHairOff( DC ); - GetScreen()->SetCrossHairPosition( startPos ); + SetCrossHairPosition( startPos ); m_canvas->MoveCursorToCrossHair(); MSG_PANEL_ITEMS items; @@ -350,7 +350,7 @@ static void DrawMovePin( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi } // Redraw pin in new position - CurrentPin->Move( aPanel->GetScreen()->GetCrossHairPosition( true ) ); + CurrentPin->Move( aPanel->GetParent()->GetCrossHairPosition( true ) ); CurrentPin->Draw( aPanel, aDC, wxPoint( 0, 0 ), UNSPECIFIED_COLOR, g_XorMode, &showPinText, DefaultTransform ); @@ -388,7 +388,7 @@ void LIB_EDIT_FRAME::CreatePin( wxDC* DC ) if( SynchronizePins() ) pin->SetFlags( IS_LINKED ); - pin->Move( GetScreen()->GetCrossHairPosition( true ) ); + pin->Move( GetCrossHairPosition( true ) ); pin->SetLength( LastPinLength ); pin->SetOrientation( LastPinOrient ); pin->SetType( LastPinType ); @@ -555,10 +555,10 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin ) if( SynchronizePins() ) Pin->SetFlags( IS_LINKED ); - wxPoint savepos = GetScreen()->GetCrossHairPosition(); + wxPoint savepos = GetCrossHairPosition(); m_canvas->CrossHairOff( DC ); - GetScreen()->SetCrossHairPosition( wxPoint( Pin->GetPosition().x, - -Pin->GetPosition().y ) ); + + SetCrossHairPosition( wxPoint( Pin->GetPosition().x, -Pin->GetPosition().y ) ); // Add this new pin in list, and creates pins for others parts if needed m_drawItem = Pin; @@ -566,7 +566,7 @@ void LIB_EDIT_FRAME::RepeatPinItem( wxDC* DC, LIB_PIN* SourcePin ) PlacePin(); m_lastDrawItem = Pin; - GetScreen()->SetCrossHairPosition( savepos ); + SetCrossHairPosition( savepos ); m_canvas->CrossHairOn( DC ); MSG_PANEL_ITEMS items; diff --git a/eeschema/sch_base_frame.cpp b/eeschema/sch_base_frame.cpp index 7f2a9357f7..891a1c1f29 100644 --- a/eeschema/sch_base_frame.cpp +++ b/eeschema/sch_base_frame.cpp @@ -73,17 +73,17 @@ const wxSize SCH_BASE_FRAME::GetPageSizeIU() const } -const wxPoint& SCH_BASE_FRAME::GetOriginAxisPosition() const +const wxPoint& SCH_BASE_FRAME::GetAuxOrigin() const { wxASSERT( GetScreen() ); - return GetScreen()->GetOriginAxisPosition(); + return GetScreen()->GetAuxOrigin(); } -void SCH_BASE_FRAME::SetOriginAxisPosition( const wxPoint& aPosition ) +void SCH_BASE_FRAME::SetAuxOrigin( const wxPoint& aPosition ) { wxASSERT( GetScreen() ); - GetScreen()->SetOriginAxisPosition( aPosition ); + GetScreen()->SetAuxOrigin( aPosition ); } @@ -113,8 +113,8 @@ void SCH_BASE_FRAME::UpdateStatusBar() EDA_DRAW_FRAME::UpdateStatusBar(); // Display absolute coordinates: - double dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x ); - double dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y ); + double dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x ); + double dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y ); if ( g_UserUnit == MILLIMETRES ) { @@ -147,8 +147,9 @@ void SCH_BASE_FRAME::UpdateStatusBar() SetStatusText( line, 2 ); // Display relative coordinates: - dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x; - dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y; + dx = GetCrossHairPosition().x - screen->m_O_Curseur.x; + dy = GetCrossHairPosition().y - screen->m_O_Curseur.y; + dXpos = To_User_Unit( g_UserUnit, dx ); dYpos = To_User_Unit( g_UserUnit, dy ); diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 3f509a6b55..7eeaac888d 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -132,7 +132,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case wxID_PASTE: - HandleBlockBegin( &dc, BLOCK_PASTE, screen->GetCrossHairPosition() ); + HandleBlockBegin( &dc, BLOCK_PASTE, GetCrossHairPosition() ); break; case ID_POPUP_SCH_ENTRY_SELECT_SLASH: @@ -165,12 +165,12 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_BEGIN_WIRE: m_canvas->MoveCursorToCrossHair(); - OnLeftClick( &dc, screen->GetCrossHairPosition() ); + OnLeftClick( &dc, GetCrossHairPosition() ); break; case ID_POPUP_SCH_BEGIN_BUS: m_canvas->MoveCursorToCrossHair(); - OnLeftClick( &dc, screen->GetCrossHairPosition() ); + OnLeftClick( &dc, GetCrossHairPosition() ); break; case ID_POPUP_SCH_SET_SHAPE_TEXT: @@ -194,7 +194,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) oldWires.SetOwnership( false ); // Prevent DLIST for deleting items in destructor. m_canvas->MoveCursorToCrossHair(); screen->ExtractWires( oldWires, true ); - screen->BreakSegment( screen->GetCrossHairPosition() ); + screen->BreakSegment( GetCrossHairPosition() ); if( oldWires.GetCount() != 0 ) { @@ -344,7 +344,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_SCH_ADD_JUNCTION: m_canvas->MoveCursorToCrossHair(); - screen->SetCurItem( AddJunction( &dc, screen->GetCrossHairPosition(), true ) ); + screen->SetCurItem( AddJunction( &dc, GetCrossHairPosition(), true ) ); screen->TestDanglingEnds( m_canvas, &dc ); screen->SetCurItem( NULL ); break; @@ -588,7 +588,7 @@ void SCH_EDIT_FRAME::DeleteConnection( bool aFullConnection ) { PICKED_ITEMS_LIST pickList; SCH_SCREEN* screen = GetScreen(); - wxPoint pos = screen->GetCrossHairPosition(); + wxPoint pos = GetCrossHairPosition(); if( screen->GetConnection( pos, pickList, aFullConnection ) != 0 ) { @@ -603,7 +603,7 @@ bool SCH_EDIT_FRAME::DeleteItemAtCrossHair( wxDC* DC ) SCH_ITEM* item; SCH_SCREEN* screen = GetScreen(); - item = LocateItem( screen->GetCrossHairPosition(), SCH_COLLECTOR::ParentItems ); + item = LocateItem( GetCrossHairPosition(), SCH_COLLECTOR::ParentItems ); if( item ) { @@ -637,7 +637,7 @@ static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPositio item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); #endif - item->SetPosition( screen->GetCrossHairPosition() ); + item->SetPosition( aPanel->GetParent()->GetCrossHairPosition() ); // Draw the item item at it's new position. item->Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode ); @@ -713,7 +713,7 @@ void SCH_EDIT_FRAME::MoveItem( SCH_ITEM* aItem, wxDC* aDC ) m_canvas->CrossHairOff( aDC ); if( aItem->Type() != SCH_SHEET_PIN_T ) - GetScreen()->SetCrossHairPosition( aItem->GetPosition() ); + SetCrossHairPosition( aItem->GetPosition() ); m_canvas->MoveCursorToCrossHair(); @@ -959,7 +959,7 @@ void SCH_EDIT_FRAME::OnDragItem( wxCommandEvent& aEvent ) // is to simulate a block drag command if( screen->m_BlockLocate.GetState() == STATE_NO_BLOCK ) { - if( !HandleBlockBegin( &dc, BLOCK_DRAG, screen->GetCrossHairPosition() ) ) + if( !HandleBlockBegin( &dc, BLOCK_DRAG, GetCrossHairPosition() ) ) break; // Give a non null size to the search block: diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 653709f516..d6432c0fdb 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -501,7 +501,7 @@ double SCH_EDIT_FRAME::BestZoom() double bestzoom = std::max( zx, zy ); - GetScreen()->SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) ); + SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) ); return bestzoom; } diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index a3805ddbc2..3d59b19197 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -244,8 +244,8 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& if( sheet->IsResized() ) { - int width = screen->GetCrossHairPosition().x - sheet->GetPosition().x; - int height = screen->GetCrossHairPosition().y - sheet->GetPosition().y; + int width = aPanel->GetParent()->GetCrossHairPosition().x - sheet->GetPosition().x; + int height = aPanel->GetParent()->GetCrossHairPosition().y - sheet->GetPosition().y; // If the sheet doesn't have any pins, clamp the minimum size to the default values. width = ( width < MIN_SHEET_WIDTH ) ? MIN_SHEET_WIDTH : width; @@ -263,12 +263,13 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& sheet->GetMinWidth() + gridSizeX : width; } - wxPoint grid = screen->GetNearestGridPosition( wxPoint( pos.x + width, pos.y + height ) ); + wxPoint grid = aPanel->GetParent()->GetNearestGridPosition( + wxPoint( pos.x + width, pos.y + height ) ); sheet->Resize( wxSize( grid.x - pos.x, grid.y - pos.y ) ); } else if( sheet->IsMoving() ) { - moveVector = screen->GetCrossHairPosition() - pos; + moveVector = aPanel->GetParent()->GetCrossHairPosition() - pos; sheet->Move( moveVector ); } @@ -324,7 +325,7 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC ) { m_itemToRepeat = NULL; - SCH_SHEET* sheet = new SCH_SHEET( GetScreen()->GetCrossHairPosition() ); + SCH_SHEET* sheet = new SCH_SHEET( GetCrossHairPosition() ); sheet->SetFlags( IS_NEW | IS_RESIZED ); sheet->SetTimeStamp( GetNewTimeStamp() ); @@ -338,7 +339,9 @@ SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC ) m_canvas->SetMouseCapture( MoveOrResizeSheet, ExitSheet ); m_canvas->CallMouseCapture( aDC, wxDefaultPosition, false ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( sheet->GetResizePosition() ); + + SetCrossHairPosition( sheet->GetResizePosition() ); + m_canvas->MoveCursorToCrossHair(); m_canvas->CrossHairOn( aDC ); @@ -356,7 +359,7 @@ void SCH_EDIT_FRAME::ReSizeSheet( SCH_SHEET* aSheet, wxDC* aDC ) GetChars( aSheet->GetClass() ) ) ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( aSheet->GetResizePosition() ); + SetCrossHairPosition( aSheet->GetResizePosition() ); m_canvas->MoveCursorToCrossHair(); m_canvas->CrossHairOn( aDC ); @@ -377,7 +380,7 @@ void SCH_EDIT_FRAME::StartMoveSheet( SCH_SHEET* aSheet, wxDC* aDC ) return; m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( aSheet->GetPosition() ); + SetCrossHairPosition( aSheet->GetPosition() ); m_canvas->MoveCursorToCrossHair(); if( !aSheet->IsNew() ) diff --git a/eeschema/symbdraw.cpp b/eeschema/symbdraw.cpp index 04186c83e9..619db5b46b 100644 --- a/eeschema/symbdraw.cpp +++ b/eeschema/symbdraw.cpp @@ -136,7 +136,7 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* Panel, wxDC* DC ) return; bool newItem = item->IsNew(); - item->EndEdit( parent->GetScreen()->GetCrossHairPosition( true ), true ); + item->EndEdit( parent->GetCrossHairPosition( true ), true ); if( newItem ) { @@ -153,7 +153,7 @@ static void AbortSymbolTraceOn( EDA_DRAW_PANEL* Panel, wxDC* DC ) LIB_ITEM* LIB_EDIT_FRAME::CreateGraphicItem( LIB_COMPONENT* LibEntry, wxDC* DC ) { m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn ); - wxPoint drawPos = GetScreen()->GetCrossHairPosition( true ); + wxPoint drawPos = GetCrossHairPosition( true ); // no temp copy -> the current version of component will be used for Undo // This is normal when adding new items to the current component @@ -239,7 +239,7 @@ void LIB_EDIT_FRAME::GraphicItemBeginDraw( wxDC* DC ) if( m_drawItem == NULL ) return; - wxPoint pos = GetScreen()->GetCrossHairPosition( true ); + wxPoint pos = GetCrossHairPosition( true ); if( m_drawItem->ContinueEdit( pos ) ) { @@ -264,21 +264,20 @@ static void RedrawWhileMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx if( item == NULL ) return; - BASE_SCREEN* Screen = aPanel->GetScreen(); - item->SetEraseLastDrawItem( aErase ); // if item is the reference field, we must add the current unit id if( item->Type() == LIB_FIELD_T ) { - int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit(); - wxString text = ((LIB_FIELD*)item)->GetFullText( unit ); - item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ), + int unit = ((LIB_EDIT_FRAME*)aPanel->GetParent())->GetUnit(); + wxString text = ((LIB_FIELD*)item)->GetFullText( unit ); + + item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, &text, DefaultTransform ); } else - item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ), + item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform ); } @@ -298,7 +297,7 @@ void LIB_EDIT_FRAME::StartMoveDrawSymbol( wxDC* DC ) if( m_drawItem->Type() == LIB_FIELD_T ) m_drawItem->BeginEdit( IS_MOVED, m_drawItem->GetPosition() ); else - m_drawItem->BeginEdit( IS_MOVED, GetScreen()->GetCrossHairPosition( true ) ); + m_drawItem->BeginEdit( IS_MOVED, GetCrossHairPosition( true ) ); m_canvas->SetMouseCapture( RedrawWhileMovingCursor, AbortSymbolTraceOn ); m_canvas->CallMouseCapture( DC, wxDefaultPosition, true ); @@ -312,7 +311,7 @@ void LIB_EDIT_FRAME::StartModifyDrawSymbol( wxDC* DC ) return; TempCopyComponent(); - m_drawItem->BeginEdit( IS_RESIZED, GetScreen()->GetCrossHairPosition( true ) ); + m_drawItem->BeginEdit( IS_RESIZED, GetCrossHairPosition( true ) ); m_canvas->SetMouseCapture( SymbolDisplayDraw, AbortSymbolTraceOn ); m_canvas->CallMouseCapture( DC, wxDefaultPosition, true ); } @@ -322,14 +321,13 @@ void LIB_EDIT_FRAME::StartModifyDrawSymbol( wxDC* DC ) static void SymbolDisplayDraw( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { - BASE_SCREEN* Screen = aPanel->GetScreen(); LIB_ITEM* item = ( (LIB_EDIT_FRAME*) aPanel->GetParent() )->GetDrawItem(); if( item == NULL ) return; item->SetEraseLastDrawItem( aErase ); - item->Draw( aPanel, aDC, Screen->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL, + item->Draw( aPanel, aDC, aPanel->GetParent()->GetCrossHairPosition( true ), UNSPECIFIED_COLOR, g_XorMode, NULL, DefaultTransform ); } @@ -357,7 +355,7 @@ void LIB_EDIT_FRAME::EndDrawGraphicItem( wxDC* DC ) if( m_drawItem->IsNew() ) m_component->AddDrawItem( m_drawItem ); - m_drawItem->EndEdit( GetScreen()->GetCrossHairPosition( true ) ); + m_drawItem->EndEdit( GetCrossHairPosition( true ) ); m_drawItem = NULL; diff --git a/eeschema/symbedit.cpp b/eeschema/symbedit.cpp index 0e22eff8ff..95309e6757 100644 --- a/eeschema/symbedit.cpp +++ b/eeschema/symbedit.cpp @@ -65,7 +65,7 @@ void LIB_EDIT_FRAME::LoadOneSymbol() if( dlg.ShowModal() == wxID_CANCEL ) return; - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); m_canvas->MoveCursorToCrossHair(); m_canvas->SetIgnoreMouseEvents( false ); @@ -238,7 +238,9 @@ void LIB_EDIT_FRAME::PlaceAnchor() if( m_component == NULL ) return; - wxPoint offset( -GetScreen()->GetCrossHairPosition().x, GetScreen()->GetCrossHairPosition().y ); + const wxPoint& cross_hair = GetCrossHairPosition(); + + wxPoint offset( -cross_hair.x, cross_hair.y ); OnModify( ); diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 14051141d0..3300c5a923 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -335,7 +335,7 @@ void LIB_VIEW_FRAME::OnSize( wxSizeEvent& SizeEv ) void LIB_VIEW_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) { - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); UpdateStatusBar(); } @@ -348,18 +348,16 @@ double LIB_VIEW_FRAME::BestZoom() * search for line static const int VIEWPORT_EXTENT = 1000; * and replace by static const int VIEWPORT_EXTENT = 10000; */ - LIB_COMPONENT* component = NULL; - CMP_LIBRARY* lib; - double bestzoom = 16.0; // default value for bestzoom - - lib = CMP_LIBRARY::FindLibrary( m_libraryName ); + LIB_COMPONENT* component = NULL; + double bestzoom = 16.0; // default value for bestzoom + CMP_LIBRARY* lib = CMP_LIBRARY::FindLibrary( m_libraryName ); if( lib ) component = lib->FindComponent( m_entryName ); if( component == NULL ) { - GetScreen()->SetScrollCenterPosition( wxPoint( 0, 0 ) ); + SetScrollCenterPosition( wxPoint( 0, 0 ) ); return bestzoom; } @@ -382,7 +380,7 @@ double LIB_VIEW_FRAME::BestZoom() if( bestzoom < GetScreen()->m_ZoomList[0] ) bestzoom = GetScreen()->m_ZoomList[0]; - GetScreen()->SetScrollCenterPosition( BoundaryBox.Centre() ); + SetScrollCenterPosition( BoundaryBox.Centre() ); return bestzoom; } diff --git a/gerbview/block.cpp b/gerbview/block.cpp index 774e5dde2a..d973ac9a03 100644 --- a/gerbview/block.cpp +++ b/gerbview/block.cpp @@ -171,10 +171,11 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx if( screen->m_BlockLocate.GetState() != STATE_BLOCK_STOP ) { - screen->m_BlockLocate.SetMoveVector( wxPoint( screen->GetCrossHairPosition().x - - screen->m_BlockLocate.GetRight(), - screen->GetCrossHairPosition().y - - screen->m_BlockLocate.GetBottom() ) ); + const wxPoint& cross_hair = aPanel->GetParent()->GetCrossHairPosition(); + + screen->m_BlockLocate.SetMoveVector( + wxPoint( cross_hair.x - screen->m_BlockLocate.GetRight(), + cross_hair.y - screen->m_BlockLocate.GetBottom() ) ); } screen->m_BlockLocate.Draw( aPanel, aDC, wxPoint( 0, 0 ), g_XorMode, Color ); @@ -195,10 +196,10 @@ void GERBVIEW_FRAME::Block_Move( wxDC* DC ) wxPoint delta; wxPoint oldpos; - oldpos = GetScreen()->GetCrossHairPosition(); + oldpos = GetCrossHairPosition(); m_canvas->SetMouseCaptureCallback( NULL ); - GetScreen()->SetCrossHairPosition( oldpos ); + SetCrossHairPosition( oldpos ); m_canvas->MoveCursorToCrossHair(); GetScreen()->SetModify(); GetScreen()->m_BlockLocate.Normalize(); diff --git a/gerbview/class_gbr_layout.h b/gerbview/class_gbr_layout.h index c192fff890..ac97e87eb2 100644 --- a/gerbview/class_gbr_layout.h +++ b/gerbview/class_gbr_layout.h @@ -38,12 +38,12 @@ public: const PAGE_INFO& GetPageSettings() const { return m_paper; } void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; } - const wxPoint& GetOriginAxisPosition() const + const wxPoint& GetAuxOrigin() const { return m_originAxisPosition; } - void SetOriginAxisPosition( const wxPoint& aPosition ) + void SetAuxOrigin( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; } diff --git a/gerbview/controle.cpp b/gerbview/controle.cpp index 8c058fa3f8..fedb66b381 100644 --- a/gerbview/controle.cpp +++ b/gerbview/controle.cpp @@ -38,9 +38,9 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH wxPoint oldpos; wxPoint pos = aPosition; - pos = GetScreen()->GetNearestGridPosition( pos ); + pos = GetNearestGridPosition( pos ); - oldpos = GetScreen()->GetCrossHairPosition(); + oldpos = GetCrossHairPosition(); gridSize = GetScreen()->GetGridSize(); switch( aHotKey ) @@ -73,14 +73,14 @@ void GERBVIEW_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH break; } - GetScreen()->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); - if( oldpos != GetScreen()->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = GetScreen()->GetCrossHairPosition(); - GetScreen()->SetCrossHairPosition( oldpos ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp index 40580a1c84..9bfac36737 100644 --- a/gerbview/gerbview_frame.cpp +++ b/gerbview/gerbview_frame.cpp @@ -196,7 +196,7 @@ double GERBVIEW_FRAME::BestZoom() double x = (double) bbox.GetWidth() / (double) size.x; double y = (double) bbox.GetHeight() / (double) size.y; - GetScreen()->SetScrollCenterPosition( bbox.Centre() ); + SetScrollCenterPosition( bbox.Centre() ); double best_zoom = std::max( x, y ); return best_zoom; @@ -733,17 +733,17 @@ void GERBVIEW_FRAME::SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) } -const wxPoint& GERBVIEW_FRAME::GetOriginAxisPosition() const +const wxPoint& GERBVIEW_FRAME::GetAuxOrigin() const { wxASSERT( m_gerberLayout ); - return m_gerberLayout->GetOriginAxisPosition(); + return m_gerberLayout->GetAuxOrigin(); } -void GERBVIEW_FRAME::SetOriginAxisPosition( const wxPoint& aPosition ) +void GERBVIEW_FRAME::SetAuxOrigin( const wxPoint& aPosition ) { wxASSERT( m_gerberLayout ); - m_gerberLayout->SetOriginAxisPosition( aPosition ); + m_gerberLayout->SetAuxOrigin( aPosition ); } @@ -800,8 +800,8 @@ void GERBVIEW_FRAME::UpdateStatusBar() { double theta, ro; - dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x; - dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y; + dx = GetCrossHairPosition().x - screen->m_O_Curseur.x; + dy = GetCrossHairPosition().y - screen->m_O_Curseur.y; // atan2 in the 0,0 case returns 0 theta = RAD2DEG( atan2( -dy, dx ) ); @@ -829,9 +829,8 @@ void GERBVIEW_FRAME::UpdateStatusBar() } // Display absolute coordinates: - dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x ); - dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y ); - + dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x ); + dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y ); wxString absformatter; @@ -859,8 +858,8 @@ void GERBVIEW_FRAME::UpdateStatusBar() if( !m_DisplayOptions.m_DisplayPolarCood ) // display relative cartesian coordinates { // Display relative coordinates: - dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x; - dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y; + dx = GetCrossHairPosition().x - screen->m_O_Curseur.x; + dy = GetCrossHairPosition().y - screen->m_O_Curseur.y; dXpos = To_User_Unit( g_UserUnit, dx ); dYpos = To_User_Unit( g_UserUnit, dy ); diff --git a/gerbview/gerbview_frame.h b/gerbview/gerbview_frame.h index 98cf6fe83d..6a69191706 100644 --- a/gerbview/gerbview_frame.h +++ b/gerbview/gerbview_frame.h @@ -82,7 +82,9 @@ public: class GERBVIEW_FRAME : public EDA_DRAW_FRAME // PCB_BASE_FRAME { - GBR_LAYOUT* m_gerberLayout; + GBR_LAYOUT* m_gerberLayout; + wxPoint m_grid_origin; + public: GBR_DISPLAY_OPTIONS m_DisplayOptions; @@ -126,8 +128,14 @@ public: const PAGE_INFO& GetPageSettings() const; // overload const wxSize GetPageSizeIU() const; // overload - const wxPoint& GetOriginAxisPosition() const; // overload - void SetOriginAxisPosition( const wxPoint& aPosition ); // overload + const wxPoint& GetAuxOrigin() const; // overload + void SetAuxOrigin( const wxPoint& aPoint ); // overload + + const wxPoint& GetGridOrigin() const { return m_grid_origin; } // overload + void SetGridOrigin( const wxPoint& aPoint ) // overload + { + m_grid_origin = aPoint; + } const TITLE_BLOCK& GetTitleBlock() const; // overload void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload diff --git a/gerbview/hotkeys.cpp b/gerbview/hotkeys.cpp index c07a42854e..29082a6349 100644 --- a/gerbview/hotkeys.cpp +++ b/gerbview/hotkeys.cpp @@ -31,30 +31,28 @@ * and see this list for some ascii keys (space ...) */ -/* local variables */ -/* Hotkey list: */ -static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), - HK_RESET_LOCAL_COORD, ' ' ); -static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); -static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 ); -static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 ); -static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); -static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 ); -static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); -static EDA_HOTKEY HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' ); -static EDA_HOTKEY HkTrackDisplayMode( wxT( "Track Display Mode" ), - HK_SWITCH_GBR_ITEMS_DISPLAY_MODE, 'F' ); +// local variables +// Hotkey list: +static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); +static EDA_HOTKEY HkSetGridOrigin( wxT("Set Grid Origin"), HK_SET_GRID_ORIGIN, 'S' ); -static EDA_HOTKEY HkSwitch2NextCopperLayer( wxT( "Switch to Next Layer" ), - HK_SWITCH_LAYER_TO_NEXT, '+' ); -static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" ), - HK_SWITCH_LAYER_TO_PREVIOUS, '-' ); +static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); +static EDA_HOTKEY HkZoomCenter( wxT( "Zoom Center" ), HK_ZOOM_CENTER, WXK_F4 ); +static EDA_HOTKEY HkZoomRedraw( wxT( "Zoom Redraw" ), HK_ZOOM_REDRAW, WXK_F3 ); +static EDA_HOTKEY HkZoomOut( wxT( "Zoom Out" ), HK_ZOOM_OUT, WXK_F2 ); +static EDA_HOTKEY HkZoomIn( wxT( "Zoom In" ), HK_ZOOM_IN, WXK_F1 ); +static EDA_HOTKEY HkHelp( wxT( "Help (this window)" ), HK_HELP, '?' ); +static EDA_HOTKEY HkSwitchUnits( wxT( "Switch Units" ), HK_SWITCH_UNITS, 'U' ); +static EDA_HOTKEY HkTrackDisplayMode( wxT( "Track Display Mode" ), HK_SWITCH_GBR_ITEMS_DISPLAY_MODE, 'F' ); + +static EDA_HOTKEY HkSwitch2NextCopperLayer( wxT( "Switch to Next Layer" ), HK_SWITCH_LAYER_TO_NEXT, '+' ); +static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" ), HK_SWITCH_LAYER_TO_PREVIOUS, '-' ); // List of common hotkey descriptors EDA_HOTKEY* s_Gerbview_Hotkey_List[] = { &HkHelp, - &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, - &HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord, + &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, + &HkZoomAuto, &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkTrackDisplayMode, &HkSwitch2NextCopperLayer, &HkSwitch2PreviousCopperLayer, @@ -130,8 +128,12 @@ void GERBVIEW_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit GetEventHandler()->ProcessEvent( cmd ); break; - case HK_RESET_LOCAL_COORD: /*Reset the relative coord */ - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + case HK_RESET_LOCAL_COORD: // Reset the relative coord + GetScreen()->m_O_Curseur = GetCrossHairPosition(); + break; + + case HK_SET_GRID_ORIGIN: + SetGridOrigin( GetCrossHairPosition() ); break; case HK_SWITCH_UNITS: diff --git a/gerbview/locate.cpp b/gerbview/locate.cpp index 4a16337f68..7e6ba30737 100644 --- a/gerbview/locate.cpp +++ b/gerbview/locate.cpp @@ -44,7 +44,7 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc bool found = false; if( aTypeloc == CURSEUR_ON_GRILLE ) - ref = GetScreen()->GetNearestGridPosition( ref ); + ref = GetNearestGridPosition( ref ); LAYER_NUM layer = getActiveLayer(); diff --git a/include/class_base_screen.h b/include/class_base_screen.h index 4da7754539..537b277bfe 100644 --- a/include/class_base_screen.h +++ b/include/class_base_screen.h @@ -75,53 +75,134 @@ typedef std::vector< GRID_TYPE > GRIDS; class BASE_SCREEN : public EDA_ITEM { private: - GRIDS m_grids; ///< List of valid grid sizes. - bool m_FlagModified; ///< Indicates current drawing has been modified. - bool m_FlagSave; ///< Indicates automatic file save. - EDA_ITEM* m_CurrentItem; ///< Currently selected object - GRID_TYPE m_Grid; ///< Current grid selection. - wxPoint m_scrollCenter; ///< Current scroll center point in logical units. - wxPoint m_MousePosition; ///< Mouse cursor coordinate in logical units. - + GRIDS m_grids; ///< List of valid grid sizes. + bool m_FlagModified; ///< Indicates current drawing has been modified. + bool m_FlagSave; ///< Indicates automatic file save. + EDA_ITEM* m_CurrentItem; ///< Currently selected object + GRID_TYPE m_Grid; ///< Current grid selection. + wxPoint m_scrollCenter; ///< Current scroll center point in logical units. + wxPoint m_MousePosition; ///< Mouse cursor coordinate in logical units. /** * The cross hair position in logical (drawing) units. The cross hair is not the cursor * position. It is an addition indicator typically drawn on grid to indicate to the * user where the current action will be performed. */ - wxPoint m_crossHairPosition; + wxPoint m_crossHairPosition; - double m_Zoom; ///< Current zoom coefficient. + double m_Zoom; ///< Current zoom coefficient. + + //----< Old public API now is private, and migratory>------------------------ + // called only from EDA_DRAW_FRAME + friend class EDA_DRAW_FRAME; + + /** + * Function getCrossHairPosition + * return the current cross hair position in logical (drawing) coordinates. + * @param aInvertY Inverts the Y axis position. + * @return The cross hair position in drawing coordinates. + */ + wxPoint getCrossHairPosition( bool aInvertY = false ) const + { + if( aInvertY ) + return wxPoint( m_crossHairPosition.x, -m_crossHairPosition.y ); + + return wxPoint( m_crossHairPosition.x, m_crossHairPosition.y ); + } + + /** + * Function setCrossHairPosition + * sets the screen cross hair position to \a aPosition in logical (drawing) units. + * @param aPosition The new cross hair position. + * @param aGridOrigin Origin point of the snap grid. + * @param aSnapToGrid Sets the cross hair position to the nearest grid position to + * \a aPosition. + * + */ + void setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid = true ); + + /** + * Function getCursorScreenPosition + * returns the cross hair position in device (display) units.b + * @return The current cross hair position. + */ + wxPoint getCrossHairScreenPosition() const; + + /** + * Function getNearestGridPosition + * returns the nearest \a aGridSize location to \a aPosition. + * @param aPosition The position to check. + * @param aGridOrigin The origin point of the snap grid. + * @param aGridSize The grid size to locate to if provided. If NULL then the current + * grid size is used. + * @return The nearst grid position. + */ + wxPoint getNearestGridPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, + wxRealPoint* aGridSize = NULL ) const; + + /** + * Function getCursorPosition + * returns the current cursor position in logical (drawing) units. + * @param aOnGrid Returns the nearest grid position at the current cursor position. + * @param aGridOrigin Origin point of the snap grid. + * @param aGridSize Custom grid size instead of the current grid size. Only valid + * if \a aOnGrid is true. + * @return The current cursor position. + */ + wxPoint getCursorPosition( bool aOnGrid, const wxPoint& aGridOrigin, wxRealPoint* aGridSize = NULL ) const; + + void setMousePosition( const wxPoint& aPosition ) { m_MousePosition = aPosition; } + + /** + * Function RefPos + * Return the reference position, coming from either the mouse position + * or the cursor position. + * + * @param useMouse If true, return mouse position, else cursor's. + * + * @return wxPoint - The reference point, either the mouse position or + * the cursor position. + */ + wxPoint refPos( bool useMouse ) const + { + return useMouse ? m_MousePosition : m_crossHairPosition; + } + + const wxPoint& getScrollCenterPosition() const { return m_scrollCenter; } + void setScrollCenterPosition( const wxPoint& aPoint ) { m_scrollCenter = aPoint; } + + //---------------------------- public: static wxString m_PageLayoutDescrFileName; ///< the name of the page layout descr file, ///< or emty to used the default pagelayout - wxPoint m_DrawOrg; ///< offsets for drawing the circuit on the screen - wxPoint m_O_Curseur; ///< Relative Screen cursor coordinate (on grid) - ///< in user units. (coordinates from last reset position) + wxPoint m_DrawOrg; ///< offsets for drawing the circuit on the screen + + wxPoint m_O_Curseur; ///< Relative Screen cursor coordinate (on grid) + ///< in user units. (coordinates from last reset position) // Scrollbars management: - int m_ScrollPixelsPerUnitX; ///< Pixels per scroll unit in the horizontal direction. - int m_ScrollPixelsPerUnitY; ///< Pixels per scroll unit in the vertical direction. + int m_ScrollPixelsPerUnitX; ///< Pixels per scroll unit in the horizontal direction. + int m_ScrollPixelsPerUnitY; ///< Pixels per scroll unit in the vertical direction. - wxSize m_ScrollbarNumber; /* Current virtual draw area size in scroll units. + wxSize m_ScrollbarNumber; /**< Current virtual draw area size in scroll units. * m_ScrollbarNumber * m_ScrollPixelsPerUnit = * virtual draw area size in pixels */ - wxPoint m_ScrollbarPos; ///< Current scroll bar position in scroll units. + wxPoint m_ScrollbarPos; ///< Current scroll bar position in scroll units. - wxPoint m_StartVisu; /* Coordinates in drawing units of the current - * view position (upper left corner of device) - */ + wxPoint m_StartVisu; /**< Coordinates in drawing units of the current + * view position (upper left corner of device) + */ - bool m_Center; /* Center on screen. If true (0.0) is centered - * on screen coordinates can be < 0 and - * > 0 except for schematics. - * false: when coordinates can only be >= 0 - * Schematic */ - bool m_FirstRedraw; + bool m_Center; /**< Center on screen. If true (0.0) is centered + * on screen coordinates can be < 0 and + * > 0 except for schematics. + * false: when coordinates can only be >= 0 + * Schematic */ + bool m_FirstRedraw; // Undo/redo list of commands UNDO_REDO_CONTAINER m_UndoList; ///< Objects list for the undo command (old data) @@ -134,8 +215,6 @@ public: int m_ScreenNumber; int m_NumberOfScreens; - wxPoint m_GridOrigin; - std::vector m_ZoomList; ///< standard zoom (i.e. scale) coefficients. bool m_IsPrinting; @@ -164,30 +243,6 @@ public: */ virtual int MilsToIuScalar() { return 1; } - /** - * Function GetCrossHairPosition - * return the current cross hair position in logical (drawing) coordinates. - * @param aInvertY Inverts the Y axis position. - * @return The cross hair position in drawing coordinates. - */ - wxPoint GetCrossHairPosition( bool aInvertY = false ) const - { - if( aInvertY ) - return wxPoint( m_crossHairPosition.x, -m_crossHairPosition.y ); - - return wxPoint( m_crossHairPosition.x, m_crossHairPosition.y ); - } - - /** - * Function SetCrossHairPosition - * sets the screen cross hair position to \a aPosition in logical (drawing) units. - * @param aPosition The new cross hair position. - * @param aSnapToGrid Sets the cross hair position to the nearest grid position to - * \a aPosition. - * - */ - void SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid = true ); - /* general Undo/Redo command control */ /** @@ -247,19 +302,17 @@ public: return m_UndoList.m_CommandsList.size(); } - int GetRedoCommandCount() const { return m_RedoList.m_CommandsList.size(); } - - void SetModify() { m_FlagModified = true; } - void ClrModify() { m_FlagModified = false;; } - void SetSave() { m_FlagSave = true; } - void ClrSave() { m_FlagSave = false; } - bool IsModify() const { return m_FlagModified; } - bool IsSave() const { return m_FlagSave; } + void SetModify() { m_FlagModified = true; } + void ClrModify() { m_FlagModified = false; } + void SetSave() { m_FlagSave = true; } + void ClrSave() { m_FlagSave = false; } + bool IsModify() const { return m_FlagModified; } + bool IsSave() const { return m_FlagSave; } //------------------------------------------------------------- @@ -349,8 +402,6 @@ public: */ const GRID_TYPE& GetGrid() const { return m_Grid; } - const wxPoint& GetGridOrigin() const { return m_GridOrigin; } - void SetGrid( const wxRealPoint& size ); /** @@ -388,51 +439,6 @@ public: */ void GetGrids( GRIDS& aList ); - void SetMousePosition( const wxPoint& aPosition ) { m_MousePosition = aPosition; } - - /** - * Function RefPos - * Return the reference position, coming from either the mouse position - * or the cursor position. - * - * @param useMouse If true, return mouse position, else cursor's. - * - * @return wxPoint - The reference point, either the mouse position or - * the cursor position. - */ - wxPoint RefPos( bool useMouse ) const - { - return useMouse ? m_MousePosition : m_crossHairPosition; - } - - /** - * Function GetCursorPosition - * returns the current cursor position in logical (drawing) units. - * @param aOnGrid Returns the nearest grid position at the current cursor position. - * @param aGridSize Custom grid size instead of the current grid size. Only valid - * if \a aOnGrid is true. - * @return The current cursor position. - */ - wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL ) const; - - /** - * Function GetCursorScreenPosition - * returns the cross hair position in device (display) units.b - * @return The current cross hair position. - */ - wxPoint GetCrossHairScreenPosition() const; - - /** - * Function GetNearestGridPosition - * returns the nearest \a aGridSize location to \a aPosition. - * @param aPosition The position to check. - * @param aGridSize The grid size to locate to if provided. If NULL then the current - * grid size is used. - * @return The nearst grid position. - */ - wxPoint GetNearestGridPosition( const wxPoint& aPosition, - wxRealPoint* aGridSize = NULL ) const; - /** * Function GetClass * returns the class name. @@ -447,12 +453,6 @@ public: void ClearBlockCommand() { m_BlockLocate.Clear(); } - const wxPoint& GetScrollCenterPosition() const { return m_scrollCenter; } - void SetScrollCenterPosition( const wxPoint& aCenterPosition ) - { - m_scrollCenter = aCenterPosition; - } - #if defined(DEBUG) void Show( int nestLevel, std::ostream& os ) const; // overload #endif diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 0eedc23d22..3e18736f50 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -45,6 +45,8 @@ public: wxSize m_ModuleTextSize; ///< Default footprint texts size int m_ModuleTextWidth; int m_ModuleSegmentWidth; + wxPoint m_AuxOrigin; ///< origin for plot exports + wxPoint m_GridOrigin; ///< origin for grid offsets D_PAD m_Pad_Master; diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 0e3fe4cf22..46439257c9 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -55,52 +55,55 @@ typedef void ( *END_MOUSE_CAPTURE_CALLBACK )( EDA_DRAW_PANEL* aPanel, wxDC* aDC class EDA_DRAW_PANEL : public wxScrolledWindow { private: - int m_currentCursor; ///< Current mouse cursor shape id. - int m_defaultCursor; ///< The default mouse cursor shape id. - bool m_showCrossHair; ///< Indicate if cross hair is to be shown. - int m_cursorLevel; ///< Index for cursor redraw in XOR mode. - int m_scrollIncrementX; ///< X axis scroll increment in pixels per unit. - int m_scrollIncrementY; ///< Y axis scroll increment in pixels per unit. - wxPoint m_CursorStartPos; ///< Used for testing the cursor movement. - wxPoint m_PanStartCenter; ///< Initial scroll center position when pan started - wxPoint m_PanStartEventPosition; ///< Initial position of mouse event when pan started + int m_currentCursor; ///< Current mouse cursor shape id. + int m_defaultCursor; ///< The default mouse cursor shape id. + bool m_showCrossHair; ///< Indicate if cross hair is to be shown. + int m_cursorLevel; ///< Index for cursor redraw in XOR mode. + int m_scrollIncrementX; ///< X axis scroll increment in pixels per unit. + int m_scrollIncrementY; ///< Y axis scroll increment in pixels per unit. + + wxPoint m_CursorStartPos; ///< Used for testing the cursor movement. + wxPoint m_PanStartCenter; ///< Initial scroll center position when pan started + wxPoint m_PanStartEventPosition; ///< Initial position of mouse event when pan started /// The drawing area used to redraw the screen which is usually the visible area /// of the drawing in internal units. - EDA_RECT m_ClipBox; + EDA_RECT m_ClipBox; - bool m_abortRequest; ///< Flag used to abort long commands. + bool m_abortRequest; ///< Flag used to abort long commands. - bool m_enableZoomNoCenter; ///< True to enable zooming around the crosshair instead of the center - bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning. - bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true - ///< true to limit panning to scrollbar current limits - ///< false to used unlimited pan + bool m_enableZoomNoCenter; ///< True to enable zooming around the crosshair instead of the center + bool m_enableMiddleButtonPan; ///< True to enable middle mouse button panning. + bool m_panScrollbarLimits; ///< has meaning only if m_enableMiddleButtonPan = true + ///< true to limit panning to scrollbar current limits + ///< false to used unlimited pan - bool m_enableAutoPan; ///< True to enable automatic panning. + bool m_enableAutoPan; ///< True to enable automatic panning. - /// true to request an auto pan. Valid only when m_enableAutoPan = true. - bool m_requestAutoPan; + bool m_requestAutoPan; ///< true to request an auto pan. Valid only when m_enableAutoPan = true. - bool m_ignoreMouseEvents; ///< Ignore mouse events when true. + bool m_ignoreMouseEvents; ///< Ignore mouse events when true. /* Used to inhibit a response to a mouse left button release, after a double click * (when releasing the left button at the end of the second click. Used in Eeschema * to inhibit a mouse left release command when switching between hierarchical sheets * on a double click. */ - bool m_ignoreNextLeftButtonRelease; ///< Ignore the next mouse left button release when true. + bool m_ignoreNextLeftButtonRelease; ///< Ignore the next mouse left button release when true. - bool m_enableBlockCommands; ///< True enables block commands. + bool m_enableBlockCommands; ///< True enables block commands. - int m_minDragEventCount; /* Count the drag events. Used to filter mouse moves before starting a - * block command. A block command can be started only if - * MinDragEventCount > MIN_DRAG_COUNT_FOR_START_BLOCK_COMMAND - * in order to avoid spurious block commands. */ + /** + * Count the drag events. Used to filter mouse moves before starting a + * block command. A block command can be started only if + * MinDragEventCount > MIN_DRAG_COUNT_FOR_START_BLOCK_COMMAND in order to avoid + * spurious block commands. + */ + int m_minDragEventCount; /// True when drawing in mirror mode. Used by the draw arc function, because arcs /// are oriented, and in mirror mode, orientations are reversed. - bool m_PrintIsMirrored; + bool m_PrintIsMirrored; /// Mouse capture move callback function. MOUSE_CAPTURE_CALLBACK m_mouseCaptureCallback; @@ -108,9 +111,10 @@ private: /// Abort mouse capture callback function. END_MOUSE_CAPTURE_CALLBACK m_endMouseCaptureCallback; - // useful to avoid false start block in certain cases - // (like switch from a sheet to an other sheet - int m_canStartBlock; // >= 0 (or >= n) if a block can start + /// useful to avoid false start block in certain cases + /// (like switch from a sheet to an other sheet + /// >= 0 (or >= n) if a block can start + int m_canStartBlock; public: @@ -155,9 +159,8 @@ public: void SetEnableBlockCommands( bool aEnable ) { m_enableBlockCommands = aEnable; } - bool GetPrintMirrored() const { return m_PrintIsMirrored; } - - void SetPrintMirrored( bool aMirror ) { m_PrintIsMirrored = aMirror; } + bool GetPrintMirrored() const { return m_PrintIsMirrored; } + void SetPrintMirrored( bool aMirror ) { m_PrintIsMirrored = aMirror; } void SetCanStartBlock( int aStartBlock ) { m_canStartBlock = aStartBlock; } @@ -196,8 +199,9 @@ public: * the grid origin is set by user, and is not (0,0) * @param aDC = current Device Context * @param aDrawMode = draw mode (GR_COPY, GR_OR ..) + * @param aGridOrigin = the absolute coordinate of grid origin for snap. */ - void DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode ); + void DrawGridAxis( wxDC* aDC, GR_DRAWMODE aDrawMode, const wxPoint& aGridOrigin ); void OnEraseBackground( wxEraseEvent& event ) { } @@ -324,7 +328,7 @@ public: * warps the cursor to the current cross hair position. */ void MoveCursorToCrossHair(); - + /** * Function ToDeviceXY * transforms logical to device coordinates diff --git a/include/class_sch_screen.h b/include/class_sch_screen.h index b04dc3871b..02a6787679 100644 --- a/include/class_sch_screen.h +++ b/include/class_sch_screen.h @@ -73,8 +73,8 @@ private: TITLE_BLOCK m_titles; - /// Position of the origin axis, which is used in exports mostly, but not yet in EESCHEMA - wxPoint m_originAxisPosition; + /// Origin of the auxilliary axis, which is used in exports mostly, but not yet in EESCHEMA + wxPoint m_aux_origin; DLIST< SCH_ITEM > m_drawList; ///< Object list for the screen. /// @todo use DLIST or superior container @@ -108,12 +108,12 @@ public: const PAGE_INFO& GetPageSettings() const { return m_paper; } void SetPageSettings( const PAGE_INFO& aPageSettings ) { m_paper = aPageSettings; } - void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; } + void SetFileName( const wxString& aFileName ) { m_fileName = aFileName; } - const wxString& GetFileName() const { return m_fileName; } + const wxString& GetFileName() const { return m_fileName; } - const wxPoint& GetOriginAxisPosition() const { return m_originAxisPosition; } - void SetOriginAxisPosition( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; } + const wxPoint& GetAuxOrigin() const { return m_aux_origin; } + void SetAuxOrigin( const wxPoint& aPosition ) { m_aux_origin = aPosition; } const TITLE_BLOCK& GetTitleBlock() const { return m_titles; } //TITLE_BLOCK& GetTitleBlock() const { return (TITLE_BLOCK&) m_titles; } diff --git a/include/hotkeys_basic.h b/include/hotkeys_basic.h index 8e355188f7..65f53dc483 100644 --- a/include/hotkeys_basic.h +++ b/include/hotkeys_basic.h @@ -217,6 +217,7 @@ void ParseHotkeyConfig( const wxString& data, struct EDA_HOTKEY_CONFIG* aDescLis enum common_hotkey_id_commnand { HK_NOT_FOUND = 0, HK_RESET_LOCAL_COORD, + HK_SET_GRID_ORIGIN, HK_HELP, HK_ZOOM_IN, HK_ZOOM_OUT, diff --git a/include/sch_base_frame.h b/include/sch_base_frame.h index 2265ed2ec9..e53634a28d 100644 --- a/include/sch_base_frame.h +++ b/include/sch_base_frame.h @@ -58,8 +58,15 @@ public: const PAGE_INFO& GetPageSettings () const; // overload EDA_DRAW_FRAME const wxSize GetPageSizeIU() const; // overload EDA_DRAW_FRAME - const wxPoint& GetOriginAxisPosition() const; // overload EDA_DRAW_FRAME - void SetOriginAxisPosition( const wxPoint& aPosition ); // overload EDA_DRAW_FRAME + const wxPoint& GetAuxOrigin() const; // overload EDA_DRAW_FRAME + void SetAuxOrigin( const wxPoint& aPosition ); // overload EDA_DRAW_FRAME + + const wxPoint& GetGridOrigin() const // overload EDA_DRAW_FRAME + { + static wxPoint zero; + return zero; + } + void SetGridOrigin( const wxPoint& aPoint ) {} // overload EDA_DRAW_FRAME const TITLE_BLOCK& GetTitleBlock() const; // overload EDA_DRAW_FRAME void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload EDA_DRAW_FRAME diff --git a/include/wxBasePcbFrame.h b/include/wxBasePcbFrame.h index 2b15bfa611..7118ff8867 100644 --- a/include/wxBasePcbFrame.h +++ b/include/wxBasePcbFrame.h @@ -131,8 +131,11 @@ public: const PAGE_INFO& GetPageSettings() const; // overload const wxSize GetPageSizeIU() const; // overload - const wxPoint& GetOriginAxisPosition() const; // overload - void SetOriginAxisPosition( const wxPoint& aPosition ); // overload + const wxPoint& GetAuxOrigin() const; // overload + void SetAuxOrigin( const wxPoint& aPoint ); // overload + + const wxPoint& GetGridOrigin() const; // overload + void SetGridOrigin( const wxPoint& aPoint ); // overload const TITLE_BLOCK& GetTitleBlock() const; // overload void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload diff --git a/include/wxstruct.h b/include/wxstruct.h index 3b9b0b6bcf..4c3144ea28 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -113,15 +113,15 @@ extern const wxChar* traceAutoSave; class EDA_BASE_FRAME : public wxFrame { protected: - ID_DRAWFRAME_TYPE m_Ident; // Id Type (pcb, schematic, library..) + ID_DRAWFRAME_TYPE m_Ident; ///< Id Type (pcb, schematic, library..) wxPoint m_FramePos; wxSize m_FrameSize; - wxAuiToolBar* m_mainToolBar; // Standard horizontal Toolbar + wxAuiToolBar* m_mainToolBar; ///< Standard horizontal Toolbar bool m_FrameIsActive; - wxString m_FrameName; // name used for writing and reading setup - // It is "SchematicFrame", "PcbFrame" .... - wxString m_AboutTitle; // Name of program displayed in About. + wxString m_FrameName; ///< name used for writing and reading setup + ///< It is "SchematicFrame", "PcbFrame" .... + wxString m_AboutTitle; ///< Name of program displayed in About. wxAuiManager m_auimgr; @@ -404,47 +404,47 @@ protected: EDA_DRAW_PANEL* m_canvas; /// Tool ID of previously active draw tool bar button. - int m_lastDrawToolId; + int m_lastDrawToolId; /// The shape of the KiCad cursor. The default value (0) is the normal cross /// hair cursor. Set to non-zero value to draw the full screen cursor. /// @note This is not the system mouse cursor. - int m_cursorShape; + int m_cursorShape; /// True shows the X and Y axis indicators. - bool m_showAxis; + bool m_showAxis; /// True shows the grid axis indicators. - bool m_showGridAxis; + bool m_showGridAxis; /// True shows the origin axis used to indicate the coordinate offset for /// drill, gerber, and component position files. - bool m_showOriginAxis; + bool m_showOriginAxis; /// True shows the drawing border and title block. - bool m_showBorderAndTitleBlock; + bool m_showBorderAndTitleBlock; /// Choice box to choose the grid size. - wxComboBox* m_gridSelectBox; + wxComboBox* m_gridSelectBox; /// Choice box to choose the zoom value. - wxComboBox* m_zoomSelectBox; + wxComboBox* m_zoomSelectBox; /// The tool bar that contains the buttons for quick access to the application draw /// tools. It typically is located on the right side of the main window. - wxAuiToolBar* m_drawToolBar; + wxAuiToolBar* m_drawToolBar; /// The options tool bar typcially located on the left edge of the main window. - wxAuiToolBar* m_optionsToolBar; + wxAuiToolBar* m_optionsToolBar; /// Panel used to display information at the bottom of the main window. - EDA_MSG_PANEL* m_messagePanel; + EDA_MSG_PANEL* m_messagePanel; - int m_MsgFrameHeight; + int m_MsgFrameHeight; #ifdef USE_WX_OVERLAY // MAC Uses overlay to workaround the wxINVERT and wxXOR miss - wxOverlay m_overlay; + wxOverlay m_overlay; #endif protected: @@ -480,8 +480,89 @@ public: */ virtual const wxSize GetPageSizeIU() const = 0; - virtual const wxPoint& GetOriginAxisPosition() const = 0; - virtual void SetOriginAxisPosition( const wxPoint& aPosition ) = 0; + /** + * Function GetAuxOrigin + * returns the origin of the axis used for plotting and various exports. + */ + virtual const wxPoint& GetAuxOrigin() const = 0; + virtual void SetAuxOrigin( const wxPoint& aPosition ) = 0; + + /** + * Function GetGridOrigin + * returns the absolute coordinates of the origin of the snap grid. This is + * treated as a relative offset, and snapping will occur at multiples of the grid + * size relative to this point. + */ + virtual const wxPoint& GetGridOrigin() const = 0; + virtual void SetGridOrigin( const wxPoint& aPosition ) = 0; + + //----------------------------------------------- + /** + * Function GetCrossHairPosition + * return the current cross hair position in logical (drawing) coordinates. + * @param aInvertY Inverts the Y axis position. + * @return The cross hair position in drawing coordinates. + */ + wxPoint GetCrossHairPosition( bool aInvertY = false ) const; + + /** + * Function SetCrossHairPosition + * sets the screen cross hair position to \a aPosition in logical (drawing) units. + * @param aPosition The new cross hair position. + * @param aGridOrigin Origin point of the snap grid. + * @param aSnapToGrid Sets the cross hair position to the nearest grid position to + * \a aPosition. + * + */ + void SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid = true ); + + /** + * Function GetCursorPosition + * returns the current cursor position in logical (drawing) units. + * @param aOnGrid Returns the nearest grid position at the current cursor position. + * @param aGridOrigin Origin point of the snap grid. + * @param aGridSize Custom grid size instead of the current grid size. Only valid + * if \a aOnGrid is true. + * @return The current cursor position. + */ + wxPoint GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize = NULL ) const; + + /** + * Function GetNearestGridPosition + * returns the nearest \a aGridSize location to \a aPosition. + * @param aPosition The position to check. + * @param aGridSize The grid size to locate to if provided. If NULL then the current + * grid size is used. + * @return The nearst grid position. + */ + wxPoint GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize = NULL ) const; + + /** + * Function GetCursorScreenPosition + * returns the cross hair position in device (display) units.b + * @return The current cross hair position. + */ + wxPoint GetCrossHairScreenPosition() const; + + void SetMousePosition( const wxPoint& aPosition ); + + /** + * Function RefPos + * Return the reference position, coming from either the mouse position + * or the cursor position. + * + * @param useMouse If true, return mouse position, else cursor's. + * + * @return wxPoint - The reference point, either the mouse position or + * the cursor position. + */ + wxPoint RefPos( bool useMouse ) const; + + const wxPoint& GetScrollCenterPosition() const; + void SetScrollCenterPosition( const wxPoint& aPoint ); + + //---------------------------------------------- + virtual const TITLE_BLOCK& GetTitleBlock() const = 0; virtual void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) = 0; @@ -718,13 +799,13 @@ public: void DrawWorkSheet( wxDC* aDC, BASE_SCREEN* aScreen, int aLineWidth, double aScale, const wxString &aFilename ); - void DisplayToolMsg( const wxString& msg ); - virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0; - virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; - virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); - virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; - virtual void ToolOnRightClick( wxCommandEvent& event ); - void AdjustScrollBars( const wxPoint& aCenterPosition ); + void DisplayToolMsg( const wxString& msg ); + virtual void RedrawActiveWindow( wxDC* DC, bool EraseBg ) = 0; + virtual void OnLeftClick( wxDC* DC, const wxPoint& MousePos ) = 0; + virtual void OnLeftDClick( wxDC* DC, const wxPoint& MousePos ); + virtual bool OnRightClick( const wxPoint& MousePos, wxMenu* PopMenu ) = 0; + virtual void ToolOnRightClick( wxCommandEvent& event ); + void AdjustScrollBars( const wxPoint& aCenterPosition ); /** * Function OnActivate (virtual) diff --git a/pagelayout_editor/class_pl_editor_layout.h b/pagelayout_editor/class_pl_editor_layout.h index 5d589ff1b1..0a418b7dbe 100644 --- a/pagelayout_editor/class_pl_editor_layout.h +++ b/pagelayout_editor/class_pl_editor_layout.h @@ -33,7 +33,7 @@ public: m_paper = aPageSettings; } - const wxPoint& GetOriginAxisPosition() const + const wxPoint& GetAuxOrigin() const { static wxPoint zero( 0, 0 ); return zero; diff --git a/pagelayout_editor/controle.cpp b/pagelayout_editor/controle.cpp index dfb674d8d3..415c0fad1c 100644 --- a/pagelayout_editor/controle.cpp +++ b/pagelayout_editor/controle.cpp @@ -35,14 +35,9 @@ void PL_EDITOR_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aHotKey ) { - wxRealPoint gridSize; - wxPoint oldpos; - wxPoint pos = aPosition; - - pos = GetScreen()->GetNearestGridPosition( pos ); - - oldpos = GetScreen()->GetCrossHairPosition(); - gridSize = GetScreen()->GetGridSize(); + wxPoint pos = GetNearestGridPosition( aPosition ); + wxPoint oldpos = GetCrossHairPosition(); + wxRealPoint gridSize = GetScreen()->GetGridSize(); switch( aHotKey ) { @@ -74,14 +69,14 @@ void PL_EDITOR_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, break; } - GetScreen()->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); - if( oldpos != GetScreen()->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = GetScreen()->GetCrossHairPosition(); - GetScreen()->SetCrossHairPosition( oldpos ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index bf65fd48f9..68c3d2285c 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -250,7 +250,7 @@ static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPositio WORKSHEET_DATAITEM *item = screen->GetCurItem(); wxCHECK_RET( (item != NULL), wxT( "Cannot move NULL item." ) ); - wxPoint position = screen->GetCrossHairPosition() + wxPoint position = aPanel->GetParent()->GetCrossHairPosition() - ( initialCursorPosition - initialPositionUi ); if( (item->GetFlags() & LOCATE_STARTPOINT) ) @@ -285,12 +285,13 @@ static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) aPanel->Refresh(); } + void PL_EDITOR_FRAME::MoveItem( WORKSHEET_DATAITEM* aItem ) { wxCHECK_RET( aItem != NULL, wxT( "Cannot move NULL item" ) ); initialPosition = aItem->GetStartPos(); initialPositionUi = aItem->GetStartPosUi(); - initialCursorPosition = GetScreen()->GetCrossHairPosition(); + initialCursorPosition = GetCrossHairPosition(); if( (aItem->GetFlags() & LOCATE_ENDPOINT) ) { @@ -300,8 +301,8 @@ void PL_EDITOR_FRAME::MoveItem( WORKSHEET_DATAITEM* aItem ) if( aItem->GetFlags() & (LOCATE_STARTPOINT|LOCATE_ENDPOINT) ) { - GetScreen()->SetCrossHairPosition( initialPositionUi, false ); - initialCursorPosition = GetScreen()->GetCrossHairPosition(); + SetCrossHairPosition( initialPositionUi, false ); + initialCursorPosition = GetCrossHairPosition(); if( m_canvas->IsPointOnDisplay( initialCursorPosition ) ) { m_canvas->MoveCursorToCrossHair(); @@ -317,6 +318,7 @@ void PL_EDITOR_FRAME::MoveItem( WORKSHEET_DATAITEM* aItem ) GetScreen()->SetCurItem( aItem ); } + /** * Save in Undo list the layout, and place an item being moved. * @param aItem is the item moved diff --git a/pagelayout_editor/hotkeys.cpp b/pagelayout_editor/hotkeys.cpp index a0ba6da265..ab8045fac6 100644 --- a/pagelayout_editor/hotkeys.cpp +++ b/pagelayout_editor/hotkeys.cpp @@ -180,7 +180,11 @@ void PL_EDITOR_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, break; case HK_RESET_LOCAL_COORD: // Reset the relative coord - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); + break; + + case HK_SET_GRID_ORIGIN: + SetGridOrigin( GetCrossHairPosition() ); break; case HK_MOVE_ITEM: diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 5d8b36f052..3e18ba0ee8 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -254,7 +254,7 @@ double PL_EDITOR_FRAME::BestZoom() double bestzoom = std::max( zx, zy ); - GetScreen()->SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) ); + SetScrollCenterPosition( wxPoint( dx / 2, dy / 2 ) ); return bestzoom; } @@ -369,42 +369,44 @@ void PL_EDITOR_FRAME::UpdateStatusBar() wxPoint originCoord; int Xsign = 1; int Ysign = 1; + WORKSHEET_DATAITEM dummy( WORKSHEET_DATAITEM::WS_SEGMENT ); + switch( m_originSelectChoice ) { - default: - case 0: // Origin = paper Left Top corner - break; + default: + case 0: // Origin = paper Left Top corner + break; - case 1: // Origin = page Right Bottom corner - Xsign = -1; - Ysign = -1; - dummy.SetStart( 0, 0, RB_CORNER ); - originCoord = dummy.GetStartPosUi(); - break; + case 1: // Origin = page Right Bottom corner + Xsign = -1; + Ysign = -1; + dummy.SetStart( 0, 0, RB_CORNER ); + originCoord = dummy.GetStartPosUi(); + break; - case 2: // Origin = page Left Bottom corner - Ysign = -1; - dummy.SetStart( 0, 0, LB_CORNER ); - originCoord = dummy.GetStartPosUi(); - break; + case 2: // Origin = page Left Bottom corner + Ysign = -1; + dummy.SetStart( 0, 0, LB_CORNER ); + originCoord = dummy.GetStartPosUi(); + break; - case 3: // Origin = page Right Top corner - Xsign = -1; - dummy.SetStart( 0, 0, RT_CORNER ); - originCoord = dummy.GetStartPosUi(); - break; + case 3: // Origin = page Right Top corner + Xsign = -1; + dummy.SetStart( 0, 0, RT_CORNER ); + originCoord = dummy.GetStartPosUi(); + break; - case 4: // Origin = page Left Top corner - dummy.SetStart( 0, 0, LT_CORNER ); - originCoord = dummy.GetStartPosUi(); - break; + case 4: // Origin = page Left Top corner + dummy.SetStart( 0, 0, LT_CORNER ); + originCoord = dummy.GetStartPosUi(); + break; } - screen->m_GridOrigin = originCoord; + SetGridOrigin( originCoord ); // Display absolute coordinates: - wxPoint coord = screen->GetCrossHairPosition() - originCoord; + wxPoint coord = GetCrossHairPosition() - originCoord; double dXpos = To_User_Unit( g_UserUnit, coord.x*Xsign ); double dYpos = To_User_Unit( g_UserUnit, coord.y*Ysign ); @@ -441,8 +443,8 @@ void PL_EDITOR_FRAME::UpdateStatusBar() SetStatusText( line, 2 ); // Display relative coordinates: - int dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x; - int dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y; + int dx = GetCrossHairPosition().x - screen->m_O_Curseur.x; + int dy = GetCrossHairPosition().y - screen->m_O_Curseur.y; dXpos = To_User_Unit( g_UserUnit, dx * Xsign ); dYpos = To_User_Unit( g_UserUnit, dy * Ysign ); line.Printf( locformatter, dXpos, dYpos ); @@ -594,10 +596,11 @@ WORKSHEET_DATAITEM * PL_EDITOR_FRAME::GetSelectedItem() */ WORKSHEET_DATAITEM* PL_EDITOR_FRAME::Locate( const wxPoint& aPosition ) { - const PAGE_INFO& pageInfo = GetPageSettings(); - TITLE_BLOCK t_block = GetTitleBlock(); - EDA_COLOR_T color = RED; // Needed, not used - PL_EDITOR_SCREEN* screen = (PL_EDITOR_SCREEN*) GetScreen(); + const PAGE_INFO& pageInfo = GetPageSettings(); + TITLE_BLOCK t_block = GetTitleBlock(); + EDA_COLOR_T color = RED; // Needed, not used + PL_EDITOR_SCREEN* screen = (PL_EDITOR_SCREEN*) GetScreen(); + screen-> m_ScreenNumber = GetPageNumberOption() ? 1 : 2; WS_DRAW_ITEM_LIST drawList; @@ -623,9 +626,9 @@ WORKSHEET_DATAITEM* PL_EDITOR_FRAME::Locate( const wxPoint& aPosition ) // Choose item in list if more than 1 item if( list.size() > 1 ) { - wxArrayString choices; + wxArrayString choices; wxString text; - wxPoint cursPos = screen->GetCrossHairPosition(); + wxPoint cursPos = GetCrossHairPosition(); for( unsigned ii = 0; ii < list.size(); ++ii ) { @@ -656,7 +659,7 @@ WORKSHEET_DATAITEM* PL_EDITOR_FRAME::Locate( const wxPoint& aPosition ) if( selection < 0 ) return NULL; - screen->SetCrossHairPosition( cursPos ); + SetCrossHairPosition( cursPos ); m_canvas->MoveCursorToCrossHair(); drawitem = list[selection]; } diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index 8b1e85c72f..660e02d1b8 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -58,6 +58,8 @@ class PL_EDITOR_FRAME : public EDA_DRAW_FRAME // usefull when there are some items which are // only on page 1, not on page 1 + wxPoint m_grid_origin; + protected: /// The last filename chosen to be proposed to the user wxString m_lastFileName; @@ -90,12 +92,21 @@ public: return (PL_EDITOR_SCREEN*) m_canvas->GetScreen(); } - const wxPoint& GetOriginAxisPosition() const // overload EDA_DRAW_FRAME + const wxPoint& GetAuxOrigin() const // overload EDA_DRAW_FRAME { - static wxPoint dummy( 0,0 ); + static wxPoint dummy; // ( 0,0 ); return dummy; } - void SetOriginAxisPosition( const wxPoint& aPosition ) {} // overload EDA_DRAW_FRAME + void SetAuxOrigin( const wxPoint& aPosition ) {} // overload EDA_DRAW_FRAME + + const wxPoint& GetGridOrigin() const // overload EDA_DRAW_FRAME + { + return m_grid_origin; + } + void SetGridOrigin( const wxPoint& aPoint ) // overload EDA_DRAW_FRAME + { + m_grid_origin = aPoint; + } const TITLE_BLOCK& GetTitleBlock() const; // overload EDA_DRAW_FRAME void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ); // overload EDA_DRAW_FRAME diff --git a/pcbnew/autorouter/automove.cpp b/pcbnew/autorouter/automove.cpp index 401b7d8606..19d04e5885 100644 --- a/pcbnew/autorouter/automove.cpp +++ b/pcbnew/autorouter/automove.cpp @@ -106,7 +106,7 @@ void PCB_EDIT_FRAME::AutoPlace( wxCommandEvent& event ) break; } - /* Erase ratsnest if needed */ + // Erase ratsnest if needed if( GetBoard()->IsElementVisible(RATSNEST_VISIBLE) ) DrawGeneralRatsnest( &dc ); @@ -191,7 +191,7 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) return; } - /* Confirmation */ + // Confirmation if( !IsOK( this, _( "Move modules?" ) ) ) return; @@ -223,15 +223,15 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) */ if( PlaceModulesHorsPcb && edgesExist ) { - if( GetScreen()->GetCrossHairPosition().y < (bbbox.GetBottom() + 2000) ) + if( GetCrossHairPosition().y < (bbbox.GetBottom() + 2000) ) { - wxPoint pos = GetScreen()->GetCrossHairPosition(); + wxPoint pos = GetCrossHairPosition(); pos.y = bbbox.GetBottom() + 2000; - GetScreen()->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); } } - /* calculate the area needed by footprints */ + // calculate the area needed by footprints surface = 0.0; for( unsigned ii = 0; ii < moduleList.size(); ii++ ) @@ -249,7 +249,7 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) Xsize_allowed = (int) ( sqrt( surface ) * 4.0 / 3.0 ); - start = current = GetScreen()->GetCrossHairPosition(); + start = current = GetCrossHairPosition(); Ymax_size = 0; for( unsigned ii = 0; ii < moduleList.size(); ii++ ) @@ -276,8 +276,8 @@ void PCB_EDIT_FRAME::AutoMoveModulesOnPcb( bool PlaceModulesHorsPcb ) Ymax_size = 0; } - GetScreen()->SetCrossHairPosition( current + Module->GetPosition() - - Module->GetBoundingBox().GetPosition() ); + SetCrossHairPosition( current + Module->GetPosition() - + Module->GetBoundingBox().GetPosition() ); Ymax_size = std::max( Ymax_size, Module->GetBoundingBox().GetHeight() ); diff --git a/pcbnew/autorouter/autoplac.cpp b/pcbnew/autorouter/autoplac.cpp index 1baf7097e7..5aa3db6d0d 100644 --- a/pcbnew/autorouter/autoplac.cpp +++ b/pcbnew/autorouter/autoplac.cpp @@ -62,20 +62,20 @@ */ static const double OrientPenality[11] = { - 2.0f, /* CntRot = 0 rotation prohibited */ - 1.9f, /* CntRot = 1 */ - 1.8f, /* CntRot = 2 */ - 1.7f, /* CntRot = 3 */ - 1.6f, /* CntRot = 4 */ - 1.5f, /* CntRot = 5 */ - 1.4f, /* CntRot = 5 */ - 1.3f, /* CntRot = 7 */ - 1.2f, /* CntRot = 8 */ - 1.1f, /* CntRot = 9 */ - 1.0f /* CntRot = 10 rotation authorized, no penalty */ + 2.0f, // CntRot = 0 rotation prohibited + 1.9f, // CntRot = 1 + 1.8f, // CntRot = 2 + 1.7f, // CntRot = 3 + 1.6f, // CntRot = 4 + 1.5f, // CntRot = 5 + 1.4f, // CntRot = 5 + 1.3f, // CntRot = 7 + 1.2f, // CntRot = 8 + 1.1f, // CntRot = 9 + 1.0f // CntRot = 10 rotation authorized, no penalty }; -/* Cell states. */ +// Cell states. #define OUT_OF_BOARD -2 #define OCCUPED_By_MODULE -1 @@ -149,7 +149,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) if( RoutingMatrix.m_GridRouting < 10*IU_PER_MILS ) RoutingMatrix.m_GridRouting = 10*IU_PER_MILS; // Min value = 1/1000 inch - /* Compute module parameters used in auto place */ + // Compute module parameters used in auto place if( GenPlaceBoard() == 0 ) return; @@ -245,7 +245,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) msg.Printf( _("Place module %d of %d"), cnt, moduleCount ); SetStatusText( msg ); - /* Display fill area of interest, barriers, penalties. */ + // Display fill area of interest, barriers, penalties. DrawInfoPlace( DC ); error = GetOptimalModulePlacement( Module, DC ); @@ -255,7 +255,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) if( error == ESC ) goto end_of_tst; - /* Determine if the best orientation of a module is 180. */ + // Determine if the best orientation of a module is 180. ii = Module->GetPlacementCost180() & 0x0F; if( ii != 0 ) @@ -266,7 +266,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) error = GetOptimalModulePlacement( Module, DC ); MinCout *= OrientPenality[ii]; - if( BestScore > MinCout ) /* This orientation is best. */ + if( BestScore > MinCout ) // This orientation is best. { PosOK = CurrPosition; BestScore = MinCout; @@ -281,7 +281,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) goto end_of_tst; } - /* Determine if the best orientation of a module is 90. */ + // Determine if the best orientation of a module is 90. ii = Module->GetPlacementCost90() & 0x0F; if( ii != 0 ) @@ -291,7 +291,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) error = GetOptimalModulePlacement( Module, DC ); MinCout *= OrientPenality[ii]; - if( BestScore > MinCout ) /* This orientation is best. */ + if( BestScore > MinCout ) // This orientation is best. { PosOK = CurrPosition; BestScore = MinCout; @@ -306,7 +306,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) goto end_of_tst; } - /* Determine if the best orientation of a module is 270. */ + // Determine if the best orientation of a module is 270. ii = (Module->GetPlacementCost90() >> 4 ) & 0x0F; if( ii != 0 ) @@ -316,7 +316,7 @@ void PCB_EDIT_FRAME::AutoPlaceModule( MODULE* Module, int place_mode, wxDC* DC ) error = GetOptimalModulePlacement( Module, DC ); MinCout *= OrientPenality[ii]; - if( BestScore > MinCout ) /* This orientation is best. */ + if( BestScore > MinCout ) // This orientation is best. { PosOK = CurrPosition; BestScore = MinCout; @@ -336,11 +336,11 @@ end_of_tst: if( error == ESC ) break; - /* Place module. */ - CurrPosition = GetScreen()->GetCrossHairPosition(); - GetScreen()->SetCrossHairPosition( PosOK ); + // Place module. + CurrPosition = GetCrossHairPosition(); + SetCrossHairPosition( PosOK ); PlaceModule( Module, DC ); - GetScreen()->SetCrossHairPosition( CurrPosition ); + SetCrossHairPosition( CurrPosition ); Module->CalculateBoundingBox(); @@ -393,14 +393,14 @@ void PCB_EDIT_FRAME::DrawInfoPlace( wxDC* DC ) if( top_state & CELL_is_ZONE ) color = BLUE; - /* obstacles */ + // obstacles if( ( top_state & CELL_is_EDGE ) || ( bottom_state & CELL_is_EDGE ) ) color = WHITE; else if( top_state & ( HOLE | CELL_is_MODULE ) ) color = LIGHTRED; else if( bottom_state & (HOLE | CELL_is_MODULE) ) color = LIGHTGREEN; - else /* Display the filling and keep out regions. */ + else // Display the filling and keep out regions. { if( RoutingMatrix.GetDist( ii, jj, TOP ) || RoutingMatrix.GetDist( ii, jj, BOTTOM ) ) @@ -438,12 +438,12 @@ int PCB_EDIT_FRAME::GenPlaceBoard() msg.Printf( wxT( "%d" ), nbCells ); m_messagePanel->SetMessage( 14, _( "Cells." ), msg, YELLOW ); - /* Choose the number of board sides. */ + // Choose the number of board sides. RoutingMatrix.m_RoutingLayersCount = 2; RoutingMatrix.InitRoutingMatrix(); - /* Display memory usage. */ + // Display memory usage. msg.Printf( wxT( "%d" ), RoutingMatrix.m_MemSize / 1024 ); m_messagePanel->SetMessage( 24, wxT( "Mem(Kb)" ), msg, CYAN ); @@ -454,7 +454,7 @@ int PCB_EDIT_FRAME::GenPlaceBoard() g_Route_Layer_TOP = LAYER_N_FRONT; - /* Place the edge layer segments */ + // Place the edge layer segments TRACK TmpSegm( NULL ); TmpSegm.SetLayer( UNDEFINED_LAYER ); @@ -561,7 +561,7 @@ void PCB_EDIT_FRAME::GenModuleOnBoard( MODULE* Module ) int trackWidth = GetBoard()->m_NetClasses.GetDefault()->GetTrackWidth(); int clearance = GetBoard()->m_NetClasses.GetDefault()->GetClearance(); - /* Trace pads and surface safely. */ + // Trace pads and surface safely. marge = trackWidth + clearance; for( Pad = Module->Pads(); Pad != NULL; Pad = Pad->Next() ) @@ -569,7 +569,7 @@ void PCB_EDIT_FRAME::GenModuleOnBoard( MODULE* Module ) ::PlacePad( Pad, CELL_is_MODULE, marge, WRITE_OR_CELL ); } - /* Trace clearance. */ + // Trace clearance. marge = ( RoutingMatrix.m_GridRouting * Module->GetPadCount() ) / GAIN; CreateKeepOutRectangle( ox, oy, fx, fy, marge, KEEP_OUT_MARGIN, layerMask ); } @@ -578,7 +578,7 @@ void PCB_EDIT_FRAME::GenModuleOnBoard( MODULE* Module ) int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) { int cx, cy; - int ox, oy, fx, fy; /* occupying part of the module focuses on the cursor */ + int ox, oy, fx, fy; // occupying part of the module focuses on the cursor int error = 1; int showRat = 0; wxPoint LastPosOK; @@ -604,7 +604,7 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) CurrPosition.x = RoutingMatrix.m_BrdBox.GetX() - ox; CurrPosition.y = RoutingMatrix.m_BrdBox.GetY() - oy; - /* Module placement on grid. */ + // Module placement on grid. CurrPosition.x -= CurrPosition.x % RoutingMatrix.m_GridRouting; CurrPosition.y -= CurrPosition.y % RoutingMatrix.m_GridRouting; @@ -664,7 +664,7 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) g_Offset_Module.x = cx - CurrPosition.x; CurrPosition.y = RoutingMatrix.m_BrdBox.GetY() - oy; - /* Placement on grid. */ + // Placement on grid. CurrPosition.y -= CurrPosition.y % RoutingMatrix.m_GridRouting; DrawModuleOutlines( m_canvas, aDC, aModule ); @@ -673,7 +673,7 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) CurrPosition.y += RoutingMatrix.m_GridRouting ) { #ifndef USE_WX_OVERLAY - /* Erase traces. */ + // Erase traces. DrawModuleOutlines( m_canvas, aDC, aModule ); if( showRat ) @@ -717,14 +717,14 @@ int PCB_EDIT_FRAME::GetOptimalModulePlacement( MODULE* aModule, wxDC* aDC ) } } - DrawModuleOutlines( m_canvas, aDC, aModule ); /* erasing the last traces */ + DrawModuleOutlines( m_canvas, aDC, aModule ); // erasing the last traces g_Show_Module_Ratsnest = showRats; if( showRat ) Compute_Ratsnest_PlaceModule( aDC ); - /* Regeneration of the modified variable. */ + // Regeneration of the modified variable. aModule->GetBoundingBox().SetX( ox + cx ); aModule->GetBoundingBox().SetY( oy + cy ); CurrPosition = LastPosOK; @@ -926,7 +926,7 @@ double PCB_EDIT_FRAME::Compute_Ratsnest_PlaceModule( wxDC* DC ) GRLine( m_canvas->GetClipBox(), DC, start, end, 0, color ); } #endif - /* Cost of the ratsnest. */ + // Cost of the ratsnest. dx = end.x - start.x; dy = end.y - start.y; @@ -970,10 +970,10 @@ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, int lgain, cgain; if( aLayerMask & GetLayerMask( g_Route_Layer_BOTTOM ) ) - trace = 1; /* Trace on bottom layer. */ + trace = 1; // Trace on bottom layer. if( ( aLayerMask & GetLayerMask( g_Route_Layer_TOP ) ) && RoutingMatrix.m_RoutingLayersCount ) - trace |= 2; /* Trace on top layer. */ + trace |= 2; // Trace on top layer. if( trace == 0 ) return; @@ -991,7 +991,7 @@ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, if( pmarge < 1 ) pmarge = 1; - /* Calculate the coordinate limits of the rectangle. */ + // Calculate the coordinate limits of the rectangle. row_max = uy1 / RoutingMatrix.m_GridRouting; col_max = ux1 / RoutingMatrix.m_GridRouting; row_min = uy0 / RoutingMatrix.m_GridRouting; @@ -1057,7 +1057,7 @@ void CreateKeepOutRectangle( int ux0, int uy0, int ux1, int uy1, } -/* Sort routines */ +// Sort routines static bool Tri_PlaceModules( MODULE* ref, MODULE* compare ) { double ff1, ff2; @@ -1114,7 +1114,7 @@ static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) pcbframe->SetMsgPanel( Module ); pcbframe->build_ratsnest_module( Module ); - /* Calculate external ratsnest. */ + // Calculate external ratsnest. for( unsigned ii = 0; ii < pcbframe->GetBoard()->m_LocalRatsnest.size(); ii++ ) { if( ( pcbframe->GetBoard()->m_LocalRatsnest[ii].m_Status & @@ -1127,7 +1127,7 @@ static MODULE* PickModule( PCB_EDIT_FRAME* pcbframe, wxDC* DC ) sort( moduleList.begin(), moduleList.end(), Tri_RatsModules ); - /* Search for "best" module. */ + // Search for "best" module. MODULE* bestModule = NULL; MODULE* altModule = NULL; @@ -1199,7 +1199,7 @@ int propagate() { current_cell = RoutingMatrix.GetCell( row, col, BOTTOM ) & NO_CELL_ZONE; - if( current_cell == 0 ) /* a free cell is found */ + if( current_cell == 0 ) // a free cell is found { if( (old_cell_H & CELL_is_ZONE) || (pt_cell_V[col] & CELL_is_ZONE) ) { @@ -1224,7 +1224,7 @@ int propagate() { current_cell = RoutingMatrix.GetCell( row, col, BOTTOM ) & NO_CELL_ZONE; - if( current_cell == 0 ) /* a free cell is found */ + if( current_cell == 0 ) // a free cell is found { if( (old_cell_H & CELL_is_ZONE) || (pt_cell_V[col] & CELL_is_ZONE) ) { @@ -1249,7 +1249,7 @@ int propagate() { current_cell = RoutingMatrix.GetCell( row, col, BOTTOM ) & NO_CELL_ZONE; - if( current_cell == 0 ) /* a free cell is found */ + if( current_cell == 0 ) // a free cell is found { if( (old_cell_H & CELL_is_ZONE) || (pt_cell_V[row] & CELL_is_ZONE) ) { @@ -1274,7 +1274,7 @@ int propagate() { current_cell = RoutingMatrix.GetCell( row, col, BOTTOM ) & NO_CELL_ZONE; - if( current_cell == 0 ) /* a free cell is found */ + if( current_cell == 0 ) // a free cell is found { if( (old_cell_H & CELL_is_ZONE) || (pt_cell_V[row] & CELL_is_ZONE) ) { diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index fc7d20a57d..1cd6d4663d 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -148,17 +148,31 @@ const wxSize PCB_BASE_FRAME::GetPageSizeIU() const } -const wxPoint& PCB_BASE_FRAME::GetOriginAxisPosition() const +const wxPoint& PCB_BASE_FRAME::GetAuxOrigin() const { wxASSERT( m_Pcb ); - return m_Pcb->GetOriginAxisPosition(); + return m_Pcb->GetAuxOrigin(); } -void PCB_BASE_FRAME::SetOriginAxisPosition( const wxPoint& aPosition ) +void PCB_BASE_FRAME::SetAuxOrigin( const wxPoint& aPoint ) { wxASSERT( m_Pcb ); - m_Pcb->SetOriginAxisPosition( aPosition ); + m_Pcb->SetAuxOrigin( aPoint ); +} + + +const wxPoint& PCB_BASE_FRAME::GetGridOrigin() const +{ + wxASSERT( m_Pcb ); + return m_Pcb->GetGridOrigin(); +} + + +void PCB_BASE_FRAME::SetGridOrigin( const wxPoint& aPoint ) +{ + wxASSERT( m_Pcb ); + m_Pcb->SetGridOrigin( aPoint ); } @@ -258,7 +272,7 @@ double PCB_BASE_FRAME::BestZoom() double bestzoom = std::max( iu_per_du_X, iu_per_du_Y ); - GetScreen()->SetScrollCenterPosition( ibbbox.Centre() ); + SetScrollCenterPosition( ibbbox.Centre() ); return bestzoom; } @@ -268,21 +282,19 @@ void PCB_BASE_FRAME::CursorGoto( const wxPoint& aPos, bool aWarp ) { // factored out of pcbnew/find.cpp - PCB_SCREEN* screen = (PCB_SCREEN*)GetScreen(); - INSTALL_UNBUFFERED_DC( dc, m_canvas ); // There may be need to reframe the drawing. if( !m_canvas->IsPointOnDisplay( aPos ) ) { - screen->SetCrossHairPosition( aPos ); + SetCrossHairPosition( aPos ); RedrawScreen( aPos, aWarp ); } else { // Put cursor on item position m_canvas->CrossHairOff( &dc ); - screen->SetCrossHairPosition( aPos ); + SetCrossHairPosition( aPos ); if( aWarp ) m_canvas->MoveCursorToCrossHair(); @@ -560,8 +572,8 @@ void PCB_BASE_FRAME::UpdateStatusBar() { double theta, ro; - dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x; - dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y; + dx = GetCrossHairPosition().x - screen->m_O_Curseur.x; + dy = GetCrossHairPosition().y - screen->m_O_Curseur.y; theta = ArcTangente( -dy, dx ) / 10; @@ -598,8 +610,8 @@ void PCB_BASE_FRAME::UpdateStatusBar() } // Display absolute coordinates: - dXpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().x ); - dYpos = To_User_Unit( g_UserUnit, screen->GetCrossHairPosition().y ); + dXpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().x ); + dYpos = To_User_Unit( g_UserUnit, GetCrossHairPosition().y ); // The following sadly is an if Eeschema/if Pcbnew wxString absformatter; @@ -642,8 +654,8 @@ void PCB_BASE_FRAME::UpdateStatusBar() if( !DisplayOpt.DisplayPolarCood ) // display relative cartesian coordinates { // Display relative coordinates: - dx = screen->GetCrossHairPosition().x - screen->m_O_Curseur.x; - dy = screen->GetCrossHairPosition().y - screen->m_O_Curseur.y; + dx = GetCrossHairPosition().x - screen->m_O_Curseur.x; + dy = GetCrossHairPosition().y - screen->m_O_Curseur.y; dXpos = To_User_Unit( g_UserUnit, dx ); dYpos = To_User_Unit( g_UserUnit, dy ); diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 88e96f8abf..20c6b848a3 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -120,7 +120,7 @@ private: static bool InstallBlockCmdFrame( PCB_BASE_FRAME* parent, const wxString& title ) { - wxPoint oldpos = parent->GetScreen()->GetCrossHairPosition(); + wxPoint oldpos = parent->GetCrossHairPosition(); parent->GetCanvas()->SetIgnoreMouseEvents( true ); DIALOG_BLOCK_OPTIONS * dlg = new DIALOG_BLOCK_OPTIONS( parent, title ); @@ -128,7 +128,7 @@ static bool InstallBlockCmdFrame( PCB_BASE_FRAME* parent, const wxString& title int cmd = dlg->ShowModal(); dlg->Destroy(); - parent->GetScreen()->SetCrossHairPosition( oldpos ); + parent->SetCrossHairPosition( oldpos ); parent->GetCanvas()->MoveCursorToCrossHair(); parent->GetCanvas()->SetIgnoreMouseEvents( false ); @@ -232,9 +232,9 @@ void PCB_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) case BLOCK_IDLE: break; - case BLOCK_DRAG: /* Drag */ - case BLOCK_MOVE: /* Move */ - case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ + case BLOCK_DRAG: // Drag + case BLOCK_MOVE: // Move + case BLOCK_PRESELECT_MOVE: // Move with preselection list if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); @@ -242,7 +242,7 @@ void PCB_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) GetScreen()->m_BlockLocate.ClearItemsList(); break; - case BLOCK_COPY: /* Copy */ + case BLOCK_COPY: // Copy if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); @@ -315,35 +315,35 @@ bool PCB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) DisplayError( this, wxT( "Error in HandleBlockPLace" ) ); break; - case BLOCK_DRAG: /* Drag (not used, for future enhancements)*/ - case BLOCK_MOVE: /* Move */ - case BLOCK_COPY: /* Copy */ - case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ + case BLOCK_DRAG: // Drag (not used, for future enhancements) + case BLOCK_MOVE: // Move + case BLOCK_COPY: // Copy + case BLOCK_PRESELECT_MOVE: // Move with preselection list GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE ); nextcmd = true; m_canvas->SetMouseCaptureCallback( drawMovingBlock ); m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); break; - case BLOCK_DELETE: /* Delete */ + case BLOCK_DELETE: // Delete m_canvas->SetMouseCaptureCallback( NULL ); GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_STOP ); Block_Delete(); break; - case BLOCK_ROTATE: /* Rotation */ + case BLOCK_ROTATE: // Rotation m_canvas->SetMouseCaptureCallback( NULL ); GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_STOP ); Block_Rotate(); break; - case BLOCK_FLIP: /* Flip */ + case BLOCK_FLIP: // Flip m_canvas->SetMouseCaptureCallback( NULL ); GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_STOP ); Block_Flip(); break; - case BLOCK_SAVE: /* Save (not used, for future enhancements)*/ + case BLOCK_SAVE: // Save (not used, for future enhancements) GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_STOP ); if( GetScreen()->m_BlockLocate.GetCount() ) @@ -355,7 +355,7 @@ bool PCB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) case BLOCK_PASTE: break; - case BLOCK_ZOOM: /* Window Zoom */ + case BLOCK_ZOOM: // Window Zoom // Turn off the redraw block routine now so it is not displayed // with one corner at the new center of the screen @@ -577,7 +577,7 @@ static void drawMovingBlock( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& a if( screen->m_BlockLocate.GetState() != STATE_BLOCK_STOP ) { - screen->m_BlockLocate.SetMoveVector( screen->GetCrossHairPosition() - + screen->m_BlockLocate.SetMoveVector( aPanel->GetParent()->GetCrossHairPosition() - screen->m_BlockLocate.GetLastCursorPosition() ); } @@ -600,7 +600,7 @@ void PCB_EDIT_FRAME::Block_Delete() PICKED_ITEMS_LIST* itemsList = &GetScreen()->m_BlockLocate.GetItems(); itemsList->m_Status = UR_DELETED; - /* unlink items and clear flags */ + // unlink items and clear flags for( unsigned ii = 0; ii < itemsList->GetCount(); ii++ ) { BOARD_ITEM* item = (BOARD_ITEM*) itemsList->GetPickedItem( ii ); @@ -658,7 +658,7 @@ void PCB_EDIT_FRAME::Block_Rotate() wxPoint centre; // rotation cent-re for the rotation transform int rotAngle = 900; // rotation angle in 0.1 deg. - oldpos = GetScreen()->GetCrossHairPosition(); + oldpos = GetCrossHairPosition(); centre = GetScreen()->m_BlockLocate.Centre(); OnModify(); @@ -680,7 +680,7 @@ void PCB_EDIT_FRAME::Block_Rotate() m_Pcb->m_Status_Pcb = 0; break; - /* Move and rotate the track segments */ + // Move and rotate the track segments case PCB_TRACE_T: // a track segment (segment on a copper layer) case PCB_VIA_T: // a via (like track segment on a copper layer) m_Pcb->m_Status_Pcb = 0; @@ -716,14 +716,14 @@ void PCB_EDIT_FRAME::Block_Flip() { #define INVERT( pos ) (pos) = center.y - ( (pos) - center.y ) wxPoint memo; - wxPoint center; /* Position of the axis for inversion of all elements */ + wxPoint center; // Position of the axis for inversion of all elements OnModify(); PICKED_ITEMS_LIST* itemsList = &GetScreen()->m_BlockLocate.GetItems(); itemsList->m_Status = UR_FLIPPED; - memo = GetScreen()->GetCrossHairPosition(); + memo = GetCrossHairPosition(); center = GetScreen()->m_BlockLocate.Centre(); @@ -741,7 +741,7 @@ void PCB_EDIT_FRAME::Block_Flip() m_Pcb->m_Status_Pcb = 0; break; - /* Move and rotate the track segments */ + // Move and rotate the track segments case PCB_TRACE_T: // a track segment (segment on a copper layer) case PCB_VIA_T: // a via (like track segment on a copper layer) m_Pcb->m_Status_Pcb = 0; @@ -795,7 +795,7 @@ void PCB_EDIT_FRAME::Block_Move() item->ClearFlags(); break; - /* Move track segments */ + // Move track segments case PCB_TRACE_T: // a track segment (segment on a copper layer) case PCB_VIA_T: // a via (like a track segment on a copper layer) m_Pcb->m_Status_Pcb = 0; diff --git a/pcbnew/block_module_editor.cpp b/pcbnew/block_module_editor.cpp index 0301a8c1b5..01e18f6fbb 100644 --- a/pcbnew/block_module_editor.cpp +++ b/pcbnew/block_module_editor.cpp @@ -127,12 +127,14 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) { BLOCK_STATE_T state = GetScreen()->m_BlockLocate.GetState(); BLOCK_COMMAND_T command = GetScreen()->m_BlockLocate.GetCommand(); + m_canvas->CallEndMouseCapture( DC ); GetScreen()->m_BlockLocate.SetState( state ); GetScreen()->m_BlockLocate.SetCommand( command ); m_canvas->SetMouseCapture( DrawAndSizingBlockOutlines, AbortBlockCurrentCommand ); - GetScreen()->SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(), - GetScreen()->m_BlockLocate.GetBottom() ) ); + + SetCrossHairPosition( wxPoint( GetScreen()->m_BlockLocate.GetRight(), + GetScreen()->m_BlockLocate.GetBottom() ) ); m_canvas->MoveCursorToCrossHair(); } @@ -142,9 +144,9 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) DisplayError( this, wxT( "Error in HandleBlockPLace" ) ); break; - case BLOCK_DRAG: /* Drag */ - case BLOCK_MOVE: /* Move */ - case BLOCK_COPY: /* Copy */ + case BLOCK_DRAG: // Drag + case BLOCK_MOVE: // Move + case BLOCK_COPY: // Copy itemsCount = MarkItemsInBloc( currentModule, GetScreen()->m_BlockLocate ); if( itemsCount ) @@ -164,13 +166,13 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) break; - case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ + case BLOCK_PRESELECT_MOVE: // Move with preselection list nextcmd = true; m_canvas->SetMouseCaptureCallback( DrawMovingBlockOutlines ); GetScreen()->m_BlockLocate.SetState( STATE_BLOCK_MOVE ); break; - case BLOCK_DELETE: /* Delete */ + case BLOCK_DELETE: // Delete itemsCount = MarkItemsInBloc( currentModule, GetScreen()->m_BlockLocate ); if( itemsCount ) @@ -179,7 +181,7 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) DeleteMarkedItems( currentModule ); break; - case BLOCK_SAVE: /* Save */ + case BLOCK_SAVE: // Save case BLOCK_PASTE: break; @@ -195,7 +197,7 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) case BLOCK_MIRROR_X: case BLOCK_MIRROR_Y: - case BLOCK_FLIP: /* mirror */ + case BLOCK_FLIP: // mirror itemsCount = MarkItemsInBloc( currentModule, GetScreen()->m_BlockLocate ); if( itemsCount ) @@ -204,7 +206,7 @@ bool FOOTPRINT_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) MirrorMarkedItems( currentModule, GetScreen()->m_BlockLocate.Centre() ); break; - case BLOCK_ZOOM: /* Window Zoom */ + case BLOCK_ZOOM: // Window Zoom Window_Zoom( GetScreen()->m_BlockLocate ); break; @@ -249,28 +251,28 @@ void FOOTPRINT_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) case BLOCK_IDLE: break; - case BLOCK_DRAG: /* Drag */ - case BLOCK_MOVE: /* Move */ - case BLOCK_PRESELECT_MOVE: /* Move with preselection list*/ + case BLOCK_DRAG: // Drag + case BLOCK_MOVE: // Move + case BLOCK_PRESELECT_MOVE: // Move with preselection list GetScreen()->m_BlockLocate.ClearItemsList(); SaveCopyInUndoList( currentModule, UR_MODEDIT ); MoveMarkedItems( currentModule, GetScreen()->m_BlockLocate.GetMoveVector() ); m_canvas->Refresh( true ); break; - case BLOCK_COPY: /* Copy */ + case BLOCK_COPY: // Copy GetScreen()->m_BlockLocate.ClearItemsList(); SaveCopyInUndoList( currentModule, UR_MODEDIT ); CopyMarkedItems( currentModule, GetScreen()->m_BlockLocate.GetMoveVector() ); break; - case BLOCK_PASTE: /* Paste */ + case BLOCK_PASTE: // Paste GetScreen()->m_BlockLocate.ClearItemsList(); break; case BLOCK_MIRROR_X: case BLOCK_MIRROR_Y: - case BLOCK_FLIP: /* Mirror by popup menu, from block move */ + case BLOCK_FLIP: // Mirror by popup menu, from block move SaveCopyInUndoList( currentModule, UR_MODEDIT ); MirrorMarkedItems( currentModule, GetScreen()->m_BlockLocate.Centre() ); break; @@ -304,8 +306,8 @@ void FOOTPRINT_EDIT_FRAME::HandleBlockPlace( wxDC* DC ) static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { - BASE_SCREEN* screen = aPanel->GetScreen(); - FOOTPRINT_EDIT_FRAME * moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); + BASE_SCREEN* screen = aPanel->GetScreen(); + FOOTPRINT_EDIT_FRAME* moduleEditFrame = FOOTPRINT_EDIT_FRAME::GetActiveFootprintEditor(); wxASSERT( moduleEditFrame ); MODULE* currentModule = moduleEditFrame->GetBoard()->m_Modules; @@ -319,7 +321,7 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx if( currentModule ) { - wxPoint move_offset = -block->GetMoveVector(); + wxPoint move_offset = -block->GetMoveVector(); BOARD_ITEM* item = currentModule->GraphicalItems(); for( ; item != NULL; item = item->Next() ) @@ -351,15 +353,15 @@ static void DrawMovingBlockOutlines( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wx } } - /* Repaint new view. */ - block->SetMoveVector( screen->GetCrossHairPosition() - block->GetLastCursorPosition() ); + // Repaint new view. + block->SetMoveVector( moduleEditFrame->GetCrossHairPosition() - block->GetLastCursorPosition() ); block->Draw( aPanel, aDC, block->GetMoveVector(), g_XorMode, block->GetColor() ); if( currentModule ) { BOARD_ITEM* item = currentModule->GraphicalItems(); - wxPoint move_offset = - block->GetMoveVector(); + wxPoint move_offset = - block->GetMoveVector(); for( ; item != NULL; item = item->Next() ) { diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index dc4dcdad5b..67917a52b1 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -215,6 +215,8 @@ private: ZONE_CONTAINERS m_ZoneDescriptorList; LAYER m_Layer[NB_LAYERS]; + + wxPoint m_grid_origin; // if true m_highLight_NetCode is used HIGH_LIGHT_INFO m_highLight; // current high light data HIGH_LIGHT_INFO m_highLightPrevious; // a previously stored high light data @@ -231,9 +233,6 @@ private: TITLE_BLOCK m_titles; ///< text in lower right of screen and plots PCB_PLOT_PARAMS m_plotOptions; - /// Position of the origin axis, which is used in exports mostly - wxPoint m_originAxisPosition; - /// Number of pads connected to the current net. int m_nodeCount; @@ -387,6 +386,20 @@ public: return (int) m_markers.size(); } + /** + * Function SetAuxOrigin + * sets the origin point used for plotting. + */ + void SetAuxOrigin( const wxPoint& aPoint ) { m_designSettings.m_AuxOrigin = aPoint; } + const wxPoint& GetAuxOrigin() const { return m_designSettings.m_AuxOrigin; } + + /** + * Function SetGridOrigin + * sets the origin point of the grid. + */ + void SetGridOrigin( const wxPoint& aPoint ) { m_designSettings.m_GridOrigin = aPoint; } + const wxPoint& GetGridOrigin() const { return m_designSettings.m_GridOrigin; } + /** * Function ResetHighLight * Reset all high light data to the init state @@ -594,9 +607,6 @@ public: const PCB_PLOT_PARAMS& GetPlotOptions() const { return m_plotOptions; } void SetPlotOptions( const PCB_PLOT_PARAMS& aOptions ) { m_plotOptions = aOptions; } - const wxPoint& GetOriginAxisPosition() const { return m_originAxisPosition; } - void SetOriginAxisPosition( const wxPoint& aPosition ) { m_originAxisPosition = aPosition; } - TITLE_BLOCK& GetTitleBlock() { return m_titles; } void SetTitleBlock( const TITLE_BLOCK& aTitleBlock ) { m_titles = aTitleBlock; } diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index accad0fd10..05b6ef9523 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -141,7 +141,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) } } - m_Collector->Collect( m_Pcb, scanList, GetScreen()->RefPos( true ), guide ); + m_Collector->Collect( m_Pcb, scanList, RefPos( true ), guide ); #if 0 // debugging: print out the collected items, showing their priority order too. @@ -161,7 +161,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) if( item->Type() != PCB_ZONE_T ) continue; - /* Found a TYPE ZONE */ + // Found a TYPE ZONE if( item->GetTimeStamp() == timestampzone ) // Remove it, redundant, zone already found { m_Collector->Remove( ii ); @@ -200,7 +200,7 @@ BOARD_ITEM* PCB_BASE_FRAME::PcbGeneralLocateAndDisplay( int aHotKeyCode ) { wxMenu itemMenu; - /* Give a title to the selection menu. This is also a cancel menu item */ + // Give a title to the selection menu. This is also a cancel menu item wxMenuItem * item_title = new wxMenuItem( &itemMenu, -1, _( "Selection Clarification" ) ); #ifdef __WINDOWS__ @@ -269,9 +269,9 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH snapToGrid = false; if( snapToGrid ) - pos = GetScreen()->GetNearestGridPosition( pos ); + pos = GetNearestGridPosition( pos ); - oldpos = GetScreen()->GetCrossHairPosition(); + oldpos = GetCrossHairPosition(); gridSize = GetScreen()->GetGridSize(); @@ -306,7 +306,7 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH } // Put cursor in new position, according to the zoom keys (if any). - GetScreen()->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); /* Put cursor on grid or a pad centre if requested. If the tool DELETE is active the * cursor is left off grid this is better to reach items to delete off grid, @@ -326,7 +326,7 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH if( Magnetize( this, GetToolId(), igridsize, curs_pos, &pos ) ) { - GetScreen()->SetCrossHairPosition( pos, false ); + SetCrossHairPosition( pos, false ); } else { @@ -335,19 +335,19 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH if( !g_Drc_On || !g_CurrentTrackSegment || (BOARD_ITEM*)g_CurrentTrackSegment != this->GetCurItem() || !LocateIntrusion( m_Pcb->m_Track, g_CurrentTrackSegment, - GetScreen()->m_Active_Layer, GetScreen()->RefPos( true ) ) ) + GetScreen()->m_Active_Layer, RefPos( true ) ) ) { - GetScreen()->SetCrossHairPosition( curs_pos, snapToGrid ); + SetCrossHairPosition( curs_pos, snapToGrid ); } } - if( oldpos != GetScreen()->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = GetScreen()->GetCrossHairPosition(); - GetScreen()->SetCrossHairPosition( oldpos, false ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos, false ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( pos, false ); + SetCrossHairPosition( pos, false ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) @@ -373,5 +373,5 @@ void PCB_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, int aH OnHotKey( aDC, aHotKey, aPosition ); } - UpdateStatusBar(); /* Display new cursor coordinates */ + UpdateStatusBar(); // Display new cursor coordinates } diff --git a/pcbnew/cross-probing.cpp b/pcbnew/cross-probing.cpp index ced4db35dd..39e50e34a1 100644 --- a/pcbnew/cross-probing.cpp +++ b/pcbnew/cross-probing.cpp @@ -96,7 +96,7 @@ void RemoteCommand( const char* cmdline ) pos = pad->GetPosition(); } - if( netcode > 0 ) /* highlight the pad net*/ + if( netcode > 0 ) // highlight the pad net { pcb->HighLightON(); pcb->SetHighLightNet( netcode ); @@ -127,7 +127,7 @@ void RemoteCommand( const char* cmdline ) if( module ) // if found, center the module on screen, and redraw the screen. { - frame->GetScreen()->SetCrossHairPosition(pos); + frame->SetCrossHairPosition( pos ); frame->RedrawScreen( pos, false ); } } diff --git a/pcbnew/dialogs/dialog_SVG_print.cpp b/pcbnew/dialogs/dialog_SVG_print.cpp index a467b328f1..f8eec0ad5b 100644 --- a/pcbnew/dialogs/dialog_SVG_print.cpp +++ b/pcbnew/dialogs/dialog_SVG_print.cpp @@ -317,7 +317,7 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) m_plotOpts.SetValueColor( color ); PAGE_INFO pageInfo = m_board->GetPageSettings(); - wxPoint axisorigin = m_board->GetOriginAxisPosition(); + wxPoint axisorigin = m_board->GetAuxOrigin(); if( PageIsBoardBoundarySize() ) { @@ -328,7 +328,7 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) m_board->SetPageSettings( currpageInfo ); m_plotOpts.SetUseAuxOrigin( true ); wxPoint origin = bbox.GetOrigin(); - m_board->SetOriginAxisPosition( origin ); + m_board->SetAuxOrigin( origin ); } LOCALE_IO toggle; @@ -344,7 +344,7 @@ bool DIALOG_SVG_PRINT::CreateSVGFile( const wxString& aFullFileName ) } delete plotter; - m_board->SetOriginAxisPosition( axisorigin ); + m_board->SetAuxOrigin( axisorigin ); m_board->SetPageSettings( pageInfo ); return true; diff --git a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp index fa6fe3c351..5e0dbc7c13 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_BoardEditor.cpp @@ -85,7 +85,7 @@ DIALOG_MODULE_BOARD_EDITOR::~DIALOG_MODULE_BOARD_EDITOR() } -/* Creation of the panel properties of the module editor. */ +// Creation of the panel properties of the module editor. void DIALOG_MODULE_BOARD_EDITOR::InitBoardProperties() { PutValueInLocalUnits( *m_ModPositionX, m_CurrentModule->GetPosition().x ); @@ -244,7 +244,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties() m_LastSelected3DShapeIndex = -1; - /* Init 3D shape list */ + // Init 3D shape list S3D_MASTER* draw3D = m_CurrentModule->Models(); while( draw3D ) @@ -276,7 +276,7 @@ void DIALOG_MODULE_BOARD_EDITOR::InitModeditProperties() _( "Use this attribute for \"virtual\" components drawn on board\n" "(like a old ISA PC bus connector)" ) ); - /* Controls on right side of the dialog */ + // Controls on right side of the dialog switch( m_CurrentModule->GetAttributes() & 255 ) { case 0: @@ -601,7 +601,7 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) if( change_layer ) m_CurrentModule->Flip( m_CurrentModule->GetPosition() ); - /* Update 3D shape list */ + // Update 3D shape list int ii = m_3D_ShapeNameListBox->GetSelection(); if( ii >= 0 ) @@ -660,23 +660,23 @@ void DIALOG_MODULE_BOARD_EDITOR::OnOkClick( wxCommandEvent& event ) void DIALOG_MODULE_BOARD_EDITOR::OnEditReference( wxCommandEvent& event ) { - wxPoint tmp = m_Parent->GetScreen()->GetCrossHairPosition(); + wxPoint tmp = m_Parent->GetCrossHairPosition(); - m_Parent->GetScreen()->SetCrossHairPosition( m_ReferenceCopy->GetTextPosition() ); + m_Parent->SetCrossHairPosition( m_ReferenceCopy->GetTextPosition() ); m_ReferenceCopy->SetParent( m_CurrentModule ); m_Parent->InstallTextModOptionsFrame( m_ReferenceCopy, NULL ); - m_Parent->GetScreen()->SetCrossHairPosition( tmp ); + m_Parent->SetCrossHairPosition( tmp ); m_ReferenceCtrl->SetValue( m_ReferenceCopy->GetText() ); } void DIALOG_MODULE_BOARD_EDITOR::OnEditValue( wxCommandEvent& event ) { - wxPoint tmp = m_Parent->GetScreen()->GetCrossHairPosition(); + wxPoint tmp = m_Parent->GetCrossHairPosition(); - m_Parent->GetScreen()->SetCrossHairPosition( m_ValueCopy->GetTextPosition() ); + m_Parent->SetCrossHairPosition( m_ValueCopy->GetTextPosition() ); m_ValueCopy->SetParent( m_CurrentModule ); m_Parent->InstallTextModOptionsFrame( m_ValueCopy, NULL ); - m_Parent->GetScreen()->SetCrossHairPosition( tmp ); + m_Parent->SetCrossHairPosition( tmp ); m_ValueCtrl->SetValue( m_ValueCopy->GetText() ); } diff --git a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp index 56aeb185a6..1268a15f04 100644 --- a/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp +++ b/pcbnew/dialogs/dialog_edit_module_for_Modedit.cpp @@ -84,9 +84,7 @@ DIALOG_MODULE_MODULE_EDITOR::~DIALOG_MODULE_MODULE_EDITOR() } -/********************************************************/ void DIALOG_MODULE_MODULE_EDITOR::initModeditProperties() -/********************************************************/ { SetFocus(); @@ -213,8 +211,7 @@ void DIALOG_MODULE_MODULE_EDITOR::initModeditProperties() } -/* Initialize 3D info displayed in dialog box from values in aStruct3DSource - */ +// Initialize 3D info displayed in dialog box from values in aStruct3DSource void DIALOG_MODULE_MODULE_EDITOR::Transfert3DValuesToDisplay( S3D_MASTER * aStruct3DSource ) { if( aStruct3DSource ) @@ -247,9 +244,8 @@ void DIALOG_MODULE_MODULE_EDITOR::TransfertDisplayTo3DValues( int aIndexSelectio struct3DDest->m_MatPosition = m_3D_Offset->GetValue(); } -/***********************************************************/ + void DIALOG_MODULE_MODULE_EDITOR::On3DShapeNameSelected(wxCommandEvent& event) -/***********************************************************/ { if( m_lastSelected3DShapeIndex >= 0 ) TransfertDisplayTo3DValues( m_lastSelected3DShapeIndex ); @@ -268,9 +264,7 @@ void DIALOG_MODULE_MODULE_EDITOR::On3DShapeNameSelected(wxCommandEvent& event) } -/***********************************************************/ void DIALOG_MODULE_MODULE_EDITOR::Remove3DShape(wxCommandEvent& event) -/***********************************************************/ { if( m_lastSelected3DShapeIndex >= 0 ) TransfertDisplayTo3DValues( m_lastSelected3DShapeIndex ); @@ -293,9 +287,7 @@ void DIALOG_MODULE_MODULE_EDITOR::Remove3DShape(wxCommandEvent& event) } -/*********************************************************************/ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) -/*********************************************************************/ { wxString fullfilename, shortfilename; wxString fullpath; @@ -364,16 +356,13 @@ void DIALOG_MODULE_MODULE_EDITOR::BrowseAndAdd3DLib( wxCommandEvent& event ) } -/**********************************************************************/ void DIALOG_MODULE_MODULE_EDITOR::OnCancelClick( wxCommandEvent& event ) -/**********************************************************************/ { EndModal( -1 ); } -/******************************************************************************/ + void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event ) -/******************************************************************************/ { // First, test for invalid chars in module name wxString footprintName = m_FootprintNameCtrl->GetValue(); @@ -486,25 +475,22 @@ void DIALOG_MODULE_MODULE_EDITOR::OnOkClick( wxCommandEvent& event ) } -/***********************************************************************/ void DIALOG_MODULE_MODULE_EDITOR::OnEditReference(wxCommandEvent& event) -/***********************************************************************/ { - wxPoint tmp = m_parent->GetScreen()->GetCrossHairPosition(); - m_parent->GetScreen()->SetCrossHairPosition( m_referenceCopy->GetTextPosition() ); + wxPoint tmp = m_parent->GetCrossHairPosition(); + m_parent->SetCrossHairPosition( m_referenceCopy->GetTextPosition() ); m_parent->InstallTextModOptionsFrame( m_referenceCopy, NULL ); - m_parent->GetScreen()->SetCrossHairPosition( tmp ); + m_parent->SetCrossHairPosition( tmp ); m_ReferenceCtrl->SetValue( m_referenceCopy->GetText() ); } -/***********************************************************/ + void DIALOG_MODULE_MODULE_EDITOR::OnEditValue(wxCommandEvent& event) -/***********************************************************/ { - wxPoint tmp = m_parent->GetScreen()->GetCrossHairPosition(); - m_parent->GetScreen()->SetCrossHairPosition( m_valueCopy->GetTextPosition() ); + wxPoint tmp = m_parent->GetCrossHairPosition(); + m_parent->SetCrossHairPosition( m_valueCopy->GetTextPosition() ); m_parent->InstallTextModOptionsFrame( m_valueCopy, NULL ); - m_parent->GetScreen()->SetCrossHairPosition( tmp ); + m_parent->SetCrossHairPosition( tmp ); m_ValueCtrl->SetValue( m_valueCopy->GetText() ); } diff --git a/pcbnew/dialogs/dialog_gendrill.cpp b/pcbnew/dialogs/dialog_gendrill.cpp index fe53f3b8b0..c8a4b81c2c 100644 --- a/pcbnew/dialogs/dialog_gendrill.cpp +++ b/pcbnew/dialogs/dialog_gendrill.cpp @@ -321,7 +321,7 @@ void DIALOG_GENDRILL::SetParams() if( m_Choice_Drill_Offset->GetSelection() == 0 ) m_FileDrillOffset = wxPoint( 0, 0 ); else - m_FileDrillOffset = m_parent->GetOriginAxisPosition(); + m_FileDrillOffset = m_parent->GetAuxOrigin(); if( m_UnitDrillIsInch ) m_Precision = precisionListForInches; diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index 36527c6df6..154088cd3a 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -201,14 +201,18 @@ void DIALOG_SET_GRID::OnOkClick( wxCommandEvent& event ) bool PCB_BASE_FRAME::InvokeDialogGrid() { + wxPoint grid_origin = GetGridOrigin(); + DIALOG_SET_GRID dlg( this, &m_UserGridUnit, g_UserUnit, &m_UserGridSize, - &GetScreen()->m_GridOrigin, &m_FastGrid1, &m_FastGrid2, + &grid_origin, &m_FastGrid1, &m_FastGrid2, m_gridSelectBox->GetStrings() ); int ret = dlg.ShowModal(); if( ret == wxID_OK ) { + SetGridOrigin( grid_origin ); + GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); // If the user grid is the current option, recall SetGrid() diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index 391addb6f9..85de08fee1 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -240,7 +240,7 @@ DIMENSION* PCB_EDIT_FRAME::EditDimension( DIMENSION* aDimension, wxDC* aDC ) if( aDimension == NULL ) { status_dimension = 1; - pos = GetScreen()->GetCrossHairPosition(); + pos = GetCrossHairPosition(); aDimension = new DIMENSION( GetBoard() ); aDimension->SetFlags( IS_NEW ); @@ -302,7 +302,7 @@ static void BuildDimension( EDA_DRAW_PANEL* aPanel, wxDC* aDC, { PCB_SCREEN* screen = (PCB_SCREEN*) aPanel->GetScreen(); DIMENSION* Dimension = (DIMENSION*) screen->GetCurItem(); - wxPoint pos = screen->GetCrossHairPosition(); + wxPoint pos = aPanel->GetParent()->GetCrossHairPosition(); if( Dimension == NULL ) return; @@ -386,7 +386,7 @@ void PCB_EDIT_FRAME::BeginMoveDimensionText( DIMENSION* aItem, wxDC* DC ) aItem->SetFlags( IS_MOVED ); SetMsgPanel( aItem ); - GetScreen()->SetCrossHairPosition( aItem->Text().GetTextPosition() ); + SetCrossHairPosition( aItem->Text().GetTextPosition() ); m_canvas->MoveCursorToCrossHair(); m_canvas->SetMouseCapture( MoveDimensionText, AbortMoveDimensionText ); @@ -407,7 +407,7 @@ static void MoveDimensionText( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& if( aErase ) dimension->Draw( aPanel, aDC, GR_XOR ); - dimension->Text().SetTextPosition( aPanel->GetScreen()->GetCrossHairPosition() ); + dimension->Text().SetTextPosition( aPanel->GetParent()->GetCrossHairPosition() ); dimension->Draw( aPanel, aDC, GR_XOR ); } diff --git a/pcbnew/edgemod.cpp b/pcbnew/edgemod.cpp index 1fdaf78378..870e9e710a 100644 --- a/pcbnew/edgemod.cpp +++ b/pcbnew/edgemod.cpp @@ -66,7 +66,7 @@ void FOOTPRINT_EDIT_FRAME::Start_Move_EdgeMod( EDGE_MODULE* aEdge, wxDC* DC ) aEdge->Draw( m_canvas, DC, GR_XOR ); aEdge->SetFlags( IS_MOVED ); MoveVector.x = MoveVector.y = 0; - CursorInitialPosition = GetScreen()->GetCrossHairPosition(); + CursorInitialPosition = GetCrossHairPosition(); m_canvas->SetMouseCapture( ShowCurrentOutlineWhileMoving, Abort_Move_ModuleOutline ); SetCurItem( aEdge ); m_canvas->CallMouseCapture( DC, wxDefaultPosition, false ); @@ -115,7 +115,7 @@ static void ShowCurrentOutlineWhileMoving( EDA_DRAW_PANEL* aPanel, wxDC* aDC, edge->Draw( aPanel, aDC, GR_XOR, MoveVector ); } - MoveVector = -(screen->GetCrossHairPosition() - CursorInitialPosition); + MoveVector = -(aPanel->GetParent()->GetCrossHairPosition() - CursorInitialPosition); edge->Draw( aPanel, aDC, GR_XOR, MoveVector ); @@ -142,7 +142,7 @@ static void ShowNewEdgeModule( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& edge->Draw( aPanel, aDC, GR_XOR ); } - edge->SetEnd( screen->GetCrossHairPosition() ); + edge->SetEnd( aPanel->GetParent()->GetCrossHairPosition() ); // Update relative coordinate. edge->SetEnd0( edge->GetEnd() - module->GetPosition() ); @@ -346,7 +346,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* aEdge, aEdge->SetLayer( SILKSCREEN_N_FRONT ); // Initialize the starting point of the new segment or arc - aEdge->SetStart( GetScreen()->GetCrossHairPosition() ); + aEdge->SetStart( GetCrossHairPosition() ); // Initialize the ending point of the new segment or arc aEdge->SetEnd( aEdge->GetStart() ); @@ -383,7 +383,7 @@ EDGE_MODULE* FOOTPRINT_EDIT_FRAME::Begin_Edge_Module( EDGE_MODULE* aEdge, aEdge->SetFlags( IS_NEW ); aEdge->SetWidth( GetDesignSettings().m_ModuleSegmentWidth ); - aEdge->SetStart( GetScreen()->GetCrossHairPosition() ); + aEdge->SetStart( GetCrossHairPosition() ); aEdge->SetEnd( aEdge->GetStart() ); // Update relative coordinate. diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 0a2fb5434f..93d380fee9 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -56,7 +56,7 @@ #include -/* Handles the selection of command events. */ +// Handles the selection of command events. void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { int id = event.GetId(); @@ -153,7 +153,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->EndMouseCapture(); } - /* Should not be executed, just in case */ + // Should not be executed, just in case if( GetScreen()->m_BlockLocate.GetCommand() != BLOCK_IDLE ) { GetScreen()->m_BlockLocate.SetCommand( BLOCK_IDLE ); @@ -544,7 +544,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { m_canvas->MoveCursorToCrossHair(); ZONE_CONTAINER* zone_cont = (ZONE_CONTAINER*) GetCurItem(); - wxPoint pos = GetScreen()->GetCrossHairPosition(); + wxPoint pos = GetCrossHairPosition(); /* add corner between zone_cont->m_CornerSelection * and zone_cont->m_CornerSelection+1 @@ -644,12 +644,12 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) } SendMessageToEESCHEMA( module ); - GetScreen()->SetCrossHairPosition( module->GetPosition() ); + SetCrossHairPosition( module->GetPosition() ); m_canvas->MoveCursorToCrossHair(); StartMoveModule( module, &dc, id == ID_POPUP_PCB_DRAG_MODULE_REQUEST ); break; - case ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST: /* get module by name and move it */ + case ID_POPUP_PCB_GET_AND_MOVE_MODULE_REQUEST: // get module by name and move it SetCurItem( GetModuleByName() ); module = (MODULE*) GetCurItem(); @@ -658,9 +658,9 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) if( module->IsLocked() ) { - wxString msg; - msg.Printf( _( "Footprint %s found, but it is locked" ), - module->GetReference().GetData() ); + wxString msg = wxString::Format( + _( "Footprint %s found, but it is locked" ), + module->GetReference().GetData() ); DisplayInfoMessage( this, msg ); break; } @@ -719,7 +719,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; } - /* This is a simple rotation, no other editing in progress */ + // This is a simple rotation, no other editing in progress if( !GetCurItem()->IsMoving() ) SaveCopyInUndoList( GetCurItem(), UR_ROTATED, ((MODULE*)GetCurItem())->GetPosition() ); @@ -747,7 +747,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; } - /* This is a simple rotation, no other editing in progress */ + // This is a simple rotation, no other editing in progress if( !GetCurItem()->IsMoving() ) SaveCopyInUndoList( GetCurItem(), UR_ROTATED_CLOCKWISE, ((MODULE*)GetCurItem())->GetPosition() ); @@ -776,7 +776,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; } - /* This is a simple flip, no other editing in progress */ + // This is a simple flip, no other editing in progress if( !GetCurItem()->IsMoving() ) SaveCopyInUndoList( GetCurItem(), UR_FLIPPED, ((MODULE*)GetCurItem())->GetPosition() ); @@ -1108,14 +1108,18 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); { TRACK* track = (TRACK*) GetScreen()->GetCurItem(); - wxPoint pos = GetScreen()->GetCrossHairPosition(); + wxPoint pos = GetCrossHairPosition(); + track->Draw( m_canvas, &dc, GR_XOR ); PICKED_ITEMS_LIST itemsListPicker; + TRACK* newtrack = GetBoard()->CreateLockPoint( pos, track, &itemsListPicker ); + SaveCopyInUndoList( itemsListPicker, UR_UNSPECIFIED ); track->Draw( m_canvas, &dc, GR_XOR ); newtrack->Draw( m_canvas, &dc, GR_XOR ); - /* compute the new ratsnest, because connectivity could change */ + + // compute the new ratsnest, because connectivity could change TestNetConnection( &dc, track->GetNet() ); } break; diff --git a/pcbnew/edit_pcb_text.cpp b/pcbnew/edit_pcb_text.cpp index c7a62aaa01..7c518322e4 100644 --- a/pcbnew/edit_pcb_text.cpp +++ b/pcbnew/edit_pcb_text.cpp @@ -147,7 +147,7 @@ void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aE m_canvas->Refresh(); #endif - GetScreen()->SetCrossHairPosition( aTextePcb->GetTextPosition() ); + SetCrossHairPosition( aTextePcb->GetTextPosition() ); m_canvas->MoveCursorToCrossHair(); m_canvas->SetMouseCapture( Move_Texte_Pcb, Abort_Edit_Pcb_Text ); @@ -156,7 +156,7 @@ void PCB_EDIT_FRAME::StartMoveTextePcb( TEXTE_PCB* aTextePcb, wxDC* aDC, bool aE } -/* Move PCB text following the cursor. */ +// Move PCB text following the cursor. static void Move_Texte_Pcb( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { @@ -168,7 +168,7 @@ static void Move_Texte_Pcb( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aP if( aErase ) TextePcb->Draw( aPanel, aDC, GR_XOR ); - TextePcb->SetTextPosition( aPanel->GetScreen()->GetCrossHairPosition() ); + TextePcb->SetTextPosition( aPanel->GetParent()->GetCrossHairPosition() ); TextePcb->Draw( aPanel, aDC, GR_XOR ); } @@ -214,7 +214,7 @@ TEXTE_PCB* PCB_EDIT_FRAME::CreateTextePcb( wxDC* aDC, TEXTE_PCB* aText ) textePcb->SetMirrored( true ); textePcb->SetSize( GetBoard()->GetDesignSettings().m_PcbTextSize ); - textePcb->SetTextPosition( GetScreen()->GetCrossHairPosition() ); + textePcb->SetTextPosition( GetCrossHairPosition() ); textePcb->SetThickness( GetBoard()->GetDesignSettings().m_PcbTextWidth ); InstallTextPCBOptionsFrame( textePcb, aDC ); diff --git a/pcbnew/editedge.cpp b/pcbnew/editedge.cpp index acc881c687..a85a0bf26e 100644 --- a/pcbnew/editedge.cpp +++ b/pcbnew/editedge.cpp @@ -43,7 +43,7 @@ #include -static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ); +static void Abort_EditEdge( EDA_DRAW_PANEL* aPanel, wxDC* DC ); static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ); static void Move_Segment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ); @@ -61,7 +61,7 @@ void PCB_EDIT_FRAME::Start_Move_DrawItem( DRAWSEGMENT* drawitem, wxDC* DC ) drawitem->Draw( m_canvas, DC, GR_XOR ); drawitem->SetFlags( IS_MOVED ); - s_InitialPosition = s_LastPosition = GetScreen()->GetCrossHairPosition(); + s_InitialPosition = s_LastPosition = GetCrossHairPosition(); SetMsgPanel( drawitem ); m_canvas->SetMouseCapture( Move_Segment, Abort_EditEdge ); SetCurItem( drawitem ); @@ -100,12 +100,12 @@ static void Move_Segment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPos segment->Draw( aPanel, aDC, GR_XOR ); wxPoint delta; - delta = aPanel->GetScreen()->GetCrossHairPosition() - s_LastPosition; + delta = aPanel->GetParent()->GetCrossHairPosition() - s_LastPosition; segment->SetStart( segment->GetStart() + delta ); segment->SetEnd( segment->GetEnd() + delta ); - s_LastPosition = aPanel->GetScreen()->GetCrossHairPosition(); + s_LastPosition = aPanel->GetParent()->GetCrossHairPosition(); segment->Draw( aPanel, aDC, GR_XOR ); } @@ -153,17 +153,17 @@ void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_NUM aLayer ) return; } - wxString msg; - msg.Printf( _( "Delete everything on layer %s?" ), - GetChars( GetBoard()->GetLayerName( aLayer ) ) ); + wxString msg = wxString::Format( + _( "Delete everything on layer %s?" ), + GetChars( GetBoard()->GetLayerName( aLayer ) ) ); if( !IsOK( this, msg ) ) return; - PICKED_ITEMS_LIST pickList; - ITEM_PICKER picker(NULL, UR_DELETED); + PICKED_ITEMS_LIST pickList; + ITEM_PICKER picker( NULL, UR_DELETED ); + BOARD_ITEM* PtNext; - BOARD_ITEM* PtNext; for( BOARD_ITEM* item = GetBoard()->m_Drawings; item; item = PtNext ) { PtNext = item->Next(); @@ -202,38 +202,38 @@ void PCB_EDIT_FRAME::Delete_Drawings_All_Layer( LAYER_NUM aLayer ) } -static void Abort_EditEdge( EDA_DRAW_PANEL* Panel, wxDC* DC ) +static void Abort_EditEdge( EDA_DRAW_PANEL* aPanel, wxDC* DC ) { - DRAWSEGMENT* Segment = (DRAWSEGMENT*) Panel->GetScreen()->GetCurItem(); + DRAWSEGMENT* Segment = (DRAWSEGMENT*) aPanel->GetScreen()->GetCurItem(); if( Segment == NULL ) { - Panel->SetMouseCapture( NULL, NULL ); + aPanel->SetMouseCapture( NULL, NULL ); return; } if( Segment->IsNew() ) { - Panel->CallMouseCapture( DC, wxDefaultPosition, false ); + aPanel->CallMouseCapture( DC, wxDefaultPosition, false ); Segment ->DeleteStructure(); Segment = NULL; } else { - wxPoint pos = Panel->GetScreen()->GetCrossHairPosition(); - Panel->GetScreen()->SetCrossHairPosition( s_InitialPosition ); - Panel->CallMouseCapture( DC, wxDefaultPosition, true ); - Panel->GetScreen()->SetCrossHairPosition( pos ); + wxPoint pos = aPanel->GetParent()->GetCrossHairPosition(); + aPanel->GetParent()->SetCrossHairPosition( s_InitialPosition ); + aPanel->CallMouseCapture( DC, wxDefaultPosition, true ); + aPanel->GetParent()->SetCrossHairPosition( pos ); Segment->ClearFlags(); - Segment->Draw( Panel, DC, GR_OR ); + Segment->Draw( aPanel, DC, GR_OR ); } #ifdef USE_WX_OVERLAY - Panel->Refresh(); + aPanel->Refresh(); #endif - - Panel->SetMouseCapture( NULL, NULL ); - ( (PCB_EDIT_FRAME*) Panel->GetParent() )->SetCurItem( NULL ); + + aPanel->SetMouseCapture( NULL, NULL ); + ( (PCB_EDIT_FRAME*) aPanel->GetParent() )->SetCurItem( NULL ); } @@ -259,8 +259,8 @@ DRAWSEGMENT* PCB_EDIT_FRAME::Begin_DrawSegment( DRAWSEGMENT* Segment, STROKE_T s Segment->SetWidth( s_large ); Segment->SetShape( shape ); Segment->SetAngle( 900 ); - Segment->SetStart( GetScreen()->GetCrossHairPosition() ); - Segment->SetEnd( GetScreen()->GetCrossHairPosition() ); + Segment->SetStart( GetCrossHairPosition() ); + Segment->SetEnd( GetCrossHairPosition() ); m_canvas->SetMouseCapture( DrawSegment, Abort_EditEdge ); } else /* The ending point ccordinate Segment->m_End was updated by he function @@ -350,14 +350,14 @@ static void DrawSegment( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosi { wxPoint pt; - CalculateSegmentEndPoint( aPanel->GetScreen()->GetCrossHairPosition(), + CalculateSegmentEndPoint( aPanel->GetParent()->GetCrossHairPosition(), Segment->GetStart().x, Segment->GetStart().y, &pt.x, &pt.y ); Segment->SetEnd( pt ); } else // here the angle is arbitrary { - Segment->SetEnd( aPanel->GetScreen()->GetCrossHairPosition() ); + Segment->SetEnd( aPanel->GetParent()->GetCrossHairPosition() ); } Segment->Draw( aPanel, aDC, GR_XOR ); diff --git a/pcbnew/editrack.cpp b/pcbnew/editrack.cpp index ab538b6a9c..b3ea13790d 100644 --- a/pcbnew/editrack.cpp +++ b/pcbnew/editrack.cpp @@ -101,7 +101,7 @@ TRACK* PCB_EDIT_FRAME::Begin_Route( TRACK* aTrack, wxDC* aDC ) TRACK* TrackOnStartPoint = NULL; LAYER_MSK layerMask = GetLayerMask( GetScreen()->m_Active_Layer ); BOARD_CONNECTED_ITEM* LockPoint; - wxPoint pos = GetScreen()->GetCrossHairPosition(); + wxPoint pos = GetCrossHairPosition(); if( aTrack == NULL ) // Starting a new track segment { @@ -595,17 +595,17 @@ TRACK* LocateIntrusion( TRACK* listStart, TRACK* aTrack, LAYER_NUM aLayer, const */ static void PushTrack( EDA_DRAW_PANEL* panel ) { - PCB_SCREEN* screen = ( (PCB_BASE_FRAME*) (panel->GetParent()) )->GetScreen(); - BOARD* pcb = ( (PCB_BASE_FRAME*) (panel->GetParent()) )->GetBoard(); - wxPoint cursor = screen->GetCrossHairPosition(); - wxPoint cv, vec, n; - TRACK* track = g_CurrentTrackSegment; - TRACK* other; - double det; - int dist; - double f; + PCB_SCREEN* screen = (PCB_SCREEN*) panel->GetParent()->GetScreen(); + BOARD* pcb = ( (PCB_BASE_FRAME*) (panel->GetParent()) )->GetBoard(); + wxPoint cursor = panel->GetParent()->GetCrossHairPosition(); + wxPoint cv, vec, n; + TRACK* track = g_CurrentTrackSegment; + TRACK* other; + double det; + int dist; + double f; - other = LocateIntrusion( pcb->m_Track, track, screen->m_Active_Layer, screen->RefPos( true ) ); + other = LocateIntrusion( pcb->m_Track, track, screen->m_Active_Layer, panel->GetParent()->RefPos( true ) ); // are we currently pointing into a conflicting trace ? if( !other ) @@ -735,7 +735,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo { if( g_TwoSegmentTrackBuild ) { - g_CurrentTrackSegment->SetEnd( screen->GetCrossHairPosition() ); + g_CurrentTrackSegment->SetEnd( frame->GetCrossHairPosition() ); if( g_Drc_On ) PushTrack( aPanel ); @@ -750,7 +750,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo * horizontal, vertical or 45 degrees. */ wxPoint hp = g_CurrentTrackSegment->GetEnd(); - CalculateSegmentEndPoint( screen->GetCrossHairPosition(), + CalculateSegmentEndPoint( frame->GetCrossHairPosition(), g_CurrentTrackSegment->GetStart().x, g_CurrentTrackSegment->GetStart().y, &hp.x, @@ -760,7 +760,7 @@ void ShowNewTrackWhenMovingCursor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo } else // Here the angle is arbitrary { - g_CurrentTrackSegment->SetEnd( screen->GetCrossHairPosition() ); + g_CurrentTrackSegment->SetEnd( frame->GetCrossHairPosition() ); } // Redraw the new track diff --git a/pcbnew/edtxtmod.cpp b/pcbnew/edtxtmod.cpp index 01869ae06f..d180cd00cd 100644 --- a/pcbnew/edtxtmod.cpp +++ b/pcbnew/edtxtmod.cpp @@ -68,7 +68,7 @@ TEXTE_MODULE* PCB_BASE_FRAME::CreateTextModule( MODULE* Module, wxDC* DC ) Text = new TEXTE_MODULE( Module ); - /* Add the new text object to the beginning of the draw item list. */ + // Add the new text object to the beginning of the draw item list. if( Module ) Module->GraphicalItems().PushFront( Text ); @@ -80,7 +80,7 @@ TEXTE_MODULE* PCB_BASE_FRAME::CreateTextModule( MODULE* Module, wxDC* DC ) std::min( GetDesignSettings().m_ModuleTextSize.x, GetDesignSettings().m_ModuleTextSize.y ), true ); Text->SetSize( GetDesignSettings().m_ModuleTextSize ); Text->SetThickness( GetDesignSettings().m_ModuleTextWidth ); - Text->SetTextPosition( GetScreen()->GetCrossHairPosition() ); + Text->SetTextPosition( GetCrossHairPosition() ); Text->SetLocalCoord(); InstallTextModOptionsFrame( Text, NULL ); @@ -175,7 +175,7 @@ static void AbortMoveTextModule( EDA_DRAW_PANEL* Panel, wxDC* DC ) if( Text->IsMoving() ) Text->SetOrientation( TextInitialOrientation ); - /* Redraw the text */ + // Redraw the text Panel->RefreshDrawingRect( Text->GetBoundingBox() ); // leave it at (0,0) so we can use it Rotate when not moving. @@ -208,7 +208,7 @@ void PCB_BASE_FRAME::StartMoveTexteModule( TEXTE_MODULE* Text, wxDC* DC ) TextInitialOrientation = Text->GetOrientation(); // Center cursor on initial position of text - GetScreen()->SetCrossHairPosition( TextInitialPosition ); + SetCrossHairPosition( TextInitialPosition ); m_canvas->MoveCursorToCrossHair(); SetMsgPanel( Text ); @@ -227,7 +227,7 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ) m_canvas->RefreshDrawingRect( Text->GetBoundingBox() ); Text->DrawUmbilical( m_canvas, DC, GR_XOR, -MoveVector ); - /* Update the coordinates for anchor. */ + // Update the coordinates for anchor. MODULE* Module = (MODULE*) Text->GetParent(); if( Module ) @@ -244,7 +244,7 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ) Text->SetOrientation( tmp ); // Set the new position for text. - Text->SetTextPosition( GetScreen()->GetCrossHairPosition() ); + Text->SetTextPosition( GetCrossHairPosition() ); wxPoint textRelPos = Text->GetTextPosition() - Module->GetPosition(); RotatePoint( &textRelPos, -Module->GetOrientation() ); Text->SetPos0( textRelPos ); @@ -253,12 +253,12 @@ void PCB_BASE_FRAME::PlaceTexteModule( TEXTE_MODULE* Text, wxDC* DC ) Module->SetLastEditTime(); OnModify(); - /* Redraw text. */ + // Redraw text. m_canvas->RefreshDrawingRect( Text->GetBoundingBox() ); } else { - Text->SetTextPosition( GetScreen()->GetCrossHairPosition() ); + Text->SetTextPosition( GetCrossHairPosition() ); } } @@ -285,7 +285,7 @@ static void Show_MoveTexte_Module( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPo Text->Draw( aPanel, aDC, GR_XOR, MoveVector ); } - MoveVector = TextInitialPosition - screen->GetCrossHairPosition(); + MoveVector = TextInitialPosition - aPanel->GetParent()->GetCrossHairPosition(); // Draw umbilical if text moved if( MoveVector.x || MoveVector.y ) diff --git a/pcbnew/export_gencad.cpp b/pcbnew/export_gencad.cpp index fbe33bcab0..59cecd1869 100644 --- a/pcbnew/export_gencad.cpp +++ b/pcbnew/export_gencad.cpp @@ -146,8 +146,8 @@ void PCB_EDIT_FRAME::ExportToGenCAD( wxCommandEvent& aEvent ) GetBoard()->ComputeBoundingBox(); // Save the auxiliary origin for the rest of the module - GencadOffsetX = GetOriginAxisPosition().x; - GencadOffsetY = GetOriginAxisPosition().y; + GencadOffsetX = GetAuxOrigin().x; + GencadOffsetY = GetAuxOrigin().y; // No idea on *why* this should be needed... maybe to fix net names? Compile_Ratsnest( NULL, true ); @@ -708,8 +708,8 @@ static bool CreateHeaderInfoData( FILE* aFile, PCB_EDIT_FRAME* aFrame ) fputs( "UNITS INCH\n", aFile ); msg.Printf( wxT( "ORIGIN %g %g\n" ), - MapXTo( aFrame->GetOriginAxisPosition().x ), - MapYTo( aFrame->GetOriginAxisPosition().y ) ); + MapXTo( aFrame->GetAuxOrigin().x ), + MapYTo( aFrame->GetAuxOrigin().y ) ); fputs( TO_UTF8( msg ), aFile ); fputs( "INTERTRACK 0\n", aFile ); diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 73fe27b054..f5e10d9b50 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -53,16 +53,16 @@ BEGIN_EVENT_TABLE( FOOTPRINT_WIZARD_FRAME, EDA_DRAW_FRAME ) -/* Window events */ +// Window events EVT_CLOSE( FOOTPRINT_WIZARD_FRAME::OnCloseWindow ) EVT_SIZE( FOOTPRINT_WIZARD_FRAME::OnSize ) EVT_ACTIVATE( FOOTPRINT_WIZARD_FRAME::OnActivate ) -/* Sash drag events */ +// Sash drag events EVT_SASH_DRAGGED( ID_FOOTPRINT_WIZARD_PAGES, FOOTPRINT_WIZARD_FRAME::OnSashDrag ) EVT_SASH_DRAGGED( ID_FOOTPRINT_WIZARD_PARAMETERS, FOOTPRINT_WIZARD_FRAME::OnSashDrag ) -/* Toolbar events */ +// Toolbar events EVT_TOOL( ID_FOOTPRINT_WIZARD_SELECT_WIZARD, FOOTPRINT_WIZARD_FRAME::SelectCurrentWizard ) @@ -78,7 +78,7 @@ EVT_TOOL( ID_FOOTPRINT_WIZARD_DONE, EVT_TOOL( ID_FOOTPRINT_WIZARD_SHOW_3D_VIEW, FOOTPRINT_WIZARD_FRAME::Show3D_Frame ) -/* listbox events */ +// listbox events EVT_LISTBOX( ID_FOOTPRINT_WIZARD_PAGE_LIST, FOOTPRINT_WIZARD_FRAME::ClickOnPageList ) EVT_GRID_CMD_CELL_CHANGE( ID_FOOTPRINT_WIZARD_PARAMETER_LIST, FOOTPRINT_WIZARD_FRAME::ParametersUpdated ) @@ -374,7 +374,7 @@ void FOOTPRINT_WIZARD_FRAME::OnSize( wxSizeEvent& SizeEv ) */ void FOOTPRINT_WIZARD_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) { - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); UpdateStatusBar(); } @@ -587,8 +587,8 @@ void FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition cmd.SetEventObject( this ); - pos = screen->GetNearestGridPosition( pos ); - oldpos = screen->GetCrossHairPosition(); + pos = GetNearestGridPosition( pos ); + oldpos = GetCrossHairPosition(); gridSize = screen->GetGridSize(); switch( aHotKey ) @@ -619,42 +619,42 @@ void FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition break; case ' ': - screen->m_O_Curseur = screen->GetCrossHairPosition(); + screen->m_O_Curseur = GetCrossHairPosition(); break; - case WXK_NUMPAD8: /* cursor moved up */ + case WXK_NUMPAD8: // cursor moved up case WXK_UP: pos.y -= KiROUND( gridSize.y ); m_canvas->MoveCursor( pos ); break; - case WXK_NUMPAD2: /* cursor moved down */ + case WXK_NUMPAD2: // cursor moved down case WXK_DOWN: pos.y += KiROUND( gridSize.y ); m_canvas->MoveCursor( pos ); break; - case WXK_NUMPAD4: /* cursor moved left */ + case WXK_NUMPAD4: // cursor moved left case WXK_LEFT: pos.x -= KiROUND( gridSize.x ); m_canvas->MoveCursor( pos ); break; - case WXK_NUMPAD6: /* cursor moved right */ + case WXK_NUMPAD6: // cursor moved right case WXK_RIGHT: pos.x += KiROUND( gridSize.x ); m_canvas->MoveCursor( pos ); break; } - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); - if( oldpos != screen->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = screen->GetCrossHairPosition(); - screen->SetCrossHairPosition( oldpos ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos ); m_canvas->CrossHairOff( aDC ); - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) @@ -663,7 +663,7 @@ void FOOTPRINT_WIZARD_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition } } - UpdateStatusBar(); /* Display new cursor coordinates */ + UpdateStatusBar(); // Display new cursor coordinates } diff --git a/pcbnew/gen_modules_placefile.cpp b/pcbnew/gen_modules_placefile.cpp index f78316ef81..32503e63a0 100644 --- a/pcbnew/gen_modules_placefile.cpp +++ b/pcbnew/gen_modules_placefile.cpp @@ -359,7 +359,7 @@ int PCB_EDIT_FRAME::DoGenFootprintsPositionFile( const wxString& aFullFileName, MODULE* module; char line[1024]; - File_Place_Offset = GetOriginAxisPosition(); + File_Place_Offset = GetAuxOrigin(); // Calculating the number of useful modules (CMS attribute, not VIRTUAL) int moduleCount = 0; diff --git a/pcbnew/highlight.cpp b/pcbnew/highlight.cpp index ef7d7cd599..d288a4f287 100644 --- a/pcbnew/highlight.cpp +++ b/pcbnew/highlight.cpp @@ -133,7 +133,7 @@ int PCB_EDIT_FRAME::SelectHighLight( wxDC* DC ) // optionally, modify the "guide" here as needed using its member functions m_Collector->Collect( GetBoard(), GENERAL_COLLECTOR::PadsTracksOrZones, - GetScreen()->RefPos( true ), guide ); + RefPos( true ), guide ); BOARD_ITEM* item = (*m_Collector)[0]; diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 5487510c30..8186af3d14 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -24,7 +24,7 @@ * This can be useful if the new function cannot be executed while an item is currently * being edited ( For example, one cannot start a new wire when a component is moving.) * - * Note: If an hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX) + * Note: If a hotkey is a special key, be sure the corresponding wxWidget keycode (WXK_XXXX) * is handled in the hotkey_name_descr s_Hotkey_Name_List list (see hotkeys_basic.cpp) * and see this list for some ascii keys (space ...) */ @@ -60,10 +60,8 @@ static EDA_HOTKEY HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL static EDA_HOTKEY HkBackspace( wxT( "Delete track segment" ), HK_BACK_SPACE, WXK_BACK ); static EDA_HOTKEY HkAddNewTrack( wxT( "Add new track" ), HK_ADD_NEW_TRACK, 'X' ); static EDA_HOTKEY HkAddVia( wxT( "Add Via" ), HK_ADD_VIA, 'V' ); -static EDA_HOTKEY HkSwitchTrackPosture( wxT( "Switch Track Posture" ), - HK_SWITCH_TRACK_POSTURE, '/' ); -static EDA_HOTKEY HkDragTrackKeepSlope( wxT( "Drag track keep slope" ), - HK_DRAG_TRACK_KEEP_SLOPE, 'D' ); +static EDA_HOTKEY HkSwitchTrackPosture( wxT( "Switch Track Posture" ), HK_SWITCH_TRACK_POSTURE, '/' ); +static EDA_HOTKEY HkDragTrackKeepSlope( wxT( "Drag track keep slope" ), HK_DRAG_TRACK_KEEP_SLOPE, 'D' ); static EDA_HOTKEY HkPlaceItem( wxT( "Place Item" ), HK_PLACE_ITEM, 'P' ); static EDA_HOTKEY HkAddMicroVia( wxT( "Add MicroVia" ), HK_ADD_MICROVIA, 'V' + GR_KB_CTRL ); static EDA_HOTKEY HkEndTrack( wxT( "End Track" ), HK_END_TRACK, WXK_END ); @@ -73,15 +71,14 @@ static EDA_HOTKEY HkRotateItem( wxT( "Rotate Item" ), HK_ROTATE_ITEM, 'R' ); static EDA_HOTKEY HkMoveItem( wxT( "Move Item" ), HK_MOVE_ITEM, 'M' ); static EDA_HOTKEY HkCopyItem( wxT( "Copy Item" ), HK_COPY_ITEM, 'C' ); static EDA_HOTKEY HkDragFootprint( wxT( "Drag Footprint" ), HK_DRAG_ITEM, 'G' ); -static EDA_HOTKEY HkGetAndMoveFootprint( wxT( "Get and Move Footprint" ), - HK_GET_AND_MOVE_FOOTPRINT, 'T' ); -static EDA_HOTKEY HkLock_Unlock_Footprint( wxT( "Lock/Unlock Footprint" ), - HK_LOCK_UNLOCK_FOOTPRINT, 'L' ); +static EDA_HOTKEY HkGetAndMoveFootprint( wxT( "Get and Move Footprint" ), HK_GET_AND_MOVE_FOOTPRINT, 'T' ); +static EDA_HOTKEY HkLock_Unlock_Footprint( wxT( "Lock/Unlock Footprint" ), HK_LOCK_UNLOCK_FOOTPRINT, 'L' ); static EDA_HOTKEY HkDelete( wxT( "Delete Track or Footprint" ), HK_DELETE, WXK_DELETE ); -static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), - HK_RESET_LOCAL_COORD, ' ' ); -static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), - HK_SWITCH_HIGHCONTRAST_MODE,'H'); +static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_LOCAL_COORD, ' ' ); +static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); + +static EDA_HOTKEY HkSetGridOrigin( wxT("Set Grid Origin"), HK_SET_GRID_ORIGIN, 'S' ); + /* Fit on Screen */ #if !defined( __WXMAC__ ) static EDA_HOTKEY HkZoomAuto( wxT( "Zoom Auto" ), HK_ZOOM_AUTO, WXK_HOME ); @@ -198,7 +195,7 @@ EDA_HOTKEY* common_Hotkey_List[] = { &HkHelp, &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, - &HkSwitchUnits, &HkResetLocalCoord, + &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkUndo, &HkRedo, NULL }; diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 0a155643f4..2d46178a47 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -30,7 +30,7 @@ void PCB_EDIT_FRAME::RecordMacros(wxDC* aDC, int aNumber) if( m_RecordingMacros < 0 ) { m_RecordingMacros = aNumber; - m_Macros[aNumber].m_StartPosition = GetScreen()->GetCrossHairPosition( false ); + m_Macros[aNumber].m_StartPosition = GetCrossHairPosition( false ); m_Macros[aNumber].m_Record.clear(); msg.Printf( _( "Recording macro %d" ), aNumber ); @@ -48,7 +48,6 @@ void PCB_EDIT_FRAME::RecordMacros(wxDC* aDC, int aNumber) void PCB_EDIT_FRAME::CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumber ) { - PCB_SCREEN* screen = GetScreen(); wxPoint tPosition; wxString msg; @@ -59,19 +58,19 @@ void PCB_EDIT_FRAME::CallMacros( wxDC* aDC, const wxPoint& aPosition, int aNumbe wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); - tPosition = screen->GetNearestGridPosition( aPosition ); + tPosition = GetNearestGridPosition( aPosition ); m_canvas->CrossHairOff( aDC ); - screen->SetMousePosition( tPosition ); + SetMousePosition( tPosition ); GeneralControl( aDC, tPosition ); for( std::list::iterator i = m_Macros[aNumber].m_Record.begin(); i != m_Macros[aNumber].m_Record.end(); i++ ) { - wxPoint tmpPos = screen->GetNearestGridPosition( tPosition + i->m_Position ); + wxPoint tmpPos = GetNearestGridPosition( tPosition + i->m_Position ); - screen->SetMousePosition( tmpPos ); + SetMousePosition( tmpPos ); GeneralControl( aDC, tmpPos, i->m_HotkeyCode ); } @@ -117,8 +116,8 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit MACROS_RECORD macros_record; macros_record.m_HotkeyCode = aHotkeyCode; macros_record.m_Idcommand = HK_Descr->m_Idcommand; - macros_record.m_Position = screen->GetNearestGridPosition( aPosition ) - - m_Macros[m_RecordingMacros].m_StartPosition; + macros_record.m_Position = GetNearestGridPosition( aPosition ) - + m_Macros[m_RecordingMacros].m_StartPosition; m_Macros[m_RecordingMacros].m_Record.push_back( macros_record ); wxString msg; msg.Printf( _( "Add key [%c] in macro %d" ), aHotkeyCode, m_RecordingMacros ); @@ -162,8 +161,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit case HK_CALL_MACROS_7: case HK_CALL_MACROS_8: case HK_CALL_MACROS_9: - CallMacros( aDC, screen->GetCrossHairPosition( false ), - hk_id - HK_CALL_MACROS_0 ); + CallMacros( aDC, GetCrossHairPosition( false ), hk_id - HK_CALL_MACROS_0 ); break; case HK_SWITCH_TRACK_WIDTH_TO_NEXT: @@ -222,7 +220,6 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit cmd.SetEventType( wxEVT_COMMAND_COMBOBOX_SELECTED ); OnSelectGrid( cmd ); } - break; case HK_SWITCH_GRID_TO_PREVIOUS: @@ -344,8 +341,14 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit break; - case HK_RESET_LOCAL_COORD: /*Reset the relative coord */ - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + case HK_RESET_LOCAL_COORD: // Set the relative coord + GetScreen()->m_O_Curseur = GetCrossHairPosition(); + break; + + case HK_SET_GRID_ORIGIN: + SetGridOrigin( GetCrossHairPosition() ); + OnModify(); // because grid origin is saved in board, show as modified + m_canvas->Refresh(); break; case HK_SWITCH_UNITS: @@ -498,7 +501,7 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit // get any module, locked or not locked and toggle its locked status if( !itemCurrentlyEdited ) { - wxPoint pos = screen->RefPos( true ); + wxPoint pos = RefPos( true ); module = GetBoard()->GetFootprint( pos, screen->m_Active_Layer, true ); } else if( GetCurItem()->Type() == PCB_MODULE_T ) @@ -513,7 +516,6 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit OnModify(); SetMsgPanel( module ); } - break; case HK_DRAG_ITEM: // Start drag module or track segment @@ -586,7 +588,7 @@ bool PCB_EDIT_FRAME::OnHotkeyDeleteItem( wxDC* aDC ) case ID_PCB_MODULE_BUTT: if( ItemFree ) { - wxPoint pos = GetScreen()->RefPos( false ); + wxPoint pos = RefPos( false ); MODULE* module = GetBoard()->GetFootprint( pos, UNDEFINED_LAYER, false ); if( module == NULL ) diff --git a/pcbnew/hotkeys_module_editor.cpp b/pcbnew/hotkeys_module_editor.cpp index cba541ea59..978f8a3a3c 100644 --- a/pcbnew/hotkeys_module_editor.cpp +++ b/pcbnew/hotkeys_module_editor.cpp @@ -51,12 +51,17 @@ void FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos return; break; - case HK_HELP: // Display Current hotkey list + case HK_HELP: // Display Current hotkey list DisplayHotkeyList( this, g_Module_Editor_Hokeys_Descr ); break; - case HK_RESET_LOCAL_COORD: /*Reset the relative coord */ - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + case HK_RESET_LOCAL_COORD: // set local (relative) coordinate origin + GetScreen()->m_O_Curseur = GetCrossHairPosition(); + break; + + case HK_SET_GRID_ORIGIN: + SetGridOrigin( GetCrossHairPosition() ); + m_canvas->Refresh(); break; case HK_SWITCH_UNITS: diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index 287deee5cb..d987948d71 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -557,8 +557,12 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const Double2Str( aBoard->GetDesignSettings().m_SolderPasteMarginRatio ).c_str() ); m_out->Print( aNestLevel+1, "(aux_axis_origin %s %s)\n", - FMTIU( aBoard->GetOriginAxisPosition().x ).c_str(), - FMTIU( aBoard->GetOriginAxisPosition().y ).c_str() ); + FMTIU( aBoard->GetAuxOrigin().x ).c_str(), + FMTIU( aBoard->GetAuxOrigin().y ).c_str() ); + + m_out->Print( aNestLevel+1, "(grid_origin %s %s)\n", + FMTIU( aBoard->GetGridOrigin().x ).c_str(), + FMTIU( aBoard->GetGridOrigin().y ).c_str() ); m_out->Print( aNestLevel+1, "(visible_elements %X)\n", aBoard->GetDesignSettings().GetVisibleElements() ); diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 12a5ba39d2..03a1fd8313 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -649,7 +649,8 @@ void LEGACY_PLUGIN::loadSETUP() BIU gx = biuParse( line + SZ( "AuxiliaryAxisOrg" ), &data ); BIU gy = biuParse( data ); - m_board->SetOriginAxisPosition( wxPoint( gx, gy ) ); + // m_board->SetAuxOrigin( wxPoint( gx, gy ) ); gets overwritten by SetDesignSettings() below + bds.m_AuxOrigin = wxPoint( gx, gy ); } else if( TESTLINE( "Layers" ) ) @@ -851,13 +852,11 @@ void LEGACY_PLUGIN::loadSETUP() else if( TESTLINE( "GridOrigin" ) ) { - /* @todo - BIU gx = biuParse( line + SZ( "GridOrigin" ), &data ); - BIU gy = biuParse( data ); + BIU x = biuParse( line + SZ( "GridOrigin" ), &data ); + BIU y = biuParse( data ); - GetScreen()->m_GridOrigin.x = Ox; - GetScreen()->m_GridOrigin.y = Oy; - */ + // m_board->SetGridOrigin( wxPoint( x, y ) ); gets overwritten by SetDesignSettings() below + bds.m_GridOrigin = wxPoint( x, y ); } else if( TESTLINE( "VisibleElements" ) ) @@ -3071,14 +3070,8 @@ void LEGACY_PLUGIN::saveSETUP( const BOARD* aBoard ) const if( bds.m_SolderPasteMarginRatio != 0 ) fprintf( m_fp, "Pad2PasteClearanceRatio %g\n", bds.m_SolderPasteMarginRatio ); - /* @todo no aFrame - if ( aFrame->GetScreen()->m_GridOrigin != wxPoint( 0, 0 ) ) - { - fprintf( m_fp, "GridOrigin %s\n", fmtBIUPoint( aFrame->GetScreen()->m_GridOrigin ).c_str() ); - } - */ - - fprintf( m_fp, "AuxiliaryAxisOrg %s\n", fmtBIUPoint( aBoard->GetOriginAxisPosition() ).c_str() ); + fprintf( m_fp, "GridOrigin %s\n", fmtBIUPoint( aBoard->GetGridOrigin() ).c_str() ); + fprintf( m_fp, "AuxiliaryAxisOrg %s\n", fmtBIUPoint( aBoard->GetAuxOrigin() ).c_str() ); fprintf( m_fp, "VisibleElements %X\n", bds.GetVisibleElements() ); diff --git a/pcbnew/librairi.cpp b/pcbnew/librairi.cpp index 7c4aa15d20..fb0752d45a 100644 --- a/pcbnew/librairi.cpp +++ b/pcbnew/librairi.cpp @@ -725,7 +725,7 @@ MODULE* PCB_BASE_FRAME::Create_1_Module( const wxString& aModuleName ) GetBoard()->Add( module ); // Update parameters: position, timestamp ... - newpos = GetScreen()->GetCrossHairPosition(); + newpos = GetCrossHairPosition(); module->SetPosition( newpos ); module->SetLastEditTime(); diff --git a/pcbnew/loadcmp.cpp b/pcbnew/loadcmp.cpp index ae766cd6cc..fbdfdd5a29 100644 --- a/pcbnew/loadcmp.cpp +++ b/pcbnew/loadcmp.cpp @@ -93,7 +93,7 @@ bool FOOTPRINT_EDIT_FRAME::Load_Module_From_BOARD( MODULE* aModule ) GetBoard()->BuildListOfNets(); - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); PlaceModule( aModule, NULL ); // Put it on FRONT layer, @@ -155,7 +155,7 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, wxDC* aDC ) { MODULE* module; - wxPoint curspos = GetScreen()->GetCrossHairPosition(); + wxPoint curspos = GetCrossHairPosition(); wxString moduleName, keys; wxString libName = aLibrary; bool allowWildSeach = true; @@ -277,7 +277,7 @@ MODULE* PCB_BASE_FRAME::LoadModuleFromLibrary( const wxString& aLibrary, } } - GetScreen()->SetCrossHairPosition( curspos ); + SetCrossHairPosition( curspos ); m_canvas->MoveCursorToCrossHair(); if( module ) diff --git a/pcbnew/magnetic_tracks_functions.cpp b/pcbnew/magnetic_tracks_functions.cpp index 684ee374a5..8f7a8e5064 100644 --- a/pcbnew/magnetic_tracks_functions.cpp +++ b/pcbnew/magnetic_tracks_functions.cpp @@ -116,7 +116,7 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, TRACK* currTrack = g_CurrentTrackSegment; BOARD_ITEM* currItem = frame->GetCurItem(); PCB_SCREEN* screen = frame->GetScreen(); - wxPoint pos = screen->RefPos( true ); + wxPoint pos = frame->RefPos( true ); // D( printf( "currTrack=%p currItem=%p currTrack->Type()=%d currItem->Type()=%d\n", currTrack, currItem, currTrack ? currTrack->Type() : 0, currItem ? currItem->Type() : 0 ); ) @@ -133,7 +133,6 @@ bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, wxSize aGridSize, currTrack = NULL; } - if( g_MagneticPadOption == capture_always ) doPad = true; diff --git a/pcbnew/mirepcb.cpp b/pcbnew/mirepcb.cpp index 61aa0f55ff..ca9101ae9b 100644 --- a/pcbnew/mirepcb.cpp +++ b/pcbnew/mirepcb.cpp @@ -16,14 +16,14 @@ #include -/* Routines Locales */ +// Routines Locales static void AbortMoveAndEditTarget( EDA_DRAW_PANEL* Panel, wxDC* DC ); static void ShowTargetShapeWhileMovingMouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ); -/* Local variables : */ +// Local variables : static int MireDefaultSize = 5000; static PCB_TARGET s_TargetCopy( NULL ); /* Used to store "old" values of the * current item parameters before @@ -93,7 +93,7 @@ TARGET_PROPERTIES_DIALOG_EDITOR::TARGET_PROPERTIES_DIALOG_EDITOR( PCB_EDIT_FRAME MainBoxSizer->Add( LeftBoxSizer, 0, wxGROW | wxALL, 5 ); MainBoxSizer->Add( RightBoxSizer, 0, wxALIGN_CENTER_VERTICAL | wxALL, 5 ); - /* Create of the command buttons. */ + // Create of the command buttons. Button = new wxButton( this, wxID_OK, _( "OK" ) ); RightBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 ); @@ -215,7 +215,7 @@ PCB_TARGET* PCB_EDIT_FRAME::CreateTarget( wxDC* DC ) target->SetLayer( EDGE_N ); target->SetWidth( GetDesignSettings().m_EdgeSegmentWidth ); target->SetSize( MireDefaultSize ); - target->SetPosition( m_canvas->GetScreen()->GetCrossHairPosition() ); + target->SetPosition( GetCrossHairPosition() ); PlaceTarget( target, DC ); @@ -273,7 +273,7 @@ void PCB_EDIT_FRAME::PlaceTarget( PCB_TARGET* aTarget, wxDC* DC ) } -/* Redraw the contour of the track while moving the mouse */ +// Redraw the contour of the track while moving the mouse static void ShowTargetShapeWhileMovingMouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { @@ -286,7 +286,7 @@ static void ShowTargetShapeWhileMovingMouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC, if( aErase ) target->Draw( aPanel, aDC, GR_XOR ); - target->SetPosition( screen->GetCrossHairPosition() ); + target->SetPosition( aPanel->GetParent()->GetCrossHairPosition() ); target->Draw( aPanel, aDC, GR_XOR ); } diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index fb1b5f1035..c140224549 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -87,9 +87,9 @@ BOARD_ITEM* FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay( int aHotKeyCode ) scanList = GENERAL_COLLECTOR::ModulesAndTheirItems; } - m_Collector->Collect( GetBoard(), scanList, GetScreen()->RefPos( true ), guide ); + m_Collector->Collect( GetBoard(), scanList, RefPos( true ), guide ); - /* Remove redundancies: when an item is found, we can remove the module from list */ + // Remove redundancies: when an item is found, we can remove the module from list if( m_Collector->GetCount() > 1 ) { for( int ii = 0; ii < m_Collector->GetCount(); ii++ ) @@ -113,7 +113,7 @@ BOARD_ITEM* FOOTPRINT_EDIT_FRAME::ModeditLocateAndDisplay( int aHotKeyCode ) { wxMenu itemMenu; - /* Give a title to the selection menu. This is also a cancel menu item **/ + // Give a title to the selection menu. This is also a cancel menu item * wxMenuItem* item_title = new wxMenuItem( &itemMenu, -1, _( "Selection Clarification" ) ); #ifdef __WINDOWS__ @@ -255,100 +255,100 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_OPEN_MODULE_VIEWER: - { - FOOTPRINT_VIEWER_FRAME * viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - - if( viewer == NULL ) { - viewer = new FOOTPRINT_VIEWER_FRAME( this, m_footprintLibTable, NULL ); - viewer->Show( true ); - viewer->Zoom_Automatique( false ); - } - else - { - if( viewer->IsIconized() ) - viewer->Iconize( false ); + FOOTPRINT_VIEWER_FRAME * viewer = FOOTPRINT_VIEWER_FRAME::GetActiveFootprintViewer(); - viewer->Raise(); + if( viewer == NULL ) + { + viewer = new FOOTPRINT_VIEWER_FRAME( this, m_footprintLibTable, NULL ); + viewer->Show( true ); + viewer->Zoom_Automatique( false ); + } + else + { + if( viewer->IsIconized() ) + viewer->Iconize( false ); - // Raising the window does not set the focus on Linux. This should work on - // any platform. - if( wxWindow::FindFocus() != viewer ) - viewer->SetFocus(); + viewer->Raise(); + + // Raising the window does not set the focus on Linux. This should work on + // any platform. + if( wxWindow::FindFocus() != viewer ) + viewer->SetFocus(); + } } - } - break; + break; case ID_MODEDIT_DELETE_PART: DeleteModuleFromCurrentLibrary(); break; case ID_MODEDIT_NEW_MODULE: - { - Clear_Pcb( true ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); - - MODULE* module = Create_1_Module( wxEmptyString ); - - if( module ) // i.e. if create module command not aborted { - // Initialize data relative to nets and netclasses (for a new - // module the defaults are used) - // This is mandatory to handle and draw pads - GetBoard()->BuildListOfNets(); - redraw = true; - module->SetPosition( wxPoint( 0, 0 ) ); + Clear_Pcb( true ); + GetScreen()->ClearUndoRedoList(); + SetCurItem( NULL ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); - if( GetBoard()->m_Modules ) - GetBoard()->m_Modules->ClearFlags(); + MODULE* module = Create_1_Module( wxEmptyString ); - Zoom_Automatique( false ); + if( module ) // i.e. if create module command not aborted + { + // Initialize data relative to nets and netclasses (for a new + // module the defaults are used) + // This is mandatory to handle and draw pads + GetBoard()->BuildListOfNets(); + redraw = true; + module->SetPosition( wxPoint( 0, 0 ) ); + + if( GetBoard()->m_Modules ) + GetBoard()->m_Modules->ClearFlags(); + + Zoom_Automatique( false ); + } } - } - break; + break; case ID_MODEDIT_NEW_MODULE_FROM_WIZARD: - { - Clear_Pcb( true ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); - - wxSemaphore semaphore( 0, 1 ); - FOOTPRINT_WIZARD_FRAME *wizard = new FOOTPRINT_WIZARD_FRAME( this, &semaphore, - KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); - wizard->Show( true ); - wizard->Zoom_Automatique( false ); - - while( semaphore.TryWait() == wxSEMA_BUSY ) // Wait for viewer closing event { - wxYield(); - wxMilliSleep( 50 ); + Clear_Pcb( true ); + GetScreen()->ClearUndoRedoList(); + SetCurItem( NULL ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); + + wxSemaphore semaphore( 0, 1 ); + FOOTPRINT_WIZARD_FRAME *wizard = new FOOTPRINT_WIZARD_FRAME( this, &semaphore, + KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); + wizard->Show( true ); + wizard->Zoom_Automatique( false ); + + while( semaphore.TryWait() == wxSEMA_BUSY ) // Wait for viewer closing event + { + wxYield(); + wxMilliSleep( 50 ); + } + + MODULE* module = wizard->GetBuiltFootprint(); + + if( module ) // i.e. if create module command not aborted + { + // Here we should make a copy of the object before adding to board + module->SetParent( (EDA_ITEM*)GetBoard() ); + GetBoard()->m_Modules.Append( module ); + + // Initialize data relative to nets and netclasses (for a new + // module the defaults are used) + // This is mandatory to handle and draw pads + GetBoard()->BuildListOfNets(); + redraw = true; + module->SetPosition( wxPoint( 0, 0 ) ); + + if( GetBoard()->m_Modules ) + GetBoard()->m_Modules->ClearFlags(); + } + + wizard->Destroy(); } - - MODULE* module = wizard->GetBuiltFootprint(); - - if( module ) // i.e. if create module command not aborted - { - /* Here we should make a copy of the object before adding to board*/ - module->SetParent( (EDA_ITEM*)GetBoard() ); - GetBoard()->m_Modules.Append( module ); - - // Initialize data relative to nets and netclasses (for a new - // module the defaults are used) - // This is mandatory to handle and draw pads - GetBoard()->BuildListOfNets(); - redraw = true; - module->SetPosition( wxPoint( 0, 0 ) ); - - if( GetBoard()->m_Modules ) - GetBoard()->m_Modules->ClearFlags(); - } - - wizard->Destroy(); - } break; case ID_MODEDIT_SAVE_LIBMODULE: @@ -361,84 +361,84 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_INSERT_MODULE_IN_BOARD: case ID_MODEDIT_UPDATE_MODULE_IN_BOARD: - { - // update module in the current board, - // not just add it to the board with total disregard for the netlist... - PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) GetParent(); - BOARD* mainpcb = pcbframe->GetBoard(); - MODULE* source_module = NULL; - MODULE* module_in_edit = GetBoard()->m_Modules; - - // Search the old module (source) if exists - // Because this source could be deleted when editing the main board... - if( module_in_edit->GetLink() ) // this is not a new module ... { - source_module = mainpcb->m_Modules; + // update module in the current board, + // not just add it to the board with total disregard for the netlist... + PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) GetParent(); + BOARD* mainpcb = pcbframe->GetBoard(); + MODULE* source_module = NULL; + MODULE* module_in_edit = GetBoard()->m_Modules; - for( ; source_module != NULL; source_module = (MODULE*) source_module->Next() ) + // Search the old module (source) if exists + // Because this source could be deleted when editing the main board... + if( module_in_edit->GetLink() ) // this is not a new module ... { - if( module_in_edit->GetLink() == source_module->GetTimeStamp() ) - break; + source_module = mainpcb->m_Modules; + + for( ; source_module != NULL; source_module = (MODULE*) source_module->Next() ) + { + if( module_in_edit->GetLink() == source_module->GetTimeStamp() ) + break; + } } + + if( ( source_module == NULL ) + && ( id == ID_MODEDIT_UPDATE_MODULE_IN_BOARD ) ) // source not found + { + wxString msg; + msg.Printf( _( "Unable to find the footprint source on the main board" ) ); + msg << _( "\nCannot update the footprint" ); + DisplayError( this, msg ); + break; + } + + if( ( source_module != NULL ) + && ( id == ID_MODEDIT_INSERT_MODULE_IN_BOARD ) ) // source not found + { + wxString msg; + msg.Printf( _( "A footprint source was found on the main board" ) ); + msg << _( "\nCannot insert this footprint" ); + DisplayError( this, msg ); + break; + } + + // Create the "new" module + MODULE* newmodule = new MODULE( *module_in_edit ); + newmodule->SetParent( mainpcb ); + newmodule->SetLink( 0 ); + + // Put the footprint in the main pcb linked list. + mainpcb->Add( newmodule ); + + if( source_module ) // this is an update command + { + // In the main board, + // the new module replace the old module (pos, orient, ref, value + // and connexions are kept) + // and the source_module (old module) is deleted + PICKED_ITEMS_LIST pickList; + pcbframe->Exchange_Module( source_module, newmodule, &pickList ); + newmodule->SetTimeStamp( module_in_edit->GetLink() ); + + if( pickList.GetCount() ) + pcbframe->SaveCopyInUndoList( pickList, UR_UNSPECIFIED ); + } + else // This is an insert command + { + wxPoint cursor_pos = pcbframe->GetCrossHairPosition(); + pcbframe->SetCrossHairPosition( wxPoint( 0, 0 ) ); + pcbframe->PlaceModule( newmodule, NULL ); + pcbframe->SetCrossHairPosition( cursor_pos ); + newmodule->SetTimeStamp( GetNewTimeStamp() ); + pcbframe->SaveCopyInUndoList( newmodule, UR_NEW ); + } + + newmodule->ClearFlags(); + GetScreen()->ClrModify(); + pcbframe->SetCurItem( NULL ); + mainpcb->m_Status_Pcb = 0; } - - if( ( source_module == NULL ) - && ( id == ID_MODEDIT_UPDATE_MODULE_IN_BOARD ) ) // source not found - { - wxString msg; - msg.Printf( _( "Unable to find the footprint source on the main board" ) ); - msg << _( "\nCannot update the footprint" ); - DisplayError( this, msg ); - break; - } - - if( ( source_module != NULL ) - && ( id == ID_MODEDIT_INSERT_MODULE_IN_BOARD ) ) // source not found - { - wxString msg; - msg.Printf( _( "A footprint source was found on the main board" ) ); - msg << _( "\nCannot insert this footprint" ); - DisplayError( this, msg ); - break; - } - - // Create the "new" module - MODULE* newmodule = new MODULE( *module_in_edit ); - newmodule->SetParent( mainpcb ); - newmodule->SetLink( 0 ); - - // Put the footprint in the main pcb linked list. - mainpcb->Add( newmodule ); - - if( source_module ) // this is an update command - { - // In the main board, - // the new module replace the old module (pos, orient, ref, value - // and connexions are kept) - // and the source_module (old module) is deleted - PICKED_ITEMS_LIST pickList; - pcbframe->Exchange_Module( source_module, newmodule, &pickList ); - newmodule->SetTimeStamp( module_in_edit->GetLink() ); - - if( pickList.GetCount() ) - pcbframe->SaveCopyInUndoList( pickList, UR_UNSPECIFIED ); - } - else // This is an insert command - { - wxPoint cursor_pos = pcbframe->GetScreen()->GetCrossHairPosition(); - pcbframe->GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); - pcbframe->PlaceModule( newmodule, NULL ); - pcbframe->GetScreen()->SetCrossHairPosition( cursor_pos ); - newmodule->SetTimeStamp( GetNewTimeStamp() ); - pcbframe->SaveCopyInUndoList( newmodule, UR_NEW ); - } - - newmodule->ClearFlags(); - GetScreen()->ClrModify(); - pcbframe->SetCurItem( NULL ); - mainpcb->m_Status_Pcb = 0; - } - break; + break; case ID_MODEDIT_IMPORT_PART: if( ! Clear_Pcb( true ) ) @@ -446,7 +446,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetScreen()->ClearUndoRedoList(); SetCurItem( NULL ); - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); Import_Module(); redraw = true; @@ -485,7 +485,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetScreen()->ClearUndoRedoList(); SetCurItem( NULL ); Clear_Pcb( true ); - GetScreen()->SetCrossHairPosition( wxPoint( 0, 0 ) ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); #if !defined( USE_FP_LIB_TABLE ) LoadModuleFromLibrary( getLibPath(), m_footprintLibTable, true ); diff --git a/pcbnew/modedit_onclick.cpp b/pcbnew/modedit_onclick.cpp index 4628f1ba80..145959aa6d 100644 --- a/pcbnew/modedit_onclick.cpp +++ b/pcbnew/modedit_onclick.cpp @@ -132,32 +132,31 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos ) break; case ID_MODEDIT_ANCHOR_TOOL: - { - MODULE* module = GetBoard()->m_Modules; + { + MODULE* module = GetBoard()->m_Modules; - if( module == NULL // No module loaded - || (module->GetFlags() != 0) ) - break; + if( module == NULL // No module loaded + || (module->GetFlags() != 0) ) + break; - SaveCopyInUndoList( module, UR_MODEDIT ); + SaveCopyInUndoList( module, UR_MODEDIT ); - // set the new relative internal local coordinates of footprint items - wxPoint moveVector = module->GetPosition() - - GetScreen()->GetCrossHairPosition(); - module->MoveAnchorPosition( moveVector ); + // set the new relative internal local coordinates of footprint items + wxPoint moveVector = module->GetPosition() - GetCrossHairPosition(); + module->MoveAnchorPosition( moveVector ); - // Usually, we do not need to change twice the anchor position, - // so deselect the active tool - SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); - SetCurItem( NULL ); - m_canvas->Refresh(); - } - break; + // Usually, we do not need to change twice the anchor position, + // so deselect the active tool + SetToolID( ID_NO_TOOL_SELECTED, m_canvas->GetDefaultCursor(), wxEmptyString ); + SetCurItem( NULL ); + m_canvas->Refresh(); + } + break; case ID_MODEDIT_PLACE_GRID_COORD: - m_canvas->DrawGridAxis( DC, GR_XOR ); - GetScreen()->m_GridOrigin = GetScreen()->GetCrossHairPosition(); - m_canvas->DrawGridAxis( DC, GR_COPY ); + m_canvas->DrawGridAxis( DC, GR_XOR, GetBoard()->GetGridOrigin() ); + SetGridOrigin( GetCrossHairPosition() ); + m_canvas->DrawGridAxis( DC, GR_COPY, GetBoard()->GetGridOrigin() ); GetScreen()->SetModify(); break; diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 44d5d122fa..4e9834fb72 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -497,9 +497,9 @@ void FOOTPRINT_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, snapToGrid = false; if( snapToGrid ) - pos = GetScreen()->GetNearestGridPosition( pos ); + pos = GetNearestGridPosition( pos ); - oldpos = GetScreen()->GetCrossHairPosition(); + oldpos = GetCrossHairPosition(); gridSize = GetScreen()->GetGridSize(); switch( aHotKey ) @@ -532,14 +532,14 @@ void FOOTPRINT_EDIT_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition, break; } - GetScreen()->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); - if( oldpos != GetScreen()->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = GetScreen()->GetCrossHairPosition(); - GetScreen()->SetCrossHairPosition( oldpos, false ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos, false ); m_canvas->CrossHairOff( aDC ); - GetScreen()->SetCrossHairPosition( pos, snapToGrid ); + SetCrossHairPosition( pos, snapToGrid ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) diff --git a/pcbnew/modules.cpp b/pcbnew/modules.cpp index f19e944a9b..477feacaf6 100644 --- a/pcbnew/modules.cpp +++ b/pcbnew/modules.cpp @@ -244,7 +244,7 @@ void MoveFootprint( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, } /* Redraw the module at the new position. */ - g_Offset_Module = module->GetPosition() - aPanel->GetScreen()->GetCrossHairPosition(); + g_Offset_Module = module->GetPosition() - aPanel->GetParent()->GetCrossHairPosition(); DrawModuleOutlines( aPanel, aDC, module ); DrawSegmentWhileMovingFootprint( aPanel, aDC ); @@ -391,7 +391,7 @@ void PCB_BASE_FRAME::PlaceModule( MODULE* aModule, wxDC* aDC, bool aDoNotRecreat if( g_Show_Module_Ratsnest && ( GetBoard()->m_Status_Pcb & LISTE_PAD_OK ) && aDC ) TraceModuleRatsNest( aDC ); - newpos = GetScreen()->GetCrossHairPosition(); + newpos = GetCrossHairPosition(); aModule->SetPosition( newpos ); aModule->ClearFlags(); diff --git a/pcbnew/modview_frame.cpp b/pcbnew/modview_frame.cpp index a051ea942d..b8cf54629f 100644 --- a/pcbnew/modview_frame.cpp +++ b/pcbnew/modview_frame.cpp @@ -369,7 +369,7 @@ void FOOTPRINT_VIEWER_FRAME::OnSize( wxSizeEvent& SizeEv ) void FOOTPRINT_VIEWER_FRAME::OnSetRelativeOffset( wxCommandEvent& event ) { - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); UpdateStatusBar(); } @@ -644,8 +644,8 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition wxCommandEvent cmd( wxEVT_COMMAND_MENU_SELECTED ); cmd.SetEventObject( this ); - pos = screen->GetNearestGridPosition( pos ); - oldpos = screen->GetCrossHairPosition(); + pos = GetNearestGridPosition( pos ); + oldpos = GetCrossHairPosition(); gridSize = screen->GetGridSize(); switch( aHotKey ) @@ -676,7 +676,7 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition break; case ' ': - screen->m_O_Curseur = screen->GetCrossHairPosition(); + screen->m_O_Curseur = GetCrossHairPosition(); break; case WXK_NUMPAD8: /* cursor moved up */ @@ -704,14 +704,14 @@ void FOOTPRINT_VIEWER_FRAME::GeneralControl( wxDC* aDC, const wxPoint& aPosition break; } - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); - if( oldpos != screen->GetCrossHairPosition() ) + if( oldpos != GetCrossHairPosition() ) { - pos = screen->GetCrossHairPosition(); - screen->SetCrossHairPosition( oldpos ); + pos = GetCrossHairPosition(); + SetCrossHairPosition( oldpos ); m_canvas->CrossHairOff( aDC ); - screen->SetCrossHairPosition( pos ); + SetCrossHairPosition( pos ); m_canvas->CrossHairOn( aDC ); if( m_canvas->IsMouseCaptured() ) diff --git a/pcbnew/move-drag_pads.cpp b/pcbnew/move-drag_pads.cpp index b7dd439d7e..eae74d2662 100644 --- a/pcbnew/move-drag_pads.cpp +++ b/pcbnew/move-drag_pads.cpp @@ -63,7 +63,6 @@ static void Show_Pad_Move( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo bool aErase ) { TRACK* Track; - BASE_SCREEN* screen = aPanel->GetScreen(); D_PAD* pad = s_CurrentSelectedPad; if( pad == NULL ) // Should not occur @@ -72,7 +71,7 @@ static void Show_Pad_Move( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo if( aErase ) pad->Draw( aPanel, aDC, GR_XOR ); - pad->SetPosition( screen->GetCrossHairPosition() ); + pad->SetPosition( aPanel->GetParent()->GetCrossHairPosition() ); pad->Draw( aPanel, aDC, GR_XOR ); for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ ) diff --git a/pcbnew/move_or_drag_track.cpp b/pcbnew/move_or_drag_track.cpp index 877edfcd03..3a5b1bb271 100644 --- a/pcbnew/move_or_drag_track.cpp +++ b/pcbnew/move_or_drag_track.cpp @@ -85,7 +85,7 @@ static void Abort_MoveTrack( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) frame->SetCurItem( NULL ); aPanel->SetMouseCapture( NULL, NULL ); - /* Undo move and redraw trace segments. */ + // Undo move and redraw trace segments. for( unsigned jj=0 ; jj < g_DragSegmentList.size(); jj++ ) { TRACK* track = g_DragSegmentList[jj].m_Track; @@ -101,12 +101,11 @@ static void Abort_MoveTrack( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) } -/* Redraw the moved node according to the mouse cursor position */ +// Redraw the moved node according to the mouse cursor position static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { wxPoint moveVector; - BASE_SCREEN* screen = aPanel->GetScreen(); int tmp = DisplayOpt.DisplayPcbTrackFill; GR_DRAWMODE draw_mode = GR_XOR | GR_HIGHLIGHT; @@ -118,8 +117,8 @@ static void Show_MoveNode( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPo aErase = false; #endif - /* set the new track coordinates */ - wxPoint Pos = screen->GetCrossHairPosition(); + // set the new track coordinates + wxPoint Pos = aPanel->GetParent()->GetCrossHairPosition(); moveVector = Pos - s_LastPos; s_LastPos = Pos; @@ -202,7 +201,6 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC double xi1 = 0, yi1 = 0, xi2 = 0, yi2 = 0; // calculated intersection points double tx1, tx2, ty1, ty2; // temporary storage of points int dx, dy; - BASE_SCREEN* screen = aPanel->GetScreen(); bool update = true; TRACK* Track; TRACK* tSegmentToStart = NULL, * tSegmentToEnd = NULL; @@ -243,7 +241,7 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC GR_DRAWMODE draw_mode = GR_XOR | GR_HIGHLIGHT; - /* Undraw the current moved track segments before modification*/ + // Undraw the current moved track segments before modification #ifndef USE_WX_OVERLAY // if( erase ) @@ -258,13 +256,13 @@ static void Show_Drag_Track_Segment_With_Cte_Slope( EDA_DRAW_PANEL* aPanel, wxDC } #endif - /* Compute the new track segment position */ - wxPoint Pos = screen->GetCrossHairPosition(); + // Compute the new track segment position + wxPoint Pos = aPanel->GetParent()->GetCrossHairPosition(); dx = Pos.x - s_LastPos.x; dy = Pos.y - s_LastPos.y; - //move the line by dx and dy + // move the line by dx and dy tx1 = (double) ( Track->GetStart().x + dx ); ty1 = (double) ( Track->GetStart().y + dy ); tx2 = (double) ( Track->GetEnd().x + dx ); @@ -613,13 +611,13 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC EraseDragList(); - /* Change highlighted net: the new one will be highlighted */ + // Change highlighted net: the new one will be highlighted GetBoard()->PushHighLight(); if( GetBoard()->IsHighLightNetON() ) HighLight( aDC ); - PosInit = GetScreen()->GetCrossHairPosition(); + PosInit = GetCrossHairPosition(); if( aTrack->Type() == PCB_VIA_T ) { @@ -637,7 +635,7 @@ void PCB_EDIT_FRAME::StartMoveOneNodeOrSegment( TRACK* aTrack, wxDC* aDC, int aC } else { - STATUS_FLAGS diag = aTrack->IsPointOnEnds( GetScreen()->GetCrossHairPosition(), -1 ); + STATUS_FLAGS diag = aTrack->IsPointOnEnds( GetCrossHairPosition(), -1 ); wxPoint pos; switch( aCommand ) @@ -754,7 +752,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC if( !TrackToEndPoint || ( TrackToEndPoint->Type() != PCB_TRACE_T ) ) s_EndSegmentPresent = false; - /* Change high light net: the new one will be highlighted */ + // Change high light net: the new one will be highlighted GetBoard()->PushHighLight(); if( GetBoard()->IsHighLightNetON() ) @@ -791,8 +789,8 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC UndrawAndMarkSegmentsToDrag( m_canvas, DC ); - PosInit = GetScreen()->GetCrossHairPosition(); - s_LastPos = GetScreen()->GetCrossHairPosition(); + PosInit = GetCrossHairPosition(); + s_LastPos = GetCrossHairPosition(); m_canvas->SetMouseCapture( Show_Drag_Track_Segment_With_Cte_Slope, Abort_MoveTrack ); GetBoard()->SetHighLightNet( track->GetNet() ); @@ -823,7 +821,7 @@ void PCB_EDIT_FRAME::Start_DragTrackSegmentAndKeepSlope( TRACK* track, wxDC* DC } -/* Place a dragged (or moved) track segment or via */ +// Place a dragged (or moved) track segment or via bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) { int errdrc; @@ -841,7 +839,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) if( errdrc == BAD_DRC ) return false; - /* Redraw the dragged segments */ + // Redraw the dragged segments for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ ) { errdrc = m_drc->Drc( g_DragSegmentList[ii].m_Track, GetBoard()->m_Track ); @@ -855,7 +853,7 @@ bool PCB_EDIT_FRAME::PlaceDraggedOrMovedTrackSegment( TRACK* Track, wxDC* DC ) Track->ClearFlags(); Track->SetState( IN_EDIT, false ); - /* Draw dragged tracks */ + // Draw dragged tracks for( unsigned ii = 0; ii < g_DragSegmentList.size(); ii++ ) { Track = g_DragSegmentList[ii].m_Track; diff --git a/pcbnew/muonde.cpp b/pcbnew/muonde.cpp index 494cd8430c..6bf21028c7 100644 --- a/pcbnew/muonde.cpp +++ b/pcbnew/muonde.cpp @@ -123,7 +123,7 @@ static void ShowBoundingBoxMicroWaveInductor( EDA_DRAW_PANEL* aPanel, wxDC* aDC, GRPoly( aPanel->GetClipBox(), aDC, 5, poly, false, 0, YELLOW, YELLOW ); } - Mself.m_End = aPanel->GetScreen()->GetCrossHairPosition(); + Mself.m_End = aPanel->GetParent()->GetCrossHairPosition(); pt = Mself.m_End - Mself.m_Start; angle = -ArcTangente( pt.y, pt.x ); len = KiROUND( EuclideanNorm( pt ) ); @@ -161,13 +161,13 @@ void PCB_EDIT_FRAME::Begin_Self( wxDC* DC ) return; } - Mself.m_Start = GetScreen()->GetCrossHairPosition(); + Mself.m_Start = GetCrossHairPosition(); Mself.m_End = Mself.m_Start; Self_On = 1; // Update the initial coordinates. - GetScreen()->m_O_Curseur = GetScreen()->GetCrossHairPosition(); + GetScreen()->m_O_Curseur = GetCrossHairPosition(); UpdateStatusBar(); m_canvas->SetMouseCapture( ShowBoundingBoxMicroWaveInductor, Exit_Self ); @@ -192,7 +192,7 @@ MODULE* PCB_EDIT_FRAME::Genere_Self( wxDC* DC ) Self_On = 0; - Mself.m_End = GetScreen()->GetCrossHairPosition(); + Mself.m_End = GetCrossHairPosition(); wxPoint pt = Mself.m_End - Mself.m_Start; int min_len = KiROUND( EuclideanNorm( pt ) ); @@ -751,7 +751,8 @@ private: wxRadioBox* m_ShapeOptionCtrl; EDA_SIZE_CTRL* m_SizeCtrl; -public: WinEDA_SetParamShapeFrame( PCB_EDIT_FRAME* parent, const wxPoint& pos ); +public: + WinEDA_SetParamShapeFrame( PCB_EDIT_FRAME* parent, const wxPoint& pos ); ~WinEDA_SetParamShapeFrame() { }; private: diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp index f655b1a6a0..53703e3166 100644 --- a/pcbnew/onleftclick.cpp +++ b/pcbnew/onleftclick.cpp @@ -394,7 +394,7 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) break; case ID_PCB_DELETE_ITEM_BUTT: - if( !DrawStruct || (DrawStruct->GetFlags() == 0) ) + if( !DrawStruct || !DrawStruct->GetFlags() ) { DrawStruct = PcbGeneralLocateAndDisplay(); @@ -409,15 +409,15 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) case ID_PCB_PLACE_OFFSET_COORD_BUTT: m_canvas->DrawAuxiliaryAxis( aDC, GR_XOR ); - SetOriginAxisPosition( GetScreen()->GetCrossHairPosition() ); + SetAuxOrigin( GetCrossHairPosition() ); m_canvas->DrawAuxiliaryAxis( aDC, GR_COPY ); OnModify(); break; case ID_PCB_PLACE_GRID_COORD_BUTT: - m_canvas->DrawGridAxis( aDC, GR_XOR ); - GetScreen()->m_GridOrigin = GetScreen()->GetCrossHairPosition(); - m_canvas->DrawGridAxis( aDC, GR_COPY ); + m_canvas->DrawGridAxis( aDC, GR_XOR, GetBoard()->GetGridOrigin() ); + SetGridOrigin( GetCrossHairPosition() ); + m_canvas->DrawGridAxis( aDC, GR_COPY, GetBoard()->GetGridOrigin() ); break; default: diff --git a/pcbnew/onrightclick.cpp b/pcbnew/onrightclick.cpp index 5df6ea1d61..1d482743fe 100644 --- a/pcbnew/onrightclick.cpp +++ b/pcbnew/onrightclick.cpp @@ -101,12 +101,12 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) } } - /* Select a proper item */ + // Select a proper item - wxPoint cursorPos = GetScreen()->GetCrossHairPosition(); + wxPoint cursorPos = GetCrossHairPosition(); wxPoint selectPos = m_Collector->GetRefPos(); - selectPos = GetScreen()->GetNearestGridPosition( selectPos ); + selectPos = GetNearestGridPosition( selectPos ); /* We can reselect another item only if there are no item being edited * because ALL moving functions use GetCurItem(), therefore GetCurItem() @@ -312,7 +312,7 @@ bool PCB_EDIT_FRAME::OnRightClick( const wxPoint& aMousePos, wxMenu* aPopMenu ) msg, KiBitmap( move_module_xpm ) ); } - /* Display context sensitive commands: */ + // Display context sensitive commands: switch( GetToolId() ) { case ID_PCB_ZONES_BUTT: @@ -455,7 +455,7 @@ void PCB_EDIT_FRAME::createPopUpBlockMenu( wxMenu* menu ) */ void PCB_EDIT_FRAME::createPopupMenuForTracks( TRACK* Track, wxMenu* PopMenu ) { - wxPoint cursorPosition = GetScreen()->GetCrossHairPosition(); + wxPoint cursorPosition = GetCrossHairPosition(); wxString msg; GetBoard()->SetCurrentNetClass( Track->GetNetClassName() ); @@ -635,14 +635,14 @@ void PCB_EDIT_FRAME::createPopUpMenuForZones( ZONE_CONTAINER* edge_zone, wxMenu* edge_zone->GetIsKeepout() ? _("Keepout Area") : _( "Zones" ), KiBitmap( add_zone_xpm ) ); - if( edge_zone->HitTestForCorner( GetScreen()->RefPos( true ) ) ) + if( edge_zone->HitTestForCorner( RefPos( true ) ) ) { AddMenuItem( zones_menu, ID_POPUP_PCB_MOVE_ZONE_CORNER, _( "Move Corner" ), KiBitmap( move_xpm ) ); AddMenuItem( zones_menu, ID_POPUP_PCB_DELETE_ZONE_CORNER, _( "Delete Corner" ), KiBitmap( delete_xpm ) ); } - else if( edge_zone->HitTestForEdge( GetScreen()->RefPos( true ) ) ) + else if( edge_zone->HitTestForEdge( RefPos( true ) ) ) { AddMenuItem( zones_menu, ID_POPUP_PCB_ADD_ZONE_CORNER, _( "Create Corner" ), KiBitmap( add_corner_xpm ) ); @@ -862,7 +862,7 @@ void PCB_EDIT_FRAME::createPopUpMenuForFpPads( D_PAD* Pad, wxMenu* menu ) } -/* Create pop menu for pcb texts */ +// Create pop menu for pcb texts void PCB_EDIT_FRAME::createPopUpMenuForTexts( TEXTE_PCB* Text, wxMenu* menu ) { wxMenu* sub_menu_Text; diff --git a/pcbnew/pad_edition_functions.cpp b/pcbnew/pad_edition_functions.cpp index 51eab2a6f2..b99bd1580a 100644 --- a/pcbnew/pad_edition_functions.cpp +++ b/pcbnew/pad_edition_functions.cpp @@ -143,7 +143,7 @@ void PCB_BASE_FRAME::AddPad( MODULE* aModule, bool draw ) Import_Pad_Settings( pad, false ); pad->SetNetname( wxEmptyString ); - pad->SetPosition( GetScreen()->GetCrossHairPosition() ); + pad->SetPosition( GetCrossHairPosition() ); // Set the relative pad position // ( pad position for module orient, 0, and relative to the module position) diff --git a/pcbnew/pcb_parser.cpp b/pcbnew/pcb_parser.cpp index 6de537f87e..bd255e84b2 100644 --- a/pcbnew/pcb_parser.cpp +++ b/pcbnew/pcb_parser.cpp @@ -883,12 +883,12 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_user_via: - { - int viaSize = parseBoardUnits( "user via size" ); - int viaDrill = parseBoardUnits( "user via drill" ); - m_board->m_ViasDimensionsList.push_back( VIA_DIMENSION( viaSize, viaDrill ) ); - NeedRIGHT(); - } + { + int viaSize = parseBoardUnits( "user via size" ); + int viaDrill = parseBoardUnits( "user via drill" ); + m_board->m_ViasDimensionsList.push_back( VIA_DIMENSION( viaSize, viaDrill ) ); + NeedRIGHT(); + } break; case T_uvia_size: @@ -944,21 +944,21 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_pad_size: - { - wxSize sz; - sz.SetWidth( parseBoardUnits( "master pad width" ) ); - sz.SetHeight( parseBoardUnits( "master pad height" ) ); - designSettings.m_Pad_Master.SetSize( sz ); - NeedRIGHT(); + { + wxSize sz; + sz.SetWidth( parseBoardUnits( "master pad width" ) ); + sz.SetHeight( parseBoardUnits( "master pad height" ) ); + designSettings.m_Pad_Master.SetSize( sz ); + NeedRIGHT(); + } break; - } case T_pad_drill: - { - int drillSize = parseBoardUnits( T_pad_drill ); - designSettings.m_Pad_Master.SetDrillSize( wxSize( drillSize, drillSize ) ); - NeedRIGHT(); - } + { + int drillSize = parseBoardUnits( T_pad_drill ); + designSettings.m_Pad_Master.SetDrillSize( wxSize( drillSize, drillSize ) ); + NeedRIGHT(); + } break; case T_pad_to_mask_clearance: @@ -982,14 +982,24 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_aux_axis_origin: - { - int x = parseBoardUnits( "auxiliary origin X" ); - int y = parseBoardUnits( "auxiliary origin Y" ); - // x, y are not evaluated left to right, since they are push on stack right to left - m_board->SetOriginAxisPosition( wxPoint( x, y ) ); - NeedRIGHT(); + { + int x = parseBoardUnits( "auxiliary origin X" ); + int y = parseBoardUnits( "auxiliary origin Y" ); + // m_board->SetAuxOrigin( wxPoint( x, y ) ); gets overwritten via SetDesignSettings below + designSettings.m_AuxOrigin = wxPoint( x, y ); + NeedRIGHT(); + } + break; + + case T_grid_origin: + { + int x = parseBoardUnits( "grid origin X" ); + int y = parseBoardUnits( "grid origin Y" ); + // m_board->SetGridOrigin( wxPoint( x, y ) ); gets overwritten SetDesignSettings below + designSettings.m_GridOrigin = wxPoint( x, y ); + NeedRIGHT(); + } break; - } case T_visible_elements: designSettings.SetVisibleElements( parseHex() ); @@ -997,17 +1007,17 @@ void PCB_PARSER::parseSetup() throw( IO_ERROR, PARSE_ERROR ) break; case T_pcbplotparams: - { - PCB_PLOT_PARAMS plotParams; - PCB_PLOT_PARAMS_PARSER parser( reader ); + { + PCB_PLOT_PARAMS plotParams; + PCB_PLOT_PARAMS_PARSER parser( reader ); - plotParams.Parse( &parser ); - m_board->SetPlotOptions( plotParams ); + plotParams.Parse( &parser ); + m_board->SetPlotOptions( plotParams ); - // I don't know why but this seems to fix a problem in PCB_PLOT_PARAMS::Parse(). - NextTok(); + // I don't know why but this seems to fix a problem in PCB_PLOT_PARAMS::Parse(). + NextTok(); + } break; - } default: Unexpected( CurText() ); diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index a20e33fde7..2897af7bb3 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -683,7 +683,7 @@ static void initializePlotter( PLOTTER *aPlotter, BOARD * aBoard, else { if( aPlotOpts->GetUseAuxOrigin() ) - offset = aBoard->GetOriginAxisPosition(); + offset = aBoard->GetAuxOrigin(); } /* Configure the plotter object with all the stuff computed and diff --git a/pcbnew/xchgmod.cpp b/pcbnew/xchgmod.cpp index 32ee549465..d40a95a8b6 100644 --- a/pcbnew/xchgmod.cpp +++ b/pcbnew/xchgmod.cpp @@ -181,7 +181,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, if( old_name == new_name ) return 0; - /* Build CMP file name by changing the extension of NetList filename */ + // Build CMP file name by changing the extension of NetList filename fn = m_Parent->GetBoard()->GetFileName(); fn.SetExt( ComponentFileExtension ); @@ -456,11 +456,11 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* Module, wxBusyCursor dummy; - /* Copy parameters from the old module. */ + // Copy parameters from the old module. oldnamecmp = Module->GetLibRef(); namecmp = new_module; - /* Load module. */ + // Load module. line.Printf( _( "Change module %s (from %s) " ), GetChars( Module->GetReference() ), GetChars( oldnamecmp ) ); @@ -470,7 +470,7 @@ bool DIALOG_EXCHANGE_MODULE::Change_1_Module( MODULE* Module, namecmp.Trim( false ); NewModule = m_Parent->GetModuleLibrary( wxEmptyString, namecmp, ShowError ); - if( NewModule == NULL ) /* New module not found, redraw the old one. */ + if( NewModule == NULL ) // New module not found, redraw the old one. { m_WinMessages->AppendText( wxT( "No\n" ) ); return false; @@ -507,36 +507,36 @@ void PCB_EDIT_FRAME::Exchange_Module( MODULE* aOldModule, aNewModule->SetParent( GetBoard() ); GetBoard()->m_Status_Pcb = 0; - oldpos = GetScreen()->GetCrossHairPosition(); - GetScreen()->SetCrossHairPosition( aOldModule->GetPosition(), false ); + oldpos = GetCrossHairPosition(); + SetCrossHairPosition( aOldModule->GetPosition(), false ); /* place module without ratsnest refresh: this will be made later * when all modules are on board */ PlaceModule( aNewModule, NULL, true ); - GetScreen()->SetCrossHairPosition( oldpos, false ); + SetCrossHairPosition( oldpos, false ); - /* Flip footprint if needed */ + // Flip footprint if needed if( aOldModule->GetLayer() != aNewModule->GetLayer() ) { aNewModule->Flip( aNewModule->GetPosition() ); } - /* Rotate footprint if needed */ + // Rotate footprint if needed if( aOldModule->GetOrientation() != aNewModule->GetOrientation() ) { Rotate_Module( NULL, aNewModule, aOldModule->GetOrientation(), false ); } - /* Update reference and value */ + // Update reference and value aNewModule->SetReference( aOldModule->GetReference() ); aNewModule->SetValue( aOldModule->GetValue() ); - /* Updating other parameters */ + // Updating other parameters aNewModule->SetTimeStamp( aOldModule->GetTimeStamp() ); aNewModule->SetPath( aOldModule->GetPath() ); - /* Update pad netnames ( when possible) */ + // Update pad netnames ( when possible) pad = aNewModule->Pads(); for( ; pad != NULL; pad = pad->Next() ) @@ -604,7 +604,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent ) return; } - /* Calculation file name by changing the extension name to NetList */ + // Calculation file name by changing the extension name to NetList fn = GetBoard()->GetFileName(); fn.SetExt( ComponentFileExtension ); wildcard = wxGetTranslation( ComponentFileWildcard ); diff --git a/pcbnew/zones_by_polygon.cpp b/pcbnew/zones_by_polygon.cpp index 9effa3977c..19dcfe5f2a 100644 --- a/pcbnew/zones_by_polygon.cpp +++ b/pcbnew/zones_by_polygon.cpp @@ -272,7 +272,7 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Drag_Outline_Edge( wxDC* DC, aZone->SetSelectedCorner( corner_id ); m_canvas->SetMouseCapture( Show_Zone_Corner_Or_Outline_While_Move_Mouse, Abort_Zone_Move_Corner_Or_Outlines ); - s_CursorLastPosition = s_CornerInitialPosition = GetScreen()->GetCrossHairPosition(); + s_CursorLastPosition = s_CornerInitialPosition = GetCrossHairPosition(); s_AddCutoutToCurrentZone = false; s_CurrentZone = NULL; @@ -309,7 +309,7 @@ void PCB_EDIT_FRAME::Start_Move_Zone_Outlines( wxDC* DC, ZONE_CONTAINER* aZone ) aZone->SetFlags( IS_MOVED ); m_canvas->SetMouseCapture( Show_Zone_Corner_Or_Outline_While_Move_Mouse, Abort_Zone_Move_Corner_Or_Outlines ); - s_CursorLastPosition = s_CornerInitialPosition = GetScreen()->GetCrossHairPosition(); + s_CursorLastPosition = s_CornerInitialPosition = GetCrossHairPosition(); s_CornerIsNew = false; s_AddCutoutToCurrentZone = false; s_CurrentZone = NULL; @@ -470,7 +470,7 @@ void Show_Zone_Corner_Or_Outline_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* zone->Draw( aPanel, aDC, GR_XOR ); } - wxPoint pos = pcbframe->GetScreen()->GetCrossHairPosition(); + wxPoint pos = pcbframe->GetCrossHairPosition(); if( zone->IsMoving() ) { @@ -651,11 +651,11 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) zoneInfo.ExportSetting( *zone ); zone->Outline()->Start( zoneInfo.m_CurrentZone_Layer, - GetScreen()->GetCrossHairPosition().x, - GetScreen()->GetCrossHairPosition().y, + GetCrossHairPosition().x, + GetCrossHairPosition().y, zone->GetHatchStyle() ); - zone->AppendCorner( GetScreen()->GetCrossHairPosition() ); + zone->AppendCorner( GetCrossHairPosition() ); if( g_Drc_On && (m_drc->Drc( zone, 0 ) == BAD_DRC) && zone->IsOnCopperLayer() ) { @@ -687,7 +687,7 @@ int PCB_EDIT_FRAME::Begin_Zone( wxDC* DC ) // Ok, we can add a new corner if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxPoint(0,0), false ); - zone->AppendCorner( GetScreen()->GetCrossHairPosition() ); + zone->AppendCorner( GetCrossHairPosition() ); SetCurItem( zone ); // calls DisplayInfo(). if( m_canvas->IsMouseCaptured() ) m_canvas->CallMouseCapture( DC, wxPoint(0,0), false ); @@ -810,7 +810,7 @@ static void Show_New_Edge_While_Move_Mouse( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPosition, bool aErase ) { PCB_EDIT_FRAME* pcbframe = (PCB_EDIT_FRAME*) aPanel->GetParent(); - wxPoint c_pos = pcbframe->GetScreen()->GetCrossHairPosition(); + wxPoint c_pos = pcbframe->GetCrossHairPosition(); ZONE_CONTAINER* zone = pcbframe->GetBoard()->m_CurrentZoneContour; if( !zone ) diff --git a/scripts/lib_convert.py b/scripts/lib_convert.py index 569b4ec26c..18abc72e19 100755 --- a/scripts/lib_convert.py +++ b/scripts/lib_convert.py @@ -13,8 +13,8 @@ # 3) Entered following command line, script takes to arguments: oldLibPath & newLibPath # $ PYTHONPATH=. /lib_convert.py /usr/local/share/kicad/modules/smd_dil.mod /tmp/smd_dil.pretty -# 4) inspect one footprint found in new librarypath /tmp/smd_dil -# $ less /tmp/smd_dil/msoic-10.kicad_mod +# 4) inspect one footprint found in new librarypath /tmp/smd_dil.pretty +# $ less /tmp/smd_dil.pretty/msoic-10.kicad_mod from __future__ import print_function From 386f9b207474851142455ed539128a717e8ffc4a Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 Aug 2013 01:36:51 -0500 Subject: [PATCH 02/42] split expression into two lines for verification while using debugger that GetScreen() is a virtualized call. --- common/drawframe.cpp | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index a05a9d8fc3..5c29adcfdd 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -930,55 +930,66 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const { - return GetScreen()->getCrossHairPosition(); + // subject to change, borrow from old BASE_SCREEN for now. + + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->getCrossHairPosition(); } void EDA_DRAW_FRAME::SetCrossHairPosition( const wxPoint& aPosition, bool aSnapToGrid ) { - GetScreen()->setCrossHairPosition( aPosition, GetGridOrigin(), aSnapToGrid ); + BASE_SCREEN* screen = GetScreen(); // virtual call + screen->setCrossHairPosition( aPosition, GetGridOrigin(), aSnapToGrid ); } wxPoint EDA_DRAW_FRAME::GetCursorPosition( bool aOnGrid, wxRealPoint* aGridSize ) const { - return GetScreen()->getCursorPosition( aOnGrid, GetGridOrigin(), aGridSize ); + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->getCursorPosition( aOnGrid, GetGridOrigin(), aGridSize ); } wxPoint EDA_DRAW_FRAME::GetNearestGridPosition( const wxPoint& aPosition, wxRealPoint* aGridSize ) const { - return GetScreen()->getNearestGridPosition( aPosition, GetGridOrigin(), aGridSize ); + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->getNearestGridPosition( aPosition, GetGridOrigin(), aGridSize ); } wxPoint EDA_DRAW_FRAME::GetCrossHairScreenPosition() const { - return GetScreen()->getCrossHairScreenPosition(); + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->getCrossHairScreenPosition(); } void EDA_DRAW_FRAME::SetMousePosition( const wxPoint& aPosition ) { - GetScreen()->setMousePosition( aPosition ); + BASE_SCREEN* screen = GetScreen(); // virtual call + screen->setMousePosition( aPosition ); } wxPoint EDA_DRAW_FRAME::RefPos( bool useMouse ) const { - return GetScreen()->refPos( useMouse ); + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->refPos( useMouse ); } const wxPoint& EDA_DRAW_FRAME::GetScrollCenterPosition() const { - return GetScreen()->getScrollCenterPosition(); + BASE_SCREEN* screen = GetScreen(); // virtual call + return screen->getScrollCenterPosition(); } void EDA_DRAW_FRAME::SetScrollCenterPosition( const wxPoint& aPoint ) { - GetScreen()->setScrollCenterPosition( aPoint ); + BASE_SCREEN* screen = GetScreen(); // virtual call + screen->setScrollCenterPosition( aPoint ); } //------------------------------------------------- From 891c85a2c1412ae089f3eddf79d2fc16c616d948 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 3 Aug 2013 18:16:57 +0200 Subject: [PATCH 03/42] Pcbnew: add hotkey Z to reset grid origin. Save grid origin in .kicad_pcb files only if not 0,0 (to keep compatibility with previous versions of pcbnew, mainly the stable version) Very minor other fixes (set modify flag when grid origin is moved from the dialog grid) --- include/hotkeys_basic.h | 1 + pcbnew/dialogs/dialog_set_grid.cpp | 3 +++ pcbnew/hotkeys.cpp | 6 ++++-- pcbnew/hotkeys.h | 4 +++- pcbnew/hotkeys_board_editor.cpp | 6 ++++++ pcbnew/hotkeys_module_editor.cpp | 5 +++++ pcbnew/kicad_plugin.cpp | 7 ++++--- pcbnew/menubar_pcbframe.cpp | 4 ++-- 8 files changed, 28 insertions(+), 8 deletions(-) diff --git a/include/hotkeys_basic.h b/include/hotkeys_basic.h index 65f53dc483..f070441de4 100644 --- a/include/hotkeys_basic.h +++ b/include/hotkeys_basic.h @@ -218,6 +218,7 @@ enum common_hotkey_id_commnand { HK_NOT_FOUND = 0, HK_RESET_LOCAL_COORD, HK_SET_GRID_ORIGIN, + HK_RESET_GRID_ORIGIN, HK_HELP, HK_ZOOM_IN, HK_ZOOM_OUT, diff --git a/pcbnew/dialogs/dialog_set_grid.cpp b/pcbnew/dialogs/dialog_set_grid.cpp index 154088cd3a..d22890b572 100644 --- a/pcbnew/dialogs/dialog_set_grid.cpp +++ b/pcbnew/dialogs/dialog_set_grid.cpp @@ -211,6 +211,9 @@ bool PCB_BASE_FRAME::InvokeDialogGrid() if( ret == wxID_OK ) { + if( GetGridOrigin() != grid_origin && IsType( PCB_FRAME_TYPE ) ) + OnModify(); // because grid origin is saved in board, show as modified + SetGridOrigin( grid_origin ); GetScreen()->AddGrid( m_UserGridSize, m_UserGridUnit, ID_POPUP_GRID_USER ); diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp index 8186af3d14..c0a3830388 100644 --- a/pcbnew/hotkeys.cpp +++ b/pcbnew/hotkeys.cpp @@ -55,6 +55,7 @@ static EDA_HOTKEY HkSwitch2PreviousCopperLayer( wxT( "Switch to Previous Layer" static EDA_HOTKEY HkSaveModule( wxT( "Save Module" ), HK_SAVE_MODULE, 'S' + GR_KB_CTRL ); static EDA_HOTKEY HkSavefile( wxT( "Save board" ), HK_SAVE_BOARD, 'S' + GR_KB_CTRL ); +static EDA_HOTKEY HkSavefileAs( wxT( "Save board as" ), HK_SAVE_BOARD_AS, 'S' + GR_KB_CTRL + GR_KB_SHIFT ); static EDA_HOTKEY HkLoadfile( wxT( "Load board" ), HK_LOAD_BOARD, 'L' + GR_KB_CTRL ); static EDA_HOTKEY HkFindItem( wxT( "Find Item" ), HK_FIND_ITEM, 'F' + GR_KB_CTRL ); static EDA_HOTKEY HkBackspace( wxT( "Delete track segment" ), HK_BACK_SPACE, WXK_BACK ); @@ -78,6 +79,7 @@ static EDA_HOTKEY HkResetLocalCoord( wxT( "Reset Local Coordinates" ), HK_RESET_ static EDA_HOTKEY HkSwitchHighContrastMode( wxT("Switch Highcontrast mode"), HK_SWITCH_HIGHCONTRAST_MODE,'H'); static EDA_HOTKEY HkSetGridOrigin( wxT("Set Grid Origin"), HK_SET_GRID_ORIGIN, 'S' ); +static EDA_HOTKEY HkResetGridOrigin( wxT("Reset Grid Origin"), HK_RESET_GRID_ORIGIN, 'Z' ); /* Fit on Screen */ #if !defined( __WXMAC__ ) @@ -195,7 +197,7 @@ EDA_HOTKEY* common_Hotkey_List[] = { &HkHelp, &HkZoomIn, &HkZoomOut, &HkZoomRedraw, &HkZoomCenter, &HkZoomAuto, - &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, + &HkSwitchUnits, &HkResetLocalCoord, &HkSetGridOrigin, &HkResetGridOrigin, &HkUndo, &HkRedo, NULL }; @@ -211,7 +213,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] = &HkPlaceItem, &HkCopyItem, &HkEndTrack, &HkMoveItem, &HkFlipItem, &HkRotateItem, &HkDragFootprint, - &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, + &HkGetAndMoveFootprint, &HkLock_Unlock_Footprint, &HkSavefile, &HkSavefileAs, &HkLoadfile, &HkFindItem, &HkEditBoardItem, &HkSwitch2CopperLayer, &HkSwitch2InnerLayer1, &HkSwitch2InnerLayer2, &HkSwitch2InnerLayer3, &HkSwitch2InnerLayer4, diff --git a/pcbnew/hotkeys.h b/pcbnew/hotkeys.h index 98e18fb565..dca43f3aa0 100644 --- a/pcbnew/hotkeys.h +++ b/pcbnew/hotkeys.h @@ -26,7 +26,9 @@ enum hotkey_id_commnand { HK_SWITCH_TRACK_POSTURE, HK_DRAG_TRACK_KEEP_SLOPE, HK_END_TRACK, - HK_SAVE_BOARD, HK_LOAD_BOARD, + HK_SAVE_BOARD, + HK_SAVE_BOARD_AS, + HK_LOAD_BOARD, HK_SAVE_MODULE, HK_SWITCH_UNITS, HK_SWITCH_TRACK_DISPLAY_MODE, diff --git a/pcbnew/hotkeys_board_editor.cpp b/pcbnew/hotkeys_board_editor.cpp index 2d46178a47..b3cc0893b0 100644 --- a/pcbnew/hotkeys_board_editor.cpp +++ b/pcbnew/hotkeys_board_editor.cpp @@ -351,6 +351,12 @@ void PCB_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotkeyCode, const wxPoint& aPosit m_canvas->Refresh(); break; + case HK_RESET_GRID_ORIGIN: + SetGridOrigin( wxPoint(0,0) ); + OnModify(); // because grid origin is saved in board, show as modified + m_canvas->Refresh(); + break; + case HK_SWITCH_UNITS: evt_type = (g_UserUnit == INCHES) ? ID_TB_OPTIONS_SELECT_UNIT_MM : ID_TB_OPTIONS_SELECT_UNIT_INCH; diff --git a/pcbnew/hotkeys_module_editor.cpp b/pcbnew/hotkeys_module_editor.cpp index 978f8a3a3c..0bff61af9e 100644 --- a/pcbnew/hotkeys_module_editor.cpp +++ b/pcbnew/hotkeys_module_editor.cpp @@ -64,6 +64,11 @@ void FOOTPRINT_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPos m_canvas->Refresh(); break; + case HK_RESET_GRID_ORIGIN: + SetGridOrigin( wxPoint(0,0) ); + m_canvas->Refresh(); + break; + case HK_SWITCH_UNITS: cmd.SetId( (g_UserUnit == INCHES) ? ID_TB_OPTIONS_SELECT_UNIT_MM : ID_TB_OPTIONS_SELECT_UNIT_INCH ); diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index d987948d71..d6bc8f87e7 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -560,9 +560,10 @@ void PCB_IO::format( BOARD* aBoard, int aNestLevel ) const FMTIU( aBoard->GetAuxOrigin().x ).c_str(), FMTIU( aBoard->GetAuxOrigin().y ).c_str() ); - m_out->Print( aNestLevel+1, "(grid_origin %s %s)\n", - FMTIU( aBoard->GetGridOrigin().x ).c_str(), - FMTIU( aBoard->GetGridOrigin().y ).c_str() ); + if( aBoard->GetGridOrigin().x || aBoard->GetGridOrigin().y ) + m_out->Print( aNestLevel+1, "(grid_origin %s %s)\n", + FMTIU( aBoard->GetGridOrigin().x ).c_str(), + FMTIU( aBoard->GetGridOrigin().y ).c_str() ); m_out->Print( aNestLevel+1, "(visible_elements %X)\n", aBoard->GetDesignSettings().GetVisibleElements() ); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index b3d732d934..a63c652b5a 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -105,8 +105,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() KiBitmap( save_xpm ) ); // Save As - AddMenuItem( filesMenu, ID_SAVE_BOARD_AS, - _( "Sa&ve As...\tCtrl+Shift+S" ), + text = AddHotkeyName( _( "Sa&ve As..." ), g_Board_Editor_Hokeys_Descr, HK_SAVE_BOARD_AS ); + AddMenuItem( filesMenu, ID_SAVE_BOARD_AS, text, _( "Save the current board as..." ), KiBitmap( save_as_xpm ) ); filesMenu->AppendSeparator(); From a95dee3d096cd6f356c059ec5cf4104636b2971c Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 Aug 2013 13:57:15 -0500 Subject: [PATCH 04/42] fix interface mapping slip-up in wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const --- common/drawframe.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/common/drawframe.cpp b/common/drawframe.cpp index 5c29adcfdd..ac0669ef7d 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -720,12 +720,9 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) { BASE_SCREEN* screen = GetScreen(); - if( screen == NULL || m_canvas == NULL ) + if( !screen || !m_canvas ) return; - // There are no safety limits on these calculations, so in NANOMETRES build it - // still blows up. This is incomplete work. - double scale = screen->GetScalingFactor(); wxLogTrace( traceScrollSettings, wxT( "Center Position = ( %d, %d ), scale = %.10g" ), @@ -933,7 +930,7 @@ wxPoint EDA_DRAW_FRAME::GetCrossHairPosition( bool aInvertY ) const // subject to change, borrow from old BASE_SCREEN for now. BASE_SCREEN* screen = GetScreen(); // virtual call - return screen->getCrossHairPosition(); + return screen->getCrossHairPosition( aInvertY ); } From 01eab7dccb7fbb01f399d732ba5216232f829c50 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Sat, 3 Aug 2013 15:20:55 -0500 Subject: [PATCH 05/42] ReturnStringFromValue() refinements --- common/base_screen.cpp | 2 +- common/base_units.cpp | 24 ++++++++++++++++++++++-- include/class_base_screen.h | 8 ++++---- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/common/base_screen.cpp b/common/base_screen.cpp index a47f21386d..717154b2e3 100644 --- a/common/base_screen.cpp +++ b/common/base_screen.cpp @@ -337,7 +337,7 @@ wxPoint BASE_SCREEN::getCrossHairScreenPosition() const void BASE_SCREEN::setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid ) { if( aSnapToGrid ) - m_crossHairPosition = getNearestGridPosition( aPosition, aGridOrigin ); + m_crossHairPosition = getNearestGridPosition( aPosition, aGridOrigin, NULL ); else m_crossHairPosition = aPosition; } diff --git a/common/base_units.cpp b/common/base_units.cpp index 76dcc5d8c1..09a2ab9bd0 100644 --- a/common/base_units.cpp +++ b/common/base_units.cpp @@ -209,8 +209,28 @@ wxString ReturnStringFromValue( EDA_UNITS_T aUnit, int aValue, bool aAddUnitSymb StripTrailingZeros( stringValue, 3 ); #else - std::string s = Double2Str( value_to_print ); - wxString stringValue = FROM_UTF8( s.c_str() ); + + char buf[50]; + int len; + + if( value_to_print != 0.0 && fabs( value_to_print ) <= 0.0001 ) + { + len = sprintf( buf, "%.10f", value_to_print ); + + while( --len > 0 && buf[len] == '0' ) + buf[len] = '\0'; + + if( buf[len]=='.' || buf[len]==',' ) + buf[len] = '\0'; + else + ++len; + } + else + { + len = sprintf( buf, "%.10g", value_to_print ); + } + + wxString stringValue( buf, wxConvUTF8 ); #endif diff --git a/include/class_base_screen.h b/include/class_base_screen.h index 537b277bfe..6d133982a9 100644 --- a/include/class_base_screen.h +++ b/include/class_base_screen.h @@ -102,7 +102,7 @@ private: * @param aInvertY Inverts the Y axis position. * @return The cross hair position in drawing coordinates. */ - wxPoint getCrossHairPosition( bool aInvertY = false ) const + wxPoint getCrossHairPosition( bool aInvertY ) const { if( aInvertY ) return wxPoint( m_crossHairPosition.x, -m_crossHairPosition.y ); @@ -119,7 +119,7 @@ private: * \a aPosition. * */ - void setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid = true ); + void setCrossHairPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, bool aSnapToGrid ); /** * Function getCursorScreenPosition @@ -138,7 +138,7 @@ private: * @return The nearst grid position. */ wxPoint getNearestGridPosition( const wxPoint& aPosition, const wxPoint& aGridOrigin, - wxRealPoint* aGridSize = NULL ) const; + wxRealPoint* aGridSize ) const; /** * Function getCursorPosition @@ -149,7 +149,7 @@ private: * if \a aOnGrid is true. * @return The current cursor position. */ - wxPoint getCursorPosition( bool aOnGrid, const wxPoint& aGridOrigin, wxRealPoint* aGridSize = NULL ) const; + wxPoint getCursorPosition( bool aOnGrid, const wxPoint& aGridOrigin, wxRealPoint* aGridSize ) const; void setMousePosition( const wxPoint& aPosition ) { m_MousePosition = aPosition; } From 2bc4103ea9ec76b53b4674efadf2240928f7dbf4 Mon Sep 17 00:00:00 2001 From: Brian Sidebotham Date: Sun, 4 Aug 2013 21:31:14 +0100 Subject: [PATCH 06/42] * Added modified CMake FindPython... modules to support using Python-a-mingw-us distribution when building Windows scripting support using MinGW --- CMakeLists.txt | 2 +- CMakeModules/CMakeFindFrameworks.cmake | 32 ++ .../FindPackageHandleStandardArgs.cmake | 260 ++++++++++++++ CMakeModules/FindPythonInterp.cmake | 175 +++++++++ CMakeModules/FindPythonLibs.cmake | 338 ++++++++++++++++++ CMakeModules/PerformFeatureChecks.cmake | 12 + .../SelectLibraryConfigurations.cmake | 87 +++++ 7 files changed, 905 insertions(+), 1 deletion(-) create mode 100644 CMakeModules/CMakeFindFrameworks.cmake create mode 100644 CMakeModules/FindPackageHandleStandardArgs.cmake create mode 100644 CMakeModules/FindPythonInterp.cmake create mode 100644 CMakeModules/FindPythonLibs.cmake create mode 100644 CMakeModules/SelectLibraryConfigurations.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 559397b60b..0dbf597ebf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -323,7 +323,7 @@ if(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) mark_as_advanced(PYTHON_DEST) message( STATUS "Python module install path: ${PYTHON_DEST}") find_package(PythonLibs) - include_directories(${PYTHON_INCLUDE_PATH} + include_directories(${PYTHON_INCLUDE_DIRS} ./scripting) endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) diff --git a/CMakeModules/CMakeFindFrameworks.cmake b/CMakeModules/CMakeFindFrameworks.cmake new file mode 100644 index 0000000000..7fdeb84bef --- /dev/null +++ b/CMakeModules/CMakeFindFrameworks.cmake @@ -0,0 +1,32 @@ +# - helper module to find OSX frameworks + +#============================================================================= +# Copyright 2003-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +if(NOT CMAKE_FIND_FRAMEWORKS_INCLUDED) + set(CMAKE_FIND_FRAMEWORKS_INCLUDED 1) + macro(CMAKE_FIND_FRAMEWORKS fwk) + set(${fwk}_FRAMEWORKS) + if(APPLE) + foreach(dir + ~/Library/Frameworks/${fwk}.framework + /Library/Frameworks/${fwk}.framework + /System/Library/Frameworks/${fwk}.framework + /Network/Library/Frameworks/${fwk}.framework) + if(EXISTS ${dir}) + set(${fwk}_FRAMEWORKS ${${fwk}_FRAMEWORKS} ${dir}) + endif() + endforeach() + endif() + endmacro() +endif() diff --git a/CMakeModules/FindPackageHandleStandardArgs.cmake b/CMakeModules/FindPackageHandleStandardArgs.cmake new file mode 100644 index 0000000000..1acb021e80 --- /dev/null +++ b/CMakeModules/FindPackageHandleStandardArgs.cmake @@ -0,0 +1,260 @@ +# FIND_PACKAGE_HANDLE_STANDARD_ARGS( ... ) +# +# This function is intended to be used in FindXXX.cmake modules files. +# It handles the REQUIRED, QUIET and version-related arguments to FIND_PACKAGE(). +# It also sets the _FOUND variable. +# The package is considered found if all variables ... listed contain +# valid results, e.g. valid filepaths. +# +# There are two modes of this function. The first argument in both modes is +# the name of the Find-module where it is called (in original casing). +# +# The first simple mode looks like this: +# FIND_PACKAGE_HANDLE_STANDARD_ARGS( (DEFAULT_MSG|"Custom failure message") ... ) +# If the variables to are all valid, then _FOUND +# will be set to TRUE. +# If DEFAULT_MSG is given as second argument, then the function will generate +# itself useful success and error messages. You can also supply a custom error message +# for the failure case. This is not recommended. +# +# The second mode is more powerful and also supports version checking: +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(NAME [REQUIRED_VARS ...] +# [VERSION_VAR +# [CONFIG_MODE] +# [FAIL_MESSAGE "Custom failure message"] ) +# +# As above, if through are all valid, _FOUND +# will be set to TRUE. +# After REQUIRED_VARS the variables which are required for this package are listed. +# Following VERSION_VAR the name of the variable can be specified which holds +# the version of the package which has been found. If this is done, this version +# will be checked against the (potentially) specified required version used +# in the find_package() call. The EXACT keyword is also handled. The default +# messages include information about the required version and the version +# which has been actually found, both if the version is ok or not. +# Use the option CONFIG_MODE if your FindXXX.cmake module is a wrapper for +# a find_package(... NO_MODULE) call, in this case all the information +# provided by the config-mode of find_package() will be evaluated +# automatically. +# Via FAIL_MESSAGE a custom failure message can be specified, if this is not +# used, the default message will be displayed. +# +# Example for mode 1: +# +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 DEFAULT_MSG LIBXML2_LIBRARY LIBXML2_INCLUDE_DIR) +# +# LibXml2 is considered to be found, if both LIBXML2_LIBRARY and +# LIBXML2_INCLUDE_DIR are valid. Then also LIBXML2_FOUND is set to TRUE. +# If it is not found and REQUIRED was used, it fails with FATAL_ERROR, +# independent whether QUIET was used or not. +# If it is found, success will be reported, including the content of . +# On repeated Cmake runs, the same message won't be printed again. +# +# Example for mode 2: +# +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(BISON REQUIRED_VARS BISON_EXECUTABLE +# VERSION_VAR BISON_VERSION) +# In this case, BISON is considered to be found if the variable(s) listed +# after REQUIRED_VAR are all valid, i.e. BISON_EXECUTABLE in this case. +# Also the version of BISON will be checked by using the version contained +# in BISON_VERSION. +# Since no FAIL_MESSAGE is given, the default messages will be printed. +# +# Another example for mode 2: +# +# FIND_PACKAGE(Automoc4 QUIET NO_MODULE HINTS /opt/automoc4) +# FIND_PACKAGE_HANDLE_STANDARD_ARGS(Automoc4 CONFIG_MODE) +# In this case, FindAutmoc4.cmake wraps a call to FIND_PACKAGE(Automoc4 NO_MODULE) +# and adds an additional search directory for automoc4. +# The following FIND_PACKAGE_HANDLE_STANDARD_ARGS() call produces a proper +# success/error message. + +#============================================================================= +# Copyright 2007-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +INCLUDE(FindPackageMessage) +INCLUDE(CMakeParseArguments) + +# internal helper macro +MACRO(_FPHSA_FAILURE_MESSAGE _msg) + IF (${_NAME}_FIND_REQUIRED) + MESSAGE(FATAL_ERROR "${_msg}") + ELSE (${_NAME}_FIND_REQUIRED) + IF (NOT ${_NAME}_FIND_QUIETLY) + MESSAGE(STATUS "${_msg}") + ENDIF (NOT ${_NAME}_FIND_QUIETLY) + ENDIF (${_NAME}_FIND_REQUIRED) +ENDMACRO(_FPHSA_FAILURE_MESSAGE _msg) + + +# internal helper macro to generate the failure message when used in CONFIG_MODE: +MACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) + # _CONFIG is set, but FOUND is false, this means that some other of the REQUIRED_VARS was not found: + IF(${_NAME}_CONFIG) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: missing: ${MISSING_VARS} (found ${${_NAME}_CONFIG} ${VERSION_MSG})") + ELSE(${_NAME}_CONFIG) + # If _CONSIDERED_CONFIGS is set, the config-file has been found, but no suitable version. + # List them all in the error message: + IF(${_NAME}_CONSIDERED_CONFIGS) + SET(configsText "") + LIST(LENGTH ${_NAME}_CONSIDERED_CONFIGS configsCount) + MATH(EXPR configsCount "${configsCount} - 1") + FOREACH(currentConfigIndex RANGE ${configsCount}) + LIST(GET ${_NAME}_CONSIDERED_CONFIGS ${currentConfigIndex} filename) + LIST(GET ${_NAME}_CONSIDERED_VERSIONS ${currentConfigIndex} version) + SET(configsText "${configsText} ${filename} (version ${version})\n") + ENDFOREACH(currentConfigIndex) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} ${VERSION_MSG}, checked the following files:\n${configsText}") + + ELSE(${_NAME}_CONSIDERED_CONFIGS) + # Simple case: No Config-file was found at all: + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: found neither ${_NAME}Config.cmake nor ${_NAME_LOWER}-config.cmake ${VERSION_MSG}") + ENDIF(${_NAME}_CONSIDERED_CONFIGS) + ENDIF(${_NAME}_CONFIG) +ENDMACRO(_FPHSA_HANDLE_FAILURE_CONFIG_MODE) + + +FUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FIRST_ARG) + +# set up the arguments for CMAKE_PARSE_ARGUMENTS and check whether we are in +# new extended or in the "old" mode: + SET(options CONFIG_MODE) + SET(oneValueArgs FAIL_MESSAGE VERSION_VAR) + SET(multiValueArgs REQUIRED_VARS) + SET(_KEYWORDS_FOR_EXTENDED_MODE ${options} ${oneValueArgs} ${multiValueArgs} ) + LIST(FIND _KEYWORDS_FOR_EXTENDED_MODE "${_FIRST_ARG}" INDEX) + + IF(${INDEX} EQUAL -1) + SET(FPHSA_FAIL_MESSAGE ${_FIRST_ARG}) + SET(FPHSA_REQUIRED_VARS ${ARGN}) + SET(FPHSA_VERSION_VAR) + ELSE(${INDEX} EQUAL -1) + + CMAKE_PARSE_ARGUMENTS(FPHSA "${options}" "${oneValueArgs}" "${multiValueArgs}" ${_FIRST_ARG} ${ARGN}) + + IF(FPHSA_UNPARSED_ARGUMENTS) + MESSAGE(FATAL_ERROR "Unknown keywords given to FIND_PACKAGE_HANDLE_STANDARD_ARGS(): \"${FPHSA_UNPARSED_ARGUMENTS}\"") + ENDIF(FPHSA_UNPARSED_ARGUMENTS) + + IF(NOT FPHSA_FAIL_MESSAGE) + SET(FPHSA_FAIL_MESSAGE "DEFAULT_MSG") + ENDIF(NOT FPHSA_FAIL_MESSAGE) + ENDIF(${INDEX} EQUAL -1) + +# now that we collected all arguments, process them + + IF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG") + SET(FPHSA_FAIL_MESSAGE "Could NOT find ${_NAME}") + ENDIF("${FPHSA_FAIL_MESSAGE}" STREQUAL "DEFAULT_MSG") + + # In config-mode, we rely on the variable _CONFIG, which is set by find_package() + # when it successfully found the config-file, including version checking: + IF(FPHSA_CONFIG_MODE) + LIST(INSERT FPHSA_REQUIRED_VARS 0 ${_NAME}_CONFIG) + LIST(REMOVE_DUPLICATES FPHSA_REQUIRED_VARS) + SET(FPHSA_VERSION_VAR ${_NAME}_VERSION) + ENDIF(FPHSA_CONFIG_MODE) + + IF(NOT FPHSA_REQUIRED_VARS) + MESSAGE(FATAL_ERROR "No REQUIRED_VARS specified for FIND_PACKAGE_HANDLE_STANDARD_ARGS()") + ENDIF(NOT FPHSA_REQUIRED_VARS) + + LIST(GET FPHSA_REQUIRED_VARS 0 _FIRST_REQUIRED_VAR) + + STRING(TOUPPER ${_NAME} _NAME_UPPER) + STRING(TOLOWER ${_NAME} _NAME_LOWER) + + # collect all variables which were not found, so they can be printed, so the + # user knows better what went wrong (#6375) + SET(MISSING_VARS "") + SET(DETAILS "") + SET(${_NAME_UPPER}_FOUND TRUE) + # check if all passed variables are valid + FOREACH(_CURRENT_VAR ${FPHSA_REQUIRED_VARS}) + IF(NOT ${_CURRENT_VAR}) + SET(${_NAME_UPPER}_FOUND FALSE) + SET(MISSING_VARS "${MISSING_VARS} ${_CURRENT_VAR}") + ELSE(NOT ${_CURRENT_VAR}) + SET(DETAILS "${DETAILS}[${${_CURRENT_VAR}}]") + ENDIF(NOT ${_CURRENT_VAR}) + ENDFOREACH(_CURRENT_VAR) + + + # version handling: + SET(VERSION_MSG "") + SET(VERSION_OK TRUE) + SET(VERSION ${${FPHSA_VERSION_VAR}} ) + IF (${_NAME}_FIND_VERSION) + + IF(VERSION) + + IF(${_NAME}_FIND_VERSION_EXACT) # exact version required + IF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is exact version \"${${_NAME}_FIND_VERSION}\"") + SET(VERSION_OK FALSE) + ELSE (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + SET(VERSION_MSG "(found suitable exact version \"${VERSION}\")") + ENDIF (NOT "${${_NAME}_FIND_VERSION}" VERSION_EQUAL "${VERSION}") + + ELSE(${_NAME}_FIND_VERSION_EXACT) # minimum version specified: + IF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") + SET(VERSION_MSG "Found unsuitable version \"${VERSION}\", but required is at least \"${${_NAME}_FIND_VERSION}\"") + SET(VERSION_OK FALSE) + ELSE ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") + SET(VERSION_MSG "(found suitable version \"${VERSION}\", required is \"${${_NAME}_FIND_VERSION}\")") + ENDIF ("${${_NAME}_FIND_VERSION}" VERSION_GREATER "${VERSION}") + ENDIF(${_NAME}_FIND_VERSION_EXACT) + + ELSE(VERSION) + + # if the package was not found, but a version was given, add that to the output: + IF(${_NAME}_FIND_VERSION_EXACT) + SET(VERSION_MSG "(Required is exact version \"${${_NAME}_FIND_VERSION}\")") + ELSE(${_NAME}_FIND_VERSION_EXACT) + SET(VERSION_MSG "(Required is at least version \"${${_NAME}_FIND_VERSION}\")") + ENDIF(${_NAME}_FIND_VERSION_EXACT) + + ENDIF(VERSION) + ELSE (${_NAME}_FIND_VERSION) + IF(VERSION) + SET(VERSION_MSG "(found version \"${VERSION}\")") + ENDIF(VERSION) + ENDIF (${_NAME}_FIND_VERSION) + + IF(VERSION_OK) + SET(DETAILS "${DETAILS}[v${VERSION}(${${_NAME}_FIND_VERSION})]") + ELSE(VERSION_OK) + SET(${_NAME_UPPER}_FOUND FALSE) + ENDIF(VERSION_OK) + + + # print the result: + IF (${_NAME_UPPER}_FOUND) + FIND_PACKAGE_MESSAGE(${_NAME} "Found ${_NAME}: ${${_FIRST_REQUIRED_VAR}} ${VERSION_MSG}" "${DETAILS}") + ELSE (${_NAME_UPPER}_FOUND) + + IF(FPHSA_CONFIG_MODE) + _FPHSA_HANDLE_FAILURE_CONFIG_MODE() + ELSE(FPHSA_CONFIG_MODE) + IF(NOT VERSION_OK) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE}: ${VERSION_MSG} (found ${${_FIRST_REQUIRED_VAR}})") + ELSE(NOT VERSION_OK) + _FPHSA_FAILURE_MESSAGE("${FPHSA_FAIL_MESSAGE} (missing: ${MISSING_VARS}) ${VERSION_MSG}") + ENDIF(NOT VERSION_OK) + ENDIF(FPHSA_CONFIG_MODE) + + ENDIF (${_NAME_UPPER}_FOUND) + + SET(${_NAME_UPPER}_FOUND ${${_NAME_UPPER}_FOUND} PARENT_SCOPE) + +ENDFUNCTION(FIND_PACKAGE_HANDLE_STANDARD_ARGS _FIRST_ARG) diff --git a/CMakeModules/FindPythonInterp.cmake b/CMakeModules/FindPythonInterp.cmake new file mode 100644 index 0000000000..b2261f1466 --- /dev/null +++ b/CMakeModules/FindPythonInterp.cmake @@ -0,0 +1,175 @@ +# - Find python interpreter +# This module finds if Python interpreter is installed and determines where the +# executables are. This code sets the following variables: +# +# PYTHONINTERP_FOUND - Was the Python executable found +# PYTHON_EXECUTABLE - path to the Python interpreter +# +# PYTHON_VERSION_STRING - Python version found e.g. 2.5.2 +# PYTHON_VERSION_MAJOR - Python major version found e.g. 2 +# PYTHON_VERSION_MINOR - Python minor version found e.g. 5 +# PYTHON_VERSION_PATCH - Python patch version found e.g. 2 +# +# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of +# version numbers that should be taken into account when searching for Python. +# You need to set this variable before calling find_package(PythonInterp). +# +# You can point to a preferred python install to use by setting the following +# to the point at the root directory of the python install: +# +# PYTHON_ROOT_DIR - The root directory of the python install +#============================================================================= +# Copyright 2005-2010 Kitware, Inc. +# Copyright 2011 Bjoern Ricks +# Copyright 2012 Rolf Eike Beer +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +unset(_Python_NAMES) + +set(_PYTHON1_VERSIONS 1.6 1.5) +set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) + +if(PythonInterp_FIND_VERSION) + if(PythonInterp_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$") + string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonInterp_FIND_VERSION}") + string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}") + list(APPEND _Python_NAMES python${_PYTHON_FIND_MAJ_MIN} python${_PYTHON_FIND_MAJ}) + unset(_PYTHON_FIND_OTHER_VERSIONS) + if(NOT PythonInterp_FIND_VERSION_EXACT) + foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS}) + if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) + list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) + endif() + endforeach() + endif() + unset(_PYTHON_FIND_MAJ_MIN) + unset(_PYTHON_FIND_MAJ) + else() + list(APPEND _Python_NAMES python${PythonInterp_FIND_VERSION}) + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonInterp_FIND_VERSION}_VERSIONS}) + endif() +else() + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) +endif() + +list(APPEND _Python_NAMES python) + +# Search for the preferred executable first +if( ${PYTHON_ROOT_DIR} ) + # Search for any of the executable names solely in the directory we've + # been pointed to. Failure to find the python executable here is a fatal + # fail. + find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES} + PATHS ${PYTHON_ROOT_DIR} + NO_DEFAULT_PATH ) +else() + # If there is no specific path given, look for python in the path + find_program(PYTHON_EXECUTABLE NAMES ${_Python_NAMES}) +endif() + +# Set up the versions we know about, in the order we will search. Always add +# the user supplied additional versions to the front. +set(_Python_VERSIONS + ${Python_ADDITIONAL_VERSIONS} + ${_PYTHON_FIND_OTHER_VERSIONS} + ) + +unset(_PYTHON_FIND_OTHER_VERSIONS) +unset(_PYTHON1_VERSIONS) +unset(_PYTHON2_VERSIONS) +unset(_PYTHON3_VERSIONS) + +# Search for newest python version if python executable isn't found +if(NOT PYTHON_EXECUTABLE) + + # If using the MINGW compiler, we mustn't find the standard python + # distribution because of multiple C-Runtime errors. We must instead + # use the Python-a-mingw-us distribution + if(MINGW) + list( APPEND _Python_PPATHS ${PYTHON_ROOT_DIR} ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.9" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.8" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.7" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.6" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.5" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.4" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.3" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.2" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.1" ) + list( APPEND _Python_PPATHS "C:/python/${_CURRENT_VERSION}.0" ) + else() + list( APPEND _Python_PPATHS [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath] ) + endif() + + foreach(_CURRENT_VERSION ${_Python_VERSIONS}) + set(_Python_NAMES python${_CURRENT_VERSION}) + if(WIN32) + list(APPEND _Python_NAMES python) + endif() + find_program(PYTHON_EXECUTABLE + NAMES ${_Python_NAMES} + PATHS ${_Python_PPATHS} + ) + endforeach() +endif() + +# determine python version string +if(PYTHON_EXECUTABLE) + execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c + "import sys; sys.stdout.write(';'.join([str(x) for x in sys.version_info[:3]]))" + OUTPUT_VARIABLE _VERSION + RESULT_VARIABLE _PYTHON_VERSION_RESULT + ERROR_QUIET) + if(NOT _PYTHON_VERSION_RESULT) + string(REPLACE ";" "." PYTHON_VERSION_STRING "${_VERSION}") + list(GET _VERSION 0 PYTHON_VERSION_MAJOR) + list(GET _VERSION 1 PYTHON_VERSION_MINOR) + list(GET _VERSION 2 PYTHON_VERSION_PATCH) + if(PYTHON_VERSION_PATCH EQUAL 0) + # it's called "Python 2.7", not "2.7.0" + string(REGEX REPLACE "\\.0$" "" PYTHON_VERSION_STRING "${PYTHON_VERSION_STRING}") + endif() + else() + # sys.version predates sys.version_info, so use that + execute_process(COMMAND "${PYTHON_EXECUTABLE}" -c "import sys; sys.stdout.write(sys.version)" + OUTPUT_VARIABLE _VERSION + RESULT_VARIABLE _PYTHON_VERSION_RESULT + ERROR_QUIET) + if(NOT _PYTHON_VERSION_RESULT) + string(REGEX REPLACE " .*" "" PYTHON_VERSION_STRING "${_VERSION}") + string(REGEX REPLACE "^([0-9]+)\\.[0-9]+.*" "\\1" PYTHON_VERSION_MAJOR "${PYTHON_VERSION_STRING}") + string(REGEX REPLACE "^[0-9]+\\.([0-9])+.*" "\\1" PYTHON_VERSION_MINOR "${PYTHON_VERSION_STRING}") + if(PYTHON_VERSION_STRING MATCHES "^[0-9]+\\.[0-9]+\\.[0-9]+.*") + string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" PYTHON_VERSION_PATCH "${PYTHON_VERSION_STRING}") + else() + set(PYTHON_VERSION_PATCH "0") + endif() + else() + # sys.version was first documented for Python 1.5, so assume + # this is older. + set(PYTHON_VERSION_STRING "1.4") + set(PYTHON_VERSION_MAJOR "1") + set(PYTHON_VERSION_MAJOR "4") + set(PYTHON_VERSION_MAJOR "0") + endif() + endif() + unset(_PYTHON_VERSION_RESULT) + unset(_VERSION) +endif() + +# handle the QUIETLY and REQUIRED arguments and set PYTHONINTERP_FOUND to TRUE if +# all listed variables are TRUE +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonInterp REQUIRED_VARS PYTHON_EXECUTABLE VERSION_VAR PYTHON_VERSION_STRING) + +mark_as_advanced(PYTHON_EXECUTABLE) diff --git a/CMakeModules/FindPythonLibs.cmake b/CMakeModules/FindPythonLibs.cmake new file mode 100644 index 0000000000..e2f73d8ea4 --- /dev/null +++ b/CMakeModules/FindPythonLibs.cmake @@ -0,0 +1,338 @@ +# - Find python libraries +# This module finds if Python is installed and determines where the +# include files and libraries are. It also determines what the name of +# the library is. This code sets the following variables: +# +# PYTHONLIBS_FOUND - have the Python libs been found +# PYTHON_LIBRARIES - path to the python library +# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated) +# PYTHON_INCLUDE_DIRS - path to where Python.h is found +# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated) +# PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8) +# +# The Python_ADDITIONAL_VERSIONS variable can be used to specify a list of +# version numbers that should be taken into account when searching for Python. +# You need to set this variable before calling find_package(PythonLibs). +# +# You can point to a preferred python install to use by setting the following +# to the point at the root directory of the python install: +# +# PYTHON_ROOT_DIR - The root directory of the python install +# +# If you'd like to specify the installation of Python to use, you should modify +# the following cache variables: +# PYTHON_LIBRARY - path to the python library +# PYTHON_INCLUDE_DIR - path to where Python.h is found + +#============================================================================= +# Copyright 2001-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +include(${CMAKE_CURRENT_LIST_DIR}/CMakeFindFrameworks.cmake) +# Search for the python framework on Apple. +CMAKE_FIND_FRAMEWORKS(Python) + +set(_PYTHON1_VERSIONS 1.6 1.5) +set(_PYTHON2_VERSIONS 2.7 2.6 2.5 2.4 2.3 2.2 2.1 2.0) +set(_PYTHON3_VERSIONS 3.3 3.2 3.1 3.0) + +if(PythonLibs_FIND_VERSION) + if(PythonLibs_FIND_VERSION MATCHES "^[0-9]+\\.[0-9]+(\\.[0-9]+.*)?$") + string(REGEX REPLACE "^([0-9]+\\.[0-9]+).*" "\\1" _PYTHON_FIND_MAJ_MIN "${PythonLibs_FIND_VERSION}") + string(REGEX REPLACE "^([0-9]+).*" "\\1" _PYTHON_FIND_MAJ "${_PYTHON_FIND_MAJ_MIN}") + unset(_PYTHON_FIND_OTHER_VERSIONS) + if(PythonLibs_FIND_VERSION_EXACT) + if(_PYTHON_FIND_MAJ_MIN STREQUAL PythonLibs_FIND_VERSION) + set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}") + else() + set(_PYTHON_FIND_OTHER_VERSIONS "${PythonLibs_FIND_VERSION}" "${_PYTHON_FIND_MAJ_MIN}") + endif() + else() + foreach(_PYTHON_V ${_PYTHON${_PYTHON_FIND_MAJ}_VERSIONS}) + if(NOT _PYTHON_V VERSION_LESS _PYTHON_FIND_MAJ_MIN) + list(APPEND _PYTHON_FIND_OTHER_VERSIONS ${_PYTHON_V}) + endif() + endforeach() + endif() + unset(_PYTHON_FIND_MAJ_MIN) + unset(_PYTHON_FIND_MAJ) + else() + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON${PythonLibs_FIND_VERSION}_VERSIONS}) + endif() +else() + set(_PYTHON_FIND_OTHER_VERSIONS ${_PYTHON3_VERSIONS} ${_PYTHON2_VERSIONS} ${_PYTHON1_VERSIONS}) +endif() + +# Set up the versions we know about, in the order we will search. Always add +# the user supplied additional versions to the front. +set(_Python_VERSIONS + ${Python_ADDITIONAL_VERSIONS} + ${_PYTHON_FIND_OTHER_VERSIONS} + ) + +unset(_PYTHON_FIND_OTHER_VERSIONS) +unset(_PYTHON1_VERSIONS) +unset(_PYTHON2_VERSIONS) +unset(_PYTHON3_VERSIONS) + +foreach(_CURRENT_VERSION ${_Python_VERSIONS}) + string(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION}) + if(WIN32) + if(MINGW) + find_library(PYTHON_DEBUG_LIBRARY + NAMES python{$_CURRENT_VERSION}_d + PATHS + "${PYTHON_ROOT_DIR}" + "C:/python/${_CURRENT_VERSION}.9" + "C:/python/${_CURRENT_VERSION}.8" + "C:/python/${_CURRENT_VERSION}.7" + "C:/python/${_CURRENT_VERSION}.6" + "C:/python/${_CURRENT_VERSION}.5" + "C:/python/${_CURRENT_VERSION}.4" + "C:/python/${_CURRENT_VERSION}.3" + "C:/python/${_CURRENT_VERSION}.2" + "C:/python/${_CURRENT_VERSION}.1" + "C:/python/${_CURRENT_VERSION}.0" + NO_SYSTEM_ENVIRONMENT_PATH + ) + else() + find_library(PYTHON_DEBUG_LIBRARY + NAMES python${_CURRENT_VERSION_NO_DOTS}_d python + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + ) + endif() + endif() + + if(MINGW) + find_library(PYTHON_LIBRARY + NAMES python${_CURRENT_VERSION} + PATHS + "${PYTHON_ROOT_DIR}" + "C:/python/${_CURRENT_VERSION}.9" + "C:/python/${_CURRENT_VERSION}.8" + "C:/python/${_CURRENT_VERSION}.7" + "C:/python/${_CURRENT_VERSION}.6" + "C:/python/${_CURRENT_VERSION}.5" + "C:/python/${_CURRENT_VERSION}.4" + "C:/python/${_CURRENT_VERSION}.3" + "C:/python/${_CURRENT_VERSION}.2" + "C:/python/${_CURRENT_VERSION}.1" + "C:/python/${_CURRENT_VERSION}.0" + NO_SYSTEM_ENVIRONMENT_PATH + ) + else() + find_library(PYTHON_LIBRARY + NAMES + python${_CURRENT_VERSION_NO_DOTS} + python${_CURRENT_VERSION}mu + python${_CURRENT_VERSION}m + python${_CURRENT_VERSION}u + python${_CURRENT_VERSION} + PATHS + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs + # Avoid finding the .dll in the PATH. We want the .lib. + NO_SYSTEM_ENVIRONMENT_PATH + ) + endif() + + # Look for the static library in the Python config directory + find_library(PYTHON_LIBRARY + NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION} + # Avoid finding the .dll in the PATH. We want the .lib. + NO_SYSTEM_ENVIRONMENT_PATH + # This is where the static library is usually located + PATH_SUFFIXES python${_CURRENT_VERSION}/config + ) + + + # For backward compatibility, honour value of PYTHON_INCLUDE_PATH, if + # PYTHON_INCLUDE_DIR is not set. + if(DEFINED PYTHON_INCLUDE_PATH AND NOT DEFINED PYTHON_INCLUDE_DIR) + set(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_PATH}" CACHE PATH + "Path to where Python.h is found" FORCE) + endif() + + set(PYTHON_FRAMEWORK_INCLUDES) + if(Python_FRAMEWORKS AND NOT PYTHON_INCLUDE_DIR) + foreach(dir ${Python_FRAMEWORKS}) + set(PYTHON_FRAMEWORK_INCLUDES ${PYTHON_FRAMEWORK_INCLUDES} + ${dir}/Versions/${_CURRENT_VERSION}/include/python${_CURRENT_VERSION}) + endforeach() + endif() + + if(MINGW) + find_path(PYTHON_INCLUDE_DIR + NAMES Python.h + PATHS + "${PYTHON_ROOT_DIR}/include" + "C:/python/${_CURRENT_VERSION}.9/include" + "C:/python/${_CURRENT_VERSION}.8/include" + "C:/python/${_CURRENT_VERSION}.7/include" + "C:/python/${_CURRENT_VERSION}.6/include" + "C:/python/${_CURRENT_VERSION}.5/include" + "C:/python/${_CURRENT_VERSION}.4/include" + "C:/python/${_CURRENT_VERSION}.3/include" + "C:/python/${_CURRENT_VERSION}.2/include" + "C:/python/${_CURRENT_VERSION}.1/include" + "C:/python/${_CURRENT_VERSION}.0/include" + ) + else() + find_path(PYTHON_INCLUDE_DIR + NAMES Python.h + PATHS + ${PYTHON_FRAMEWORK_INCLUDES} + [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include + PATH_SUFFIXES + python${_CURRENT_VERSION}mu + python${_CURRENT_VERSION}m + python${_CURRENT_VERSION}u + python${_CURRENT_VERSION} + ) + endif() + + # For backward compatibility, set PYTHON_INCLUDE_PATH. + set(PYTHON_INCLUDE_PATH "${PYTHON_INCLUDE_DIR}") + + if(PYTHON_INCLUDE_DIR AND EXISTS "${PYTHON_INCLUDE_DIR}/patchlevel.h") + file(STRINGS "${PYTHON_INCLUDE_DIR}/patchlevel.h" python_version_str + REGEX "^#define[ \t]+PY_VERSION[ \t]+\"[^\"]+\"") + string(REGEX REPLACE "^#define[ \t]+PY_VERSION[ \t]+\"([^\"]+)\".*" "\\1" + PYTHONLIBS_VERSION_STRING "${python_version_str}") + unset(python_version_str) + endif() + + if(PYTHON_LIBRARY AND PYTHON_INCLUDE_DIR) + break() + endif() +endforeach() + +mark_as_advanced( + PYTHON_DEBUG_LIBRARY + PYTHON_LIBRARY + PYTHON_INCLUDE_DIR +) + +# We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the +# cache entries because they are meant to specify the location of a single +# library. We now set the variables listed by the documentation for this +# module. +set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}") +set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}") + +# These variables have been historically named in this module different from +# what SELECT_LIBRARY_CONFIGURATIONS() expects. +set(PYTHON_LIBRARY_DEBUG "${PYTHON_DEBUG_LIBRARY}") +set(PYTHON_LIBRARY_RELEASE "${PYTHON_LIBRARY}") +include(${CMAKE_CURRENT_LIST_DIR}/SelectLibraryConfigurations.cmake) +SELECT_LIBRARY_CONFIGURATIONS(PYTHON) +# SELECT_LIBRARY_CONFIGURATIONS() sets ${PREFIX}_FOUND if it has a library. +# Unset this, this prefix doesn't match the module prefix, they are different +# for historical reasons. +unset(PYTHON_FOUND) + +include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(PythonLibs + REQUIRED_VARS PYTHON_LIBRARIES PYTHON_INCLUDE_DIRS + VERSION_VAR PYTHONLIBS_VERSION_STRING) + +# PYTHON_ADD_MODULE( src1 src2 ... srcN) is used to build modules for python. +# PYTHON_WRITE_MODULES_HEADER() writes a header file you can include +# in your sources to initialize the static python modules +function(PYTHON_ADD_MODULE _NAME ) + get_property(_TARGET_SUPPORTS_SHARED_LIBS + GLOBAL PROPERTY TARGET_SUPPORTS_SHARED_LIBS) + option(PYTHON_ENABLE_MODULE_${_NAME} "Add module ${_NAME}" TRUE) + option(PYTHON_MODULE_${_NAME}_BUILD_SHARED + "Add module ${_NAME} shared" ${_TARGET_SUPPORTS_SHARED_LIBS}) + + # Mark these options as advanced + mark_as_advanced(PYTHON_ENABLE_MODULE_${_NAME} + PYTHON_MODULE_${_NAME}_BUILD_SHARED) + + if(PYTHON_ENABLE_MODULE_${_NAME}) + if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + set(PY_MODULE_TYPE MODULE) + else() + set(PY_MODULE_TYPE STATIC) + set_property(GLOBAL APPEND PROPERTY PY_STATIC_MODULES_LIST ${_NAME}) + endif() + + set_property(GLOBAL APPEND PROPERTY PY_MODULES_LIST ${_NAME}) + add_library(${_NAME} ${PY_MODULE_TYPE} ${ARGN}) +# target_link_libraries(${_NAME} ${PYTHON_LIBRARIES}) + + if(PYTHON_MODULE_${_NAME}_BUILD_SHARED) + set_target_properties(${_NAME} PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}") + if(WIN32 AND NOT CYGWIN) + set_target_properties(${_NAME} PROPERTIES SUFFIX ".pyd") + endif() + endif() + + endif() +endfunction() + +function(PYTHON_WRITE_MODULES_HEADER _filename) + + get_property(PY_STATIC_MODULES_LIST GLOBAL PROPERTY PY_STATIC_MODULES_LIST) + + get_filename_component(_name "${_filename}" NAME) + string(REPLACE "." "_" _name "${_name}") + string(TOUPPER ${_name} _nameUpper) + set(_filename ${CMAKE_CURRENT_BINARY_DIR}/${_filename}) + + set(_filenameTmp "${_filename}.in") + file(WRITE ${_filenameTmp} "/*Created by cmake, do not edit, changes will be lost*/\n") + file(APPEND ${_filenameTmp} +"#ifndef ${_nameUpper} +#define ${_nameUpper} + +#include + +#ifdef __cplusplus +extern \"C\" { +#endif /* __cplusplus */ + +") + + foreach(_currentModule ${PY_STATIC_MODULES_LIST}) + file(APPEND ${_filenameTmp} "extern void init${PYTHON_MODULE_PREFIX}${_currentModule}(void);\n\n") + endforeach() + + file(APPEND ${_filenameTmp} +"#ifdef __cplusplus +} +#endif /* __cplusplus */ + +") + + + foreach(_currentModule ${PY_STATIC_MODULES_LIST}) + file(APPEND ${_filenameTmp} "int ${_name}_${_currentModule}(void) \n{\n static char name[]=\"${PYTHON_MODULE_PREFIX}${_currentModule}\"; return PyImport_AppendInittab(name, init${PYTHON_MODULE_PREFIX}${_currentModule});\n}\n\n") + endforeach() + + file(APPEND ${_filenameTmp} "void ${_name}_LoadAllPythonModules(void)\n{\n") + foreach(_currentModule ${PY_STATIC_MODULES_LIST}) + file(APPEND ${_filenameTmp} " ${_name}_${_currentModule}();\n") + endforeach() + file(APPEND ${_filenameTmp} "}\n\n") + file(APPEND ${_filenameTmp} "#ifndef EXCLUDE_LOAD_ALL_FUNCTION\nvoid CMakeLoadAllPythonModules(void)\n{\n ${_name}_LoadAllPythonModules();\n}\n#endif\n\n#endif\n") + +# with configure_file() cmake complains that you may not use a file created using file(WRITE) as input file for configure_file() + execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different "${_filenameTmp}" "${_filename}" OUTPUT_QUIET ERROR_QUIET) + +endfunction() diff --git a/CMakeModules/PerformFeatureChecks.cmake b/CMakeModules/PerformFeatureChecks.cmake index 3dcae68b30..e1cc304ab6 100644 --- a/CMakeModules/PerformFeatureChecks.cmake +++ b/CMakeModules/PerformFeatureChecks.cmake @@ -56,6 +56,18 @@ macro(perform_feature_checks) # mean won't fail somewhere down the line. check_include_file("iso646.h" HAVE_ISO646_H) + # The STDINT header file test is required because MinGW under Windows + # doesn't define HAVE_STDINT_H even though it does have it. + # + # We need to add it to the global compiler definitions as config.h is not + # included in pyport.h which is where the problem ocurrs without this + # fix. + check_include_file("stdint.h" HAVE_STDINT_H) + + if( HAVE_STDINT_H ) + add_definitions( -DHAVE_STDINT_H ) + endif() + # no place is this used, and "HAVE_STRINGS_H", if present in config.h then # conflicts with /usr/include/python2.6/Python.h. Please rename the macro if # re-introduce this. diff --git a/CMakeModules/SelectLibraryConfigurations.cmake b/CMakeModules/SelectLibraryConfigurations.cmake new file mode 100644 index 0000000000..5bca064f5a --- /dev/null +++ b/CMakeModules/SelectLibraryConfigurations.cmake @@ -0,0 +1,87 @@ +# select_library_configurations( basename ) +# +# This macro takes a library base name as an argument, and will choose good +# values for basename_LIBRARY, basename_LIBRARIES, basename_LIBRARY_DEBUG, and +# basename_LIBRARY_RELEASE depending on what has been found and set. If only +# basename_LIBRARY_RELEASE is defined, basename_LIBRARY, basename_LIBRARY_DEBUG, +# and basename_LIBRARY_RELEASE will be set to the release value. If only +# basename_LIBRARY_DEBUG is defined, then basename_LIBRARY, +# basename_LIBRARY_DEBUG and basename_LIBRARY_RELEASE will take the debug value. +# +# If the generator supports configuration types, then basename_LIBRARY and +# basename_LIBRARIES will be set with debug and optimized flags specifying the +# library to be used for the given configuration. If no build type has been set +# or the generator in use does not support configuration types, then +# basename_LIBRARY and basename_LIBRARIES will take only the release values. + +#============================================================================= +# Copyright 2009 Will Dicharry +# Copyright 2005-2009 Kitware, Inc. +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# This macro was adapted from the FindQt4 CMake module and is maintained by Will +# Dicharry . + +# Utility macro to check if one variable exists while another doesn't, and set +# one that doesn't exist to the one that exists. +macro( _set_library_name basename GOOD BAD ) + if( ${basename}_LIBRARY_${GOOD} AND NOT ${basename}_LIBRARY_${BAD} ) + set( ${basename}_LIBRARY_${BAD} ${${basename}_LIBRARY_${GOOD}} ) + set( ${basename}_LIBRARY ${${basename}_LIBRARY_${GOOD}} ) + set( ${basename}_LIBRARIES ${${basename}_LIBRARY_${GOOD}} ) + endif() +endmacro() + +macro( select_library_configurations basename ) + # if only the release version was found, set the debug to be the release + # version. + _set_library_name( ${basename} RELEASE DEBUG ) + # if only the debug version was found, set the release value to be the + # debug value. + _set_library_name( ${basename} DEBUG RELEASE ) + + # Set a default case, which will come into effect if + # -no build type is set and the generator only supports one build type + # at a time (i.e. CMAKE_CONFIGURATION_TYPES is false) + # -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are the same + # -${basename}_LIBRARY_DEBUG and ${basename}_LIBRARY_RELEASE are both empty + set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) + set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} ) + + if( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND + NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE ) + # if the generator supports configuration types or CMAKE_BUILD_TYPE + # is set, then set optimized and debug options. + if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) + set( ${basename}_LIBRARY "" ) + foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) + list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) + endforeach() + foreach( _libname IN LISTS ${basename}_LIBRARY_DEBUG ) + list( APPEND ${basename}_LIBRARY debug "${_libname}" ) + endforeach() + set( ${basename}_LIBRARIES "${${basename}_LIBRARY}" ) + endif() + endif() + + set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH + "The ${basename} library" ) + + if( ${basename}_LIBRARY ) + set( ${basename}_FOUND TRUE ) + endif() + + mark_as_advanced( ${basename}_LIBRARY + ${basename}_LIBRARY_RELEASE + ${basename}_LIBRARY_DEBUG + ) +endmacro() From 9855104120f5ab8a3fd58d08ba22e3b3d01f2dd5 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 5 Aug 2013 15:43:15 +0200 Subject: [PATCH 07/42] Pcbnew: footprint wizard dialogs: minor fixes, and fixes a not working parmeters dialog under Windows, due to an incorrect Printf format. --- .../dialogs/dialog_footprint_wizard_list.cpp | 7 +- .../dialogs/dialog_footprint_wizard_list.fbp | 100 ++++-------------- pcbnew/dialogs/dialog_footprint_wizard_list.h | 4 +- .../dialog_footprint_wizard_list_base.cpp | 17 ++- .../dialog_footprint_wizard_list_base.h | 7 +- pcbnew/dialogs/dialog_set_grid_base.cpp | 6 +- pcbnew/dialogs/dialog_set_grid_base.fbp | 4 +- pcbnew/dialogs/dialog_set_grid_base.h | 2 +- pcbnew/footprint_wizard.cpp | 35 +++--- pcbnew/footprint_wizard_frame.cpp | 37 +++---- pcbnew/footprint_wizard_frame.h | 6 +- pcbnew/modedit.cpp | 17 ++- 12 files changed, 98 insertions(+), 144 deletions(-) diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.cpp b/pcbnew/dialogs/dialog_footprint_wizard_list.cpp index d6ccf56ba8..e1e31d67e0 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.cpp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.cpp @@ -68,5 +68,10 @@ FOOTPRINT_WIZARD* DIALOG_FOOTPRINT_WIZARD_LIST::GetWizard() void DIALOG_FOOTPRINT_WIZARD_LIST::OnOpenButtonClick( wxCommandEvent& event ) { - Close(true); + EndModal( wxID_OK ); +} + +void DIALOG_FOOTPRINT_WIZARD_LIST::OnCancelClick( wxCommandEvent& event ) +{ + EndModal( wxID_CANCEL ); } diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.fbp b/pcbnew/dialogs/dialog_footprint_wizard_list.fbp index 2b0e8f9996..a90927a424 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.fbp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.fbp @@ -236,90 +236,28 @@ 5 - wxALIGN_CENTER|wxALL + wxEXPAND 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Open - - 0 - - - 0 + + 0 + 1 + 0 + 0 + 0 + 1 + 0 + 0 - 1 - m_btOpen - 1 - - + m_sdbSizer protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOpenButtonClick - - - - - - - - - - - - - - - - - - - - - - - + + OnCancelClick + + + + OnOpenButtonClick + + diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list.h b/pcbnew/dialogs/dialog_footprint_wizard_list.h index 956df0c9d6..181bafd819 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list.h +++ b/pcbnew/dialogs/dialog_footprint_wizard_list.h @@ -16,13 +16,13 @@ private: public: DIALOG_FOOTPRINT_WIZARD_LIST(wxWindow * parent ); - + FOOTPRINT_WIZARD* GetWizard(); private: - void OnCellWizardClick( wxGridEvent& event ); void OnOpenButtonClick( wxCommandEvent& event ); + void OnCancelClick( wxCommandEvent& event ); }; #endif // _DIALOG_FOOTPRINT_WIZARD_LIST_H_ diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp b/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp index f0144b1e17..a669fab58b 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp +++ b/pcbnew/dialogs/dialog_footprint_wizard_list_base.cpp @@ -51,9 +51,14 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow* bSizerMain->Add( m_footprintWizardsGrid, 1, wxALL|wxEXPAND, 5 ); - m_btOpen = new wxButton( this, wxID_ANY, _("Open"), wxDefaultPosition, wxDefaultSize, 0 ); - m_btOpen->SetDefault(); - bSizerMain->Add( m_btOpen, 0, wxALIGN_CENTER|wxALL, 5 ); + m_sdbSizer = new wxStdDialogButtonSizer(); + m_sdbSizerOK = new wxButton( this, wxID_OK ); + m_sdbSizer->AddButton( m_sdbSizerOK ); + m_sdbSizerCancel = new wxButton( this, wxID_CANCEL ); + m_sdbSizer->AddButton( m_sdbSizerCancel ); + m_sdbSizer->Realize(); + + bSizerMain->Add( m_sdbSizer, 0, wxEXPAND, 5 ); this->SetSizer( bSizerMain ); @@ -63,13 +68,15 @@ DIALOG_FOOTPRINT_WIZARD_LIST_BASE::DIALOG_FOOTPRINT_WIZARD_LIST_BASE( wxWindow* // Connect Events m_footprintWizardsGrid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCellWizardClick ), NULL, this ); - m_btOpen->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this ); + m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this ); } DIALOG_FOOTPRINT_WIZARD_LIST_BASE::~DIALOG_FOOTPRINT_WIZARD_LIST_BASE() { // Disconnect Events m_footprintWizardsGrid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCellWizardClick ), NULL, this ); - m_btOpen->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this ); + m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnCancelClick ), NULL, this ); + m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_WIZARD_LIST_BASE::OnOpenButtonClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_footprint_wizard_list_base.h b/pcbnew/dialogs/dialog_footprint_wizard_list_base.h index 63990720a6..ed7a8564dd 100644 --- a/pcbnew/dialogs/dialog_footprint_wizard_list_base.h +++ b/pcbnew/dialogs/dialog_footprint_wizard_list_base.h @@ -20,8 +20,8 @@ class DIALOG_SHIM; #include #include #include -#include #include +#include #include /////////////////////////////////////////////////////////////////////////// @@ -36,10 +36,13 @@ class DIALOG_FOOTPRINT_WIZARD_LIST_BASE : public DIALOG_SHIM protected: wxGrid* m_footprintWizardsGrid; - wxButton* m_btOpen; + wxStdDialogButtonSizer* m_sdbSizer; + wxButton* m_sdbSizerOK; + wxButton* m_sdbSizerCancel; // Virtual event handlers, overide them in your derived class virtual void OnCellWizardClick( wxGridEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOpenButtonClick( wxCommandEvent& event ) { event.Skip(); } diff --git a/pcbnew/dialogs/dialog_set_grid_base.cpp b/pcbnew/dialogs/dialog_set_grid_base.cpp index d28f7b7d8c..3530f39de9 100644 --- a/pcbnew/dialogs/dialog_set_grid_base.cpp +++ b/pcbnew/dialogs/dialog_set_grid_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -114,14 +114,14 @@ DIALOG_SET_GRID_BASE::DIALOG_SET_GRID_BASE( wxWindow* parent, wxWindowID id, con m_staticTextGrid1->Wrap( -1 ); fgSizer3->Add( m_staticTextGrid1, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxLEFT|wxTOP, 5 ); - m_comboBoxGrid1 = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_comboBoxGrid1 = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); fgSizer3->Add( m_comboBoxGrid1, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); m_staticTextGrid2 = new wxStaticText( this, wxID_ANY, _("Grid 2:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextGrid2->Wrap( -1 ); fgSizer3->Add( m_staticTextGrid2, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxBOTTOM|wxLEFT|wxTOP, 5 ); - m_comboBoxGrid2 = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 ); + m_comboBoxGrid2 = new wxComboBox( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY ); fgSizer3->Add( m_comboBoxGrid2, 1, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_set_grid_base.fbp b/pcbnew/dialogs/dialog_set_grid_base.fbp index e03ad55b27..ac115f7829 100644 --- a/pcbnew/dialogs/dialog_set_grid_base.fbp +++ b/pcbnew/dialogs/dialog_set_grid_base.fbp @@ -1375,7 +1375,7 @@ -1 1 - + wxCB_READONLY 0 @@ -1549,7 +1549,7 @@ -1 1 - + wxCB_READONLY 0 diff --git a/pcbnew/dialogs/dialog_set_grid_base.h b/pcbnew/dialogs/dialog_set_grid_base.h index 3f8fbd7aaa..9bb3e86b55 100644 --- a/pcbnew/dialogs/dialog_set_grid_base.h +++ b/pcbnew/dialogs/dialog_set_grid_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 30 2013) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/pcbnew/footprint_wizard.cpp b/pcbnew/footprint_wizard.cpp index 75560423a0..28377da033 100644 --- a/pcbnew/footprint_wizard.cpp +++ b/pcbnew/footprint_wizard.cpp @@ -34,6 +34,7 @@ void FOOTPRINT_WIZARD_FRAME::Process_Special_Functions( wxCommandEvent& event ) { case ID_FOOTPRINT_WIZARD_NEXT: m_PageList->SetSelection( m_PageList->GetSelection() + 1, true ); + ClickOnPageList( event ); break; case ID_FOOTPRINT_WIZARD_PREVIOUS: @@ -43,6 +44,7 @@ void FOOTPRINT_WIZARD_FRAME::Process_Special_Functions( wxCommandEvent& event ) page = 0; m_PageList->SetSelection( page, true ); + ClickOnPageList( event ); break; default: @@ -102,19 +104,20 @@ void FOOTPRINT_WIZARD_FRAME::ReloadFootprint() SetCurItem( NULL ); // Delete the current footprint GetBoard()->m_Modules.DeleteAll(); - MODULE* m = footprintWizard->GetModule(); - if( m ) + // Creates the module + MODULE* module = footprintWizard->GetModule(); + + if( module ) { - /* Here we should make a copy of the object before adding to board*/ - m->SetParent( (EDA_ITEM*) GetBoard() ); - GetBoard()->m_Modules.Append( m ); - wxPoint p( 0, 0 ); - m->SetPosition( p ); + // Add the object to board + module->SetParent( (EDA_ITEM*) GetBoard() ); + GetBoard()->m_Modules.Append( module ); + module->SetPosition( wxPoint( 0, 0 ) ); } else { - printf( "footprintWizard->GetModule() returns NULL\n" ); + D(printf( "footprintWizard->GetModule() returns NULL\n" );) } m_canvas->Refresh(); @@ -142,14 +145,12 @@ MODULE* FOOTPRINT_WIZARD_FRAME::GetBuiltFootprint() { FOOTPRINT_WIZARD* footprintWizard = FOOTPRINT_WIZARDS::GetWizard( m_wizardName ); - if( footprintWizard ) + if( footprintWizard && m_exportRequest ) { return footprintWizard->GetModule(); } - else - { - return NULL; - } + + return NULL; } @@ -158,7 +159,8 @@ void FOOTPRINT_WIZARD_FRAME::SelectFootprintWizard() DIALOG_FOOTPRINT_WIZARD_LIST* selectWizard = new DIALOG_FOOTPRINT_WIZARD_LIST( this ); - selectWizard->ShowModal(); + if( selectWizard->ShowModal() != wxID_OK ) + return; FOOTPRINT_WIZARD* footprintWizard = selectWizard->GetWizard(); @@ -225,14 +227,11 @@ void FOOTPRINT_WIZARD_FRAME::ParametersUpdated( wxGridEvent& event ) dValue = dValue / 1000.0; dValue = From_User_Unit( g_UserUnit, dValue ); - - value.Printf( wxT( "%lf" ), dValue ); + value.Printf( wxT( "%f" ), dValue ); } // If our locale is set to use , for decimal point, just change it // to be scripting compatible - - arr.Add( value ); } diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index f5e10d9b50..1804286618 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -127,11 +127,12 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, m_showAxis = true; // true to draw axis. // Give an icon - +#if 1 // Disabled for now, it raises an assert error in wxwidgets - // wxIcon icon; - // icon.CopyFromBitmap( KiBitmap( module_wizard_xpm) ); - // SetIcon( icon ); + wxIcon icon; + icon.CopyFromBitmap( KiBitmap( module_wizard_xpm) ); + SetIcon( icon ); +#endif m_HotkeysZoomAndGridList = g_Module_Viewer_Hokeys_Descr; m_PageList = NULL; @@ -140,6 +141,7 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, m_ParameterGridWindow = NULL; m_Semaphore = semaphore; m_wizardName.Empty(); + m_exportRequest = false; if( m_Semaphore ) SetModalMode( true ); @@ -199,11 +201,11 @@ FOOTPRINT_WIZARD_FRAME::FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, // Columns m_ParameterGrid->AutoSizeColumns(); - m_ParameterGrid->SetColLabelSize( 20 ); m_ParameterGrid->SetColLabelValue( 0, _( "Parameter" ) ); m_ParameterGrid->SetColLabelValue( 1, _( "Value" ) ); m_ParameterGrid->SetColLabelValue( 2, _( "Units" ) ); m_ParameterGrid->SetColLabelAlignment( wxALIGN_LEFT, wxALIGN_CENTRE ); + m_ParameterGrid->AutoSizeColumns(); ReCreatePageList(); @@ -293,14 +295,6 @@ FOOTPRINT_WIZARD_FRAME::~FOOTPRINT_WIZARD_FRAME() * */ void FOOTPRINT_WIZARD_FRAME::OnCloseWindow( wxCloseEvent& Event ) -{ - wxCommandEvent fakeEvent; - - ExportSelectedFootprint( fakeEvent ); -} - - -void FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint( wxCommandEvent& aEvent ) { SaveSettings(); @@ -318,6 +312,13 @@ void FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint( wxCommandEvent& aEvent ) } +void FOOTPRINT_WIZARD_FRAME::ExportSelectedFootprint( wxCommandEvent& aEvent ) +{ + m_exportRequest = true; + Close(); +} + + /* Function OnSashDrag * handles the horizontal separator (sash) drag, updating the pagelist or parameter list */ @@ -450,10 +451,9 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList() m_ParameterGrid->DeleteRows( 0, m_ParameterGrid->GetNumberRows() ); m_ParameterGrid->AppendRows( fpList.size() ); + wxString name, value, units; for( unsigned int i = 0; iAddSeparator(); m_mainToolBar->AddTool( ID_FOOTPRINT_WIZARD_PREVIOUS, wxEmptyString, KiBitmap( lib_previous_xpm ), - _( "Display previous page" ) ); + _( "Select previous editable item" ) ); m_mainToolBar->AddTool( ID_FOOTPRINT_WIZARD_NEXT, wxEmptyString, KiBitmap( lib_next_xpm ), - _( "Display next page" ) ); + _( "Select next editable item" ) ); m_mainToolBar->AddSeparator(); m_mainToolBar->AddTool( ID_FOOTPRINT_WIZARD_SHOW_3D_VIEW, wxEmptyString, diff --git a/pcbnew/footprint_wizard_frame.h b/pcbnew/footprint_wizard_frame.h index d52c07311e..f65ee1d62d 100644 --- a/pcbnew/footprint_wizard_frame.h +++ b/pcbnew/footprint_wizard_frame.h @@ -47,7 +47,6 @@ class FOOTPRINT_EDIT_FRAME; class FOOTPRINT_WIZARD_FRAME : public PCB_BASE_FRAME { private: - wxSashLayoutWindow* m_PageListWindow; // < List of libraries (for selection ) wxListBox* m_PageList; // < The list of pages wxSize m_PageListSize; // < size of the window @@ -55,15 +54,18 @@ private: wxSashLayoutWindow* m_ParameterGridWindow; // < List of components in the selected library wxGrid* m_ParameterGrid; // < The list of parameters - wxSize m_ParameterGridSize; // < size of the window + wxSize m_ParameterGridSize; // < size of the window // Flags wxSemaphore* m_Semaphore; // < != NULL if the frame must emulate a modal dialog wxString m_configPath; // < subpath for configuration + bool m_exportRequest; // < true if the current footprint should be exported + protected: wxString m_wizardName; // < name of the current wizard wxString m_wizardDescription; // < description of the wizard wxString m_wizardStatus; // < current wizard status + public: FOOTPRINT_WIZARD_FRAME( FOOTPRINT_EDIT_FRAME* parent, wxSemaphore* semaphore = NULL, diff --git a/pcbnew/modedit.cpp b/pcbnew/modedit.cpp index c140224549..ca026f9f11 100644 --- a/pcbnew/modedit.cpp +++ b/pcbnew/modedit.cpp @@ -311,11 +311,6 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_MODEDIT_NEW_MODULE_FROM_WIZARD: { - Clear_Pcb( true ); - GetScreen()->ClearUndoRedoList(); - SetCurItem( NULL ); - SetCrossHairPosition( wxPoint( 0, 0 ) ); - wxSemaphore semaphore( 0, 1 ); FOOTPRINT_WIZARD_FRAME *wizard = new FOOTPRINT_WIZARD_FRAME( this, &semaphore, KICAD_DEFAULT_DRAWFRAME_STYLE | wxFRAME_FLOAT_ON_PARENT ); @@ -328,11 +323,17 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) wxMilliSleep( 50 ); } + // Creates the new footprint from python script wizard MODULE* module = wizard->GetBuiltFootprint(); if( module ) // i.e. if create module command not aborted { - // Here we should make a copy of the object before adding to board + Clear_Pcb( true ); + GetScreen()->ClearUndoRedoList(); + SetCurItem( NULL ); + SetCrossHairPosition( wxPoint( 0, 0 ) ); + + // Add the new object to board module->SetParent( (EDA_ITEM*)GetBoard() ); GetBoard()->m_Modules.Append( module ); @@ -342,9 +343,7 @@ void FOOTPRINT_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) GetBoard()->BuildListOfNets(); redraw = true; module->SetPosition( wxPoint( 0, 0 ) ); - - if( GetBoard()->m_Modules ) - GetBoard()->m_Modules->ClearFlags(); + module->ClearFlags(); } wizard->Destroy(); From bf1566884c9165d17a13a6b05f9a3385b12426d5 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 Aug 2013 10:38:50 -0500 Subject: [PATCH 08/42] 1) Remove requirement to define KICAD_TESTING_BRANCH. Instead the KICAD_STABLE_BRANCH must be defined if that is the build type wanted. This only affects a text string anyways, is not particularly important other than telling user from which code branch the source came. 2) Change name of "testing" to "product" in that same description within common/build_version.cpp. "testing" made it sound frightenly unusable. --- CMakeLists.txt | 15 ++------------- common/build_version.cpp | 18 ++++++++---------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0dbf597ebf..21b2f16411 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,10 +35,6 @@ option(KICAD_STABLE_VERSION "set this option to ON to build the stable version of KICAD. mainly used to set version ID (default OFF)" ) -option(KICAD_TESTING_VERSION - "set this option to ON to build the testing version of KICAD. mainly used to set version ID (default OFF)" - ) - option(KICAD_SCRIPTING "set this option ON to build the scripting support inside kicad binaries" ) @@ -62,16 +58,9 @@ option(USE_FP_LIB_TABLE "Use the new footprint library table implementation. (de #Set version option (stable or testing) -if(KICAD_STABLE_VERSION AND KICAD_TESTING_VERSION ) - message(FATAL_ERROR "Only one KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION can be set to ON") -elseif(NOT KICAD_STABLE_VERSION AND NOT KICAD_TESTING_VERSION) - message(FATAL_ERROR "Either KiCad build version option KICAD_TESTING_VERSION or KICAD_STABLE_VERSION must be set to ON") -elseif(KICAD_STABLE_VERSION) +if(KICAD_STABLE_VERSION) add_definitions(-DKICAD_STABLE_VERSION) - message( "Build stable version of KiCad") -else() - add_definitions(-DKICAD_TESTING_VERSION) - message("Build testing (unstable) version of KiCad") + message( "Building stable version of KiCad") endif() # All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they diff --git a/common/build_version.cpp b/common/build_version.cpp index 9ad25196e8..5ab8b54c3c 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -10,15 +10,10 @@ #endif -#if defined KICAD_TESTING_VERSION -# define VERSION_STABILITY "testing" -#elif defined KICAD_STABLE_VERSION +#if defined KICAD_STABLE_VERSION # define VERSION_STABILITY "stable" #else -# define VERSION_STABILITY "unknown" -# warning "unknown version stability" -# warning "please: when running CMAKE, add -DKICAD_TESTING_VERSION=ON" -# warning "or -DKICAD_STABLE_VERSION=ON option" +# define VERSION_STABILITY "product" #endif /** @@ -27,8 +22,11 @@ */ wxString GetBuildVersion() { - static wxString msg; - msg.Printf( wxT("%s-%s"), - wxT( KICAD_BUILD_VERSION ), wxT( VERSION_STABILITY )); + wxString msg = wxString::Format( + wxT( "%s-%s" ), + wxT( KICAD_BUILD_VERSION ), + wxT( VERSION_STABILITY ) + ); + return msg; } From 114d12b060cf9e9b1c65715fdc16c49479975ebf Mon Sep 17 00:00:00 2001 From: Camille Delbegue Date: Mon, 5 Aug 2013 17:53:13 +0200 Subject: [PATCH 09/42] Remove a Clang warning and add a missing dependency to boost in cmake file. --- CMakeLists.txt | 1 + common/gal/stroke_font.cpp | 4 ++++ include/gal/stroke_font.h | 2 +- pcbnew/pcb_painter.cpp | 4 ++++ pcbnew/pcb_painter.h | 2 +- 5 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8962b3c38..3359c1d918 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,6 +403,7 @@ add_subdirectory(tools) add_dependencies( pcbnew boost ) add_dependencies( eeschema boost ) add_dependencies( cvpcb boost ) +add_dependencies( gal boost ) add_dependencies( common boost ) add_dependencies( pcbcommon boost ) add_dependencies( 3d-viewer boost ) diff --git a/common/gal/stroke_font.cpp b/common/gal/stroke_font.cpp index 527b9d5122..242a9f7125 100644 --- a/common/gal/stroke_font.cpp +++ b/common/gal/stroke_font.cpp @@ -29,6 +29,10 @@ using namespace KiGfx; + +const double STROKE_FONT::LINE_HEIGHT_RATIO = 1.6; + + STROKE_FONT::STROKE_FONT( GAL* aGal ) : m_gal( aGal ), m_bold( false ), diff --git a/include/gal/stroke_font.h b/include/gal/stroke_font.h index 7c58730d11..7af3b618cb 100644 --- a/include/gal/stroke_font.h +++ b/include/gal/stroke_font.h @@ -182,7 +182,7 @@ private: */ VECTOR2D computeTextSize( const std::string& aText ) const; - static const double LINE_HEIGHT_RATIO = 1.6; + static const double LINE_HEIGHT_RATIO; }; } // namespace KiGfx diff --git a/pcbnew/pcb_painter.cpp b/pcbnew/pcb_painter.cpp index f86be7a190..7c206cea8c 100644 --- a/pcbnew/pcb_painter.cpp +++ b/pcbnew/pcb_painter.cpp @@ -43,6 +43,10 @@ using namespace KiGfx; + +const double PCB_RENDER_SETTINGS::MAX_FONT_SIZE = 100000000; + + PCB_RENDER_SETTINGS::PCB_RENDER_SETTINGS() { // By default everything should be displayed as filled diff --git a/pcbnew/pcb_painter.h b/pcbnew/pcb_painter.h index 50740889ef..5f0e4fe39b 100644 --- a/pcbnew/pcb_painter.h +++ b/pcbnew/pcb_painter.h @@ -106,7 +106,7 @@ protected: bool m_netNamesOnPads; bool m_netNamesOnTracks; - static const double MAX_FONT_SIZE = 100000000; + static const double MAX_FONT_SIZE; DisplayZonesMode m_displayZoneMode; }; From 125ce485259897c26c73cb9a3e8437b4d165ff6e Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 Aug 2013 15:45:22 -0500 Subject: [PATCH 10/42] add Brian to about dialog, scoot Wayne up, alphabetize the rest --- common/dialog_about/AboutDialog_main.cpp | 175 +++--- common/dialog_about/dialog_about_base.fbp | 728 +++++++++++----------- 2 files changed, 457 insertions(+), 446 deletions(-) diff --git a/common/dialog_about/AboutDialog_main.cpp b/common/dialog_about/AboutDialog_main.cpp index 470e1f5d9a..b3957846c5 100644 --- a/common/dialog_about/AboutDialog_main.cpp +++ b/common/dialog_about/AboutDialog_main.cpp @@ -59,7 +59,7 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) info.SetAppName( wxT( ".: " ) + wxGetApp().GetTitle() + wxT( " :." ) ); /* Copyright information */ - info.SetCopyright( wxT( "(C) 1992-2012 KiCad Developers Team" ) ); + info.SetCopyright( wxT( "(C) 1992-2013 KiCad Developers Team" ) ); /* KiCad build version */ wxString version; @@ -203,98 +203,109 @@ static void InitKiCadAboutNew( AboutAppInfo& info ) * which should be represented by the same icon. */ - /* The developers */ - info.AddDeveloper( new Contributor( wxT( "Jean-Pierre Charras" ), - wxT( "jp.charras@wanadoo.fr" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Jerry Jacobs" ), - wxT( "xor.gate.engineering@gmail.com" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Jonas Diemer" ), wxT( "diemer@gmx.de" ) ) ); - info.AddDeveloper( new Contributor( wxT( "KBool Library" ), - wxT( "http://boolean.klaasholwerda.nl/bool.html" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Lorenzo Marcantonio" ), wxT( "lomarcan@tin.it" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Marco Serantoni" ), - wxT( "marco.serantoni@gmail.com" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Marco Mattila" ), wxT( "marcom99@gmail.com" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Miguel Angel Ajo Pelayo" ), - wxT( "miguelangel@nbee.es" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Rafael Sokolowski" ), - wxT( "rafael.sokolowski@web.de" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Rok Markovic" ), wxT( "rok@kanardia.eu" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Tim Hanson" ), wxT( "sideskate@gmail.com" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ) ) ); - info.AddDeveloper( new Contributor( wxT( "Wayne Stambaugh" ), - wxT( "stambaughw@verizon.net" ) ) ); + // The developers + info.AddDeveloper( + new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Dick Hollenbeck" ), wxT( "dick@softplc.com" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Wayne Stambaugh" ), wxT( "stambaughw@verizon.net" ) ) ); - /* The document writers */ - info.AddDocWriter( new Contributor( wxT( "Jean-Pierre Charras" ), - wxT( "jp.charras@wanadoo.fr" ) ) ); - info.AddDocWriter( new Contributor( wxT( "Igor Plyatov" ), - wxT( "plyatov@gmail.com" ) ) ); - info.AddDocWriter( new Contributor( wxT( "Fabrizio Tappero" ), - wxT( "fabrizio.tappero@gmail.com" ) ) ); + // alphabetically by last name after main 3 above: + info.AddDeveloper( + new Contributor( wxT( "Frank Bennett" ), wxT( "bennett78@lpbroadband.net" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Jonas Diemer" ), wxT( "diemer@gmx.de" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Tim Hanson" ), wxT( "sideskate@gmail.com" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Hauptmech" ), wxT( "hauptmech@gmail.com" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ) ) ); + + /* + info.AddDeveloper( + new Contributor( wxT( "KBool Library" ), wxT( "http://boolean.klaasholwerda.nl/bool.html" ) ) ); + */ + + info.AddDeveloper( + new Contributor( wxT( "Lorenzo Marcantonio" ), wxT( "lomarcan@tin.it" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Rok Markovic" ), wxT( "rok@kanardia.eu" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Marco Mattila" ), wxT( "marcom99@gmail.com" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Miguel Angel Ajo Pelayo" ),wxT( "miguelangel@nbee.es" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Marco Serantoni" ), wxT( "marco.serantoni@gmail.com" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Brian Sidebotham" ), wxT( "brian.sidebotham@gmail.com" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ) ) ); + info.AddDeveloper( + new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ) ) ); + + // The document writers + info.AddDocWriter( + new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ) ) ); + info.AddDocWriter( + new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ) ) ); + info.AddDocWriter( + new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ) ) ); /* The translators * As category the language to which the translation was done is used * and as icon the national flag of the corresponding country. */ - info.AddTranslator( new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ), - wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Jerry Jacobs" ), - wxT( "xor.gate.engineering@gmail.com" ), wxT( "Dutch (NL)" ), - KiBitmapNew( lang_nl_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ), - wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Jean-Pierre Charras" ), - wxT( "jp.charras@wanadoo.fr" ), - wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ), - wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), - wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ), - wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ), - wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ), - wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ), - wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Rafael Sokolowski" ), - wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ), - KiBitmapNew( lang_de_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Kenta Yonekura" ), - wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ), - KiBitmapNew( lang_jp_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ), - wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ), - KiBitmapNew( lang_gr_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Massimo Cioce" ), - wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ), - KiBitmapNew( lang_it_xpm ) ) ); - info.AddTranslator( new Contributor( wxT( "Evgeniy Ivanov" ), - wxT( "evgeniy_p_ivanov@yahoo.ca" ), wxT( "Bulgarian (BG)" ), - KiBitmapNew( lang_bg_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Martin Kratoška" ), wxT( "martin@ok1rr.com" ), wxT( "Czech (CZ)" ), KiBitmapNew( lang_cs_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Jerry Jacobs" ), wxT( "xor.gate.engineering@gmail.com" ),wxT( "Dutch (NL)" ), KiBitmapNew( lang_nl_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Vesa Solonen" ), wxT( "vesa.solonen@hut.fi" ), wxT( "Finnish (FI)" ), KiBitmapNew( lang_fi_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Jean-Pierre Charras" ), wxT( "jp.charras@wanadoo.fr" ), wxT( "French (FR)" ), KiBitmapNew( lang_fr_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Mateusz Skowroński" ), wxT( "skowri@gmail.com" ), wxT( "Polish (PL)" ), KiBitmapNew( lang_pl_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "Portuguese (PT)" ), KiBitmapNew( lang_pt_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Igor Plyatov" ), wxT( "plyatov@gmail.com" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Andrey Fedorushkov" ), wxT( "andrf@mail.ru" ), wxT( "Russian (RU)" ), KiBitmapNew( lang_ru_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Pedro Martin del Valle" ), wxT( "pkicad@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Iñigo Zuluaga" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Spanish (ES)" ), KiBitmapNew( lang_es_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Rafael Sokolowski" ), wxT( "rafael.sokolowski@web.de" ), wxT( "German (DE)" ), KiBitmapNew( lang_de_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Kenta Yonekura" ), wxT( "midpika@hotmail.com" ), wxT( "Japanese (JA)" ), KiBitmapNew( lang_jp_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Manolis Stefanis, Athanasios Vlastos and Milonas Kostas" ), + wxT( "milonas.ko@gmail.com" ), wxT( "Greek (el_GR)" ), KiBitmapNew( lang_gr_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Massimo Cioce" ), wxT( "ciocemax@alice.it" ), wxT( "Italian (IT)" ), KiBitmapNew( lang_it_xpm ) ) ); + info.AddTranslator( + new Contributor( wxT( "Evgeniy Ivanov" ), wxT( "evgeniy_p_ivanov@yahoo.ca" ), wxT( "Bulgarian (BG)" ),KiBitmapNew( lang_bg_xpm ) ) ); // TODO: are these all russian translators, // placed them here now, // or else align them below other language maintainer with mail adress - info.AddTranslator( new Contributor( wxT( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) ); - info.AddTranslator( new Contributor( wxT( "David Briscoe" ), wxEmptyString, wxT( "Others" ) ) ); - info.AddTranslator( new Contributor( wxT( "Dominique Laigle" ), wxEmptyString, wxT( "Others" ) ) ); - info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) ); + info.AddTranslator( new Contributor( wxT( "Remy Halvick" ), wxEmptyString, wxT( "Others" ) ) ); + info.AddTranslator( new Contributor( wxT( "David Briscoe" ), wxEmptyString, wxT( "Others" ) ) ); + info.AddTranslator( new Contributor( wxT( "Dominique Laigle" ), wxEmptyString, wxT( "Others" ) ) ); + info.AddTranslator( new Contributor( wxT( "Paul Burke" ), wxEmptyString, wxT( "Others" ) ) ); - /* Programm credits for icons */ - info.AddArtist( new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ), - wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) ); - info.AddArtist( new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ), - wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) ); - info.AddArtist( new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), - wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) ); - info.AddArtist( new Contributor( wxT( "Christophe Boschat" ), wxT( "nox454@hotmail.fr" ), - wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) ); + // Programm credits for icons + info.AddArtist( + new Contributor( wxT( "Iñigo Zuluagaz" ), wxT( "inigo_zuluaga@yahoo.es" ), wxT( "Icons by" ), KiBitmapNew( edit_module_xpm ) ) ); + info.AddArtist( + new Contributor( wxT( "Fabrizio Tappero" ), wxT( "fabrizio.tappero@gmail.com" ), wxT( "New icons by" ), KiBitmapNew( edit_module_xpm ) ) ); + info.AddArtist( + new Contributor( wxT( "Renie Marquet" ), wxT( "reniemarquet@uol.com.br" ), wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) ); + info.AddArtist( + new Contributor( wxT( "Christophe Boschat" ), wxT( "nox454@hotmail.fr" ), wxT( "3D modules by" ), KiBitmapNew( three_d_xpm ) ) ); } diff --git a/common/dialog_about/dialog_about_base.fbp b/common/dialog_about/dialog_about_base.fbp index 2cb96a03b3..2f6951303c 100644 --- a/common/dialog_about/dialog_about_base.fbp +++ b/common/dialog_about/dialog_about_base.fbp @@ -1,8 +1,8 @@ - + - + C++ 1 source_name @@ -14,73 +14,73 @@ none 1 MyProject - + . - + 1 1 1 0 - - - + + + 1 1 impl_virtual - - - + + + 0 wxID_ANY - + -1,-1 dialog_about_base - + 750,450 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER|wxSTAY_ON_TOP - + About... - - + + wxFILTER_NONE wxDefaultValidator - - - - - - - + + + + + + + OnClose - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - + bSizer1 wxVERTICAL none @@ -89,7 +89,7 @@ wxEXPAND 0 - + bSizer3 wxHORIZONTAL none @@ -108,53 +108,53 @@ wxALIGN_CENTER|wxALL 1 - - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_bitmapApp protected - - - - - + + + + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -162,7 +162,7 @@ wxEXPAND 10 - + b_apptitleSizer wxVERTICAL none @@ -171,55 +171,55 @@ wxALIGN_CENTER|wxALL 0 - - + + 1 1 - + ,90,92,14,70,0 0 wxID_ANY App Title - - + + m_staticTextAppTitle protected - - + + wxALIGN_CENTRE - - - + + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -227,55 +227,55 @@ wxALIGN_CENTER|wxALL 0 - - + + 1 1 - - + + 0 wxID_ANY Copyright Info - - + + m_staticTextCopyright protected - - + + wxALIGN_CENTRE - - - + + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -283,55 +283,55 @@ wxALIGN_CENTER|wxLEFT|wxRIGHT|wxTOP 0 - - + + 1 1 - - + + 0 wxID_ANY Build Version Info - - + + m_staticTextBuildVersion protected - - + + wxALIGN_CENTRE - - - + + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -339,55 +339,55 @@ wxALIGN_CENTER|wxBOTTOM|wxLEFT|wxRIGHT 0 - - + + 1 1 - - + + 0 wxID_ANY Lib Version Info - - + + m_staticTextLibVersion protected - - + + wxALIGN_CENTRE - - - + + + wxFILTER_NONE wxDefaultValidator - - - - + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -409,53 +409,53 @@ wxEXPAND | wxALL 0 - - + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline1 none - - + + wxLI_HORIZONTAL - - - + + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -463,63 +463,63 @@ wxEXPAND | wxALL 2 - - + + 1 1 - - + + 0 wxID_ANY - + 750,350 m_auiNotebook protected - - + + wxAUI_NB_SCROLL_BUTTONS|wxAUI_NB_TAB_FIXED_WIDTH - + -1 - - - + + + wxFILTER_NONE wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -527,56 +527,56 @@ wxALIGN_CENTER|wxALL 0 - - + + 1 1 1 - - + + 0 wxID_CANCEL OK - - + + m_buttonOK private - - - - - - + + + + + + wxFILTER_NONE wxDefaultValidator - - - - + + + + OnOkClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + From 4666b7fb69d5bee8612d550b63b3c392094bf0c7 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 Aug 2013 15:47:34 -0500 Subject: [PATCH 11/42] formatting and fix selection clarification bug in pcbnew, could not move reference text when hidden under another footprint --- pcbnew/collectors.cpp | 38 ++++++++++++++++----------------- pcbnew/controle.cpp | 11 ++++++++++ pcbnew/hotkeys_board_editor.cpp | 16 +++++++------- 3 files changed, 38 insertions(+), 27 deletions(-) diff --git a/pcbnew/collectors.cpp b/pcbnew/collectors.cpp index 5970de7ef7..4aee57a556 100644 --- a/pcbnew/collectors.cpp +++ b/pcbnew/collectors.cpp @@ -158,14 +158,14 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa switch( item->Type() ) { case PCB_PAD_T: - { - MODULE* m = (MODULE*) item->GetParent(); - - if( m->GetReference() == wxT( "Y2" ) ) { - breakhere++; + MODULE* m = (MODULE*) item->GetParent(); + + if( m->GetReference() == wxT( "Y2" ) ) + { + breakhere++; + } } - } break; case PCB_VIA_T: @@ -193,25 +193,25 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa break; case PCB_MODULE_TEXT_T: - { - TEXTE_MODULE* tm = (TEXTE_MODULE*) item; - - if( tm->GetText() == wxT( "10uH" ) ) { - breakhere++; + TEXTE_MODULE* tm = (TEXTE_MODULE*) item; + + if( tm->GetText() == wxT( "10uH" ) ) + { + breakhere++; + } } - } break; case PCB_MODULE_T: - { - MODULE* m = (MODULE*) item; - - if( m->GetReference() == wxT( "C98" ) ) { - breakhere++; + MODULE* m = (MODULE*) item; + + if( m->GetReference() == wxT( "C98" ) ) + { + breakhere++; + } } - } break; case PCB_MARKER_T: @@ -324,7 +324,7 @@ SEARCH_RESULT GENERAL_COLLECTOR::Inspect( EDA_ITEM* testItem, const void* testDa // Pads are not sensitive to the layer visibility controls. // They all have their own separate visibility controls // skip them if not visible - if ( pad ) + if( pad ) { if( m_Guide->IgnorePads() ) goto exit; diff --git a/pcbnew/controle.cpp b/pcbnew/controle.cpp index 05b6ef9523..d6f8a79583 100644 --- a/pcbnew/controle.cpp +++ b/pcbnew/controle.cpp @@ -54,8 +54,19 @@ extern bool Magnetize( PCB_EDIT_FRAME* frame, int aCurrentTool, */ static BOARD_ITEM* AllAreModulesAndReturnSmallestIfSo( GENERAL_COLLECTOR* aCollector ) { +#if 0 // Dick: this is not consistent with name of this function, and does not + // work correctly using 'M' (move hotkey) when another module's (2nd module) reference + // is under a module (first module) and you want to move the reference. + // Another way to fix this would be to + // treat module text as copper layer content, and put the module text into + // the primary list. I like the coded behavior best. If it breaks something + // perhaps you need a different test before calling this function, which should + // do what its name says it does. int count = aCollector->GetPrimaryCount(); // try to use preferred layer if( 0 == count ) count = aCollector->GetCount(); +#else + int count = aCollector->GetCount(); +#endif for( int i = 0; iType() ) { @@ -788,14 +788,14 @@ bool PCB_EDIT_FRAME::OnHotkeyMoveItem( int aIdCommand ) break; case PCB_MODULE_T: - { - if( aIdCommand == HK_MOVE_ITEM ) - evt_type = ID_POPUP_PCB_MOVE_MODULE_REQUEST; + { + if( aIdCommand == HK_MOVE_ITEM ) + evt_type = ID_POPUP_PCB_MOVE_MODULE_REQUEST; - if( aIdCommand == HK_DRAG_ITEM ) - evt_type = ID_POPUP_PCB_DRAG_MODULE_REQUEST; - } - break; + if( aIdCommand == HK_DRAG_ITEM ) + evt_type = ID_POPUP_PCB_DRAG_MODULE_REQUEST; + } + break; case PCB_PAD_T: // Post MODULE_REQUEST events here to prevent pads From f7ad4ca025cb1654072f875c0180fb7cbe1cdcbc Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 5 Aug 2013 16:02:41 -0500 Subject: [PATCH 12/42] BUG FIX: eeschema as segfaulting on the 'Insert' key because the m_itemToRepeat was simply a pointer to an object on the display list. At times this object would disappear from the display list, in the test case because of a concatonation of two wires, and if you then tried to clone the non-existent object you'd get a crash. This was not merely a bug, but a naive design choice. IMO. Now the item to repeat is cloned, so will never also be on the display list. --- common/drawpanel.cpp | 4 +- eeschema/bus-wire-junction.cpp | 76 ++++++++++++++++++++-------------- eeschema/edit_bitmap.cpp | 2 +- eeschema/edit_label.cpp | 4 +- eeschema/getpart.cpp | 2 +- eeschema/hierarch.cpp | 2 +- eeschema/hotkeys.cpp | 2 +- eeschema/onleftclick.cpp | 15 +++---- eeschema/schedit.cpp | 16 +++---- eeschema/schframe.cpp | 30 ++++++++++++-- eeschema/sheet.cpp | 11 ++--- include/class_drawpanel.h | 2 +- include/wxEeschemaStruct.h | 26 ++++++++---- 13 files changed, 121 insertions(+), 71 deletions(-) diff --git a/common/drawpanel.cpp b/common/drawpanel.cpp index 521c73e771..4731dbde49 100644 --- a/common/drawpanel.cpp +++ b/common/drawpanel.cpp @@ -145,9 +145,11 @@ EDA_DRAW_PANEL::~EDA_DRAW_PANEL() wxGetApp().GetSettings()->Write( ENBL_AUTO_PAN_KEY, m_enableAutoPan ); } + EDA_DRAW_FRAME* EDA_DRAW_PANEL::GetParent() { - return ( EDA_DRAW_FRAME* ) wxWindow::GetParent(); + wxWindow* mom = wxScrolledWindow::GetParent(); + return (EDA_DRAW_FRAME*) mom; } diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 72890bee3e..95af16a3d8 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -162,7 +162,7 @@ void SCH_EDIT_FRAME::BeginSegment( wxDC* DC, int type ) } m_canvas->SetMouseCapture( DrawSegment, AbortCreateNewLine ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); } else // A segment is in progress: terminates the current segment and add a new segment. { @@ -239,7 +239,8 @@ void SCH_EDIT_FRAME::EndSegment( wxDC* DC ) return; // Get the last non-null wire (this is the last created segment). - m_itemToRepeat = segment = (SCH_LINE*) s_wires.GetLast(); + SetRepeatItem( segment = (SCH_LINE*) s_wires.GetLast() ); + screen->SetCurItem( NULL ); m_canvas->EndMouseCapture( -1, -1, wxEmptyString, false ); @@ -341,7 +342,7 @@ void SCH_EDIT_FRAME::DeleteCurrentSegment( wxDC* DC ) { SCH_SCREEN* screen = GetScreen(); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); if( ( screen->GetCurItem() == NULL ) || !screen->GetCurItem()->IsNew() ) return; @@ -359,7 +360,7 @@ SCH_JUNCTION* SCH_EDIT_FRAME::AddJunction( wxDC* aDC, const wxPoint& aPosition, { SCH_JUNCTION* junction = new SCH_JUNCTION( aPosition ); - m_itemToRepeat = junction; + SetRepeatItem( junction ); m_canvas->CrossHairOff( aDC ); // Erase schematic cursor junction->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); @@ -378,19 +379,19 @@ SCH_JUNCTION* SCH_EDIT_FRAME::AddJunction( wxDC* aDC, const wxPoint& aPosition, SCH_NO_CONNECT* SCH_EDIT_FRAME::AddNoConnect( wxDC* aDC, const wxPoint& aPosition ) { - SCH_NO_CONNECT* NewNoConnect; + SCH_NO_CONNECT* no_connect = new SCH_NO_CONNECT( aPosition ); - NewNoConnect = new SCH_NO_CONNECT( aPosition ); - m_itemToRepeat = NewNoConnect; + SetRepeatItem( no_connect ); m_canvas->CrossHairOff( aDC ); // Erase schematic cursor - NewNoConnect->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); + no_connect->Draw( m_canvas, aDC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); + m_canvas->CrossHairOn( aDC ); // Display schematic cursor - GetScreen()->Append( NewNoConnect ); + GetScreen()->Append( no_connect ); OnModify(); - SaveCopyInUndoList( NewNoConnect, UR_NEW ); - return NewNoConnect; + SaveCopyInUndoList( no_connect, UR_NEW ); + return no_connect; } @@ -420,35 +421,46 @@ static void AbortCreateNewLine( EDA_DRAW_PANEL* Panel, wxDC* DC ) void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC ) { - if( m_itemToRepeat == NULL ) + SCH_ITEM* repeater = GetRepeatItem(); + + if( !repeater ) return; - m_itemToRepeat = (SCH_ITEM*) m_itemToRepeat->Clone(); + //D( repeater>Show( 0, std::cout ); ) - if( m_itemToRepeat->Type() == SCH_COMPONENT_T ) // If repeat component then put in move mode + // clone the repeater, move it, insert into display list, then save a copy + // via SetRepeatItem(); + + SCH_ITEM* my_clone = (SCH_ITEM*) repeater->Clone(); + + // If cloning a component then put into 'move' mode. + /* please tell me where components are snapshotted via SetRepeatItem() + if( my_clone->Type() == SCH_COMPONENT_T ) { wxPoint pos = GetCrossHairPosition() - - ( (SCH_COMPONENT*) m_itemToRepeat )->GetPosition(); + ( (SCH_COMPONENT*) my_clone )->GetPosition(); - m_itemToRepeat->SetFlags( IS_NEW ); - ( (SCH_COMPONENT*) m_itemToRepeat )->SetTimeStamp( GetNewTimeStamp() ); - m_itemToRepeat->Move( pos ); - m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode ); - MoveItem( m_itemToRepeat, DC ); - return; + my_clone->SetFlags( IS_NEW ); + ( (SCH_COMPONENT*) my_clone )->SetTimeStamp( GetNewTimeStamp() ); + my_clone->Move( pos ); + my_clone->Draw( m_canvas, DC, wxPoint( 0, 0 ), g_XorMode ); + MoveItem( my_clone, DC ); } - - m_itemToRepeat->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) ); - - if( m_itemToRepeat->CanIncrementLabel() ) - ( (SCH_TEXT*) m_itemToRepeat )->IncrementLabel(); - - if( m_itemToRepeat ) + else + */ { - GetScreen()->Append( m_itemToRepeat ); + my_clone->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) ); + + if( my_clone->CanIncrementLabel() ) + ( (SCH_TEXT*) my_clone )->IncrementLabel(); + + GetScreen()->Append( my_clone ); GetScreen()->TestDanglingEnds(); - m_itemToRepeat->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); - SaveCopyInUndoList( m_itemToRepeat, UR_NEW ); - m_itemToRepeat->ClearFlags(); + my_clone->Draw( m_canvas, DC, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); + SaveCopyInUndoList( my_clone, UR_NEW ); + my_clone->ClearFlags(); } + + // clone my_clone, now that it has been moved, thus saving new position. + SetRepeatItem( my_clone ); } diff --git a/eeschema/edit_bitmap.cpp b/eeschema/edit_bitmap.cpp index e3fdd42c99..2a83d10a11 100644 --- a/eeschema/edit_bitmap.cpp +++ b/eeschema/edit_bitmap.cpp @@ -144,7 +144,7 @@ void SCH_EDIT_FRAME::MoveImage( SCH_BITMAP* aImageItem, wxDC* aDC ) m_canvas->SetMouseCapture( moveBitmap, abortMoveBitmap ); GetScreen()->SetCurItem( aImageItem ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); SetUndoItem( aImageItem ); diff --git a/eeschema/edit_label.cpp b/eeschema/edit_label.cpp index 855a313bca..07f466af74 100644 --- a/eeschema/edit_label.cpp +++ b/eeschema/edit_label.cpp @@ -72,7 +72,7 @@ SCH_TEXT* SCH_EDIT_FRAME::CreateNewText( wxDC* aDC, int aType ) { SCH_TEXT* textItem = NULL; - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); switch( aType ) { @@ -235,7 +235,7 @@ void SCH_EDIT_FRAME::OnConvertTextType( wxCommandEvent& aEvent ) } } - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); OnModify(); newtext->Draw( m_canvas, &dc, wxPoint( 0, 0 ), GR_DEFAULT_DRAWMODE ); m_canvas->CrossHairOn( &dc ); // redraw schematic cursor diff --git a/eeschema/getpart.cpp b/eeschema/getpart.cpp index 6fbf348769..f456831881 100644 --- a/eeschema/getpart.cpp +++ b/eeschema/getpart.cpp @@ -199,7 +199,7 @@ SCH_COMPONENT* SCH_EDIT_FRAME::Load_Component( wxDC* aDC, { int unit = 1; int convert = 1; - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); m_canvas->SetIgnoreMouseEvents( true ); wxString Name = SelectComponentFromLibrary( aLibname, aHistoryList, aUseLibBrowser, diff --git a/eeschema/hierarch.cpp b/eeschema/hierarch.cpp index 7ac4adbca1..b74ff81b56 100644 --- a/eeschema/hierarch.cpp +++ b/eeschema/hierarch.cpp @@ -268,7 +268,7 @@ void HIERARCHY_NAVIG_DLG::OnSelect( wxTreeEvent& event ) void SCH_EDIT_FRAME::DisplayCurrentSheet() { - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); ClearMsgPanel(); SCH_SCREEN* screen = m_CurrentSheet->LastScreen(); diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 4afdebe397..474e664235 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -385,7 +385,7 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, break; case HK_REPEAT_LAST: - if( notBusy && m_itemToRepeat && ( m_itemToRepeat->GetFlags() == 0 ) ) + if( notBusy && GetRepeatItem() && ( GetRepeatItem()->GetFlags() == 0 ) ) RepeatDrawItem( aDC ); break; diff --git a/eeschema/onleftclick.cpp b/eeschema/onleftclick.cpp index 067db61625..7fa3a3f509 100644 --- a/eeschema/onleftclick.cpp +++ b/eeschema/onleftclick.cpp @@ -58,7 +58,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) ) { m_canvas->SetAutoPanRequest( false ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); if( item && item->GetFlags() ) { @@ -128,8 +128,9 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { if( false == GetScreen()->GetItem( gridPosition, 0, SCH_NO_CONNECT_T ) ) { - m_itemToRepeat = AddNoConnect( aDC, gridPosition ); - GetScreen()->SetCurItem( m_itemToRepeat ); + SCH_NO_CONNECT* no_connect = AddNoConnect( aDC, gridPosition ); + SetRepeatItem( no_connect ); + GetScreen()->SetCurItem( no_connect ); m_canvas->SetAutoPanRequest( true ); } } @@ -137,7 +138,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_JUNCTION_BUTT: @@ -145,8 +145,9 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { if( false == GetScreen()->GetItem( gridPosition, 0, SCH_JUNCTION_T ) ) { - m_itemToRepeat = AddJunction( aDC, gridPosition, true ); - GetScreen()->SetCurItem( m_itemToRepeat ); + SCH_JUNCTION* junction = AddJunction( aDC, gridPosition, true ); + SetRepeatItem( junction ); + GetScreen()->SetCurItem( junction ); m_canvas->SetAutoPanRequest( true ); } } @@ -154,7 +155,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_WIRETOBUS_ENTRY_BUTT: @@ -168,6 +168,7 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) addCurrentItemToList( aDC ); } break; + case ID_BUSTOBUS_ENTRY_BUTT: if( ( item == NULL ) || ( item->GetFlags() == 0 ) ) { diff --git a/eeschema/schedit.cpp b/eeschema/schedit.cpp index 7eeaac888d..3f6f9efce6 100644 --- a/eeschema/schedit.cpp +++ b/eeschema/schedit.cpp @@ -119,7 +119,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) { case ID_HIERARCHY: InstallHierarchyFrame( &dc, pos ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); break; case wxID_CUT: @@ -127,7 +127,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; HandleBlockEndByPopUp( BLOCK_DELETE, &dc ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); SetSheetNumberAndCount(); break; @@ -182,7 +182,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) m_canvas->MoveCursorToCrossHair(); DeleteConnection( id == ID_POPUP_SCH_DELETE_CONNECTION ); screen->SetCurItem( NULL ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); screen->TestDanglingEnds( m_canvas, &dc ); m_canvas->Refresh(); break; @@ -222,7 +222,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) DeleteItem( item ); screen->SetCurItem( NULL ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); screen->TestDanglingEnds( m_canvas, &dc ); SetSheetNumberAndCount(); OnModify(); @@ -375,7 +375,7 @@ void SCH_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) // End switch ( id ) (Command execution) if( GetToolId() == ID_NO_TOOL_SELECTED ) - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); } @@ -445,7 +445,7 @@ void SCH_EDIT_FRAME::OnMoveItem( wxCommandEvent& aEvent ) } if( GetToolId() == ID_NO_TOOL_SELECTED ) - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); } @@ -561,7 +561,7 @@ void SCH_EDIT_FRAME::OnSelectTool( wxCommandEvent& aEvent ) break; default: - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); } // Simulate left click event if we got here from a hot key. @@ -695,7 +695,7 @@ void SCH_EDIT_FRAME::MoveItem( SCH_ITEM* aItem, wxDC* aDC ) { wxCHECK_RET( aItem != NULL, wxT( "Cannot move invalid schematic item" ) ); - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); if( !aItem->IsNew() ) { diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index d6432c0fdb..dadb7a8663 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -177,7 +177,8 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, const wxPoint& aPosition, const wxSize& aSize, long aStyle ) : SCH_BASE_FRAME( aParent, SCHEMATIC_FRAME_TYPE, aTitle, aPosition, aSize, - aStyle, SCH_EDIT_FRAME_NAME ) + aStyle, SCH_EDIT_FRAME_NAME ), + m_item_to_repeat( 0 ) { m_FrameName = SCH_EDIT_FRAME_NAME; m_showAxis = false; // true to show axis @@ -207,8 +208,6 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, icon.CopyFromBitmap( KiBitmap( icon_eeschema_xpm ) ); SetIcon( icon ); - m_itemToRepeat = NULL; - /* Get config */ LoadSettings(); @@ -268,8 +267,10 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( wxWindow* aParent, const wxString& aTitle, SCH_EDIT_FRAME::~SCH_EDIT_FRAME() { + delete m_item_to_repeat; // we own the cloned object, see this->SetRepeatItem() + SetScreen( NULL ); - delete m_CurrentSheet; // a SCH_SHEET_PATH, on the heap. + delete m_CurrentSheet; // a SCH_SHEET_PATH, on the heap. delete m_undoItem; delete g_RootSheet; delete m_findReplaceData; @@ -281,6 +282,27 @@ SCH_EDIT_FRAME::~SCH_EDIT_FRAME() } +void SCH_EDIT_FRAME::SetRepeatItem( SCH_ITEM* aItem ) +{ + // we cannot store a pointer to an item in the display list here since + // that item may be deleted, such as part of a line concatonation or other. + // So simply always keep a copy of the object which is to be repeated. + + SCH_ITEM* old = m_item_to_repeat; + SCH_ITEM* cur = aItem; + + if( cur != old ) + { + if( cur ) + aItem = (SCH_ITEM*) cur->Clone(); + + m_item_to_repeat = aItem; + + delete old; + } +} + + void SCH_EDIT_FRAME::SetSheetNumberAndCount() { SCH_SCREEN* screen = GetScreen(); diff --git a/eeschema/sheet.cpp b/eeschema/sheet.cpp index 3d59b19197..4b907f2693 100644 --- a/eeschema/sheet.cpp +++ b/eeschema/sheet.cpp @@ -45,7 +45,7 @@ bool SCH_EDIT_FRAME::EditSheet( SCH_SHEET* aSheet, wxDC* aDC ) if( aSheet == NULL ) return false; - /* Get the new texts */ + // Get the new texts DIALOG_SCH_SHEET_PROPS dlg( this ); wxString units = GetUnitsLabel( g_UserUnit ); @@ -277,11 +277,12 @@ static void MoveOrResizeSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& } -/* Complete sheet move. */ +// Complete sheet move. static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { SCH_SCREEN* screen = (SCH_SCREEN*) aPanel->GetScreen(); - SCH_ITEM* item = screen->GetCurItem(); + SCH_ITEM* item = screen->GetCurItem(); + SCH_EDIT_FRAME* parent = ( SCH_EDIT_FRAME* ) aPanel->GetParent(); if( (item == NULL) || (item->Type() != SCH_SHEET_T) || (parent == NULL) ) @@ -320,10 +321,10 @@ static void ExitSheet( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) } -/* Create hierarchy sheet. */ +// Create hierarchy sheet. SCH_SHEET* SCH_EDIT_FRAME::CreateSheet( wxDC* aDC ) { - m_itemToRepeat = NULL; + SetRepeatItem( NULL ); SCH_SHEET* sheet = new SCH_SHEET( GetCrossHairPosition() ); diff --git a/include/class_drawpanel.h b/include/class_drawpanel.h index 46439257c9..270999ac7e 100644 --- a/include/class_drawpanel.h +++ b/include/class_drawpanel.h @@ -123,7 +123,7 @@ public: BASE_SCREEN* GetScreen(); - virtual EDA_DRAW_FRAME* GetParent(); + EDA_DRAW_FRAME* GetParent(); void OnPaint( wxPaintEvent& event ); diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 8607c835f7..2f050ba60d 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -134,7 +134,7 @@ private: wxArrayString m_findStringHistoryList; wxArrayString m_replaceStringHistoryList; BLOCK_SELECTOR m_blockItems; ///< List of selected items. - SCH_ITEM* m_itemToRepeat; ///< Last item to insert by the repeat command. + SCH_ITEM* m_item_to_repeat; ///< Last item to insert by the repeat command. int m_repeatLabelDelta; ///< Repeat label number increment step. SCH_COLLECTOR m_collectedItems; ///< List of collected items. SCH_FIND_COLLECTOR m_foundItems; ///< List of find/replace items. @@ -899,11 +899,12 @@ private: void EditImage( SCH_BITMAP* aItem ); // Hierarchical Sheet & PinSheet - void InstallHierarchyFrame( wxDC* DC, wxPoint& pos ); - SCH_SHEET* CreateSheet( wxDC* DC ); - void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC ); - // Loads the cache library associated to the aFileName - bool LoadCacheLibrary( const wxString& aFileName ); + void InstallHierarchyFrame( wxDC* DC, wxPoint& pos ); + SCH_SHEET* CreateSheet( wxDC* DC ); + void ReSizeSheet( SCH_SHEET* Sheet, wxDC* DC ); + + /// Loads the cache library associated to the aFileName + bool LoadCacheLibrary( const wxString& aFileName ); public: /** @@ -1176,7 +1177,18 @@ public: */ void RepeatDrawItem( wxDC* DC ); - void SetRepeatItem( SCH_ITEM* aItem ) { m_itemToRepeat = aItem; } + /** + * Function SetRepeatItem + * clones aItem and owns that clone in this container. + */ + void SetRepeatItem( SCH_ITEM* aItem ); + + /** + * Function GetRepeatItem + * returns the item which is to be repeated with the insert key. Such object + * is owned by this container, and must be cloned. + */ + SCH_ITEM* GetRepeatItem() const { return m_item_to_repeat; } /** * Function SetUndoItem From ad7ba8f0293e95f32a1b056d926c9bc7222fdae2 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 6 Aug 2013 17:59:07 -0500 Subject: [PATCH 13/42] FIX: insert key must repeat text labels --- eeschema/bus-wire-junction.cpp | 2 -- eeschema/hotkeys.cpp | 7 +++++-- eeschema/onleftclick.cpp | 13 ++----------- eeschema/schframe.cpp | 7 ++++++- 4 files changed, 13 insertions(+), 16 deletions(-) diff --git a/eeschema/bus-wire-junction.cpp b/eeschema/bus-wire-junction.cpp index 95af16a3d8..5badc58d46 100644 --- a/eeschema/bus-wire-junction.cpp +++ b/eeschema/bus-wire-junction.cpp @@ -434,7 +434,6 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC ) SCH_ITEM* my_clone = (SCH_ITEM*) repeater->Clone(); // If cloning a component then put into 'move' mode. - /* please tell me where components are snapshotted via SetRepeatItem() if( my_clone->Type() == SCH_COMPONENT_T ) { wxPoint pos = GetCrossHairPosition() - @@ -447,7 +446,6 @@ void SCH_EDIT_FRAME::RepeatDrawItem( wxDC* DC ) MoveItem( my_clone, DC ); } else - */ { my_clone->Move( wxPoint( g_RepeatStep.GetWidth(), g_RepeatStep.GetHeight() ) ); diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 474e664235..6e3fbf6e05 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -385,8 +385,11 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, break; case HK_REPEAT_LAST: - if( notBusy && GetRepeatItem() && ( GetRepeatItem()->GetFlags() == 0 ) ) - RepeatDrawItem( aDC ); + if( notBusy && GetRepeatItem() ) + { + //if( GetRepeatItem()->GetFlags() == 0 ) + RepeatDrawItem( aDC ); + } break; case HK_END_CURR_LINEWIREBUS: diff --git a/eeschema/onleftclick.cpp b/eeschema/onleftclick.cpp index 7fa3a3f509..6dfef208e6 100644 --- a/eeschema/onleftclick.cpp +++ b/eeschema/onleftclick.cpp @@ -52,8 +52,8 @@ static wxArrayString s_PowerNameList; void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { - SCH_ITEM* item = GetScreen()->GetCurItem(); - wxPoint gridPosition = GetGridPosition( aPosition ); + SCH_ITEM* item = GetScreen()->GetCurItem(); + wxPoint gridPosition = GetGridPosition( aPosition ); if( ( GetToolId() == ID_NO_TOOL_SELECTED ) || ( item && item->GetFlags() ) ) { @@ -120,7 +120,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) m_CurrentSheet->Pop(); DisplayCurrentSheet(); } - break; case ID_NOCONN_BUTT: @@ -210,7 +209,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_ADD_IMAGE_BUTT: @@ -223,7 +221,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_LABEL_BUTT: @@ -236,7 +233,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_GLABEL_BUTT: @@ -255,7 +251,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_SHEET_SYMBOL_BUTT: @@ -273,7 +268,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_IMPORT_HLABEL_BUTT: @@ -295,7 +289,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_SCH_PLACE_COMPONENT: @@ -308,7 +301,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; case ID_PLACE_POWER_BUTT: @@ -322,7 +314,6 @@ void SCH_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition ) { addCurrentItemToList( aDC ); } - break; default: diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index dadb7a8663..74bf05697e 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -294,8 +294,13 @@ void SCH_EDIT_FRAME::SetRepeatItem( SCH_ITEM* aItem ) if( cur != old ) { if( cur ) + { aItem = (SCH_ITEM*) cur->Clone(); + // Clone() preserves the flags, we want 'em cleared. + aItem->ClearFlags(); + } + m_item_to_repeat = aItem; delete old; @@ -891,7 +896,7 @@ bool SCH_EDIT_FRAME::isAutoSaveRequired() const void SCH_EDIT_FRAME::addCurrentItemToList( wxDC* aDC ) { SCH_SCREEN* screen = GetScreen(); - SCH_ITEM* item = screen->GetCurItem(); + SCH_ITEM* item = screen->GetCurItem(); wxCHECK_RET( item != NULL, wxT( "Cannot add current item to list." ) ); From 7e6a243df9f84c517db055a44fb114c14180077b Mon Sep 17 00:00:00 2001 From: Carl Poirier Date: Tue, 6 Aug 2013 18:21:40 -0500 Subject: [PATCH 14/42] REMOVE: USE_PCBNEW_NANOMETERS by making it the only way to go in pcbnew, effectively removing the deci-mils build. --- CMakeLists.txt | 3 --- CMakeModules/config.h.cmake | 9 +------ Documentation/compiling/build-config.txt | 4 --- HOW_TO_CONTRIBUTE.txt | 4 +-- common/basicframe.cpp | 7 ------ common/drawframe.cpp | 4 --- include/convert_from_iu.h | 16 +----------- include/convert_to_biu.h | 29 ++++++--------------- pcbnew/CMakeLists.txt | 4 --- pcbnew/basepcbframe.cpp | 22 ---------------- pcbnew/class_board_item.cpp | 2 +- pcbnew/classpcb.cpp | 10 -------- pcbnew/legacy_plugin.cpp | 23 +---------------- pcbnew/specctra_export.cpp | 20 +-------------- pcbnew/specctra_import.cpp | 32 ------------------------ 15 files changed, 14 insertions(+), 175 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 21b2f16411..fe85f4c05a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,9 +14,6 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) # reports. # -option(USE_PCBNEW_NANOMETRES - "Use nanometers for Pcbnew internal units instead of deci-mils (default ON)." ON) - # Russian GOST patch option(wxUSE_UNICODE "enable/disable building unicode (default OFF)") option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)") diff --git a/CMakeModules/config.h.cmake b/CMakeModules/config.h.cmake index 4914b6c417..eec9fc8547 100644 --- a/CMakeModules/config.h.cmake +++ b/CMakeModules/config.h.cmake @@ -75,15 +75,8 @@ #cmakedefine USE_IMAGES_IN_MENUS 1 -/// Definitions to enable the s-expression file formats and nanometer units. -#cmakedefine USE_PCBNEW_NANOMETRES - /// The legacy file format revision of the *.brd file created by this build -#if defined(USE_PCBNEW_NANOMETRES) -#define LEGACY_BOARD_FILE_VERSION 2 -#else -#define LEGACY_BOARD_FILE_VERSION 1 -#endif +#define LEGACY_BOARD_FILE_VERSION 2 /// Definition to compile with Pcbnew footprint library table implementation. #cmakedefine USE_FP_LIB_TABLE diff --git a/Documentation/compiling/build-config.txt b/Documentation/compiling/build-config.txt index 058106fcb6..6daa3618e7 100644 --- a/Documentation/compiling/build-config.txt +++ b/Documentation/compiling/build-config.txt @@ -111,10 +111,6 @@ This option is used to enable or disable building KiCad with images in menu items. If this is not defined when CMake is used to create the build files, images will be included in menu items on all platforms except OSX. -USE_PCBNEW_NANOMETRES (ON/OFF) -This option is used to enable or disable the nano-meter internal units for -Pcbnew. The default is ON. - KICAD_GOST (ON/OFF) ------------------- This option is used to enable or disable the GOST notation for multiple gates diff --git a/HOW_TO_CONTRIBUTE.txt b/HOW_TO_CONTRIBUTE.txt index 746d3e3698..510c49e6c1 100644 --- a/HOW_TO_CONTRIBUTE.txt +++ b/HOW_TO_CONTRIBUTE.txt @@ -25,10 +25,10 @@ Contribute to KiCad (under Linux) 6) Compile: cd kicad_john mkdir build; cd build - cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Debug + cmake ../ -DCMAKE_BUILD_TYPE=Debug to build a debug version or - cmake ../ -DKICAD_TESTING_VERSION=ON -DCMAKE_BUILD_TYPE=Release + cmake ../ -DCMAKE_BUILD_TYPE=Release to build a release version make diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 0c06bde3b2..b5434b01b5 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -502,13 +502,6 @@ void EDA_BASE_FRAME::CopyVersionInfoToClipboard( wxCommandEvent& event ) tmp << wxT( "Boost version: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." ) << ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 ) << wxT( "\n" ); - tmp << wxT( "Options: USE_PCBNEW_NANOMETRES=" ); -#ifdef USE_PCBNEW_NANOMETRES - tmp << wxT( "ON\n" ); -#else - tmp << wxT( "OFF\n" ); -#endif - tmp << wxT( " USE_WX_GRAPHICS_CONTEXT=" ); #ifdef USE_WX_GRAPHICS_CONTEXT tmp << wxT( "ON\n" ); diff --git a/common/drawframe.cpp b/common/drawframe.cpp index ac0669ef7d..06e8e018e5 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -755,7 +755,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) DBOX clientRectIU( xIU, yIU, clientSizeIU.x, clientSizeIU.y ); wxPoint centerPositionIU; -#if 1 || defined( USE_PCBNEW_NANOMETRES ) // put "int" limits on the clientRect if( clientRectIU.GetLeft() < VIRT_MIN ) clientRectIU.MoveLeftTo( VIRT_MIN ); @@ -765,7 +764,6 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) clientRectIU.MoveRightTo( VIRT_MAX ); if( clientRectIU.GetBottom() > VIRT_MAX ) clientRectIU.MoveBottomTo( VIRT_MAX ); -#endif centerPositionIU.x = KiROUND( clientRectIU.x + clientRectIU.width/2 ); centerPositionIU.y = KiROUND( clientRectIU.y + clientRectIU.height/2 ); @@ -838,11 +836,9 @@ void EDA_DRAW_FRAME::AdjustScrollBars( const wxPoint& aCenterPositionIU ) } } -#if 1 || defined( USE_PCBNEW_NANOMETRES ) // put "int" limits on the virtualSizeIU virtualSizeIU.x = std::min( virtualSizeIU.x, MAX_AXIS ); virtualSizeIU.y = std::min( virtualSizeIU.y, MAX_AXIS ); -#endif if( screen->m_Center ) { diff --git a/include/convert_from_iu.h b/include/convert_from_iu.h index 05f5e5a6bf..842777dc27 100644 --- a/include/convert_from_iu.h +++ b/include/convert_from_iu.h @@ -31,11 +31,10 @@ #ifndef _CONVERT_FROM_IU_ #define _CONVERT_FROM_IU_ -#include // USE_PCBNEW_NANOMETRES is defined here +#include /// Convert from internal units to user units. #if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW) - #if defined( USE_PCBNEW_NANOMETRES ) #if defined(GERBVIEW) #define MM_PER_IU 1.0 / 1e5 // Gerbview uses 10 micrometer. #else @@ -43,32 +42,19 @@ #endif #define MILS_PER_IU ( MM_PER_IU * 0.0254 ) #define DECIMILS_PER_IU (MM_PER_IU * 0.00254 ) - #else // Pcbnew in deci-mils. - #define DECIMILS_PER_IU 1 - #define MILS_PER_IU 0.1 - #define MM_PER_IU (25.4 / 1e4) - #endif /// Convert PCBNEW internal units (iu) to mils. inline int Iu2Mils( int iu ) { -#if defined( USE_PCBNEW_NANOMETRES ) double x = iu * MILS_PER_IU; return int( x < 0 ? x - 0.5 : x + 0.5 ); -#else - return iu * MILS_PER_IU; -#endif } /// Convert PCBNEW internal units (iu) to deci-mils. inline int Iu2DMils( int iu ) { -#if defined( USE_PCBNEW_NANOMETRES ) double x = iu * DECIMILS_PER_IU; return int( x < 0 ? x - 0.5 : x + 0.5 ); -#else - return iu; -#endif } #else // Eeschema and anything else. diff --git a/include/convert_to_biu.h b/include/convert_to_biu.h index 5401930078..7df4af7516 100644 --- a/include/convert_to_biu.h +++ b/include/convert_to_biu.h @@ -1,7 +1,7 @@ #ifndef CONVERT_TO_BIU_H_ #define CONVERT_TO_BIU_H_ -#include // USE_PCBNEW_NANOMETRES is defined here +#include /** * @file convert_to_biu.h @@ -18,41 +18,26 @@ /// Scaling factor to convert mils to internal units. #if defined(PCBNEW) || defined(CVPCB) || defined(GERBVIEW) - #if defined( USE_PCBNEW_NANOMETRES ) - #if defined(GERBVIEW) - #define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers. - #else - #define IU_PER_MM 1e6 // Pcbnew IU is 1 nanometer. - #endif - #define IU_PER_MILS (IU_PER_MM * 0.0254) - #define IU_PER_DECIMILS (IU_PER_MM * 0.00254) - - #else // Pcbnew compiled for deci-mils. - #define IU_PER_DECIMILS 1 - #define IU_PER_MILS 10.0 - #define IU_PER_MM (1e4 / 25.4) + #if defined(GERBVIEW) + #define IU_PER_MM 1e5 // Gerbview IU is 10 nanometers. + #else + #define IU_PER_MM 1e6 // Pcbnew IU is 1 nanometer. #endif + #define IU_PER_MILS (IU_PER_MM * 0.0254) + #define IU_PER_DECIMILS (IU_PER_MM * 0.00254) /// Convert mils to PCBNEW internal units (iu). inline int Mils2iu( int mils ) { -#if defined( USE_PCBNEW_NANOMETRES ) double x = mils * IU_PER_MILS; return int( x < 0 ? x - 0.5 : x + 0.5 ); -#else - return mils * IU_PER_MILS; -#endif } /// Convert deci-mils to PCBNEW internal units (iu). inline int DMils2iu( int dmils ) { -#if defined( USE_PCBNEW_NANOMETRES ) double x = dmils * IU_PER_DECIMILS; return int( x < 0 ? x - 0.5 : x + 0.5 ); -#else - return dmils; -#endif } #elif defined (PL_EDITOR) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 4b4c47f824..be4a999279 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -270,10 +270,6 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} ) endforeach() - if( USE_PCBNEW_NANOMETRES ) - set( SWIG_FLAGS ${SWIG_FLAGS} -DUSE_PCBNEW_NANOMETRES ) - endif( USE_PCBNEW_NANOMETRES ) - endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) diff --git a/pcbnew/basepcbframe.cpp b/pcbnew/basepcbframe.cpp index 1cd6d4663d..2e379e42ca 100644 --- a/pcbnew/basepcbframe.cpp +++ b/pcbnew/basepcbframe.cpp @@ -618,7 +618,6 @@ void PCB_BASE_FRAME::UpdateStatusBar() switch( g_UserUnit ) { -#if defined( USE_PCBNEW_NANOMETRES ) case INCHES: absformatter = wxT( "X %.6f Y %.6f" ); locformatter = wxT( "dx %.6f dy %.6f d %.6f" ); @@ -628,19 +627,6 @@ void PCB_BASE_FRAME::UpdateStatusBar() absformatter = wxT( "X %.6f Y %.6f" ); locformatter = wxT( "dx %.6f dy %.6f d %.6f" ); break; -#else - case INCHES: - absformatter = wxT( "X %.4f Y %.4f" ); - locformatter = wxT( "dx %.4f dy %.4f d %.4f" ); - break; - - case MILLIMETRES: - dXpos = RoundTo0( dXpos, 1000.0 ); - dYpos = RoundTo0( dYpos, 1000.0 ); - absformatter = wxT( "X %.3f Y %.3f" ); - locformatter = wxT( "dx %.3f dy %.3f d %.3f" ); - break; -#endif case UNSCALED_UNITS: absformatter = wxT( "X %f Y %f" ); @@ -659,14 +645,6 @@ void PCB_BASE_FRAME::UpdateStatusBar() dXpos = To_User_Unit( g_UserUnit, dx ); dYpos = To_User_Unit( g_UserUnit, dy ); -#ifndef USE_PCBNEW_NANOMETRES - if ( g_UserUnit == MILLIMETRES ) - { - dXpos = RoundTo0( dXpos, 1000.0 ); - dYpos = RoundTo0( dYpos, 1000.0 ); - } -#endif - // We already decided the formatter above line.Printf( locformatter, dXpos, dYpos, hypot( dXpos, dYpos ) ); SetStatusText( line, 3 ); diff --git a/pcbnew/class_board_item.cpp b/pcbnew/class_board_item.cpp index dec5ab8afa..6c309c11c7 100644 --- a/pcbnew/class_board_item.cpp +++ b/pcbnew/class_board_item.cpp @@ -88,7 +88,7 @@ wxString BOARD_ITEM::GetLayerName() const std::string BOARD_ITEM::FormatInternalUnits( int aValue ) { -#if 1 // !defined( USE_PCBNEW_NANOMETRES ) +#if 1 char buf[50]; int len; diff --git a/pcbnew/classpcb.cpp b/pcbnew/classpcb.cpp index b9e205e203..1bba2e67dd 100644 --- a/pcbnew/classpcb.cpp +++ b/pcbnew/classpcb.cpp @@ -64,12 +64,9 @@ */ static const double pcbZoomList[] = { -#if defined( USE_PCBNEW_NANOMETRES ) ZOOM_FACTOR( 0.1 ), ZOOM_FACTOR( 0.2 ), ZOOM_FACTOR( 0.3 ), -#endif - ZOOM_FACTOR( 0.5 ), ZOOM_FACTOR( 1.0 ), ZOOM_FACTOR( 1.5 ), @@ -129,13 +126,6 @@ static const double pcbZoomList[] = The largest ZOOM_FACTOR in above table is ZOOM_FACTOR( 300 ), which computes out to 762000 just below 790885. */ - - -#if !defined( USE_PCBNEW_NANOMETRES ) - ZOOM_FACTOR( 500.0 ), - ZOOM_FACTOR( 1000.0 ), - ZOOM_FACTOR( 2000.0 ) -#endif }; diff --git a/pcbnew/legacy_plugin.cpp b/pcbnew/legacy_plugin.cpp index 03a1fd8313..abe600d41b 100644 --- a/pcbnew/legacy_plugin.cpp +++ b/pcbnew/legacy_plugin.cpp @@ -411,11 +411,7 @@ void LEGACY_PLUGIN::loadGENERAL() if( !strcmp( data, "mm" ) ) { -#if defined( USE_PCBNEW_NANOMETRES ) diskToBiu = IU_PER_MM; -#else - THROW_IO_ERROR( _( "May not load millimeter *.brd file into 'Pcbnew compiled for deci-mils'" ) ); -#endif } } @@ -2822,11 +2818,7 @@ void LEGACY_PLUGIN::init( PROPERTIES* aProperties ) m_props = aProperties; // conversion factor for saving RAM BIUs to KICAD legacy file format. -#if defined( USE_PCBNEW_NANOMETRES ) biuToDisk = 1.0/IU_PER_MM; // BIUs are nanometers & file is mm -#else - biuToDisk = 1.0; // BIUs are deci-mils -#endif // Conversion factor for loading KICAD legacy file format into BIUs in RAM // Start by assuming the *.brd file is in deci-mils. @@ -2835,8 +2827,7 @@ void LEGACY_PLUGIN::init( PROPERTIES* aProperties ) // mm to nanometers. The deci-mil legacy files have no such "Units" marker // so we must assume the file is in deci-mils until told otherwise. - diskToBiu = IU_PER_DECIMILS; // BIUs are nanometers if defined(USE_PCBNEW_NANOMETRES) - // else are deci-mils + diskToBiu = IU_PER_DECIMILS; // BIUs are nanometers } @@ -2918,11 +2909,7 @@ void LEGACY_PLUGIN::saveGENERAL( const BOARD* aBoard ) const fprintf( m_fp, "encoding utf-8\n" ); // tell folks the units used within the file, as early as possible here. -#if defined( USE_PCBNEW_NANOMETRES ) fprintf( m_fp, "Units mm\n" ); -#else - fprintf( m_fp, "Units deci-mils\n" ); -#endif // Write copper layer count fprintf( m_fp, "LayerCount %d\n", aBoard->GetCopperLayerCount() ); @@ -3991,11 +3978,7 @@ void FPL_CACHE::ReadAndVerifyHeader( LINE_READER* aReader ) if( !strcmp( units, "mm" ) ) { -#if defined( USE_PCBNEW_NANOMETRES ) m_owner->diskToBiu = IU_PER_MM; -#else - THROW_IO_ERROR( _( "May not load millimeter legacy library file into 'Pcbnew compiled for deci-mils'" ) ); -#endif } } @@ -4191,11 +4174,7 @@ void FPL_CACHE::SaveHeader( FILE* aFile ) { fprintf( aFile, "%s %s\n", FOOTPRINT_LIBRARY_HEADER, TO_UTF8( DateAndTime() ) ); fprintf( aFile, "# encoding utf-8\n" ); -#if defined( USE_PCBNEW_NANOMETRES ) fprintf( aFile, "Units mm\n" ); -#else - fprintf( aFile, "Units deci-mils\n" ); -#endif } diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index 96b027c217..f974af99f0 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -201,18 +201,12 @@ const KICAD_T SPECCTRA_DB::scanPADs[] = { PCB_PAD_T, EOT }; */ static inline double scale( int kicadDist ) { -#if defined(USE_PCBNEW_NANOMETRES) // nanometers to um return kicadDist / ( IU_PER_MM / 1000.0 ); // nanometers to mils // return kicadDist/IU_PER_MILS; - -#else - // deci-mils to mils. - return kicadDist / 10.0; -#endif } @@ -1356,7 +1350,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) //----- & -------------------- { -#if defined(USE_PCBNEW_NANOMETRES) + // tell freerouter to use "tenths of micrometers", // which is 100 nm resolution. Possibly more resolution is possible // in freerouter, but it would need testing. @@ -1365,18 +1359,6 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) pcb->resolution->units = T_um; pcb->resolution->value = 10; // tenths of a um // pcb->resolution->value = 1000; // "thousandths of a um" (i.e. "nm") - -#else - pcb->unit->units = T_mil; - pcb->resolution->units = T_mil; - - // Kicad only supports 1/10th of mil internal coordinates. So to avoid - // having the router give us back 1/100th of mil coordinates which we - // will have to round and thereby cause error, we declare our maximum - // resolution precisely at 1/10th for now. For more on this, see: - // http://www.freerouting.net/usren/viewtopic.php?f=3&t=354 - pcb->resolution->value = 10; -#endif } //----------------------------------------------- diff --git a/pcbnew/specctra_import.cpp b/pcbnew/specctra_import.cpp index 78ad143edd..da0310e811 100644 --- a/pcbnew/specctra_import.cpp +++ b/pcbnew/specctra_import.cpp @@ -147,8 +147,6 @@ static int scale( double distance, UNIT_RES* aResolution ) double resValue = aResolution->GetValue(); double factor; -#if defined(USE_PCBNEW_NANOMETRES) - switch( aResolution->GetEngUnits() ) { default: @@ -171,36 +169,6 @@ static int scale( double distance, UNIT_RES* aResolution ) int ret = KiROUND( factor * distance / resValue ); -#else - - switch( aResolution->GetEngUnits() ) - { - default: - case T_inch: - factor = 1000.0; - break; - case T_mil: - factor = 1.0; - break; - case T_cm: - factor = 1000.0/2.54; - break; - case T_mm: - factor = 1000.0/25.4; - break; - case T_um: - factor = 1.0/25.4; - break; - } - - // the factor of 10.0 is used to convert mils to deci-mils, the units - // used within KiCad. - factor *= 10.0; - - int ret = KiROUND( factor * distance / resValue ); - -#endif - return ret; } From f636e1d45fd272a16a61d2cc0b21ff99fab60783 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 6 Aug 2013 18:23:50 -0500 Subject: [PATCH 15/42] REMOVE: check for repeat_item->Flags() == 0 in eeschema/hotkeys.cpp --- eeschema/hotkeys.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/eeschema/hotkeys.cpp b/eeschema/hotkeys.cpp index 6e3fbf6e05..a02aeb5a45 100644 --- a/eeschema/hotkeys.cpp +++ b/eeschema/hotkeys.cpp @@ -385,11 +385,8 @@ void SCH_EDIT_FRAME::OnHotKey( wxDC* aDC, int aHotKey, const wxPoint& aPosition, break; case HK_REPEAT_LAST: - if( notBusy && GetRepeatItem() ) - { - //if( GetRepeatItem()->GetFlags() == 0 ) - RepeatDrawItem( aDC ); - } + if( notBusy ) + RepeatDrawItem( aDC ); break; case HK_END_CURR_LINEWIREBUS: From 1c04f5a03c57079e5a4fa7272c9075200734b41f Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 8 Aug 2013 11:09:49 -0500 Subject: [PATCH 16/42] FIX: removed unwanted indent in *.kicad_pcb files ahead of "placed" and "locked" --- pcbnew/kicad_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/kicad_plugin.cpp b/pcbnew/kicad_plugin.cpp index d6bc8f87e7..815472e1d1 100644 --- a/pcbnew/kicad_plugin.cpp +++ b/pcbnew/kicad_plugin.cpp @@ -869,10 +869,10 @@ void PCB_IO::format( MODULE* aModule, int aNestLevel ) const m_out->Print( aNestLevel, "(module %s", m_out->Quotew( aModule->GetLibRef() ).c_str() ); if( aModule->IsLocked() ) - m_out->Print( aNestLevel, " locked" ); + m_out->Print( 0, " locked" ); if( aModule->IsPlaced() ) - m_out->Print( aNestLevel, " placed" ); + m_out->Print( 0, " placed" ); formatLayer( aModule ); From 7eed86de38b39d5e1bb994d24fa530ea089e8d10 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 8 Aug 2013 11:11:50 -0500 Subject: [PATCH 17/42] ENHANCE: specctra export Edge.Cuts "endpoint mismatch error message" was not showing exact coordinates with sufficient resolution --- pcbnew/specctra_export.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index f974af99f0..f25b97ac18 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -1107,10 +1107,11 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER if( !graphic ) { wxString error = wxString::Format( - _( "Unable to find the next segment with an endpoint of (%d,%d).\n" + _( "Unable to find the next segment with an endpoint of (%s mm, %s mm).\n" "Edit Edge.Cuts perimeter graphics, making them contiguous polygons each." ), - prevPt.x, - prevPt.y ); + GetChars( FROM_UTF8( BOARD_ITEM::FormatInternalUnits( prevPt.x ).c_str() ) ), + GetChars( FROM_UTF8( BOARD_ITEM::FormatInternalUnits( prevPt.y ).c_str() ) ) + ); ThrowIOError( error ); } } @@ -1223,10 +1224,10 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER if( !graphic ) { wxString error = wxString::Format( - _( "Unable to find the next segment with an endpoint of (%d,%d).\n" + _( "Unable to find the next segment with an endpoint of (%s mm, %s mm).\n" "Edit Edge.Cuts interior graphics, making them contiguous polygons each." ), - prevPt.x, - prevPt.y + GetChars( FROM_UTF8( BOARD_ITEM::FormatInternalUnits( prevPt.x ).c_str() ) ), + GetChars( FROM_UTF8( BOARD_ITEM::FormatInternalUnits( prevPt.y ).c_str() ) ) ); ThrowIOError( error ); @@ -1239,9 +1240,9 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER { // User has not defined a board perimeter yet... - EDA_RECT bbbox = aBoard->ComputeBoundingBox(); - + EDA_RECT bbbox = aBoard->ComputeBoundingBox(); RECTANGLE* rect = new RECTANGLE( boundary ); + boundary->rectangle = rect; rect->layer_id = "pcb"; From 744dd4893df6f41e5d032b9c436c93eea50e44a4 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Thu, 8 Aug 2013 11:12:41 -0500 Subject: [PATCH 18/42] EHNANCE: add a "Show" button to the two text field properties dialogs which allow editing of component properties. The button is active when the table row cursor is on the DATASHEET field only. When active, and your datasheet is a URI, then your default browser will be launced to show that datasheet if it can find it. This incentivizes use of http:// links for datasheets. --- .../dialog_edit_component_in_schematic.cpp | 25 ++-- ...dialog_edit_component_in_schematic_fbp.cpp | 22 ++-- ...dialog_edit_component_in_schematic_fbp.fbp | 36 ++---- .../dialog_edit_component_in_schematic_fbp.h | 4 +- .../dialog_edit_libentry_fields_in_lib.cpp | 10 ++ ...ialog_edit_libentry_fields_in_lib_base.cpp | 24 ++-- ...ialog_edit_libentry_fields_in_lib_base.fbp | 109 +++++++++++++++--- .../dialog_edit_libentry_fields_in_lib_base.h | 6 +- 8 files changed, 164 insertions(+), 72 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 926d2d6080..729b9a3214 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -26,6 +26,7 @@ */ #include +#include #include #include @@ -112,6 +113,7 @@ private: void addFieldButtonHandler( wxCommandEvent& event ); void deleteFieldButtonHandler( wxCommandEvent& event ); void moveUpButtonHandler( wxCommandEvent& event ); + void showButtonHandler( wxCommandEvent& event ); SCH_FIELD* findField( const wxString& aFieldName ); @@ -327,13 +329,13 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::OnOKButtonClick( wxCommandEvent& event && !m_Parent->GetTemplates().HasFieldName( m_FieldsBuf[i].GetName( false ) ) && !removeRemainingFields ) { - wxString msg; - - msg.Printf( _( "The field name <%s> does not have a value and is not defined in " - "the field template list. Empty field values are invalid an will " - "be removed from the component. Do you wish to remove this and " - "all remaining undefined fields?" ), - GetChars( m_FieldsBuf[i].GetName( false ) ) ); + wxString msg = wxString::Format( + _( "The field name <%s> does not have a value and is not defined in " + "the field template list. Empty field values are invalid an will " + "be removed from the component. Do you wish to remove this and " + "all remaining undefined fields?" ), + GetChars( m_FieldsBuf[i].GetName( false ) ) + ); wxMessageDialog dlg( this, msg, _( "Remove Fields" ), wxYES_NO | wxNO_DEFAULT ); @@ -428,6 +430,13 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::deleteFieldButtonHandler( wxCommandEven } +void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::showButtonHandler( wxCommandEvent& event ) +{ + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); +} + + void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::moveUpButtonHandler( wxCommandEvent& event ) { unsigned fieldNdx = getSelectedFieldNdx(); @@ -721,6 +730,8 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copySelectedFieldToPanel() fieldValueTextCtrl->SetValue( field.GetText() ); + m_show_datasheet_button->Enable( fieldNdx == DATASHEET ); + // For power symbols, the value is NOR editable, because value and pin // name must be same and can be edited only in library editor if( fieldNdx == VALUE && m_LibEntry && m_LibEntry->IsPower() ) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp index edf987010b..c137fedc37 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp @@ -178,26 +178,25 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( fieldNameTextCtrl->SetMaxLength( 0 ); fieldNameTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") ); - fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 ); - - - fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxEXPAND, 5 ); - - wxBoxSizer* fieldTextBoxSizer; - fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL ); + fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 ); fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 ); fieldValueLabel->Wrap( -1 ); - fieldTextBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 ); + fieldNameBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 ); fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fieldValueTextCtrl->SetMaxLength( 0 ); fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); - fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); + fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); + + m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); + m_show_datasheet_button->SetToolTip( _("If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.") ); + + fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 ); - fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxEXPAND, 5 ); + fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxBOTTOM|wxEXPAND, 5 ); wxFlexGridSizer* fgSizerPosSize; fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 ); @@ -271,6 +270,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( this->SetSizer( mainSizer ); this->Layout(); + mainSizer->Fit( this ); // Connect Events defaultsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::SetInitCmp ), NULL, this ); @@ -279,6 +279,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this ); deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this ); moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this ); + m_show_datasheet_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showButtonHandler ), NULL, this ); stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this ); } @@ -292,6 +293,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::addFieldButtonHandler ), NULL, this ); deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::deleteFieldButtonHandler ), NULL, this ); moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::moveUpButtonHandler ), NULL, this ); + m_show_datasheet_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::showButtonHandler ), NULL, this ); stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::OnOKButtonClick ), NULL, this ); diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp index aee5e6aa94..d51a6a6ed4 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp @@ -42,7 +42,7 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP - 700,496 + -1,-1 wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU DIALOG_SHIM; dialog_shim.h Component Properties @@ -1808,7 +1808,7 @@ 5 - wxEXPAND + wxBOTTOM|wxEXPAND 0 @@ -1900,7 +1900,7 @@ 5 - wxEXPAND + wxBOTTOM|wxEXPAND 0 1 @@ -1989,17 +1989,6 @@ - - - - 5 - wxEXPAND - 0 - - - fieldTextBoxSizer - wxVERTICAL - none 5 wxTOP @@ -2083,11 +2072,11 @@ - + 5 - wxEXPAND + wxBOTTOM|wxEXPAND|wxTOP 0 - + 1 1 1 @@ -2104,6 +2093,7 @@ 1 1 + 0 0 Dock 0 @@ -2115,15 +2105,15 @@ 0 0 wxID_ANY + Show 0 - 0 0 1 - fieldValueTextCtrl + m_show_datasheet_button 1 @@ -2136,15 +2126,15 @@ 0 - The text (or value) of the currently selected field + If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button. wxFILTER_NONE wxDefaultValidator - + showButtonHandler @@ -2167,10 +2157,6 @@ - - - - diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h index 895d108864..834031945e 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.h @@ -63,6 +63,7 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM wxTextCtrl* fieldNameTextCtrl; wxStaticText* fieldValueLabel; wxTextCtrl* fieldValueTextCtrl; + wxButton* m_show_datasheet_button; wxStaticText* textSizeLabel; wxTextCtrl* textSizeTextCtrl; wxStaticText* m_staticTextUnitSize; @@ -83,13 +84,14 @@ class DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP : public DIALOG_SHIM virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); } virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); } + virtual void showButtonHandler( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,496 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); + DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Component Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); ~DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP(); }; diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp index d4f5b2159e..19711d3b42 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib.cpp @@ -77,6 +77,7 @@ private: void moveUpButtonHandler( wxCommandEvent& event ); void OnCancelButtonClick( wxCommandEvent& event ); void OnOKButtonClick( wxCommandEvent& event ); + void showButtonHandler( wxCommandEvent& event ); // internal functions: void setSelectedFieldNdx( int aFieldNdx ); @@ -379,6 +380,13 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB:: moveUpButtonHandler( wxCommandEvent& e } +void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::showButtonHandler( wxCommandEvent& event ) +{ + wxString datasheet_uri = fieldValueTextCtrl->GetValue(); + ::wxLaunchDefaultBrowser( datasheet_uri ); +} + + void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::setSelectedFieldNdx( int aFieldNdx ) { // deselect old selection, but I think this is done by single selection @@ -645,6 +653,8 @@ void DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB::copySelectedFieldToPanel() textSizeTextCtrl->SetValue( EDA_GRAPHIC_TEXT_CTRL::FormatSize( g_UserUnit, field.GetSize().x ) ); + m_show_datasheet_button->Enable( fieldNdx == DATASHEET ); + wxPoint coord = field.GetTextPosition(); wxPoint zero; diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp index 103347d70e..c0b94da71f 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Apr 30 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -109,26 +109,25 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE fieldNameTextCtrl->SetMaxLength( 0 ); fieldNameTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); - fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxEXPAND, 5 ); - - - fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 ); - - wxBoxSizer* fieldTextBoxSizer; - fieldTextBoxSizer = new wxBoxSizer( wxVERTICAL ); + fieldNameBoxSizer->Add( fieldNameTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 ); fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 ); fieldValueLabel->Wrap( -1 ); - fieldTextBoxSizer->Add( fieldValueLabel, 0, 0, 5 ); + fieldNameBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 ); fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fieldValueTextCtrl->SetMaxLength( 0 ); fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); - fieldTextBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); + fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 ); + + m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); + m_show_datasheet_button->SetToolTip( _("If your datasheet is given as an http:// link, then pressing this button should bring it up in your webbrowser.") ); + + fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND, 5 ); - fieldEditBoxSizer->Add( fieldTextBoxSizer, 0, wxALL|wxEXPAND, 5 ); + fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxALL|wxEXPAND, 5 ); wxFlexGridSizer* fgSizerPosSize; fgSizerPosSize = new wxFlexGridSizer( 3, 3, 0, 0 ); @@ -200,6 +199,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE this->SetSizer( mainSizer ); this->Layout(); + mainSizer->Fit( this ); // Connect Events this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnInitDialog ) ); @@ -208,6 +208,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE addFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this ); deleteFieldButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this ); moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this ); + m_show_datasheet_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::showButtonHandler ), NULL, this ); stdDialogButtonSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this ); } @@ -221,6 +222,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BAS addFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::addFieldButtonHandler ), NULL, this ); deleteFieldButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::deleteFieldButtonHandler ), NULL, this ); moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::moveUpButtonHandler ), NULL, this ); + m_show_datasheet_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::showButtonHandler ), NULL, this ); stdDialogButtonSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnCancelButtonClick ), NULL, this ); stdDialogButtonSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::OnOKButtonClick ), NULL, this ); diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp index 2d7a00f7d1..426267a7b9 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp @@ -42,7 +42,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE - 615,456 + -1,-1 wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU Fields Properties @@ -975,7 +975,7 @@ 5 wxALL|wxEXPAND 0 - + fieldNameBoxSizer wxVERTICAL @@ -1065,7 +1065,7 @@ 5 - wxEXPAND + wxBOTTOM|wxEXPAND 0 1 @@ -1154,20 +1154,9 @@ - - - - 5 - wxALL|wxEXPAND - 0 - - - fieldTextBoxSizer - wxVERTICAL - none 5 - + wxTOP 0 1 @@ -1250,7 +1239,7 @@ 5 - wxEXPAND + wxBOTTOM|wxEXPAND 0 1 @@ -1339,6 +1328,94 @@ + + 5 + wxBOTTOM|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Show + + 0 + + + 0 + + 1 + m_show_datasheet_button + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + If your datasheet is given as an http:// link, then pressing this button should bring it up in your webbrowser. + + wxFILTER_NONE + wxDefaultValidator + + + + + showButtonHandler + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h index 2c1f089590..d08d4756dc 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Oct 8 2012) +// C++ code generated with wxFormBuilder (version Apr 30 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -51,6 +51,7 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog wxTextCtrl* fieldNameTextCtrl; wxStaticText* fieldValueLabel; wxTextCtrl* fieldValueTextCtrl; + wxButton* m_show_datasheet_button; wxStaticText* textSizeLabel; wxTextCtrl* textSizeTextCtrl; wxStaticText* m_staticTextUnitSize; @@ -72,13 +73,14 @@ class DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE : public wxDialog virtual void addFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); } virtual void deleteFieldButtonHandler( wxCommandEvent& event ) { event.Skip(); } virtual void moveUpButtonHandler( wxCommandEvent& event ) { event.Skip(); } + virtual void showButtonHandler( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelButtonClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOKButtonClick( wxCommandEvent& event ) { event.Skip(); } public: - DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 615,456 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); + DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Fields Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU ); ~DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE(); }; From f394f2c57f91396e8bf9df49b912f640b1b6134f Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Aug 2013 08:51:14 +0200 Subject: [PATCH 19/42] Eeschema: fix Bug #1210120 --- demos/interf_u/interf_u-cache.lib | 60 +- demos/interf_u/interf_u.kicad_pcb | 1330 ++++++++--------- demos/interf_u/interf_u.pro | 61 +- demos/interf_u/interf_u.sch | 79 +- demos/interf_u/pagelayout_logo.kicad_wks | 191 +++ .../dialog_edit_component_in_schematic.cpp | 3 + 6 files changed, 1003 insertions(+), 721 deletions(-) create mode 100644 demos/interf_u/pagelayout_logo.kicad_wks diff --git a/demos/interf_u/interf_u-cache.lib b/demos/interf_u/interf_u-cache.lib index d16dc3bc17..e46721dd67 100644 --- a/demos/interf_u/interf_u-cache.lib +++ b/demos/interf_u/interf_u-cache.lib @@ -1,11 +1,13 @@ -EESchema-LIBRARY Version 2.3 Date: 18/12/2011 10:04:44 +EESchema-LIBRARY Version 2.3 Date: 07/08/2013 15:43:07 #encoding utf-8 # # 4003APG120 # DEF 4003APG120 U 0 40 Y Y 1 F N -F0 "U" 0 100 70 H V C CNN -F1 "4003APG120" 0 -100 70 H V C CNN +F0 "U" 400 2800 70 H V C CNN +F1 "4003APG120" 0 -2850 70 H V C CNN +F2 "PGA120" 0 -2950 40 H V C CNN +F3 "" 400 2800 60 H V C CNN ALIAS 4003PG120 DRAW S -800 -2700 800 2700 0 1 0 N @@ -134,6 +136,8 @@ ENDDEF DEF 628128 U 0 40 Y Y 1 F N F0 "U" 50 0 70 H V C CNN F1 "628128" 300 -1200 70 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW X VCC 32 0 1100 0 D 60 60 0 0 W N X GND 16 0 -1100 0 U 60 60 0 0 W N @@ -175,6 +179,8 @@ ENDDEF DEF 74LS245 U 0 10 Y Y 1 F N F0 "U" 100 575 60 H V L BNN F1 "74LS245" 50 -575 60 H V L TNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN ALIAS 74HC245 DRAW X GND 10 0 -550 0 U 60 60 0 0 W N @@ -208,6 +214,8 @@ ENDDEF DEF 74LS541 U 0 30 Y Y 1 F N F0 "U" 0 575 60 H V C BNN F1 "74LS541" 0 -575 60 H V C TNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW X GND 10 -200 -550 0 U 60 60 0 0 W N X VCC 20 -200 550 0 D 60 60 0 0 W N @@ -243,6 +251,8 @@ ENDDEF DEF 74LS688 U 0 40 Y Y 1 F N F0 "U" 0 950 60 H V C CNN F1 "74LS688" 0 -950 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW X GND 10 -300 -900 0 R 60 60 0 0 W N X VCC 20 -300 900 0 R 60 60 0 0 W N @@ -273,6 +283,8 @@ ENDDEF DEF BUSPC BUS 0 40 Y Y 1 F N F0 "BUS" 0 100 70 H V C CNN F1 "BUSPC" 0 -100 70 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW S -600 -1600 600 1600 0 1 0 N X GND 1 -900 1500 300 R 60 60 1 1 P @@ -343,16 +355,18 @@ ENDDEF # C # DEF C C 0 10 N Y 1 F N -F0 "C" 50 100 50 H V L CNN -F1 "C" 50 -100 50 H V L CNN +F0 "C" 0 100 40 H V L CNN +F1 "C" 6 -85 40 H V L CNN +F2 "" 38 -150 30 H V C CNN +F3 "" 0 0 60 H V C CNN $FPLIST SM* C? C1-1 $ENDFPLIST DRAW -P 2 0 1 20 -100 -30 100 -30 N -P 2 0 1 20 -100 30 100 30 N +P 2 0 1 20 -80 -30 80 -30 N +P 2 0 1 20 -80 30 80 30 N X ~ 1 0 200 170 D 40 40 1 1 P X ~ 2 0 -200 170 U 40 40 1 1 P ENDDRAW @@ -363,6 +377,8 @@ ENDDEF DEF CONN_8X2 P 0 40 Y Y 1 F N F0 "P" 0 450 60 H V C CNN F1 "CONN_8X2" 0 0 50 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW S -100 400 100 -400 0 1 0 N X ~ 1 -400 350 300 R 60 60 1 1 P I @@ -387,15 +403,17 @@ ENDDEF # CP # DEF CP C 0 10 N N 1 F N -F0 "C" 50 100 50 H V L CNN -F1 "CP" 50 -100 50 H V L CNN +F0 "C" 50 100 40 H V L CNN +F1 "CP" 50 -100 40 H V L CNN +F2 "" 100 -150 30 H V C CNN +F3 "" 0 0 300 H V C CNN ALIAS CAPAPOL $FPLIST CP* SM* $ENDFPLIST DRAW -P 4 0 1 8 -100 50 -100 -50 100 -50 100 50 N +P 4 0 1 8 -80 50 -80 -50 80 -50 80 50 N P 4 0 1 0 -50 50 -50 -20 50 -20 50 50 F X ~ 1 0 200 150 D 40 40 1 1 P X ~ 2 0 -200 150 U 40 40 1 1 P @@ -407,6 +425,8 @@ ENDDEF DEF CRYSTAL X 0 40 N N 1 F N F0 "X" 0 150 60 H V C CNN F1 "CRYSTAL" 0 -150 60 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 2 0 1 16 -100 100 -100 -100 N P 2 0 1 16 100 100 100 -100 N @@ -421,6 +441,8 @@ ENDDEF DEF DB25 J 0 40 Y N 1 F N F0 "J" 50 1350 70 H V C CNN F1 "DB25" -50 -1350 70 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN $FPLIST DB25* $ENDFPLIST @@ -516,6 +538,8 @@ ENDDEF DEF EP600 U 0 40 Y Y 1 F N F0 "U" 0 100 70 H V C CNN F1 "EP600" 0 -500 70 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW S -500 -850 500 850 0 1 0 N X CLK1 1 -800 750 300 R 60 60 1 1 I C @@ -550,6 +574,8 @@ ENDDEF DEF ~GND #PWR 0 0 Y Y 1 F P F0 "#PWR" 0 0 30 H I C CNN F1 "GND" 0 -70 30 H I C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 4 0 1 0 -50 0 0 -50 50 0 -50 0 N X GND 1 0 0 0 U 30 30 1 1 W N @@ -561,6 +587,8 @@ ENDDEF DEF LED D 0 40 Y N 1 F N F0 "D" 0 100 50 H V C CNN F1 "LED" 0 -100 50 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN $FPLIST LED-3MM LED-5MM @@ -585,6 +613,8 @@ ENDDEF DEF PWR_FLAG #FLG 0 0 N N 1 F P F0 "#FLG" 0 95 30 H I C CNN F1 "PWR_FLAG" 0 180 30 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW X pwr 1 0 0 0 U 20 20 0 0 w P 6 0 1 0 0 0 0 50 -75 100 0 150 75 100 0 50 N @@ -594,8 +624,10 @@ ENDDEF # R # DEF R R 0 0 N Y 1 F N -F0 "R" 80 0 50 V V C CNN -F1 "R" 0 0 50 V V C CNN +F0 "R" 80 0 40 V V C CNN +F1 "R" 7 1 40 V V C CNN +F2 "" -70 0 30 V V C CNN +F3 "" 0 0 30 H V C CNN $FPLIST R? SM0603 @@ -615,6 +647,8 @@ ENDDEF DEF RR9 RR 0 40 Y N 1 F N F0 "RR" 50 600 70 H V C CNN F1 "RR9" 30 0 70 V V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW P 6 0 1 0 -50 -450 -50 550 50 550 100 500 100 -450 -50 -450 N X COM 1 -350 500 300 R 60 60 1 1 P I @@ -635,6 +669,8 @@ ENDDEF DEF VCC #PWR 0 0 Y Y 1 F P F0 "#PWR" 0 100 30 H I C CNN F1 "VCC" 0 100 30 H V C CNN +F2 "" 0 0 60 H V C CNN +F3 "" 0 0 60 H V C CNN DRAW X VCC 1 0 0 0 U 20 20 0 0 W N C 0 50 20 0 1 0 N diff --git a/demos/interf_u/interf_u.kicad_pcb b/demos/interf_u/interf_u.kicad_pcb index 85efaadb99..eafd7123c2 100644 --- a/demos/interf_u/interf_u.kicad_pcb +++ b/demos/interf_u/interf_u.kicad_pcb @@ -1,4 +1,4 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-03-08 BZR 3989)-testing") +(kicad_pcb (version 3) (host pcbnew "(2013-08-06 BZR 4275)-product") (general (links 200) @@ -13,7 +13,7 @@ ) (page A4) - (title_block + (title_block (title Demo) (rev 2.C) (company Kicad) @@ -22,19 +22,19 @@ (layers (15 Composant signal) (0 Cuivre signal) - (16 Dessous.Adhes user) - (17 Dessus.Adhes user) - (18 Dessous.Pate user) - (19 Dessus.Pate user) - (20 Dessous.SilkS user) - (21 Dessus.SilkS user) - (22 Dessous.Masque user) - (23 Dessus.Masque user) - (24 Dessin.User user) + (16 B.Adhes user) + (17 F.Adhes user) + (18 B.Paste user) + (19 F.Paste user) + (20 B.SilkS user) + (21 F.SilkS user) + (22 B.Mask user) + (23 F.Mask user) + (24 Dwgs.User user) (25 Cmts.User user) (26 Eco1.User user) (27 Eco2.User user) - (28 Contours.Ci user) + (28 Edge.Cuts user) ) (setup @@ -71,7 +71,7 @@ (layerselection 2129921) (usegerberextensions false) (excludeedgelayer false) - (linewidth 60) + (linewidth 0.150000) (plotframeref false) (viasonmask false) (mode 1) @@ -337,15 +337,15 @@ ) (module "" (layer Composant) (tedit 4C43F7B1) (tstamp 513C86E6) - (at 162.433 182.88) - (fp_text reference G1 (at 0 12.192) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (at 107.1 180.5) + (fp_text reference G1 (at 0 12.192) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_text value LOGO (at 0 -12.192) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value LOGO (at 0 -12.192) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) (fp_poly (pts (xy -9.60882 11.47064) (xy -9.56564 -11.34364) (xy 9.779 -11.38682) (xy -9.652 -11.43) - (xy -9.60882 11.47064)) (layer Dessus.SilkS) (width 0.00254)) + (xy -9.60882 11.47064)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 4.14528 10.49274) (xy 4.16052 10.49274) (xy 4.5212 10.48004) (xy 4.8006 10.41908) (xy 5.08508 10.26922) (xy 5.45846 9.9822) (xy 6.00202 9.51738) (xy 6.62686 9.03732) (xy 7.4295 8.55218) (xy 7.50062 8.51662) (xy 8.14832 8.12546) (xy 8.56996 7.74446) @@ -443,20 +443,20 @@ (xy -1.4859 9.57326) (xy -0.85598 9.5123) (xy -0.01778 9.48944) (xy 0.97028 9.50976) (xy 1.65608 9.54278) (xy 2.20472 9.58596) (xy 2.53492 9.64438) (xy 2.71018 9.73582) (xy 2.794 9.8679) (xy 2.90068 10.02538) (xy 3.19024 10.27938) (xy 3.38836 10.39876) - (xy 3.683 10.4775) (xy 4.14528 10.49274)) (layer Dessus.SilkS) (width 0.00254)) + (xy 3.683 10.4775) (xy 4.14528 10.49274)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 8.60298 7.112) (xy 8.59282 7.02564) (xy 8.49884 6.94182) (xy 8.509 7.02564) - (xy 8.60298 7.112)) (layer Dessus.SilkS) (width 0.00254)) + (xy 8.60298 7.112)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 8.33882 6.94182) (xy 8.382 6.89864) (xy 8.33882 6.858) (xy 8.29564 6.89864) - (xy 8.33882 6.94182)) (layer Dessus.SilkS) (width 0.00254)) + (xy 8.33882 6.94182)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 8.16864 6.858) (xy 8.21182 6.81482) (xy 8.16864 6.77164) (xy 8.128 6.81482) - (xy 8.16864 6.858)) (layer Dessus.SilkS) (width 0.00254)) + (xy 8.16864 6.858)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 7.94766 6.68782) (xy 7.92226 6.63702) (xy 7.747 6.43382) (xy 7.5946 6.28396) (xy 7.45998 6.17982) (xy 7.48284 6.23062) (xy 7.66064 6.43382) (xy 7.81304 6.58114) - (xy 7.94766 6.68782)) (layer Dessus.SilkS) (width 0.00254)) + (xy 7.94766 6.68782)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 7.4168 6.096) (xy 7.40664 6.00964) (xy 7.31266 5.92582) (xy 7.32282 6.00964) - (xy 7.4168 6.096)) (layer Dessus.SilkS) (width 0.00254)) + (xy 7.4168 6.096)) (layer F.SilkS) (width 0.00254)) (fp_poly (pts (xy 7.14248 5.53466) (xy 7.17042 5.5245) (xy 7.1755 5.48894) (xy 7.17042 5.1435) - (xy 7.14756 5.11048) (xy 7.13486 5.334) (xy 7.14248 5.53466)) (layer Dessus.SilkS) (width 0.00254)) + (xy 7.14756 5.11048) (xy 7.13486 5.334) (xy 7.14248 5.53466)) (layer F.SilkS) (width 0.00254)) ) (module PGA120 (layer Composant) (tedit 429C886F) (tstamp 322D32FA) @@ -464,468 +464,468 @@ (descr "Support PGA 120 pins") (tags PGA) (path /322D32FA) - (fp_text reference U9 (at 0 -3.81 180) (layer Dessus.SilkS) + (fp_text reference U9 (at 0 -3.81 180) (layer F.SilkS) (effects (font (size 2.54 2.032) (thickness 0.2032))) ) - (fp_text value 4003APG120 (at 0 3.81 360) (layer Dessus.SilkS) + (fp_text value 4003APG120 (at 0 3.81 360) (layer F.SilkS) (effects (font (size 2.54 1.5748) (thickness 0.2032))) ) - (fp_line (start 16.51 15.24) (end 15.24 16.51) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 16.51 15.24) (end 16.51 -16.51) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 16.51 -16.51) (end -16.51 -16.51) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -16.51 -16.51) (end -16.51 16.51) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -16.51 16.51) (end 15.24 16.51) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start 16.51 15.24) (end 15.24 16.51) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.51 15.24) (end 16.51 -16.51) (layer F.SilkS) (width 0.3048)) + (fp_line (start 16.51 -16.51) (end -16.51 -16.51) (layer F.SilkS) (width 0.3048)) + (fp_line (start -16.51 -16.51) (end -16.51 16.51) (layer F.SilkS) (width 0.3048)) + (fp_line (start -16.51 16.51) (end 15.24 16.51) (layer F.SilkS) (width 0.3048)) (pad N1 thru_hole circle (at 15.24 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad N2 thru_hole circle (at 12.7 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 15 /D0) ) (pad N3 thru_hole circle (at 10.16 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad M1 thru_hole circle (at 15.24 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad M2 thru_hole circle (at 12.7 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad M3 thru_hole circle (at 10.16 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 28 /LED1) ) (pad L1 thru_hole circle (at 15.24 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 108 N-000145) ) (pad L2 thru_hole circle (at 12.7 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 94 /SEL_LPT) ) (pad L3 thru_hole circle (at 10.16 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad K1 thru_hole circle (at 15.24 -7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 1 /8MH-OUT) ) (pad K2 thru_hole circle (at 12.7 -7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 62 /PC-A3) ) (pad K3 thru_hole circle (at 10.16 -7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad J1 thru_hole circle (at 15.24 -5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 65 /PC-A6) ) (pad J2 thru_hole circle (at 12.7 -5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 64 /PC-A5) ) (pad J3 thru_hole circle (at 10.16 -5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad H1 thru_hole circle (at 15.24 -2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 67 /PC-A8) ) (pad H2 thru_hole circle (at 12.7 -2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 66 /PC-A7) ) (pad H3 thru_hole circle (at 10.16 -2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 63 /PC-A4) ) (pad G1 thru_hole circle (at 15.24 0 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 45 /MA8) ) (pad G2 thru_hole circle (at 12.7 0 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad G3 thru_hole circle (at 10.16 0 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad F1 thru_hole circle (at 15.24 2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 37 /MA15) ) (pad F2 thru_hole circle (at 12.7 2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 43 /MA6) ) (pad F3 thru_hole circle (at 10.16 2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 34 /MA12) ) (pad E1 thru_hole circle (at 15.24 5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 41 /MA4) ) (pad E2 thru_hole circle (at 12.7 5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad E3 thru_hole circle (at 10.16 5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad D1 thru_hole circle (at 15.24 7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 36 /MA14) ) (pad D2 thru_hole circle (at 12.7 7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 33 /MA11) ) (pad D3 thru_hole circle (at 10.16 7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 39 /MA2) ) (pad C1 thru_hole circle (at 15.24 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 35 /MA13) ) (pad C2 thru_hole circle (at 12.7 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 40 /MA3) ) (pad C3 thru_hole circle (at 10.16 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad C4 thru_hole circle (at 7.62 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad C5 thru_hole circle (at 5.08 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad C6 thru_hole circle (at 2.54 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 48 /MD0) ) (pad C7 thru_hole circle (at 0 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad C8 thru_hole circle (at -2.54 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 38 /MA16) ) (pad C9 thru_hole circle (at -5.08 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 32 /MA10) ) (pad C10 thru_hole circle (at -7.62 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad C11 thru_hole circle (at -10.16 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad C12 thru_hole circle (at -12.7 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 3 /AUTOFD-) ) (pad C13 thru_hole circle (at -15.24 10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 42 /MA5) ) (pad B1 thru_hole circle (at 15.24 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad B2 thru_hole circle (at 12.7 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 31 /MA1) ) (pad B3 thru_hole circle (at 10.16 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 44 /MA7) ) (pad B4 thru_hole circle (at 7.62 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad B5 thru_hole circle (at 5.08 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad B6 thru_hole circle (at 2.54 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 50 /MD2) ) (pad B7 thru_hole circle (at 0 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad B8 thru_hole circle (at -2.54 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 55 /MD7) ) (pad B9 thru_hole circle (at -5.08 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 56 /OE-) ) (pad B10 thru_hole circle (at -7.62 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad B11 thru_hole circle (at -10.16 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad B12 thru_hole circle (at -12.7 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad B13 thru_hole circle (at -15.24 12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad A1 thru_hole rect (at 15.24 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad A2 thru_hole circle (at 12.7 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad A3 thru_hole circle (at 10.16 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad A4 thru_hole circle (at 7.62 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 46 /MA9) ) (pad A5 thru_hole circle (at 5.08 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 49 /MD1) ) (pad A6 thru_hole circle (at 2.54 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 51 /MD3) ) (pad A7 thru_hole circle (at 0 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 52 /MD4) ) (pad A8 thru_hole circle (at -2.54 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 53 /MD5) ) (pad A9 thru_hole circle (at -5.08 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 54 /MD6) ) (pad A10 thru_hole circle (at -7.62 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 14 /CS1-) ) (pad A11 thru_hole circle (at -10.16 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 30 /MA0) ) (pad A12 thru_hole circle (at -12.7 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 97 /STROBE) ) (pad A13 thru_hole circle (at -15.24 15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 98 /WR-) ) (pad N4 thru_hole circle (at 7.62 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 58 /PC-A1) ) (pad N5 thru_hole circle (at 5.08 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad N6 thru_hole circle (at 2.54 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 82 /PC-WR) ) (pad N7 thru_hole circle (at 0 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 68 /PC-A9) ) (pad N8 thru_hole circle (at -2.54 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 16 /D1) ) (pad N9 thru_hole circle (at -5.08 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 17 /D2) ) (pad N10 thru_hole circle (at -7.62 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 69 /PC-AEN) ) (pad N11 thru_hole circle (at -10.16 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 20 /D5) ) (pad N12 thru_hole circle (at -12.7 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad N13 thru_hole circle (at -15.24 -15.24 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 95 /SLCT+) ) (pad M4 thru_hole circle (at 7.62 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 13 /CLKLCA) ) (pad M5 thru_hole circle (at 5.08 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 61 /PC-A2) ) (pad M6 thru_hole circle (at 2.54 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 57 /PC-A0) ) (pad M7 thru_hole circle (at 0 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad M8 thru_hole circle (at -2.54 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 80 /PC-RD) ) (pad M9 thru_hole circle (at -5.08 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 18 /D3) ) (pad M10 thru_hole circle (at -7.62 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 19 /D4) ) (pad M11 thru_hole circle (at -10.16 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 21 /D6) ) (pad M12 thru_hole circle (at -12.7 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 84 /PROG-) ) (pad M13 thru_hole circle (at -15.24 -12.7 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad L4 thru_hole circle (at 7.62 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 13 /CLKLCA) ) (pad L5 thru_hole circle (at 5.08 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad L6 thru_hole circle (at 2.54 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad L7 thru_hole circle (at 0 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad L8 thru_hole circle (at -2.54 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 59 /PC-A10) ) (pad L9 thru_hole circle (at -5.08 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad L10 thru_hole circle (at -7.62 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad L11 thru_hole circle (at -10.16 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 24 /DONE) ) (pad L12 thru_hole circle (at -12.7 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 22 /D7) ) (pad L13 thru_hole circle (at -15.24 -10.16 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 83 /PE+) ) (pad K11 thru_hole circle (at -10.16 -7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad K12 thru_hole circle (at -12.7 -7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad K13 thru_hole circle (at -15.24 -7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /ACK) ) (pad J11 thru_hole circle (at -10.16 -5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad J12 thru_hole circle (at -12.7 -5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 12 /BUST+) ) (pad J13 thru_hole circle (at -15.24 -5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 10 /BIT6) ) (pad H11 thru_hole circle (at -10.16 -2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 11 /BIT7) ) (pad H12 thru_hole circle (at -12.7 -2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 9 /BIT5) ) (pad H13 thru_hole circle (at -15.24 -2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 8 /BIT4) ) (pad G11 thru_hole circle (at -10.16 0 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad G12 thru_hole circle (at -12.7 0 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad G13 thru_hole circle (at -15.24 0 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 7 /BIT3) ) (pad F11 thru_hole circle (at -10.16 2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 96 /SLCTIN-) ) (pad F12 thru_hole circle (at -12.7 2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 6 /BIT2) ) (pad F13 thru_hole circle (at -15.24 2.54 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 29 /LED2) ) (pad E11 thru_hole circle (at -10.16 5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad E12 thru_hole circle (at -12.7 5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 27 /INIT-) ) (pad E13 thru_hole circle (at -15.24 5.08 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 5 /BIT1) ) (pad D11 thru_hole circle (at -10.16 7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad D12 thru_hole circle (at -12.7 7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 4 /BIT0) ) (pad D13 thru_hole circle (at -15.24 7.62 180) (size 1.397 1.397) (drill 0.787399) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 26 /ERROR-) ) (model support/supp_pga120.wrl @@ -940,55 +940,55 @@ (descr "Connecteur 10 pins") (tags "CONN DEV") (path /325679C1) - (fp_text reference RR1 (at -1.016 -2.54) (layer Dessus.SilkS) + (fp_text reference RR1 (at -1.016 -2.54) (layer F.SilkS) (effects (font (size 1.27 1.27) (thickness 0.2032))) ) - (fp_text value 9x1K (at -0.762 2.286) (layer Dessus.SilkS) + (fp_text value 9x1K (at -0.762 2.286) (layer F.SilkS) (effects (font (size 1.27 1.016) (thickness 0.2032))) ) - (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -12.7 1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -12.7 -1.27) (end 12.7 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 -1.27) (end 12.7 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 12.7 1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -11.43 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad 2 thru_hole circle (at -8.89 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 88 /REF5) ) (pad 3 thru_hole circle (at -6.35 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 87 /REF4) ) (pad 4 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 91 /REF8) ) (pad 5 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 89 /REF6) ) (pad 6 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 92 /REF9) ) (pad 7 thru_hole circle (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 90 /REF7) ) (pad 8 thru_hole circle (at 6.35 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 86 /REF11) ) (pad 9 thru_hole circle (at 8.89 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 85 /REF10) ) (pad 10 thru_hole circle (at 11.43 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (model discret/r_pack9.wrl (at (xyz 0 0 0)) @@ -1002,29 +1002,29 @@ (descr "Quartz boitier HC-18 horizontal") (tags "QUARTZ DEV") (path /32307EC0) - (fp_text reference X1 (at 0 6.35 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference X1 (at 0 6.35 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 8MHz (at 0 11.43 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value 8MHz (at 0 11.43 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_line (start 6.35 2.794) (end -6.35 2.794) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.842 2.794) (end 5.842 15.24) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.35 2.794) (end -6.35 2.032) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.35 2.794) (end 6.35 2.032) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.35 2.032) (end -6.35 2.032) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 0) (end -2.54 2.032) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 0) (end 2.54 2.032) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.842 2.794) (end -5.842 15.24) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.842 15.24) (end 5.334 15.748) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 5.334 15.748) (end -5.334 15.748) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -5.334 15.748) (end -5.842 15.24) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start 6.35 2.794) (end -6.35 2.794) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.842 2.794) (end 5.842 15.24) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.35 2.794) (end -6.35 2.032) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 2.794) (end 6.35 2.032) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.35 2.032) (end -6.35 2.032) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 0) (end -2.54 2.032) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 0) (end 2.54 2.032) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.842 2.794) (end -5.842 15.24) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.842 15.24) (end 5.334 15.748) (layer F.SilkS) (width 0.3048)) + (fp_line (start 5.334 15.748) (end -5.334 15.748) (layer F.SilkS) (width 0.3048)) + (fp_line (start -5.334 15.748) (end -5.842 15.24) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -2.54 0 270) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 108 N-000145) ) (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 109 N-000146) ) (model discret\xtal\crystal_hc18u_horizontal.wrl @@ -1039,111 +1039,111 @@ (descr "Module Dil 24 pins, pads ronds, e=300 mils") (tags DIL) (path /322D321C) - (fp_text reference U8 (at -8.89 -1.27) (layer Dessus.SilkS) + (fp_text reference U8 (at -8.89 -1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value EP600 (at 6.35 1.27) (layer Dessus.SilkS) + (fp_text value EP600 (at 6.35 1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_line (start -16.51 -1.27) (end -15.24 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -15.24 -1.27) (end -15.24 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -15.24 1.27) (end -16.51 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -16.51 1.27) (end -16.51 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -16.51 -2.54) (end 16.51 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 16.51 -2.54) (end 16.51 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 16.51 2.54) (end -16.51 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -16.51 2.54) (end -16.51 -2.54) (layer Dessus.SilkS) (width 0.381)) + (fp_line (start -16.51 -1.27) (end -15.24 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -15.24 -1.27) (end -15.24 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -15.24 1.27) (end -16.51 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 1.27) (end -16.51 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 -2.54) (end 16.51 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 16.51 -2.54) (end 16.51 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 16.51 2.54) (end -16.51 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 2.54) (end -16.51 -2.54) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole rect (at -13.97 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 2 thru_hole circle (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 47 /MATCHL) ) (pad 3 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 104 N-000106) ) (pad 4 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 105 N-000107) ) (pad 5 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 106 N-000108) ) (pad 6 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 107 N-000109) ) (pad 7 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 82 /PC-WR) ) (pad 8 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad 9 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad 10 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad 11 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 93 /RSTL) ) (pad 12 thru_hole circle (at 13.97 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 13 thru_hole circle (at 13.97 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 99 /WR_REG) ) (pad 14 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 80 /PC-RD) ) (pad 15 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 99 /WR_REG) ) (pad 16 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 13 /CLKLCA) ) (pad 17 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 23 /DIR) ) (pad 18 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 94 /SEL_LPT) ) (pad 19 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 84 /PROG-) ) (pad 20 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 24 /DONE) ) (pad 21 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 15 /D0) ) (pad 22 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 25 /ENBBUF) ) (pad 23 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad 24 thru_hole circle (at -13.97 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (model dil/dil_24-w300.wrl @@ -1158,23 +1158,23 @@ (descr "Condensateur e = 1 pas") (tags C) (path /32307ECF) - (fp_text reference C2 (at 0.254 -2.286) (layer Dessus.SilkS) + (fp_text reference C2 (at 0.254 -2.286) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 47pF (at 0 -2.286) (layer Dessus.SilkS) hide + (fp_text value 47pF (at 0 -2.286) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -2.4892 -1.27) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -2.4892 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 108 N-000145) ) (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/capa_1_pas.wrl @@ -1189,23 +1189,23 @@ (descr "Condensateur e = 1 pas") (tags C) (path /32307ED4) - (fp_text reference C3 (at 0.254 -2.286) (layer Dessus.SilkS) + (fp_text reference C3 (at 0.254 -2.286) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value 47pF (at 0 -2.286) (layer Dessus.SilkS) hide + (fp_text value 47pF (at 0 -2.286) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -2.4892 -1.27) (end 2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -2.4892 -1.27) (end 2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -1.27) (end 2.54 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 1.27) (end -2.54 1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 1.27) (end -2.54 -1.27) (layer F.SilkS) (width 0.3048)) + (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 109 N-000146) ) (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/capa_1_pas.wrl @@ -1220,97 +1220,97 @@ (descr "Module Dil 20 pins, pads ronds") (tags DIL) (path /322D31F4) - (fp_text reference U1 (at -8.89 -1.27) (layer Dessus.SilkS) + (fp_text reference U1 (at -8.89 -1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value 74LS245 (at 6.35 1.27) (layer Dessus.SilkS) + (fp_text value 74LS245 (at 6.35 1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer Dessus.SilkS) (width 0.381)) + (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 23 /DIR) ) (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 70 /PC-DB0) ) (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 71 /PC-DB1) ) (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 72 /PC-DB2) ) (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 73 /PC-DB3) ) (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 74 /PC-DB4) ) (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 75 /PC-DB5) ) (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 76 /PC-DB6) ) (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 77 /PC-DB7) ) (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 22 /D7) ) (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 21 /D6) ) (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 20 /D5) ) (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 19 /D4) ) (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 18 /D3) ) (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 17 /D2) ) (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 16 /D1) ) (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 15 /D0) ) (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 25 /ENBBUF) ) (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (model dil/dil_20.wrl @@ -1325,96 +1325,96 @@ (descr "Module Dil 20 pins, pads ronds") (tags DIL) (path /4A087146) - (fp_text reference U3 (at -8.89 -1.27) (layer Dessus.SilkS) + (fp_text reference U3 (at -8.89 -1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value 74LS541 (at 6.35 1.27) (layer Dessus.SilkS) + (fp_text value 74LS541 (at 6.35 1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer Dessus.SilkS) (width 0.381)) + (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 58 /PC-A1) ) (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 57 /PC-A0) ) (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 61 /PC-A2) ) (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 62 /PC-A3) ) (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 79 /PC-IOW) ) (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 78 /PC-IOR) ) (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 81 /PC-RST) ) (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 81 /PC-RST) ) (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 93 /RSTL) ) (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 80 /PC-RD) ) (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 82 /PC-WR) ) (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 107 N-000109) ) (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 106 N-000108) ) (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 105 N-000107) ) (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 104 N-000106) ) (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (model dil/dil_20.wrl @@ -1429,97 +1429,97 @@ (descr "Module Dil 20 pins, pads ronds") (tags DIL) (path /322D35B4) - (fp_text reference U2 (at -8.89 -1.27) (layer Dessus.SilkS) + (fp_text reference U2 (at -8.89 -1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_text value 74LS688 (at 6.35 1.27) (layer Dessus.SilkS) + (fp_text value 74LS688 (at 6.35 1.27) (layer F.SilkS) (effects (font (size 1.778 1.143) (thickness 0.28702))) ) - (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer Dessus.SilkS) (width 0.381)) + (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 69 /PC-AEN) ) (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 64 /PC-A5) ) (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 88 /REF5) ) (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 67 /PC-A8) ) (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 91 /REF8) ) (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 68 /PC-A9) ) (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 92 /REF9) ) (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 60 /PC-A11) ) (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 86 /REF11) ) (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 59 /PC-A10) ) (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 85 /REF10) ) (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 66 /PC-A7) ) (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 90 /REF7) ) (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 65 /PC-A6) ) (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 89 /REF6) ) (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 63 /PC-A4) ) (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 87 /REF4) ) (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 47 /MATCHL) ) (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (model dil/dil_20.wrl @@ -1534,28 +1534,28 @@ (descr "Condensateur polarise") (tags CP) (path /32307DE2) - (fp_text reference C1 (at 0 0) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C1 (at 0 0) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 47uF (at 0.635 0) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value 47uF (at 0.635 0) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_line (start -7.62 0) (end -6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 7.62 0) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 0) (end 6.604 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 1.524) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -7.62 0) (end -6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.62 0) (end 6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 0) (end 6.604 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole trapezoid (at -7.62 0) (size 1.397 3.937) (rect_delta 0 1.27 ) (drill 1.016) - (layers *.Cu *.Paste *.Mask Dessus.Adhes Dessus.SilkS) + (layers *.Cu *.Paste *.Mask F.Adhes F.SilkS) (net 110 VCC) ) (pad 2 thru_hole trapezoid (at 7.62 0) (size 3.937 1.397) (rect_delta 1.27 0 ) (drill 1.016) - (layers *.Cu *.Mask Dessus.Pate Dessus.SilkS) + (layers *.Cu *.Mask F.Paste F.SilkS) (net 100 GND) (solder_paste_margin -0.508) ) @@ -1571,28 +1571,28 @@ (descr "Condensateur polarise") (tags CP) (path /32307DCF) - (fp_text reference C4 (at 0 0 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C4 (at 0 0 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 47uF (at 0.635 0 180) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value 47uF (at 0.635 0 180) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_line (start -7.62 0) (end -6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 7.62 0) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 0) (end 6.604 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 1.524) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -7.62 0) (end -6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.62 0) (end 6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 0) (end 6.604 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -7.62 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad 2 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/c_pol.wrl @@ -1607,28 +1607,28 @@ (descr "Condensateur polarise") (tags CP) (path /32307DCA) - (fp_text reference C5 (at 0 0 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C5 (at 0 0 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 47uF (at 0.635 0 270) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value 47uF (at 0.635 0 270) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_line (start -7.62 0) (end -6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 7.62 0) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 0) (end 6.604 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 1.524) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -7.62 0) (end -6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.62 0) (end 6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 0) (end 6.604 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -7.62 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad 2 thru_hole circle (at 7.62 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/c_pol.wrl @@ -1643,28 +1643,28 @@ (descr "Condensateur polarise") (tags CP) (path /32307DC0) - (fp_text reference C6 (at 0 0) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference C6 (at 0 0) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value 47uF (at 0.635 0) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value 47uF (at 0.635 0) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_line (start -7.62 0) (end -6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 7.62 0) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 0) (end 6.604 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 6.604 1.524) (end 6.604 0) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -7.62 0) (end -6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 0.508) (end -6.604 0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 0.508) (end -6.604 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.604 -0.508) (end -6.096 -0.508) (layer F.SilkS) (width 0.3048)) + (fp_line (start 7.62 0) (end 6.604 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 0) (end 6.604 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 -1.524) (end -6.096 -1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 -1.524) (end -6.096 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start -6.096 1.524) (end 6.604 1.524) (layer F.SilkS) (width 0.3048)) + (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -7.62 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (pad 2 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/c_pol.wrl @@ -1680,26 +1680,26 @@ (tags R) (path /32307EA1) (autoplace_cost180 10) - (fp_text reference R1 (at 0 0 90) (layer Dessus.SilkS) + (fp_text reference R1 (at 0 0 90) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 100K (at 0 0 90) (layer Dessus.SilkS) hide + (fp_text value 100K (at 0 0 90) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -3.81 0) (end -3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 0) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 0) (end 3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 1.016) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -3.81 0) (end -3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 0) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 0) (end 3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 1.016) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 90) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 109 N-000146) ) (pad 2 thru_hole circle (at 3.81 0 90) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 108 N-000145) ) (model discret/resistor.wrl @@ -1715,26 +1715,26 @@ (tags R) (path /32307EAA) (autoplace_cost180 10) - (fp_text reference R2 (at 0 0 270) (layer Dessus.SilkS) + (fp_text reference R2 (at 0 0 270) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 1K (at 0 0 270) (layer Dessus.SilkS) hide + (fp_text value 1K (at 0 0 270) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -3.81 0) (end -3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 0) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 0) (end 3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 1.016) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -3.81 0) (end -3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 0) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 0) (end 3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 1.016) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 1 /8MH-OUT) ) (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 109 N-000146) ) (model discret/resistor.wrl @@ -1750,26 +1750,26 @@ (tags R) (path /324002E6) (autoplace_cost180 10) - (fp_text reference R3 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R3 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 10K (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 10K (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -3.81 0) (end -3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 0) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 0) (end 3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 1.016) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -3.81 0) (end -3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 0) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 0) (end 3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 1.016) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 101 N-000071) ) (pad 2 thru_hole circle (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (model discret/resistor.wrl @@ -1785,26 +1785,26 @@ (tags R) (path /322D3295) (autoplace_cost180 10) - (fp_text reference R4 (at 0 0 180) (layer Dessus.SilkS) + (fp_text reference R4 (at 0 0 180) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 330 (at 0 0 180) (layer Dessus.SilkS) hide + (fp_text value 330 (at 0 0 180) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -3.81 0) (end -3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 0) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 0) (end 3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 1.016) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -3.81 0) (end -3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 0) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 0) (end 3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 1.016) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 103 N-000105) ) (pad 2 thru_hole circle (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 28 /LED1) ) (model discret/resistor.wrl @@ -1820,26 +1820,26 @@ (tags R) (path /322D32A0) (autoplace_cost180 10) - (fp_text reference R5 (at 0 0) (layer Dessus.SilkS) + (fp_text reference R5 (at 0 0) (layer F.SilkS) (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_text value 330 (at 0 0) (layer Dessus.SilkS) hide + (fp_text value 330 (at 0 0) (layer F.SilkS) hide (effects (font (size 1.397 1.27) (thickness 0.2032))) ) - (fp_line (start -3.81 0) (end -3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.81 0) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 0) (end 3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 3.302 1.016) (end 3.302 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -3.81 0) (end -3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.81 0) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 0) (end 3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 -1.016) (end -3.302 -1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -1.016) (end -3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 1.016) (end 3.302 1.016) (layer F.SilkS) (width 0.3048)) + (fp_line (start 3.302 1.016) (end 3.302 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 102 N-000104) ) (pad 2 thru_hole circle (at 3.81 0) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 29 /LED2) ) (model discret/resistor.wrl @@ -1854,22 +1854,22 @@ (descr "Led verticale diam 6mm") (tags "LED DEV") (path /322D32BE) - (fp_text reference D2 (at 0 -3.81 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference D2 (at 0 -3.81 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value LED (at 0 -3.81 180) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value LED (at 0 -3.81 180) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_circle (center 0 0) (end -2.54 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -0.635) (end 1.905 -0.635) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.905 -0.635) (end 1.905 0.635) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.905 0.635) (end 2.54 0.635) (layer Dessus.SilkS) (width 0.3048)) + (fp_circle (center 0 0) (end -2.54 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -0.635) (end 1.905 -0.635) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.905 -0.635) (end 1.905 0.635) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.905 0.635) (end 2.54 0.635) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -1.27 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 102 N-000104) ) (pad 2 thru_hole circle (at 1.27 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/led5_vertical.wrl @@ -1884,22 +1884,22 @@ (descr "Led verticale diam 6mm") (tags "LED DEV") (path /322D32AC) - (fp_text reference D1 (at 0 -3.81 180) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference D1 (at 0 -3.81 180) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value LED (at 0 -3.81 180) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value LED (at 0 -3.81 180) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_circle (center 0 0) (end -2.54 0) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 2.54 -0.635) (end 1.905 -0.635) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.905 -0.635) (end 1.905 0.635) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 1.905 0.635) (end 2.54 0.635) (layer Dessus.SilkS) (width 0.3048)) + (fp_circle (center 0 0) (end -2.54 0) (layer F.SilkS) (width 0.3048)) + (fp_line (start 2.54 -0.635) (end 1.905 -0.635) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.905 -0.635) (end 1.905 0.635) (layer F.SilkS) (width 0.3048)) + (fp_line (start 1.905 0.635) (end 2.54 0.635) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -1.27 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 103 N-000105) ) (pad 2 thru_hole circle (at 1.27 0 180) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model discret/led5_vertical.wrl @@ -1914,228 +1914,228 @@ (descr "Connecteur Bus PC 8 bits") (tags "CONN PC ISA") (path /322D3011) - (fp_text reference BUS1 (at 1.27 -6.985) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference BUS1 (at 1.27 -6.985) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value BUSPC (at -16.51 -6.985) (layer Dessus.SilkS) hide - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value BUSPC (at -16.51 -6.985) (layer F.SilkS) hide + (effects (font (thickness 0.3048))) ) - (fp_line (start 40.64 3.81) (end -40.64 3.81) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -40.64 3.81) (end -40.64 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -40.64 -5.08) (end 40.64 -5.08) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 40.64 -5.08) (end 40.64 3.81) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start 40.64 3.81) (end -40.64 3.81) (layer F.SilkS) (width 0.3048)) + (fp_line (start -40.64 3.81) (end -40.64 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start -40.64 -5.08) (end 40.64 -5.08) (layer F.SilkS) (width 0.3048)) + (fp_line (start 40.64 -5.08) (end 40.64 3.81) (layer F.SilkS) (width 0.3048)) (pad 1 connect rect (at 38.1 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 100 GND) ) (pad 2 connect rect (at 35.56 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 81 /PC-RST) ) (pad 3 connect rect (at 33.02 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 110 VCC) ) (pad 4 connect rect (at 30.48 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 5 connect rect (at 27.94 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 6 connect rect (at 25.4 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 7 connect rect (at 22.86 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 8 connect rect (at 20.32 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 9 connect rect (at 17.78 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 10 connect rect (at 15.24 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 11 connect rect (at 12.7 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 12 connect rect (at 10.16 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 13 connect rect (at 7.62 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 79 /PC-IOW) ) (pad 14 connect rect (at 5.08 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 78 /PC-IOR) ) (pad 15 connect rect (at 2.54 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 16 connect rect (at 0 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 17 connect rect (at -2.54 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 18 connect rect (at -5.08 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 19 connect rect (at -7.62 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 20 connect rect (at -10.16 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 21 connect rect (at -12.7 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 22 connect rect (at -15.24 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 23 connect rect (at -17.78 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 24 connect rect (at -20.32 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 25 connect rect (at -22.86 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 26 connect rect (at -25.4 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 27 connect rect (at -27.94 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 28 connect rect (at -30.48 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 29 connect rect (at -33.02 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 110 VCC) ) (pad 30 connect rect (at -35.56 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) ) (pad 31 connect rect (at -38.1 0) (size 1.778 7.62) - (layers Cuivre Dessous.Masque) + (layers Cuivre B.Mask) (net 100 GND) ) (pad 32 connect rect (at 38.1 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 33 connect rect (at 35.56 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 77 /PC-DB7) ) (pad 34 connect rect (at 33.02 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 76 /PC-DB6) ) (pad 35 connect rect (at 30.48 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 75 /PC-DB5) ) (pad 36 connect rect (at 27.94 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 74 /PC-DB4) ) (pad 37 connect rect (at 25.4 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 73 /PC-DB3) ) (pad 38 connect rect (at 22.86 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 72 /PC-DB2) ) (pad 39 connect rect (at 20.32 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 71 /PC-DB1) ) (pad 40 connect rect (at 17.78 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 70 /PC-DB0) ) (pad 41 connect rect (at 15.24 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 42 connect rect (at 12.7 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 69 /PC-AEN) ) (pad 43 connect rect (at 10.16 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 44 connect rect (at 7.62 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 45 connect rect (at 5.08 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 46 connect rect (at 2.54 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 47 connect rect (at 0 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 48 connect rect (at -2.54 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 49 connect rect (at -5.08 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 50 connect rect (at -7.62 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) ) (pad 51 connect rect (at -10.16 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 60 /PC-A11) ) (pad 52 connect rect (at -12.7 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 59 /PC-A10) ) (pad 53 connect rect (at -15.24 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 68 /PC-A9) ) (pad 54 connect rect (at -17.78 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 67 /PC-A8) ) (pad 55 connect rect (at -20.32 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 66 /PC-A7) ) (pad 56 connect rect (at -22.86 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 65 /PC-A6) ) (pad 57 connect rect (at -25.4 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 64 /PC-A5) ) (pad 58 connect rect (at -27.94 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 63 /PC-A4) ) (pad 59 connect rect (at -30.48 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 62 /PC-A3) ) (pad 60 connect rect (at -33.02 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 61 /PC-A2) ) (pad 61 connect rect (at -35.56 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 58 /PC-A1) ) (pad 62 connect rect (at -38.1 0) (size 1.778 7.62) - (layers Composant Dessus.Masque) + (layers Composant F.Mask) (net 57 /PC-A0) ) ) @@ -2145,78 +2145,78 @@ (descr "Double rangee de contacts 2 x 8 pins") (tags CONN) (path /32568D1E) - (fp_text reference JP1 (at 0.635 -3.81 180) (layer Dessus.SilkS) + (fp_text reference JP1 (at 0.635 -3.81 180) (layer F.SilkS) (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_text value CONN_8X2 (at 0.635 -3.81 180) (layer Dessus.SilkS) hide + (fp_text value CONN_8X2 (at 0.635 -3.81 180) (layer F.SilkS) hide (effects (font (size 1.016 1.016) (thickness 0.2032))) ) - (fp_line (start -9.906 2.286) (end -9.906 -2.286) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -9.906 -2.286) (end 9.906 -2.286) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 9.906 -2.286) (end 9.906 2.286) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 9.906 2.286) (end -9.906 2.286) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start -9.906 2.286) (end -9.906 -2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start -9.906 -2.286) (end 9.906 -2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.906 -2.286) (end 9.906 2.286) (layer F.SilkS) (width 0.3048)) + (fp_line (start 9.906 2.286) (end -9.906 2.286) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -8.89 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 2 thru_hole circle (at -8.89 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 85 /REF10) ) (pad 3 thru_hole circle (at -6.35 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 4 thru_hole circle (at -6.35 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 86 /REF11) ) (pad 5 thru_hole circle (at -3.81 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 6 thru_hole circle (at -3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 90 /REF7) ) (pad 7 thru_hole circle (at -1.27 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 8 thru_hole circle (at -1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 92 /REF9) ) (pad 9 thru_hole circle (at 1.27 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 10 thru_hole circle (at 1.27 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 89 /REF6) ) (pad 11 thru_hole circle (at 3.81 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 12 thru_hole circle (at 3.81 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 91 /REF8) ) (pad 13 thru_hole circle (at 6.35 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 14 thru_hole circle (at 6.35 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 87 /REF4) ) (pad 15 thru_hole circle (at 8.89 1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 16 thru_hole circle (at 8.89 -1.27 180) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 88 /REF5) ) (model pin_array/pins_array_8x2.wrl @@ -2231,144 +2231,144 @@ (descr "32 pins DIL package, round pads") (tags DIL) (path /3240023F) - (fp_text reference U5 (at -13.97 -3.81) (layer Dessus.SilkS) + (fp_text reference U5 (at -13.97 -3.81) (layer F.SilkS) (effects (font (size 1.778 1.778) (thickness 0.3048))) ) - (fp_text value 628128 (at 8.89 3.81) (layer Dessus.SilkS) + (fp_text value 628128 (at 8.89 3.81) (layer F.SilkS) (effects (font (size 1.778 1.778) (thickness 0.3048))) ) - (fp_line (start -21.59 -6.35) (end 21.59 -6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 21.59 -6.35) (end 21.59 6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start 21.59 6.35) (end -21.59 6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -21.59 6.35) (end -21.59 -6.35) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -21.59 1.27) (end -20.32 1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -20.32 1.27) (end -20.32 -1.27) (layer Dessus.SilkS) (width 0.381)) - (fp_line (start -20.32 -1.27) (end -21.59 -1.27) (layer Dessus.SilkS) (width 0.381)) + (fp_line (start -21.59 -6.35) (end 21.59 -6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start 21.59 -6.35) (end 21.59 6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start 21.59 6.35) (end -21.59 6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start -21.59 6.35) (end -21.59 -6.35) (layer F.SilkS) (width 0.381)) + (fp_line (start -21.59 1.27) (end -20.32 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -20.32 1.27) (end -20.32 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -20.32 -1.27) (end -21.59 -1.27) (layer F.SilkS) (width 0.381)) (pad 1 thru_hole rect (at -19.05 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad 2 thru_hole circle (at -16.51 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 38 /MA16) ) (pad 3 thru_hole circle (at -13.97 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 36 /MA14) ) (pad 4 thru_hole circle (at -11.43 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 34 /MA12) ) (pad 5 thru_hole circle (at -8.89 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 44 /MA7) ) (pad 6 thru_hole circle (at -6.35 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 43 /MA6) ) (pad 7 thru_hole circle (at -3.81 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 42 /MA5) ) (pad 8 thru_hole circle (at -1.27 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 41 /MA4) ) (pad 9 thru_hole circle (at 1.27 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 40 /MA3) ) (pad 10 thru_hole circle (at 3.81 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 39 /MA2) ) (pad 11 thru_hole circle (at 6.35 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 31 /MA1) ) (pad 12 thru_hole circle (at 8.89 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 30 /MA0) ) (pad 13 thru_hole circle (at 11.43 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 48 /MD0) ) (pad 14 thru_hole circle (at 13.97 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 49 /MD1) ) (pad 15 thru_hole circle (at 16.51 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 50 /MD2) ) (pad 16 thru_hole circle (at 19.05 7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 17 thru_hole circle (at 19.05 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 51 /MD3) ) (pad 18 thru_hole circle (at 16.51 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 52 /MD4) ) (pad 19 thru_hole circle (at 13.97 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 53 /MD5) ) (pad 20 thru_hole circle (at 11.43 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 54 /MD6) ) (pad 21 thru_hole circle (at 8.89 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 55 /MD7) ) (pad 22 thru_hole circle (at 6.35 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 14 /CS1-) ) (pad 23 thru_hole circle (at 3.81 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 32 /MA10) ) (pad 24 thru_hole circle (at 1.27 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 56 /OE-) ) (pad 25 thru_hole circle (at -1.27 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 33 /MA11) ) (pad 26 thru_hole circle (at -3.81 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 46 /MA9) ) (pad 27 thru_hole circle (at -6.35 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 45 /MA8) ) (pad 28 thru_hole circle (at -8.89 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 35 /MA13) ) (pad 29 thru_hole circle (at -11.43 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 98 /WR-) ) (pad 30 thru_hole circle (at -13.97 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 101 N-000071) ) (pad 31 thru_hole circle (at -16.51 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 37 /MA15) ) (pad 32 thru_hole circle (at -19.05 -7.62) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 110 VCC) ) (model dil/dil_32-w600.wrl @@ -2383,136 +2383,136 @@ (descr "Connecteur DB25 femelle couche") (tags "CONN DB25") (path /3256759C) - (fp_text reference P1 (at 0 -15.24 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text reference P1 (at 0 -15.24 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_text value DB25FEMELLE (at 0 -6.35 270) (layer Dessus.SilkS) - (effects (font (size 1.524 1.524) (thickness 0.3048))) + (fp_text value DB25FEMELLE (at 0 -6.35 270) (layer F.SilkS) + (effects (font (thickness 0.3048))) ) - (fp_line (start 26.67 -11.43) (end 26.67 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 19.05 -6.35) (end 19.05 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 20.955 -11.43) (end 20.955 -6.35) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -20.955 -11.43) (end -20.955 -6.35) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -19.05 -6.35) (end -19.05 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -26.67 2.54) (end -26.67 -11.43) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 26.67 -6.35) (end 19.05 -6.35) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -26.67 -6.35) (end -19.05 -6.35) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 20.32 -8.255) (end 20.32 -11.43) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -20.32 -8.255) (end -20.32 -11.43) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 20.32 -18.415) (end 20.32 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -20.32 -18.415) (end -20.32 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 26.67 -11.43) (end 26.67 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 26.67 -12.7) (end -26.67 -12.7) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -26.67 -12.7) (end -26.67 -11.43) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -26.67 -11.43) (end 26.67 -11.43) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start 19.05 2.54) (end 26.67 2.54) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -20.32 -8.255) (end 20.32 -8.255) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -20.32 -18.415) (end 20.32 -18.415) (layer Dessus.SilkS) (width 0.3048)) - (fp_line (start -26.67 2.54) (end -19.05 2.54) (layer Dessus.SilkS) (width 0.3048)) + (fp_line (start 26.67 -11.43) (end 26.67 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 19.05 -6.35) (end 19.05 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start 20.955 -11.43) (end 20.955 -6.35) (layer F.SilkS) (width 0.3048)) + (fp_line (start -20.955 -11.43) (end -20.955 -6.35) (layer F.SilkS) (width 0.3048)) + (fp_line (start -19.05 -6.35) (end -19.05 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -26.67 2.54) (end -26.67 -11.43) (layer F.SilkS) (width 0.3048)) + (fp_line (start 26.67 -6.35) (end 19.05 -6.35) (layer F.SilkS) (width 0.3048)) + (fp_line (start -26.67 -6.35) (end -19.05 -6.35) (layer F.SilkS) (width 0.3048)) + (fp_line (start 20.32 -8.255) (end 20.32 -11.43) (layer F.SilkS) (width 0.3048)) + (fp_line (start -20.32 -8.255) (end -20.32 -11.43) (layer F.SilkS) (width 0.3048)) + (fp_line (start 20.32 -18.415) (end 20.32 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start -20.32 -18.415) (end -20.32 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start 26.67 -11.43) (end 26.67 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start 26.67 -12.7) (end -26.67 -12.7) (layer F.SilkS) (width 0.3048)) + (fp_line (start -26.67 -12.7) (end -26.67 -11.43) (layer F.SilkS) (width 0.3048)) + (fp_line (start -26.67 -11.43) (end 26.67 -11.43) (layer F.SilkS) (width 0.3048)) + (fp_line (start 19.05 2.54) (end 26.67 2.54) (layer F.SilkS) (width 0.3048)) + (fp_line (start -20.32 -8.255) (end 20.32 -8.255) (layer F.SilkS) (width 0.3048)) + (fp_line (start -20.32 -18.415) (end 20.32 -18.415) (layer F.SilkS) (width 0.3048)) + (fp_line (start -26.67 2.54) (end -19.05 2.54) (layer F.SilkS) (width 0.3048)) (pad "" thru_hole circle (at 23.495 -1.27 270) (size 3.81 3.81) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad "" thru_hole circle (at -23.495 -1.27 270) (size 3.81 3.81) (drill 3.048) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) ) (pad 1 thru_hole rect (at -16.51 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 97 /STROBE) ) (pad 2 thru_hole circle (at -13.716 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 4 /BIT0) ) (pad 3 thru_hole circle (at -11.049 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 5 /BIT1) ) (pad 4 thru_hole circle (at -8.255 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 6 /BIT2) ) (pad 5 thru_hole circle (at -5.461 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 7 /BIT3) ) (pad 6 thru_hole circle (at -2.667 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 8 /BIT4) ) (pad 7 thru_hole circle (at 0 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 9 /BIT5) ) (pad 8 thru_hole circle (at 2.794 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 10 /BIT6) ) (pad 9 thru_hole circle (at 5.588 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 11 /BIT7) ) (pad 10 thru_hole circle (at 8.382 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 2 /ACK) ) (pad 11 thru_hole circle (at 11.049 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 12 /BUST+) ) (pad 12 thru_hole circle (at 13.843 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 83 /PE+) ) (pad 13 thru_hole circle (at 16.637 1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 95 /SLCT+) ) (pad 14 thru_hole circle (at -14.9352 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 3 /AUTOFD-) ) (pad 15 thru_hole circle (at -12.3952 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 26 /ERROR-) ) (pad 16 thru_hole circle (at -9.6012 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 27 /INIT-) ) (pad 17 thru_hole circle (at -6.858 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 96 /SLCTIN-) ) (pad 18 thru_hole circle (at -4.1148 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 19 thru_hole circle (at -1.3208 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 20 thru_hole circle (at 1.4224 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 21 thru_hole circle (at 4.1656 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 22 thru_hole circle (at 7.0104 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 23 thru_hole circle (at 9.7028 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 24 thru_hole circle (at 12.446 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (pad 25 thru_hole circle (at 15.24 -1.27 270) (size 1.524 1.524) (drill 1.016) - (layers *.Cu *.Mask Dessus.SilkS) + (layers *.Cu *.Mask F.SilkS) (net 100 GND) ) (model conn_DBxx/db25_female_pin90deg.wrl @@ -2564,21 +2564,21 @@ (gr_text V02 (at 175.895 38.1) (layer Composant) (effects (font (size 2.032 1.524) (thickness 0.381))) ) - (gr_text INTERF_U (at 184.785 127) (layer Dessus.SilkS) + (gr_text INTERF_U (at 184.785 127) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.381))) ) - (gr_text V02 (at 183.515 130.81) (layer Dessus.SilkS) + (gr_text V02 (at 183.515 130.81) (layer F.SilkS) (effects (font (size 2.032 1.524) (thickness 0.381))) ) - (gr_line (start 90.805 133.35) (end 90.805 140.97) (layer Contours.Ci) (width 0.127)) - (gr_line (start 90.805 140.97) (end 90.805 142.24) (layer Contours.Ci) (width 0.127)) - (gr_line (start 90.805 142.24) (end 172.085 142.24) (layer Contours.Ci) (width 0.127)) - (gr_line (start 172.085 142.24) (end 172.085 133.35) (layer Contours.Ci) (width 0.127)) - (gr_line (start 172.085 133.35) (end 194.945 133.35) (layer Contours.Ci) (width 0.127)) - (gr_line (start 194.945 133.35) (end 194.945 34.29) (layer Contours.Ci) (width 0.127)) - (gr_line (start 90.805 133.35) (end 79.375 133.35) (layer Contours.Ci) (width 0.127)) - (gr_line (start 79.375 133.35) (end 79.375 34.29) (layer Contours.Ci) (width 0.127)) - (gr_line (start 79.375 34.29) (end 194.945 34.29) (layer Contours.Ci) (width 0.127)) + (gr_line (start 90.805 133.35) (end 90.805 140.97) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 90.805 140.97) (end 90.805 142.24) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 90.805 142.24) (end 172.085 142.24) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 172.085 142.24) (end 172.085 133.35) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 172.085 133.35) (end 194.945 133.35) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 194.945 133.35) (end 194.945 34.29) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 90.805 133.35) (end 79.375 133.35) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 79.375 133.35) (end 79.375 34.29) (layer Edge.Cuts) (width 0.127)) + (gr_line (start 79.375 34.29) (end 194.945 34.29) (layer Edge.Cuts) (width 0.127)) (segment (start 127.635 91.44) (end 128.905 90.17) (width 0.4318) (layer Cuivre) (net 1) (status 800)) (segment (start 128.905 90.17) (end 142.875 90.17) (width 0.4318) (layer Cuivre) (net 1) (status 400)) diff --git a/demos/interf_u/interf_u.pro b/demos/interf_u/interf_u.pro index 953f8b0612..e069e440b3 100644 --- a/demos/interf_u/interf_u.pro +++ b/demos/interf_u/interf_u.pro @@ -1,4 +1,4 @@ -update=02/04/2011 15:02:30 +update=07/08/2013 15:44:03 version=1 last_client=pcbnew [common] @@ -14,31 +14,11 @@ NetIExt=net EquName1=devcms [eeschema] version=1 +PageLayoutDescrFile=pagelayout_logo.kicad_wks +SubpartIdSeparator=0 +SubpartFirstId=65 LibDir= -NetFmt=1 -HPGLSpd=20 -HPGLDm=15 -HPGLNum=1 -offX_A4=0 -offY_A4=0 -offX_A3=0 -offY_A3=0 -offX_A2=0 -offY_A2=0 -offX_A1=0 -offY_A1=0 -offX_A0=0 -offY_A0=0 -offX_A=0 -offY_A=0 -offX_B=0 -offY_B=0 -offX_C=0 -offY_C=0 -offX_D=0 -offY_D=0 -offX_E=0 -offY_E=0 +NetFmtName= RptD_X=0 RptD_Y=100 RptLab=1 @@ -58,21 +38,24 @@ LibName11=special LibName12=image [pcbnew] version=1 -PadDrlX=354 -PadDimH=550 -PadDimV=550 -BoardThickness=630 -TxtPcbV=800 -TxtPcbH=600 -TxtModV=600 -TxtModH=600 -TxtModW=120 -VEgarde=100 -DrawLar=150 -EdgeLar=50 -TxtLar=170 -MSegLar=150 +PageLayoutDescrFile=pagelayout_logo.kicad_wks LastNetListRead=interf_u.net +UseCmpFile=1 +PadDrill=0.89916 +PadDrillOvalY=0.89916 +PadSizeH=1.397 +PadSizeV=1.397 +PcbTextSizeV=2.032 +PcbTextSizeH=1.524 +PcbTextThickness=0.4318 +ModuleTextSizeV=1.524 +ModuleTextSizeH=1.524 +ModuleTextSizeThickness=0.3048 +SolderMaskClearance=0.254 +SolderMaskMinWidth=0 +DrawSegmentWidth=0.381 +BoardOutlineThickness=0.127 +ModuleOutlineThickness=0.381 [pcbnew/libraries] LibDir= LibName1=connect diff --git a/demos/interf_u/interf_u.sch b/demos/interf_u/interf_u.sch index 03f35457df..ce1eb3feb0 100644 --- a/demos/interf_u/interf_u.sch +++ b/demos/interf_u/interf_u.sch @@ -1,4 +1,4 @@ -EESchema Schematic File Version 2 date 18/12/2011 10:04:44 +EESchema Schematic File Version 2 LIBS:power LIBS:device LIBS:conn @@ -12,9 +12,9 @@ LIBS:xilinx LIBS:special LIBS:image LIBS:interf_u-cache -EELAYER 25 0 +EELAYER 24 0 EELAYER END -$Descr A3 16535 11700 +$Descr A3 16535 11693 encoding utf-8 Sheet 1 1 Title "INTERFACE UNIVERSEL" @@ -27,7 +27,7 @@ Comment3 "Comment 3" Comment4 "Comment 4" $EndDescr $Bitmap -Pos 11200 10550 +Pos 9250 10500 Scale 1,000000 Data 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 E5 00 00 01 0E 08 02 00 00 00 F9 5F 47 @@ -1181,7 +1181,7 @@ BF FD 96 77 9E 38 7E F1 EC E1 55 E2 AF 2F E0 1B 5F F9 FC FE BD 4F B9 56 EB C9 C9 29 65 D5 9A 89 35 EB 37 F6 E3 02 4F 95 57 89 BF 1E 63 D9 CA D5 CB 7E 65 BC F3 FF E1 D5 7A 1F CE A2 94 8E 79 E6 79 49 E6 FD 75 9E B9 C4 BC BF CE 33 97 98 F7 D7 79 E6 12 F3 FE 3A CF 5C E2 E7 E2 03 93 93 93 FD BA 8E 79 E6 39 19 8E FB EB DC 15 0B E6 F9 D5 61 7E 3F 30 CF 5C 62 DE 5F E7 99 4B -FC 1F 94 BD 62 D3 EE A5 8B 6B 00 00 00 00 49 45 4E 44 AE 42 60 82 3F $EndBitmap +FC 1F 94 BD 62 D3 EE A5 8B 6B 00 00 00 00 49 45 4E 44 AE 42 60 82 11 EndData $EndBitmap Wire Bus Line @@ -1794,6 +1794,8 @@ U 1 1 4A087146 P 5250 1950 F 0 "U3" H 5250 2525 60 0000 C BNN F 1 "74LS541" H 5250 1375 60 0000 C TNN +F 2 "" H 5250 1950 60 0001 C CNN +F 3 "" H 5250 1950 60 0001 C CNN 1 5250 1950 1 0 0 -1 $EndComp @@ -1805,6 +1807,8 @@ U 1 1 43020357 P 14350 4800 F 0 "#PWR01" H 14350 4800 30 0001 C CNN F 1 "GND" H 14350 4730 30 0001 C CNN +F 2 "" H 14350 4800 60 0001 C CNN +F 3 "" H 14350 4800 60 0001 C CNN 1 14350 4800 1 0 0 -1 $EndComp @@ -1814,6 +1818,8 @@ U 1 1 43020354 P 13550 4800 F 0 "#PWR02" H 13550 4800 30 0001 C CNN F 1 "GND" H 13550 4730 30 0001 C CNN +F 2 "" H 13550 4800 60 0001 C CNN +F 3 "" H 13550 4800 60 0001 C CNN 1 13550 4800 1 0 0 -1 $EndComp @@ -1823,6 +1829,8 @@ U 1 1 43020343 P 4550 2550 F 0 "#PWR03" H 4550 2550 30 0001 C CNN F 1 "GND" H 4550 2480 30 0001 C CNN +F 2 "" H 4550 2550 60 0001 C CNN +F 3 "" H 4550 2550 60 0001 C CNN 1 4550 2550 1 0 0 -1 $EndComp @@ -1832,6 +1840,8 @@ U 1 1 4302032E P 1200 7700 F 0 "#PWR04" H 1200 7700 30 0001 C CNN F 1 "GND" H 1200 7630 30 0001 C CNN +F 2 "" H 1200 7700 60 0001 C CNN +F 3 "" H 1200 7700 60 0001 C CNN 1 1200 7700 1 0 0 -1 $EndComp @@ -1841,6 +1851,8 @@ U 1 1 43020328 P 2600 9350 F 0 "#PWR05" H 2600 9350 30 0001 C CNN F 1 "GND" H 2600 9280 30 0001 C CNN +F 2 "" H 2600 9350 60 0001 C CNN +F 3 "" H 2600 9350 60 0001 C CNN 1 2600 9350 1 0 0 -1 $EndComp @@ -1850,6 +1862,8 @@ U 1 1 38CEA284 P 3250 9300 F 0 "#FLG06" H 3250 9570 30 0001 C CNN F 1 "PWR_FLAG" H 3250 9530 30 0000 C CNN +F 2 "" H 3250 9300 60 0001 C CNN +F 3 "" H 3250 9300 60 0001 C CNN 1 3250 9300 -1 0 0 1 $EndComp @@ -1859,6 +1873,8 @@ U 1 1 38C8E81F P 3250 8900 F 0 "#PWR07" H 3250 9170 30 0001 C CNN F 1 "PWR_FLAG" H 3250 9130 30 0000 C CNN +F 2 "" H 3250 8900 60 0001 C CNN +F 3 "" H 3250 8900 60 0001 C CNN 1 3250 8900 1 0 0 -1 $EndComp @@ -1868,6 +1884,8 @@ U 1 1 38C8E014 P 8450 2550 F 0 "#PWR08" H 8450 2650 30 0001 C CNN F 1 "VCC" H 8450 2650 30 0000 C CNN +F 2 "" H 8450 2550 60 0001 C CNN +F 3 "" H 8450 2550 60 0001 C CNN 1 8450 2550 1 0 0 -1 $EndComp @@ -1877,6 +1895,8 @@ U 1 1 4A33B1CF P 1350 4250 F 0 "#PWR09" H 1350 4450 40 0001 C CNN F 1 "VCC" H 1350 4400 40 0000 C CNN +F 2 "" H 1350 4250 60 0001 C CNN +F 3 "" H 1350 4250 60 0001 C CNN 1 1350 4250 0 -1 -1 0 $EndComp @@ -1886,6 +1906,8 @@ U 1 1 4A33B1D0 P 1350 1650 F 0 "#PWR010" H 1350 1850 40 0001 C CNN F 1 "VCC" H 1350 1800 40 0000 C CNN +F 2 "" H 1350 1650 60 0001 C CNN +F 3 "" H 1350 1650 60 0001 C CNN 1 1350 1650 0 -1 -1 0 $EndComp @@ -1895,6 +1917,8 @@ U 1 1 4A33B1D1 P 10050 3000 F 0 "#PWR011" H 10050 3100 30 0001 C CNN F 1 "VCC" H 10050 3100 30 0000 C CNN +F 2 "" H 10050 3000 60 0001 C CNN +F 3 "" H 10050 3000 60 0001 C CNN 1 10050 3000 1 0 0 -1 $EndComp @@ -1904,6 +1928,8 @@ U 1 1 4A33B1D2 P 6100 9900 F 0 "#PWR012" H 6100 10000 30 0001 C CNN F 1 "VCC" H 6100 10000 30 0000 C CNN +F 2 "" H 6100 9900 60 0001 C CNN +F 3 "" H 6100 9900 60 0001 C CNN 1 6100 9900 1 0 0 -1 $EndComp @@ -1913,6 +1939,8 @@ U 1 1 38C8DFD2 P 2600 8850 F 0 "#PWR013" H 2600 8950 30 0001 C CNN F 1 "VCC" H 2600 8950 30 0000 C CNN +F 2 "" H 2600 8850 60 0001 C CNN +F 3 "" H 2600 8850 60 0001 C CNN 1 2600 8850 1 0 0 -1 $EndComp @@ -1994,6 +2022,8 @@ U 1 1 3268ED7F P 6850 2550 F 0 "#GND014" H 6850 2550 30 0001 C CNN F 1 "GND" H 6850 2480 30 0001 C CNN +F 2 "" H 6850 2550 60 0001 C CNN +F 3 "" H 6850 2550 60 0001 C CNN 1 6850 2550 0 1 1 0 $EndComp @@ -2020,6 +2050,7 @@ P 1700 7250 F 0 "JP1" H 1700 7750 70 0000 C CNN F 1 "CONN_8X2" V 1700 7250 70 0000 C CNN F 2 "pin_array_8x2" H 1700 7800 60 0000 C CNN +F 3 "" H 1700 7250 60 0001 C CNN 1 1700 7250 1 0 0 1 $EndComp @@ -2032,6 +2063,8 @@ U 1 1 32567A22 P 3250 7950 F 0 "#015" H 3250 8150 40 0001 C CNN F 1 "VCC" H 3250 8100 40 0000 C CNN +F 2 "" H 3250 7950 60 0001 C CNN +F 3 "" H 3250 7950 60 0001 C CNN 1 3250 7950 0 1 1 0 $EndComp @@ -2042,6 +2075,7 @@ P 2750 8300 F 0 "RR1" V 2800 8300 70 0000 C CNN F 1 "9x1K" V 2770 8630 70 0000 C CNN F 2 "r_pack9" V 2900 8350 60 0000 C CNN +F 3 "" H 2750 8300 60 0001 C CNN 1 2750 8300 0 1 1 0 $EndComp @@ -2083,6 +2117,8 @@ U 1 1 325676D0 P 14650 6100 F 0 "#016" H 14650 6100 30 0001 C CNN F 1 "GND" H 14650 6030 30 0001 C CNN +F 2 "" H 14650 6100 60 0001 C CNN +F 3 "" H 14650 6100 60 0001 C CNN 1 14650 6100 0 1 1 0 $EndComp @@ -2095,6 +2131,7 @@ P 15200 7200 F 0 "P1" H 15250 8550 70 0000 C CNN F 1 "DB25FEMELLE" H 15150 5850 70 0000 C CNN F 2 "DB25FC" H 15150 5750 60 0000 C CNN +F 3 "" H 15200 7200 60 0001 C CNN 1 15200 7200 1 0 0 -1 $EndComp @@ -2297,6 +2334,7 @@ P 6350 9900 F 0 "R3" V 6430 9900 50 0000 C CNN F 1 "10K" V 6350 9900 50 0000 C CNN F 2 "R3" V 6250 9900 60 0000 C CNN +F 3 "" H 6350 9900 60 0001 C CNN 1 6350 9900 0 1 1 0 $EndComp @@ -2347,6 +2385,7 @@ P 7700 9050 F 0 "U5" H 7750 10200 70 0000 C CNN F 1 "628128" H 7700 7900 70 0000 C CNN F 2 "32dip600" H 7700 7800 60 0000 C CNN +F 3 "" H 7700 9050 60 0001 C CNN 1 7700 9050 1 0 0 -1 $EndComp @@ -2378,6 +2417,8 @@ U 1 1 32332C72 P 8450 1050 F 0 "#017" H 8450 1150 30 0001 C CNN F 1 "VCC" H 8450 1150 30 0000 C CNN +F 2 "" H 8450 1050 60 0001 C CNN +F 3 "" H 8450 1050 60 0001 C CNN 1 8450 1050 1 0 0 -1 $EndComp @@ -2389,6 +2430,8 @@ U 1 1 32331877 P 6850 1050 F 0 "#018" H 6850 1050 30 0001 C CNN F 1 "GND" H 6850 980 30 0001 C CNN +F 2 "" H 6850 1050 60 0001 C CNN +F 3 "" H 6850 1050 60 0001 C CNN 1 6850 1050 0 1 1 0 $EndComp @@ -2466,6 +2509,8 @@ U 1 1 32308380 P 14650 1750 F 0 "#019" H 14650 1750 30 0001 C CNN F 1 "GND" H 14650 1680 30 0001 C CNN +F 2 "" H 14650 1750 60 0001 C CNN +F 3 "" H 14650 1750 60 0001 C CNN 1 14650 1750 1 0 0 -1 $EndComp @@ -2475,6 +2520,8 @@ U 1 1 3230837A P 14250 2200 F 0 "#020" H 14250 2200 30 0001 C CNN F 1 "GND" H 14250 2130 30 0001 C CNN +F 2 "" H 14250 2200 60 0001 C CNN +F 3 "" H 14250 2200 60 0001 C CNN 1 14250 2200 1 0 0 -1 $EndComp @@ -2558,6 +2605,8 @@ U 1 1 32307FB9 P 1350 4450 F 0 "#021" H 1350 4450 40 0001 C CNN F 1 "GND" H 1350 4380 40 0000 C CNN +F 2 "" H 1350 4450 60 0001 C CNN +F 3 "" H 1350 4450 60 0001 C CNN 1 1350 4450 0 1 1 0 $EndComp @@ -2567,6 +2616,8 @@ U 1 1 32307FA7 P 1350 1450 F 0 "#022" H 1350 1450 40 0001 C CNN F 1 "GND" H 1350 1380 40 0000 C CNN +F 2 "" H 1350 1450 60 0001 C CNN +F 3 "" H 1350 1450 60 0001 C CNN 1 1350 1450 0 1 1 0 $EndComp @@ -2577,6 +2628,7 @@ P 14350 4600 F 0 "C3" V 14450 4750 50 0000 C CNN F 1 "47pF" V 14450 4450 50 0000 C CNN F 2 "C1" H 14550 4600 60 0000 C CNN +F 3 "" H 14350 4600 60 0001 C CNN 1 14350 4600 1 0 0 -1 $EndComp @@ -2587,6 +2639,7 @@ P 13550 4600 F 0 "C2" V 13650 4750 50 0000 C CNN F 1 "47pF" V 13650 4450 50 0000 C CNN F 2 "C1" H 13350 4600 60 0000 C CNN +F 3 "" H 13550 4600 60 0001 C CNN 1 13550 4600 1 0 0 -1 $EndComp @@ -2597,6 +2650,7 @@ P 13950 4150 F 0 "X1" H 13950 4350 70 0000 C CNN F 1 "8MHz" H 13950 3950 70 0000 C CNN F 2 "HC-18UH" H 13950 3850 60 0000 C CNN +F 3 "" H 13950 4150 60 0001 C CNN 1 13950 4150 1 0 0 -1 $EndComp @@ -2607,6 +2661,7 @@ P 14900 3700 F 0 "R2" V 14980 3700 50 0000 C CNN F 1 "1K" V 14900 3700 50 0000 C CNN F 2 "R3" V 14800 3700 60 0000 C CNN +F 3 "" H 14900 3700 60 0001 C CNN 1 14900 3700 0 1 1 0 $EndComp @@ -2617,6 +2672,7 @@ P 13950 3700 F 0 "R1" V 14030 3700 50 0000 C CNN F 1 "100K" V 13950 3700 50 0000 C CNN F 2 "R3" V 13850 3700 60 0000 C CNN +F 3 "" H 13950 3700 60 0001 C CNN 1 13950 3700 0 1 1 0 $EndComp @@ -2627,6 +2683,7 @@ P 4450 9100 F 0 "C1" H 4500 9200 50 0000 L CNN F 1 "47uF" H 4500 9000 50 0000 L CNN F 2 "CP6" H 4650 9100 60 0000 C CNN +F 3 "" H 4450 9100 60 0001 C CNN 1 4450 9100 1 0 0 -1 $EndComp @@ -2637,6 +2694,7 @@ P 3800 9100 F 0 "C4" H 3850 9200 50 0000 L CNN F 1 "47uF" H 3850 9000 50 0000 L CNN F 2 "CP6" H 4000 9100 60 0000 C CNN +F 3 "" H 3800 9100 60 0001 C CNN 1 3800 9100 1 0 0 -1 $EndComp @@ -2647,6 +2705,7 @@ P 3250 9100 F 0 "C5" H 3300 9200 50 0000 L CNN F 1 "47uF" H 3300 9000 50 0000 L CNN F 2 "CP6" H 3450 9100 60 0000 C CNN +F 3 "" H 3250 9100 60 0001 C CNN 1 3250 9100 1 0 0 -1 $EndComp @@ -2657,6 +2716,7 @@ P 2600 9100 F 0 "C6" H 2650 9200 50 0000 L CNN F 1 "47uF" H 2650 9000 50 0000 L CNN F 2 "CP6" H 2800 9100 60 0000 C CNN +F 3 "" H 2600 9100 60 0001 C CNN 1 2600 9100 1 0 0 -1 $EndComp @@ -2683,6 +2743,7 @@ P 4600 6900 F 0 "U2" H 4600 7850 60 0000 C CNN F 1 "74LS688" H 4600 5950 60 0000 C CIB F 2 "20dip300" H 4600 5850 60 0000 C CNB +F 3 "" H 4600 6900 60 0001 C CNN 1 4600 6900 1 0 0 -1 $EndComp @@ -2693,6 +2754,7 @@ P 11200 5700 F 0 "U9" H 11200 8450 70 0000 C CNN F 1 "4003APG120" H 11200 2950 70 0000 C CNN F 2 "PGA120" H 11200 2850 60 0000 C CNN +F 3 "" H 11200 5700 60 0001 C CNN F 4 "50$" H 11200 5700 60 0001 C CNN "price" F 5 "test" H 11200 5700 60 0001 C CNN "Field5" 1 11200 5700 @@ -2705,6 +2767,7 @@ P 14250 2000 F 0 "D2" H 14250 2100 50 0000 C CNN F 1 "LED" H 14250 1900 50 0000 C CNN F 2 "LEDV" V 14250 2250 60 0000 C CNN +F 3 "" H 14250 2000 60 0001 C CNN 1 14250 2000 0 1 1 0 $EndComp @@ -2715,6 +2778,7 @@ P 14650 1550 F 0 "D1" H 14650 1650 50 0000 C CNN F 1 "LED" H 14650 1450 50 0000 C CNN F 2 "LEDV" V 14650 1800 60 0000 C CNN +F 3 "" H 14650 1550 60 0001 C CNN 1 14650 1550 0 1 1 0 $EndComp @@ -2725,6 +2789,7 @@ P 13700 1500 F 0 "R5" V 13780 1500 50 0000 C CNN F 1 "330" V 13700 1500 50 0000 C CNN F 2 "R3" V 13730 1680 30 0000 C CNN +F 3 "" H 13700 1500 60 0001 C CNN 1 13700 1500 0 1 1 0 $EndComp @@ -2735,6 +2800,7 @@ P 13700 1050 F 0 "R4" V 13780 1050 50 0000 C CNN F 1 "330" V 13700 1050 50 0000 C CNN F 2 "R3" V 13850 1050 60 0000 C CNN +F 3 "" H 13700 1050 60 0001 C CNN 1 13700 1050 0 1 1 0 $EndComp @@ -2745,6 +2811,7 @@ P 7650 1800 F 0 "U8" H 7650 1900 70 0000 C CNN F 1 "EP600" H 7650 1300 70 0000 C CNN F 2 "24dip300" H 7700 1000 60 0000 C CNN +F 3 "" H 7650 1800 60 0001 C CNN 1 7650 1800 1 0 0 -1 $EndComp @@ -2755,6 +2822,7 @@ P 5200 3600 F 0 "U1" H 5300 4175 60 0000 L BNN F 1 "74LS245" H 5250 3025 60 0000 L TNN F 2 "20dip300" H 5350 3100 60 0000 C CNN +F 3 "" H 5200 3600 60 0001 C CNN 1 5200 3600 1 0 0 -1 $EndComp @@ -2765,6 +2833,7 @@ P 2250 2950 F 0 "BUS1" H 2250 3050 70 0000 C CNN F 1 "BUSPC" H 2250 2850 70 0000 C CNN F 2 "BUS_PC" H 2250 1250 60 0000 C CNN +F 3 "" H 2250 2950 60 0001 C CNN 1 2250 2950 1 0 0 -1 $EndComp diff --git a/demos/interf_u/pagelayout_logo.kicad_wks b/demos/interf_u/pagelayout_logo.kicad_wks new file mode 100644 index 0000000000..dd710966ec --- /dev/null +++ b/demos/interf_u/pagelayout_logo.kicad_wks @@ -0,0 +1,191 @@ +( page_layout + ( setup (textsize 1.5 1.5) (linewidth 0.15) (textlinewidth 0.15) ) + ( rect (comment "rect around the title block") (linewidth 0.15) (start 110 34) (end 2 2) ) + ( rect (start 0 0 ltcorner) (end 0 0 rbcorner) (repeat 2) (incrx 2) (incry 2) ) + ( line (start 50 2 ltcorner) (end 50 0 ltcorner) (repeat 30) (incrx 50) ) + ( tbtext "1" (pos 25 1 ltcorner) (font (size 1.3 1.3))(repeat 100) (incrx 50) ) + ( line (start 50 2 lbcorner) (end 50 0 lbcorner) (repeat 30) (incrx 50) ) + ( tbtext "1" (pos 25 1 lbcorner) (font (size 1.3 1.3)) (repeat 100) (incrx 50) ) + ( line (start 0 50 ltcorner) (end 2 50 ltcorner) (repeat 30) (incry 50) ) + ( tbtext "A" (pos 1 25 ltcorner) (font (size 1.3 1.3)) + (justify center)(repeat 100) (incry 50) ) + ( line (start 0 50 rtcorner) (end 2 50 rtcorner) (repeat 30) (incry 50) ) + ( tbtext "A" (pos 1 25 rtcorner) (font (size 1.3 1.3)) + (justify center) (repeat 100) (incry 50) ) + ( tbtext "Date: %D" (pos 87 6.9) ) + ( line (start 110 5.5) end 2 5.5) ) + ( tbtext "%K" (pos 109 4.1) (comment "Kicad version" ) ) + ( line (start 110 8.5) end 2 8.5) ) + ( tbtext "Rev: %R" (pos 24 6.9)(font bold)(justify left) ) + ( tbtext "Size: %Z" (comment "Paper format name")(pos 109 6.9) ) + ( tbtext "Id: %S/%N" (comment "Sheet id")(pos 24 4.1) ) + ( line (start 110 12.5) end 2 12.5) ) + ( tbtext "Title: %T" (pos 109 10.7)(font bold (size 2 2)) ) + ( tbtext "File: %F" (pos 109 14.3) ) + ( line (start 110 18.5) end 2 18.5) ) + ( tbtext "Sheet: %P" (pos 109 17) ) + ( tbtext "%Y" (comment "Company name") (pos 109 20)(font bold) ) + ( tbtext "%C0" (comment "Comment 0") (pos 109 23) ) + ( tbtext "%C1" (comment "Comment 1") (pos 109 26) ) + ( tbtext "%C2" (comment "Comment 2") (pos 109 29) ) + ( tbtext "%C3" (comment "Comment 3") (pos 109 32) ) + ( line (start 90 8.5) (end 90 5.5) ) + ( line (start 26 8.5) (end 26 2) ) + + ( rect (comment "rect around the logo") (linewidth 0.15) (start 157 34) (end 110 2) ) + (polygon (pos 134 18 rbcorner) (rotate 20) (linewidth 0.00254) + (pts (xy 20.574 8.382) (xy 19.9009 8.382) (xy 19.9009 6.26364) (xy 19.7485 5.98932) + (xy 19.71802 5.92328) (xy 19.69262 5.83946) (xy 19.66976 5.72262) (xy 19.65198 5.56006) + (xy 19.63674 5.33908) (xy 19.6215 5.04952) (xy 19.61134 4.67614) (xy 19.60372 4.20624) + (xy 19.5961 3.62712) (xy 19.58848 2.92862) (xy 19.5834 2.09296) (xy 19.57832 1.11252) + (xy 19.57578 0.27432) (xy 19.55038 -5.16636) (xy 18.15592 -5.16636) (xy 17.69364 -5.16382) + (xy 17.29232 -5.15874) (xy 16.98752 -5.15112) (xy 16.80464 -5.14096) (xy 16.764 -5.13334) + (xy 16.79194 -5.0419) (xy 16.8656 -4.85648) (xy 16.891 -4.79806) (xy 16.93672 -4.64312) + (xy 16.97228 -4.42468) (xy 16.99514 -4.11734) (xy 17.01038 -3.69824) (xy 17.01546 -3.14198) + (xy 17.018 -2.82702) (xy 17.01546 -2.25806) (xy 17.01292 -1.83896) (xy 17.0053 -1.5494) + (xy 16.99006 -1.36652) (xy 16.9672 -1.27508) (xy 16.93164 -1.25222) (xy 16.88592 -1.28016) + (xy 16.8656 -1.29794) (xy 16.47444 -1.5494) (xy 15.96644 -1.71704) (xy 15.3797 -1.7907) + (xy 15.2527 -1.79324) (xy 14.53134 -1.71958) (xy 13.89634 -1.50622) (xy 13.35278 -1.14808) + (xy 12.9032 -0.65024) (xy 12.5476 -0.0127) (xy 12.28598 0.762) (xy 12.22756 1.016) + (xy 12.1539 1.50368) (xy 12.11326 2.07264) (xy 12.10564 2.667) (xy 12.13104 3.23342) + (xy 12.18692 3.71348) (xy 12.2301 3.91668) (xy 12.49934 4.66344) (xy 12.88288 5.2959) + (xy 13.36802 5.8039) (xy 13.94968 6.17982) (xy 14.39164 6.35508) (xy 14.76248 6.41858) + (xy 15.21968 6.4262) (xy 15.69466 6.38302) (xy 16.11376 6.29158) (xy 16.20266 6.2611) + (xy 16.49984 6.1341) (xy 16.76146 5.99694) (xy 16.87576 5.92074) (xy 17.06118 5.7912) + (xy 17.15262 5.78104) (xy 17.1831 5.9055) (xy 17.18564 6.00964) (xy 17.18564 6.26364) + (xy 18.542 6.26364) (xy 19.9009 6.26364) (xy 19.9009 8.382) (xy 11.51636 8.382) + (xy 11.51636 6.26364) (xy 11.3665 6.03504) (xy 11.32586 5.9563) (xy 11.2903 5.84962) + (xy 11.26236 5.69468) (xy 11.24204 5.4737) (xy 11.22172 5.17144) (xy 11.20648 4.76504) + (xy 11.19124 4.2418) (xy 11.17854 3.57886) (xy 11.16838 3.00736) (xy 11.1506 2.16408) + (xy 11.13282 1.47066) (xy 11.10996 0.90932) (xy 11.07694 0.45974) (xy 11.03122 0.10414) + (xy 10.97026 -0.1778) (xy 10.89152 -0.40386) (xy 10.78738 -0.59436) (xy 10.6553 -0.76962) + (xy 10.49274 -0.94234) (xy 10.40892 -1.0287) (xy 9.93394 -1.38684) (xy 9.34212 -1.63576) + (xy 8.64616 -1.77546) (xy 7.85622 -1.80086) (xy 6.99262 -1.7145) (xy 6.31952 -1.57988) + (xy 5.92836 -1.48844) (xy 5.58038 -1.41478) (xy 5.31622 -1.36906) (xy 5.19938 -1.35636) + (xy 5.0419 -1.32588) (xy 4.99364 -1.27254) (xy 5.02666 -1.1557) (xy 5.10794 -0.92964) + (xy 5.22224 -0.635) (xy 5.35432 -0.31496) (xy 5.48132 -0.01524) (xy 5.588 0.22098) + (xy 5.65658 0.35052) (xy 5.6642 0.36068) (xy 5.76834 0.36322) (xy 5.98424 0.31496) + (xy 6.26872 0.22098) (xy 6.3119 0.2032) (xy 6.83768 0.04572) (xy 7.3406 -0.03048) + (xy 7.79018 -0.0254) (xy 8.14324 0.0635) (xy 8.2677 0.13462) (xy 8.49376 0.40132) + (xy 8.60044 0.68326) (xy 8.69188 1.05664) (xy 7.66826 1.10744) (xy 6.97738 1.16078) + (xy 6.41096 1.24968) (xy 5.92836 1.3843) (xy 5.49148 1.5748) (xy 5.24764 1.70942) + (xy 4.77012 2.08534) (xy 4.4196 2.54762) (xy 4.19608 3.0734) (xy 4.09448 3.63474) + (xy 4.11988 4.20878) (xy 4.26974 4.76758) (xy 4.54406 5.28828) (xy 4.9403 5.74294) + (xy 5.31876 6.02742) (xy 5.85978 6.2738) (xy 6.47954 6.40588) (xy 7.12724 6.42112) + (xy 7.74954 6.30936) (xy 7.75208 6.30936) (xy 8.06958 6.18744) (xy 8.37438 6.02742) + (xy 8.46582 5.96646) (xy 8.763 5.74802) (xy 8.7884 6.00456) (xy 8.8138 6.26364) + (xy 10.16508 6.26364) (xy 11.51636 6.26364) (xy 11.51636 8.382) (xy 4.13766 8.382) + (xy 4.13766 5.44068) (xy 4.10972 5.36702) (xy 4.0132 5.1816) (xy 3.86334 4.91744) + (xy 3.68046 4.6101) (xy 3.48742 4.29006) (xy 3.29946 3.99034) (xy 3.1369 3.74142) + (xy 3.10896 3.70078) (xy 2.9464 3.46456) (xy 2.65684 3.7211) (xy 2.20726 4.05892) + (xy 1.76276 4.26212) (xy 1.27254 4.34848) (xy 1.05664 4.3561) (xy 0.70104 4.34594) + (xy 0.43942 4.29768) (xy 0.19558 4.19862) (xy 0.05842 4.11988) (xy -0.38862 3.76682) + (xy -0.75946 3.28168) (xy -1.03378 2.7051) (xy -1.07188 2.58572) (xy -1.143 2.30378) + (xy -1.19126 1.98374) (xy -1.21666 1.58496) (xy -1.22936 1.0668) (xy -1.22936 0.889) + (xy -1.22428 0.381) (xy -1.21158 0) (xy -1.17856 -0.30226) (xy -1.12776 -0.56896) + (xy -1.04902 -0.84328) (xy -1.02108 -0.92964) (xy -0.75438 -1.53416) (xy -0.3937 -2.01676) + (xy 0.04318 -2.36474) (xy 0.54864 -2.57048) (xy 0.99822 -2.62636) (xy 1.54686 -2.55524) + (xy 2.05486 -2.35712) (xy 2.35712 -2.15138) (xy 2.5527 -1.98882) (xy 2.68986 -1.88468) + (xy 2.7305 -1.86436) (xy 2.794 -1.9304) (xy 2.92608 -2.10312) (xy 3.10388 -2.35458) + (xy 3.30962 -2.65176) (xy 3.51536 -2.96164) (xy 3.70586 -3.25374) (xy 3.85318 -3.4925) + (xy 3.94208 -3.64998) (xy 3.95732 -3.69316) (xy 3.86588 -3.74396) (xy 3.66268 -3.85064) + (xy 3.3782 -3.99288) (xy 3.22326 -4.06654) (xy 2.54508 -4.36118) (xy 1.92532 -4.5466) + (xy 1.31318 -4.64058) (xy 0.87122 -4.65836) (xy 0.02286 -4.59232) (xy -0.7493 -4.38912) + (xy -1.46558 -4.0386) (xy -2.15392 -3.5306) (xy -2.38252 -3.32232) (xy -2.9464 -2.70764) + (xy -3.37312 -2.04978) (xy -3.6957 -1.30302) (xy -3.82524 -0.87376) (xy -3.94208 -0.26924) + (xy -4.00304 0.43434) (xy -4.00812 1.17348) (xy -3.95986 1.88976) (xy -3.85572 2.52222) + (xy -3.82524 2.64922) (xy -3.51028 3.53314) (xy -3.07848 4.32562) (xy -2.53746 5.0165) + (xy -1.905 5.588) (xy -1.19126 6.02488) (xy -0.44958 6.30682) (xy 0.01016 6.39064) + (xy 0.57404 6.4262) (xy 1.17856 6.41604) (xy 1.76276 6.3627) (xy 2.26822 6.26364) + (xy 2.286 6.25856) (xy 2.72288 6.11124) (xy 3.23088 5.90296) (xy 3.73888 5.66166) + (xy 4.13766 5.44068) (xy 4.13766 8.382) (xy 0 8.382) (xy -4.74218 8.382) + (xy -4.74218 1.7653) (xy -4.74218 0.71882) (xy -4.74218 -0.55118) (xy -4.74218 -1.66116) + (xy -4.74218 -2.62382) (xy -4.74472 -3.44678) (xy -4.7498 -4.14528) (xy -4.75742 -4.7244) + (xy -4.77012 -5.19938) (xy -4.79044 -5.57784) (xy -4.81584 -5.87248) (xy -4.84886 -6.09346) + (xy -4.8895 -6.2484) (xy -4.94284 -6.35254) (xy -5.0038 -6.4135) (xy -5.07746 -6.44144) + (xy -5.16382 -6.44906) (xy -5.26542 -6.44398) (xy -5.37972 -6.4389) (xy -5.40512 -6.4389) + (xy -5.6515 -6.4516) (xy -5.79374 -6.51002) (xy -5.90042 -6.65734) (xy -5.969 -6.79958) + (xy -6.23062 -7.1755) (xy -6.57606 -7.4295) (xy -6.97738 -7.56158) (xy -7.40156 -7.57682) + (xy -7.81558 -7.47014) (xy -8.1915 -7.24662) (xy -8.49376 -6.90626) (xy -8.58774 -6.73354) + (xy -8.72998 -6.43636) (xy -14.05382 -6.43636) (xy -15.14602 -6.43636) (xy -16.08074 -6.43382) + (xy -16.87068 -6.43128) (xy -17.52854 -6.42874) (xy -18.06702 -6.42112) (xy -18.49628 -6.4135) + (xy -18.83156 -6.40334) (xy -19.08302 -6.39064) (xy -19.2659 -6.3754) (xy -19.38782 -6.35508) + (xy -19.46402 -6.33222) (xy -19.50974 -6.30428) (xy -19.50974 -6.30174) (xy -19.53514 -6.26618) + (xy -19.55546 -6.1976) (xy -19.57324 -6.08838) (xy -19.59102 -5.92582) (xy -19.60372 -5.69976) + (xy -19.61388 -5.40004) (xy -19.6215 -5.0165) (xy -19.62912 -4.53644) (xy -19.6342 -3.95224) + (xy -19.63928 -3.24866) (xy -19.64182 -2.41808) (xy -19.64182 -1.4478) (xy -19.64436 -0.32766) + (xy -19.64436 0.71882) (xy -19.64436 1.9685) (xy -19.64182 3.06324) (xy -19.64182 4.00812) + (xy -19.63928 4.81584) (xy -19.6342 5.49656) (xy -19.62912 6.06552) (xy -19.6215 6.52526) + (xy -19.61134 6.8961) (xy -19.60118 7.18058) (xy -19.58848 7.39394) (xy -19.5707 7.54634) + (xy -19.55292 7.64794) (xy -19.53006 7.71144) (xy -19.50974 7.73938) (xy -19.47418 7.76224) + (xy -19.4056 7.7851) (xy -19.29892 7.80288) (xy -19.1389 7.81812) (xy -18.91538 7.83082) + (xy -18.62074 7.84098) (xy -18.24228 7.85114) (xy -17.76984 7.85622) (xy -17.1958 7.86384) + (xy -16.50238 7.86638) (xy -15.68704 7.86892) (xy -14.732 7.87146) (xy -13.63218 7.87146) + (xy -12.37488 7.87146) (xy -12.192 7.874) (xy -10.91438 7.87146) (xy -9.79424 7.87146) + (xy -8.82142 7.86892) (xy -7.98576 7.86638) (xy -7.2771 7.86384) (xy -6.68782 7.85876) + (xy -6.20014 7.85114) (xy -5.81152 7.84352) (xy -5.50672 7.83336) (xy -5.27304 7.81812) + (xy -5.1054 7.80542) (xy -4.9911 7.78764) (xy -4.91998 7.76732) (xy -4.87934 7.74192) + (xy -4.8768 7.73938) (xy -4.8514 7.70128) (xy -4.83108 7.6327) (xy -4.8133 7.52348) + (xy -4.79552 7.36092) (xy -4.78282 7.1374) (xy -4.77266 6.83768) (xy -4.76504 6.45414) + (xy -4.75742 5.97408) (xy -4.75234 5.38734) (xy -4.74726 4.6863) (xy -4.74472 3.85318) + (xy -4.74472 2.88544) (xy -4.74218 1.7653) (xy -4.74218 8.382) (xy -20.574 8.382) + (xy -20.574 0) (xy -20.574 -8.382) (xy 0 -8.382) (xy 20.574 -8.382) + (xy 20.574 0) (xy 20.574 8.382) (xy 20.574 8.382)) + (pts (xy -9.4742 6.26364) (xy -11.25728 6.26364) (xy -13.04036 6.26364) (xy -13.04036 6.0071) + (xy -13.07846 5.76072) (xy -13.17752 5.48386) (xy -13.20038 5.4356) (xy -13.28674 5.29336) + (xy -13.45692 5.0419) (xy -13.68806 4.70662) (xy -13.96746 4.31292) (xy -14.27226 3.88112) + (xy -14.58976 3.4417) (xy -14.8971 3.02006) (xy -15.1765 2.63652) (xy -15.41526 2.31902) + (xy -15.58798 2.09296) (xy -15.67942 1.98882) (xy -15.7099 2.03454) (xy -15.73022 2.24282) + (xy -15.74038 2.61874) (xy -15.74292 3.15976) (xy -15.7353 3.76682) (xy -15.72514 4.37896) + (xy -15.71244 4.84886) (xy -15.69974 5.19684) (xy -15.67688 5.45084) (xy -15.64894 5.63372) + (xy -15.6083 5.76834) (xy -15.55496 5.88518) (xy -15.5194 5.94614) (xy -15.33144 6.26364) + (xy -16.96974 6.26364) (xy -18.61058 6.26364) (xy -18.45056 5.94868) (xy -18.415 5.87502) + (xy -18.38706 5.78612) (xy -18.36166 5.67182) (xy -18.34134 5.51688) (xy -18.3261 5.30606) + (xy -18.3134 5.02666) (xy -18.30324 4.66598) (xy -18.29816 4.20624) (xy -18.29308 3.63728) + (xy -18.29054 2.94386) (xy -18.29054 2.11328) (xy -18.29054 1.12776) (xy -18.288 0.889) + (xy -18.29054 -0.13208) (xy -18.29054 -0.99568) (xy -18.29308 -1.71958) (xy -18.29562 -2.31394) + (xy -18.30324 -2.79654) (xy -18.31086 -3.18008) (xy -18.32356 -3.47472) (xy -18.3388 -3.70078) + (xy -18.35658 -3.86588) (xy -18.37944 -3.9878) (xy -18.40738 -4.08178) (xy -18.4404 -4.15798) + (xy -18.45056 -4.17322) (xy -18.61058 -4.48818) (xy -17.01038 -4.48818) (xy -16.51 -4.48564) + (xy -16.07566 -4.48056) (xy -15.73022 -4.4704) (xy -15.49908 -4.4577) (xy -15.41018 -4.44246) + (xy -15.44574 -4.3434) (xy -15.53464 -4.16052) (xy -15.55496 -4.12496) (xy -15.61084 -3.9878) + (xy -15.65402 -3.7973) (xy -15.6845 -3.52806) (xy -15.70736 -3.15468) (xy -15.72514 -2.64922) + (xy -15.73276 -2.37236) (xy -15.75054 -1.70434) (xy -15.75816 -1.20396) (xy -15.748 -0.86106) + (xy -15.70228 -0.6731) (xy -15.61084 -0.63754) (xy -15.46098 -0.74422) (xy -15.24 -0.99314) + (xy -14.93266 -1.37668) (xy -14.5288 -1.8923) (xy -14.51102 -1.91516) (xy -14.04112 -2.51714) + (xy -13.67028 -3.00482) (xy -13.39088 -3.39344) (xy -13.18768 -3.70078) (xy -13.0556 -3.94208) + (xy -12.9794 -4.13004) (xy -12.95654 -4.28244) (xy -12.954 -4.29768) (xy -12.954 -4.48818) + (xy -11.23696 -4.48818) (xy -9.51992 -4.48818) (xy -10.07364 -3.91668) (xy -10.25398 -3.7211) + (xy -10.50544 -3.43154) (xy -10.81278 -3.06832) (xy -11.1633 -2.64922) (xy -11.54176 -2.19202) + (xy -11.93038 -1.71704) (xy -12.319 -1.23952) (xy -12.68476 -0.78232) (xy -13.02004 -0.36068) + (xy -13.30452 0.00254) (xy -13.5255 0.2921) (xy -13.66774 0.49022) (xy -13.716 0.57404) + (xy -13.66774 0.66294) (xy -13.53058 0.86868) (xy -13.31976 1.17348) (xy -13.04798 1.55702) + (xy -12.7254 2.00406) (xy -12.3698 2.49428) (xy -11.99388 3.00736) (xy -11.61034 3.5306) + (xy -11.23442 4.0386) (xy -10.87628 4.51866) (xy -10.55116 4.95046) (xy -10.27176 5.31622) + (xy -10.05332 5.59562) (xy -9.91108 5.76834) (xy -9.4742 6.26364) (xy -9.4742 6.26364)) + (pts (xy -5.75818 6.23316) (xy -5.83946 6.24332) (xy -6.06044 6.25094) (xy -6.39826 6.25856) + (xy -6.82498 6.26364) (xy -7.239 6.26364) (xy -7.71906 6.2611) (xy -8.13562 6.25856) + (xy -8.4582 6.25094) (xy -8.6614 6.24078) (xy -8.72236 6.23316) (xy -8.69188 6.14172) + (xy -8.61822 5.95376) (xy -8.59536 5.89534) (xy -8.5598 5.72262) (xy -8.52932 5.40512) + (xy -8.50392 4.9657) (xy -8.4836 4.42468) (xy -8.46836 3.81) (xy -8.4582 3.14198) + (xy -8.45566 2.44602) (xy -8.45566 1.74498) (xy -8.46074 1.06172) (xy -8.47344 0.42164) + (xy -8.49122 -0.15494) (xy -8.51408 -0.64262) (xy -8.54202 -1.01854) (xy -8.57504 -1.25984) + (xy -8.59028 -1.31572) (xy -8.7122 -1.61036) (xy -7.36346 -1.61036) (xy -6.01218 -1.61036) + (xy -6.01218 1.99136) (xy -6.01218 2.8956) (xy -6.00964 3.6449) (xy -6.00456 4.2545) + (xy -5.9944 4.74472) (xy -5.98424 5.12572) (xy -5.96646 5.41274) (xy -5.94614 5.6261) + (xy -5.92074 5.77596) (xy -5.89026 5.88264) (xy -5.88518 5.89534) (xy -5.8039 6.09854) + (xy -5.76072 6.22046) (xy -5.75818 6.23316) (xy -5.75818 6.23316)) + (pts (xy 8.636 3.4544) (xy 8.62838 3.80238) (xy 8.60298 4.0259) (xy 8.54964 4.17322) + (xy 8.45312 4.28752) (xy 8.4455 4.29514) (xy 8.08736 4.52628) (xy 7.66826 4.64058) + (xy 7.24408 4.62788) (xy 7.05866 4.572) (xy 6.77672 4.37388) (xy 6.5913 4.07924) + (xy 6.5405 3.74142) (xy 6.54558 3.70078) (xy 6.60146 3.45186) (xy 6.68782 3.25882) + (xy 6.70052 3.24104) (xy 6.96468 3.03784) (xy 7.35076 2.88798) (xy 7.81812 2.8067) + (xy 8.0645 2.794) (xy 8.636 2.794) (xy 8.636 3.4544) (xy 8.636 3.4544)) + (pts (xy 17.018 4.04876) (xy 16.7259 4.2291) (xy 16.34744 4.3942) (xy 15.94358 4.46024) + (xy 15.56766 4.4196) (xy 15.35938 4.3307) (xy 15.13332 4.15544) (xy 14.9733 3.93192) + (xy 14.86408 3.6322) (xy 14.80058 3.23342) (xy 14.77518 2.70764) (xy 14.77264 2.45364) + (xy 14.79296 1.77546) (xy 14.859 1.23952) (xy 14.97076 0.82296) (xy 15.1384 0.508) + (xy 15.33652 0.29718) (xy 15.66418 0.127) (xy 16.06042 0.08382) (xy 16.48714 0.17018) + (xy 16.68018 0.254) (xy 17.018 0.42672) (xy 17.018 2.23774) (xy 17.018 4.04876) + (xy 17.018 4.04876)) ) +) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 729b9a3214..6a1252de31 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -254,8 +254,11 @@ void DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::copyPanelToOptions() if( m_Cmp->GetUnit() ) { int unit_selection = unitChoice->GetCurrentSelection() + 1; + STATUS_FLAGS flags = m_Cmp->GetFlags(); m_Cmp->SetUnitSelection( &m_Parent->GetCurrentSheet(), unit_selection ); m_Cmp->SetUnit( unit_selection ); + m_Cmp->ClearFlags(); + m_Cmp->SetFlags( flags ); // Restore m_Flag modified by SetUnit() } switch( orientationRadioBox->GetSelection() ) From cdff2d0d412b6a9699abacfb8d397307b1f289e9 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 9 Aug 2013 18:19:52 +0200 Subject: [PATCH 20/42] Replace the wxFilePickedCtrl in Option Page dialog by an usual wxButton + wxTextCtrl, because under wxWdgets 2.8.12 the look and the behavior is very different between Windows and Linux. --- common/dialogs/dialog_page_settings.cpp | 65 +++++++----- common/dialogs/dialog_page_settings.h | 14 +-- common/dialogs/dialog_page_settings_base.cpp | 11 +- common/dialogs/dialog_page_settings_base.fbp | 104 +++++++++++++++++-- common/dialogs/dialog_page_settings_base.h | 6 +- 5 files changed, 150 insertions(+), 50 deletions(-) diff --git a/common/dialogs/dialog_page_settings.cpp b/common/dialogs/dialog_page_settings.cpp index 7ab002480b..9886bd070b 100644 --- a/common/dialogs/dialog_page_settings.cpp +++ b/common/dialogs/dialog_page_settings.cpp @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -125,8 +126,7 @@ void DIALOG_PAGES_SETTINGS::initDialog() } // initialize the page layout descr filename - m_plDescrFileName = BASE_SCREEN::m_PageLayoutDescrFileName; - m_filePicker->SetPath( m_plDescrFileName ); + SetWksFileName( BASE_SCREEN::m_PageLayoutDescrFileName ); #ifdef EESCHEMA @@ -401,13 +401,13 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings() { bool retSuccess = false; - m_plDescrFileName = m_filePicker->GetPath(); + wxString fileName = GetWksFileName(); - if( m_plDescrFileName != BASE_SCREEN::m_PageLayoutDescrFileName ) + if( fileName != BASE_SCREEN::m_PageLayoutDescrFileName ) { - if( !m_plDescrFileName.IsEmpty() ) + if( !fileName.IsEmpty() ) { - wxString fullFileName = WORKSHEET_LAYOUT::MakeFullFileName( m_plDescrFileName ); + wxString fullFileName = WORKSHEET_LAYOUT::MakeFullFileName( fileName ); if( !wxFileExists( fullFileName ) ) { wxString msg; @@ -418,26 +418,9 @@ bool DIALOG_PAGES_SETTINGS::SavePageSettings() } } - // Try to remove the path, if the path is the current working dir, - // or the dir of kicad.pro (template) - wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( m_plDescrFileName ); - wxFileName fn = shortFileName; - - // For Win/Linux/macOS compatibility, a relative path is a good idea - if( fn.IsAbsolute() ) - { - fn.MakeRelativeTo( wxGetCwd() ); - wxString msg; - msg.Printf( _( "The page layout descr filename has changed\n" - "Do you want to use the relative path:\n%s"), - fn.GetFullPath().GetData() ); - if( IsOK( this, msg ) ) - shortFileName = fn.GetFullPath(); - } - - BASE_SCREEN::m_PageLayoutDescrFileName = shortFileName; + BASE_SCREEN::m_PageLayoutDescrFileName = fileName; WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance(); - pglayout.SetPageLayout( shortFileName ); + pglayout.SetPageLayout( fileName ); m_localPrjConfigChanged = true; } @@ -793,7 +776,35 @@ void DIALOG_PAGES_SETTINGS::GetCustomSizeMilsFromDialog() } // Called on .kicad_wks file description selection change -void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxFileDirPickerEvent& event ) +void DIALOG_PAGES_SETTINGS::OnWksFileSelection( wxCommandEvent& event ) { - // Currently: Nothing to do. + // Display a file picker dialog + wxFileDialog fileDialog( this, _( "Select Page Layout Descr File" ), + wxGetCwd(), GetWksFileName(), + PageLayoutDescrFileWildcard, + wxFD_DEFAULT_STYLE | wxFD_FILE_MUST_EXIST ); + + if( fileDialog.ShowModal() != wxID_OK ) + return; + + wxString fileName = fileDialog.GetPath(); + + // Try to remove the path, if the path is the current working dir, + // or the dir of kicad.pro (template) + wxString shortFileName = WORKSHEET_LAYOUT::MakeShortFileName( fileName ); + wxFileName fn = shortFileName; + + // For Win/Linux/macOS compatibility, a relative path is a good idea + if( fn.IsAbsolute() && fileName != GetWksFileName() ) + { + fn.MakeRelativeTo( wxGetCwd() ); + wxString msg; + msg.Printf( _( "The page layout descr filename has changed\n" + "Do you want to use the relative path:\n%s"), + fn.GetFullPath().GetData() ); + if( IsOK( this, msg ) ) + shortFileName = fn.GetFullPath(); + } + + SetWksFileName( shortFileName ); } diff --git a/common/dialogs/dialog_page_settings.h b/common/dialogs/dialog_page_settings.h index cdb2c02297..073606346c 100644 --- a/common/dialogs/dialog_page_settings.h +++ b/common/dialogs/dialog_page_settings.h @@ -45,9 +45,6 @@ private: PAGE_INFO m_pageInfo; /// Temporary page info. bool m_customFmt; /// true if the page selection is custom TITLE_BLOCK m_tb; /// Temporary title block (basic inscriptions). - wxString m_plDescrFileName; /// Temporary BASE_SCREEN::m_PageLayoutDescrFileName copy - - public: DIALOG_PAGES_SETTINGS( EDA_DRAW_FRAME* parent ); @@ -55,24 +52,23 @@ public: const wxString GetWksFileName() { - return m_filePicker->GetPath(); + return m_textCtrlFilePicker->GetValue(); } void SetWksFileName(const wxString& aFilename ) { - m_filePicker->SetPath( aFilename ); + m_textCtrlFilePicker->SetValue( aFilename ); } void EnableWksFileNamePicker( bool aEnable ) { - m_filePicker->Enable( aEnable ); + m_textCtrlFilePicker->Enable( aEnable ); + m_buttonBrowse->Enable( aEnable ); } private: void initDialog(); // Initialisation of member variables -// void OnCloseWindow( wxCloseEvent& event ); - // event handler for wxID_OK void OnOkClick( wxCommandEvent& event ); @@ -99,7 +95,7 @@ private: void OnDateApplyClick( wxCommandEvent& event ); // .kicad_wks file description selection - void OnWksFileSelection( wxFileDirPickerEvent& event ); + void OnWksFileSelection( wxCommandEvent& event ); // Save in the current title block the new page settings // return true if changes are made, or false if not diff --git a/common/dialogs/dialog_page_settings_base.cpp b/common/dialogs/dialog_page_settings_base.cpp index 28865814ec..0f99290cb1 100644 --- a/common/dialogs/dialog_page_settings_base.cpp +++ b/common/dialogs/dialog_page_settings_base.cpp @@ -350,8 +350,11 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind wxBoxSizer* bSizerfileSelection; bSizerfileSelection = new wxBoxSizer( wxHORIZONTAL ); - m_filePicker = new wxFilePickerCtrl( this, wxID_ANY, wxEmptyString, _("Select a file"), wxT("*.kicad_wks"), wxDefaultPosition, wxDefaultSize, wxFLP_OPEN|wxFLP_USE_TEXTCTRL ); - bSizerfileSelection->Add( m_filePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + m_textCtrlFilePicker = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bSizerfileSelection->Add( m_textCtrlFilePicker, 1, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); + + m_buttonBrowse = new wxButton( this, wxID_ANY, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizerfileSelection->Add( m_buttonBrowse, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); bSizerFilename->Add( bSizerfileSelection, 1, wxEXPAND, 5 ); @@ -393,7 +396,7 @@ DIALOG_PAGES_SETTINGS_BASE::DIALOG_PAGES_SETTINGS_BASE( wxWindow* parent, wxWind m_TextComment2->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this ); m_TextComment3->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this ); m_TextComment4->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this ); - m_filePicker->Connect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this ); + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this ); m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnCancelClick ), NULL, this ); m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this ); } @@ -415,7 +418,7 @@ DIALOG_PAGES_SETTINGS_BASE::~DIALOG_PAGES_SETTINGS_BASE() m_TextComment2->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment2TextUpdated ), NULL, this ); m_TextComment3->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment3TextUpdated ), NULL, this ); m_TextComment4->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnComment4TextUpdated ), NULL, this ); - m_filePicker->Disconnect( wxEVT_COMMAND_FILEPICKER_CHANGED, wxFileDirPickerEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this ); + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnWksFileSelection ), NULL, this ); m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnCancelClick ), NULL, this ); m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_PAGES_SETTINGS_BASE::OnOkClick ), NULL, this ); diff --git a/common/dialogs/dialog_page_settings_base.fbp b/common/dialogs/dialog_page_settings_base.fbp index 90b35d6158..ce60f5331c 100644 --- a/common/dialogs/dialog_page_settings_base.fbp +++ b/common/dialogs/dialog_page_settings_base.fbp @@ -4235,9 +4235,9 @@ none 5 - wxBOTTOM|wxRIGHT|wxLEFT + wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL 1 - + 1 1 1 @@ -4268,12 +4268,12 @@ 0 - Select a file + 0 1 - m_filePicker + m_textCtrlFilePicker 1 @@ -4283,7 +4283,7 @@ Resizable 1 - wxFLP_OPEN|wxFLP_USE_TEXTCTRL + 0 @@ -4292,14 +4292,104 @@ wxDefaultValidator - *.kicad_wks - OnWksFileSelection + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Browse + + 0 + + + 0 + + 1 + m_buttonBrowse + 1 + + + protected + 1 + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnWksFileSelection + + + diff --git a/common/dialogs/dialog_page_settings_base.h b/common/dialogs/dialog_page_settings_base.h index 689f553d37..9ba85e6a18 100644 --- a/common/dialogs/dialog_page_settings_base.h +++ b/common/dialogs/dialog_page_settings_base.h @@ -33,7 +33,6 @@ class DIALOG_SHIM; #include #include #include -#include #include /////////////////////////////////////////////////////////////////////////// @@ -113,7 +112,8 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM wxTextCtrl* m_TextComment4; wxCheckBox* m_Comment4Export; wxStaticText* m_staticTextfilename; - wxFilePickerCtrl* m_filePicker; + wxTextCtrl* m_textCtrlFilePicker; + wxButton* m_buttonBrowse; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; wxButton* m_sdbSizer1Cancel; @@ -133,7 +133,7 @@ class DIALOG_PAGES_SETTINGS_BASE : public DIALOG_SHIM virtual void OnComment2TextUpdated( wxCommandEvent& event ) { event.Skip(); } virtual void OnComment3TextUpdated( wxCommandEvent& event ) { event.Skip(); } virtual void OnComment4TextUpdated( wxCommandEvent& event ) { event.Skip(); } - virtual void OnWksFileSelection( wxFileDirPickerEvent& event ) { event.Skip(); } + virtual void OnWksFileSelection( wxCommandEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnOkClick( wxCommandEvent& event ) { event.Skip(); } From 6338f88db1c6138e187397cfa1ac04cbc197ac19 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 9 Aug 2013 14:03:26 -0500 Subject: [PATCH 21/42] User longer, more dis-ambiguating text for Show button --- ...dialog_edit_component_in_schematic_fbp.cpp | 8 +- ...dialog_edit_component_in_schematic_fbp.fbp | 97 ++++++++++++++++++- ...ialog_edit_libentry_fields_in_lib_base.cpp | 2 +- ...ialog_edit_libentry_fields_in_lib_base.fbp | 2 +- 4 files changed, 100 insertions(+), 9 deletions(-) diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp index c137fedc37..29bd666ee7 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.cpp @@ -182,18 +182,18 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC_FBP( fieldValueLabel = new wxStaticText( this, wxID_ANY, _("Field Value"), wxDefaultPosition, wxDefaultSize, 0 ); fieldValueLabel->Wrap( -1 ); - fieldNameBoxSizer->Add( fieldValueLabel, 0, wxTOP, 5 ); + fieldNameBoxSizer->Add( fieldValueLabel, 0, wxALIGN_TOP|wxTOP, 5 ); fieldValueTextCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); fieldValueTextCtrl->SetMaxLength( 0 ); - fieldValueTextCtrl->SetToolTip( _("The text (or value) of the currently selected field") ); + fieldValueTextCtrl->SetToolTip( _("The name of the currently selected field\nSome fixed fields names are not editable") ); fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxEXPAND, 5 ); - m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); + m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 ); m_show_datasheet_button->SetToolTip( _("If your datasheet is an http:// link or a complete file path, then it may show in your browser by pressing this button.") ); - fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND|wxTOP, 5 ); + fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND, 5 ); fieldEditBoxSizer->Add( fieldNameBoxSizer, 0, wxBOTTOM|wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp index d51a6a6ed4..b9eadc9576 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic_fbp.fbp @@ -1991,7 +1991,7 @@ 5 - wxTOP + wxALIGN_TOP|wxTOP 0 1 @@ -2074,7 +2074,98 @@ 5 - wxBOTTOM|wxEXPAND|wxTOP + wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + fieldValueTextCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + The name of the currently selected field Some fixed fields names are not editable + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND 0 1 @@ -2105,7 +2196,7 @@ 0 0 wxID_ANY - Show + Show in Browser 0 diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp index c0b94da71f..f46a64ed50 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.cpp @@ -121,7 +121,7 @@ DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE::DIALOG_EDIT_LIBENTRY_FIELDS_IN_LIB_BASE fieldNameBoxSizer->Add( fieldValueTextCtrl, 0, wxBOTTOM|wxEXPAND, 5 ); - m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show"), wxDefaultPosition, wxDefaultSize, 0 ); + m_show_datasheet_button = new wxButton( this, wxID_ANY, _("Show in Browser"), wxDefaultPosition, wxDefaultSize, 0 ); m_show_datasheet_button->SetToolTip( _("If your datasheet is given as an http:// link, then pressing this button should bring it up in your webbrowser.") ); fieldNameBoxSizer->Add( m_show_datasheet_button, 0, wxBOTTOM|wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp index 426267a7b9..6cb1bc0d36 100644 --- a/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp +++ b/eeschema/dialogs/dialog_edit_libentry_fields_in_lib_base.fbp @@ -1361,7 +1361,7 @@ 0 0 wxID_ANY - Show + Show in Browser 0 From 3d79bf82f47d27098e6563fa810b9b110553d7bd Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Fri, 9 Aug 2013 14:05:04 -0500 Subject: [PATCH 22/42] REMOVE: vias from specctra DSN export which are not in a netclass. Use only netclass based via sizes in freerouter. Some of the vias in the class-less list were setting the drill hole size to zero and this made no sense to freerouter. --- pcbnew/specctra_export.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/specctra_export.cpp b/pcbnew/specctra_export.cpp index f25b97ac18..65df8c00f8 100644 --- a/pcbnew/specctra_export.cpp +++ b/pcbnew/specctra_export.cpp @@ -201,12 +201,8 @@ const KICAD_T SPECCTRA_DB::scanPADs[] = { PCB_PAD_T, EOT }; */ static inline double scale( int kicadDist ) { - // nanometers to um return kicadDist / ( IU_PER_MM / 1000.0 ); - - // nanometers to mils - // return kicadDist/IU_PER_MILS; } @@ -1139,7 +1135,7 @@ void SPECCTRA_DB::fillBOUNDARY( BOARD* aBoard, BOUNDARY* boundary ) throw( IO_ER } else { - wxPoint startPt = wxPoint( graphic->GetEnd() ); + wxPoint startPt( graphic->GetEnd() ); prevPt = graphic->GetEnd(); poly_ko->AppendPoint( mapPt( prevPt ) ); @@ -1351,7 +1347,6 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) //----- & -------------------- { - // tell freerouter to use "tenths of micrometers", // which is 100 nm resolution. Possibly more resolution is possible // in freerouter, but it would need testing. @@ -1728,7 +1723,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) } - //-----< output vias used in netclasses and as stock >--------------------- + //-----< output vias used in netclasses >----------------------------------- { NETCLASSES& nclasses = aBoard->m_NetClasses; @@ -1746,6 +1741,10 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) wxASSERT( pcb->library->vias.size() == 0 ); pcb->library->AppendVia( via ); +#if 0 + // Stock vias have drill diameter of zero, this is not sensible to freerouter + // User should use netclass based vias when going to freerouter. + // output the stock vias, but preserve uniqueness in the via container by // using LookupVia(). for( unsigned i = 0; i < aBoard->m_ViasDimensionsList.size(); ++i ) @@ -1762,6 +1761,7 @@ void SPECCTRA_DB::FromBOARD( BOARD* aBoard ) throw( IO_ERROR ) if( registered != via ) delete via; } +#endif // set the "spare via" index at the start of the // pcb->library->spareViaIndex = pcb->library->vias.size(); From 21c3926714bf778d89af1fbd1e6eac0f1bac8e36 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Sat, 10 Aug 2013 11:14:16 +0200 Subject: [PATCH 23/42] Fixed win32 builds. --- common/CMakeLists.txt | 6 ++++-- cvpcb/CMakeLists.txt | 14 ++++++-------- pcbnew/CMakeLists.txt | 12 +++++------- 3 files changed, 15 insertions(+), 17 deletions(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 837ce50e81..40223de25d 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -5,6 +5,7 @@ include_directories( ./dialog_about ${Boost_INCLUDE_DIR} ${CAIRO_INCLUDE_DIR} + ${GLEW_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon @@ -56,9 +57,10 @@ set(GAL_SRCS add_library(gal STATIC ${GAL_SRCS}) add_dependencies(gal shader_headers) -if(WIN32) +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) add_definitions(-DGLEW_STATIC) -endif(WIN32) +endif(WIN32 AND MSYS) set(COMMON_ABOUT_DLG_SRCS dialog_about/AboutDialog_main.cpp diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 5310be69a3..247ab3c1ad 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -94,18 +94,16 @@ target_link_libraries(cvpcb common bitmaps polygon + gal ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} + ${GLEW_LIBRARIES} + ${CAIRO_LIBRARIES} ) -target_link_libraries(cvpcb - gal - ${GLEW_LIBRARIES} - ${CAIRO_LIBRARIES} - ) - -if(WIN32) +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) target_link_libraries(cvpcb opengl32 glu32 @@ -114,7 +112,7 @@ target_link_libraries(cvpcb freetype bz2 ) -endif(WIN32) +endif(WIN32 AND MSYS) ### # Add cvpcb as install target diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index d01a1d579a..06a0050f3a 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -420,20 +420,18 @@ target_link_libraries(pcbnew pcad2kicadpcb polygon bitmaps + gal ${wxWidgets_LIBRARIES} ${OPENGL_LIBRARIES} ${GDI_PLUS_LIBRARIES} ${PYTHON_LIBRARIES} ${PCBNEW_EXTRA_LIBS} - ) - -target_link_libraries(pcbnew - gal ${GLEW_LIBRARIES} ${CAIRO_LIBRARIES} ) - -if(WIN32) + +# Only for win32 cross compilation using MXE +if(WIN32 AND MSYS) target_link_libraries(pcbnew opengl32 glu32 @@ -442,7 +440,7 @@ target_link_libraries(pcbnew freetype bz2 ) -endif(WIN32) +endif(WIN32 AND MSYS) ### # Add pcbnew as install target From a723b8de7aa0a01c49d948666ae2e95c06105a9b Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 13 Aug 2013 19:51:22 +0200 Subject: [PATCH 24/42] Pcbnew: fix Bug #1211468 Pl_Editor: fix copyright in files. Enhancement when creating new items. --- include/class_worksheet_dataitem.h | 14 +- pagelayout_editor/class_pl_editor_layout.cpp | 25 +++- pagelayout_editor/class_pl_editor_layout.h | 23 ++++ pagelayout_editor/class_pl_editor_screen.cpp | 23 ++++ pagelayout_editor/class_pl_editor_screen.h | 26 +++- pagelayout_editor/controle.cpp | 12 +- pagelayout_editor/design_tree_frame.cpp | 12 +- pagelayout_editor/design_tree_frame.h | 4 +- .../dialogs/dialog_new_dataitem.cpp | 14 +- .../dialogs/dialogs_for_printing.cpp | 7 +- pagelayout_editor/events_functions.cpp | 126 ++++++++++++++---- pagelayout_editor/files.cpp | 10 +- pagelayout_editor/hotkeys.cpp | 6 +- pagelayout_editor/hotkeys.h | 24 ++++ pagelayout_editor/invoke_pl_editor_dialog.h | 4 +- pagelayout_editor/menubar.cpp | 13 +- pagelayout_editor/onleftclick.cpp | 1 - pagelayout_editor/onrightclick.cpp | 24 ++-- pagelayout_editor/page_layout_writer.cpp | 5 +- pagelayout_editor/pl_editor.cpp | 4 +- pagelayout_editor/pl_editor_config.cpp | 14 +- pagelayout_editor/pl_editor_frame.cpp | 12 +- pagelayout_editor/pl_editor_frame.h | 11 +- pagelayout_editor/pl_editor_id.h | 34 ++++- pagelayout_editor/pl_editor_undo_redo.cpp | 6 +- pagelayout_editor/properties_frame.cpp | 12 +- pagelayout_editor/properties_frame.h | 12 +- pagelayout_editor/toolbars_pl_editor.cpp | 14 +- pcbnew/dialogs/dialog_copper_zones.cpp | 13 +- 29 files changed, 373 insertions(+), 132 deletions(-) diff --git a/include/class_worksheet_dataitem.h b/include/class_worksheet_dataitem.h index 851991431d..6a2e30927b 100644 --- a/include/class_worksheet_dataitem.h +++ b/include/class_worksheet_dataitem.h @@ -19,15 +19,17 @@ class WS_DRAW_ITEM_TEXT; // Forward declaration #define USE_ITALIC (1<<1) // has meaning for texts #define USE_ALT_COLOR (1<<2) #define SELECTED_STATE (1<<3) // When set, use the hight light color to draw item -#define LOCATE_STARTPOINT (1<<4) // Used in locate function:set by locate function +#define NEW_ITEM (1<<4) // Set for new items which can be deleted + // by an abort command +#define LOCATE_STARTPOINT (1<<5) // Used in locate function:set by locate function // if the start point is located -#define LOCATE_ENDPOINT (1<<5) // Used in locate function:set by locate function +#define LOCATE_ENDPOINT (1<<6) // Used in locate function:set by locate function // if the end point is located -#define PAGE1OPTION (3<<6) // flag to manage items drawn or not drawn only +#define PAGE1OPTION (3<<7) // flag to manage items drawn or not drawn only // on page 1: NONE = item on all pages -#define PAGE1OPTION_NONE (0<<6) // NONE = item on all pages -#define PAGE1OPTION_PAGE1ONLY (1<<6) // = item only on page 1 -#define PAGE1OPTION_NOTONPAGE1 (2<<6) // = item on all pages but page 1 +#define PAGE1OPTION_NONE (0<<7) // NONE = item on all pages +#define PAGE1OPTION_PAGE1ONLY (1<<7) // = item only on page 1 +#define PAGE1OPTION_NOTONPAGE1 (2<<7) // = item on all pages but page 1 // A coordinate is relative to a page corner. // Any of the 4 corners can be a reference. diff --git a/pagelayout_editor/class_pl_editor_layout.cpp b/pagelayout_editor/class_pl_editor_layout.cpp index 5d321ec22f..a40de535c2 100644 --- a/pagelayout_editor/class_pl_editor_layout.cpp +++ b/pagelayout_editor/class_pl_editor_layout.cpp @@ -1,7 +1,30 @@ /** - * @file class_gbr_layout.cpp + * @file class_pl_editor_layout.cpp * @brief PL_EDITOR_LAYOUT class functions. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pagelayout_editor/class_pl_editor_layout.h b/pagelayout_editor/class_pl_editor_layout.h index 0a418b7dbe..b28468c7a1 100644 --- a/pagelayout_editor/class_pl_editor_layout.h +++ b/pagelayout_editor/class_pl_editor_layout.h @@ -1,6 +1,29 @@ /** * @file class_pl_editor_layout.h */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #ifndef CLASS_PL_EDITOR_LAYOUT_H #define CLASS_PL_EDITOR_LAYOUT_H diff --git a/pagelayout_editor/class_pl_editor_screen.cpp b/pagelayout_editor/class_pl_editor_screen.cpp index 65df628ffb..711bac3d7c 100644 --- a/pagelayout_editor/class_pl_editor_screen.cpp +++ b/pagelayout_editor/class_pl_editor_screen.cpp @@ -1,6 +1,29 @@ /** * @file class_pl_editor_screen.cpp */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include diff --git a/pagelayout_editor/class_pl_editor_screen.h b/pagelayout_editor/class_pl_editor_screen.h index 4c76fbd9f7..957180f34a 100644 --- a/pagelayout_editor/class_pl_editor_screen.h +++ b/pagelayout_editor/class_pl_editor_screen.h @@ -1,5 +1,29 @@ /** - * @file class_pl_editor_layout.h + * @file class_pl_editor_screen.h + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ #ifndef CLASS_PL_EDITOR_SCREEN_H_ diff --git a/pagelayout_editor/controle.cpp b/pagelayout_editor/controle.cpp index 415c0fad1c..5225200857 100644 --- a/pagelayout_editor/controle.cpp +++ b/pagelayout_editor/controle.cpp @@ -1,8 +1,12 @@ +/** + * @file pagelayout_editor/controle.cpp + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013-2013 Jean-Pierre Charras jp.charras at wanadoo.fr - * Copyright (C) 2013-2013 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,10 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file pagelayout_editor/controle.cpp - */ - #include #include #include diff --git a/pagelayout_editor/design_tree_frame.cpp b/pagelayout_editor/design_tree_frame.cpp index 74fb9c1b28..3bb72f36cb 100644 --- a/pagelayout_editor/design_tree_frame.cpp +++ b/pagelayout_editor/design_tree_frame.cpp @@ -1,8 +1,12 @@ +/** + * @file design_tree_frame.cpp + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,10 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file design_tree_frame.cpp - */ - #include #include #include diff --git a/pagelayout_editor/design_tree_frame.h b/pagelayout_editor/design_tree_frame.h index d601ac4d5d..1ff901e292 100644 --- a/pagelayout_editor/design_tree_frame.h +++ b/pagelayout_editor/design_tree_frame.h @@ -1,8 +1,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/dialogs/dialog_new_dataitem.cpp b/pagelayout_editor/dialogs/dialog_new_dataitem.cpp index b6b8b019cb..5269c99111 100644 --- a/pagelayout_editor/dialogs/dialog_new_dataitem.cpp +++ b/pagelayout_editor/dialogs/dialog_new_dataitem.cpp @@ -1,8 +1,13 @@ +/** + * @file dialog_new_dataitem.cpp + * @brief a dialog called on creating a new plage layout data item. +*/ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,11 +27,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file dialog_new_dataitem.cpp - * @brief a dialog called on creating a new plage layout data item. -*/ - #include #include #include diff --git a/pagelayout_editor/dialogs/dialogs_for_printing.cpp b/pagelayout_editor/dialogs/dialogs_for_printing.cpp index 24c2aa5077..707b43a2ca 100644 --- a/pagelayout_editor/dialogs/dialogs_for_printing.cpp +++ b/pagelayout_editor/dialogs/dialogs_for_printing.cpp @@ -2,8 +2,11 @@ * @file dialogs_for_printing.cpp */ -/* Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index 68c3d2285c..d6b81f617f 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -2,6 +2,29 @@ * @file pagelayout_editor/events_called_functions.cpp * @brief page layout editor command event functions. */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ #include #include @@ -38,7 +61,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) EVT_MENU( wxID_SAVEAS, PL_EDITOR_FRAME::Files_io ) EVT_MENU( wxID_FILE, PL_EDITOR_FRAME::Files_io ) EVT_MENU( ID_LOAD_DEFAULT_PAGE_LAYOUT, PL_EDITOR_FRAME::Files_io ) - EVT_MENU( ID_OPEN_POLYGON_DESCR_FILE, PL_EDITOR_FRAME::Files_io ) + EVT_MENU( ID_APPEND_DESCR_FILE, PL_EDITOR_FRAME::Files_io ) EVT_MENU( ID_GEN_PLOT, PL_EDITOR_FRAME::ToPlotter ) @@ -67,7 +90,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( wxID_PREVIEW, PL_EDITOR_FRAME::ToPrinter ) EVT_TOOL( ID_SHEET_SET, PL_EDITOR_FRAME::Process_Special_Functions ) EVT_TOOL( ID_SHOW_REAL_MODE, PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode ) - EVT_TOOL( ID_SHOW_LPEDITOR_MODE, PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode ) + EVT_TOOL( ID_SHOW_PL_EDITOR_MODE, PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode ) EVT_CHOICE( ID_SELECT_COORDINATE_ORIGIN, PL_EDITOR_FRAME::OnSelectCoordOriginCorner) EVT_CHOICE( ID_SELECT_PAGE_NUMBER, PL_EDITOR_FRAME::Process_Special_Functions) @@ -78,7 +101,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) PL_EDITOR_FRAME::Process_Special_Functions ) EVT_UPDATE_UI( ID_SHOW_REAL_MODE, PL_EDITOR_FRAME::OnUpdateTitleBlockDisplayNormalMode ) - EVT_UPDATE_UI( ID_SHOW_LPEDITOR_MODE, PL_EDITOR_FRAME::OnUpdateTitleBlockDisplaySpecialMode ) + EVT_UPDATE_UI( ID_SHOW_PL_EDITOR_MODE, PL_EDITOR_FRAME::OnUpdateTitleBlockDisplaySpecialMode ) END_EVENT_TABLE() @@ -157,7 +180,22 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event ) RebuildDesignTree(); item = NULL; } - m_canvas->Refresh(); + else + { + // Put the new item in move mode, after putting the cursor + // on the start point: + wxPoint position = item->GetStartPosUi(); + SetCrossHairPosition( position, false ); + position = GetCrossHairPosition(); + + if( m_canvas->IsPointOnDisplay( position ) ) + m_canvas->MoveCursorToCrossHair(); + else + RedrawScreen( position, true ); + + item->SetFlags( NEW_ITEM ); + MoveItem( item ); + } break; case ID_POPUP_ITEM_ADD_RECT: @@ -171,7 +209,22 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event ) RebuildDesignTree(); item = NULL; } - m_canvas->Refresh(); + else + { + // Put the new item in move mode, after putting the cursor + // on the start point: + wxPoint position = item->GetStartPosUi(); + SetCrossHairPosition( position, false ); + position = GetCrossHairPosition(); + + if( m_canvas->IsPointOnDisplay( position ) ) + m_canvas->MoveCursorToCrossHair(); + else + RedrawScreen( position, true ); + + item->SetFlags( NEW_ITEM ); + MoveItem( item ); + } break; case ID_POPUP_ITEM_ADD_TEXT: @@ -185,11 +238,16 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event ) RebuildDesignTree(); item = NULL; } - m_canvas->Refresh(); + else + { + // Put the new text in move mode: + item->SetFlags( NEW_ITEM | LOCATE_STARTPOINT ); + MoveItem( item ); + } break; - case ID_POPUP_ITEM_ADD_POLY: - cmd.SetId( ID_OPEN_POLYGON_DESCR_FILE ); + case ID_POPUP_ITEM_APPEND_PAGE_LAYOUT: + cmd.SetId( ID_APPEND_DESCR_FILE ); wxPostEvent( this, cmd ); break; @@ -240,6 +298,11 @@ void PL_EDITOR_FRAME::Process_Special_Functions( wxCommandEvent& event ) } +/* + * Function moveItem: called when the mouse cursor is moving + * moves the item currently selected (or the start point or the end point) + * to the cursor position + */ DPOINT initialPosition; // The initial position of the item to move, in mm wxPoint initialPositionUi; // The initial position of the item to move, in Ui wxPoint initialCursorPosition; // The initial position of the cursor @@ -265,27 +328,43 @@ static void moveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC, const wxPoint& aPositio aPanel->Refresh(); } +/* + * Function abortMoveItem: called when an item is currently moving, + * and when the user aborts the move command. + * Restores the initial position of the item + */ static void abortMoveItem( EDA_DRAW_PANEL* aPanel, wxDC* aDC ) { PL_EDITOR_SCREEN* screen = (PL_EDITOR_SCREEN*) aPanel->GetScreen(); WORKSHEET_DATAITEM *item = screen->GetCurItem(); - if( (item->GetFlags() & LOCATE_STARTPOINT) ) + + if( (item->GetFlags() & NEW_ITEM ) ) { - item->MoveStartPointTo( initialPosition ); - } - else if( (item->GetFlags() & LOCATE_ENDPOINT) ) - { - item->MoveEndPointTo( initialPosition ); + PL_EDITOR_FRAME* plframe = (PL_EDITOR_FRAME*) aPanel->GetParent(); + plframe->RemoveLastCommandInUndoList(); + WORKSHEET_LAYOUT& pglayout = WORKSHEET_LAYOUT::GetTheInstance(); + pglayout.Remove( item ); + plframe->RebuildDesignTree(); } else - item->MoveTo( initialPosition ); + { + if( (item->GetFlags() & LOCATE_STARTPOINT) ) + { + item->MoveStartPointTo( initialPosition ); + } + else if( (item->GetFlags() & LOCATE_ENDPOINT) ) + { + item->MoveEndPointTo( initialPosition ); + } + else + item->MoveTo( initialPosition ); + } aPanel->SetMouseCapture( NULL, NULL ); screen->SetCurItem( NULL ); aPanel->Refresh(); } - void PL_EDITOR_FRAME::MoveItem( WORKSHEET_DATAITEM* aItem ) { wxCHECK_RET( aItem != NULL, wxT( "Cannot move NULL item" ) ); @@ -328,6 +407,8 @@ void PL_EDITOR_FRAME::PlaceItem( WORKSHEET_DATAITEM* aItem ) DPOINT currStartPos = aItem->GetStartPos(); DPOINT currEndPos = aItem->GetEndPos(); + aItem->ClearFlags( NEW_ITEM ); + // Save the curren layout before changes if( (aItem->GetFlags() & LOCATE_STARTPOINT) ) { @@ -363,7 +444,7 @@ void PL_EDITOR_FRAME::OnSelectCoordOriginCorner( wxCommandEvent& event ) void PL_EDITOR_FRAME::OnSelectTitleBlockDisplayMode( wxCommandEvent& event ) { - WORKSHEET_DATAITEM::m_SpecialMode = (event.GetId() == ID_SHOW_LPEDITOR_MODE); + WORKSHEET_DATAITEM::m_SpecialMode = (event.GetId() == ID_SHOW_PL_EDITOR_MODE); m_canvas->Refresh(); } @@ -446,20 +527,13 @@ void PL_EDITOR_FRAME::OnTreeMiddleClick( wxTreeEvent& event ) { } +extern void AddNewItemsCommand( wxMenu* aMainMenu ); void PL_EDITOR_FRAME::OnTreeRightClick( wxTreeEvent& event ) { m_treePagelayout->SelectCell( event.GetItem() ); wxMenu popMenu; - - AddMenuItem( &popMenu, ID_POPUP_ITEM_ADD_LINE, _( "Add line" ), - KiBitmap( add_dashed_line_xpm ) ); - AddMenuItem( &popMenu, ID_POPUP_ITEM_ADD_RECT, _( "Add rect" ), - KiBitmap( add_rectangle_xpm ) ); - AddMenuItem( &popMenu, ID_POPUP_ITEM_ADD_TEXT, _( "Add text" ), - KiBitmap( add_text_xpm ) ); - AddMenuItem( &popMenu, ID_POPUP_ITEM_ADD_POLY, _( "Import poly descr file" ), - KiBitmap( add_polygon_xpm ) ); + AddNewItemsCommand( &popMenu ); popMenu.AppendSeparator(); AddMenuItem( &popMenu, ID_POPUP_DESIGN_TREE_ITEM_DELETE, _( "Delete" ), diff --git a/pagelayout_editor/files.cpp b/pagelayout_editor/files.cpp index 0f7ca6c27b..8598ea9de3 100644 --- a/pagelayout_editor/files.cpp +++ b/pagelayout_editor/files.cpp @@ -1,12 +1,12 @@ /** - * @file gerbview/files.cpp + * @file pl_editor/files.cpp */ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2012 Jean-Pierre Charras, jaen-pierre.charras@gipsa-lab.inpg.com - * Copyright (C) 2004-2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -112,9 +112,9 @@ void PL_EDITOR_FRAME::Files_io( wxCommandEvent& event ) OnNewPageLayout(); break; - case ID_OPEN_POLYGON_DESCR_FILE: + case ID_APPEND_DESCR_FILE: { - wxFileDialog openFileDialog(this, _("Open polygon descr file"), + wxFileDialog openFileDialog(this, _("Append Page Layout Descr File"), wxEmptyString, wxEmptyString, PageLayoutDescrFileWildcard, wxFD_OPEN); diff --git a/pagelayout_editor/hotkeys.cpp b/pagelayout_editor/hotkeys.cpp index ab8045fac6..77ea54bccd 100644 --- a/pagelayout_editor/hotkeys.cpp +++ b/pagelayout_editor/hotkeys.cpp @@ -1,11 +1,11 @@ /** - * @file gerbview/hotkeys.cpp + * @file pagelayout_editor/hotkeys.cpp */ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/hotkeys.h b/pagelayout_editor/hotkeys.h index 1b86ccf2b0..37a310116b 100644 --- a/pagelayout_editor/hotkeys.h +++ b/pagelayout_editor/hotkeys.h @@ -2,6 +2,30 @@ * @file pagelayout_editor/hotkeys.h */ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #ifndef PL_EDITOR_KOTKEYS_H_ #define PL_EDITOR_KOTKEYS_H_ diff --git a/pagelayout_editor/invoke_pl_editor_dialog.h b/pagelayout_editor/invoke_pl_editor_dialog.h index a54f3633e3..a0aee5cf4d 100644 --- a/pagelayout_editor/invoke_pl_editor_dialog.h +++ b/pagelayout_editor/invoke_pl_editor_dialog.h @@ -1,8 +1,10 @@ +/** + * @file invoke_pl_editor.h + */ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck * Copyright (C) 2013 KiCad Developers, see change_log.txt for contributors. * diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index f32007129e..77da7936db 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -1,8 +1,13 @@ +/** + * @file pagelayout_editor/menubar.cpp + * @brief (Re)Create the main menubar for Pl_Editor + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,10 +27,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file pl_editor/menubar.cpp - * @brief (Re)Create the main menubar for Pl_Editor - */ #include #include diff --git a/pagelayout_editor/onleftclick.cpp b/pagelayout_editor/onleftclick.cpp index 6f8ba57e94..ed467eef19 100644 --- a/pagelayout_editor/onleftclick.cpp +++ b/pagelayout_editor/onleftclick.cpp @@ -8,7 +8,6 @@ * * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 CERN - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/onrightclick.cpp b/pagelayout_editor/onrightclick.cpp index 6a343094df..c586989335 100644 --- a/pagelayout_editor/onrightclick.cpp +++ b/pagelayout_editor/onrightclick.cpp @@ -8,7 +8,6 @@ * * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 CERN - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -40,6 +39,19 @@ #include #include +// Helper function to add menuitems relative to items creation +void AddNewItemsCommand( wxMenu* aMainMenu ) +{ + AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_LINE, _( "Add Line" ), + KiBitmap( add_dashed_line_xpm ) ); + AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_RECT, _( "Add Rectangle" ), + KiBitmap( add_rectangle_xpm ) ); + AddMenuItem( aMainMenu, ID_POPUP_ITEM_ADD_TEXT, _( "Add Text" ), + KiBitmap( add_text_xpm ) ); + AddMenuItem( aMainMenu, ID_POPUP_ITEM_APPEND_PAGE_LAYOUT, + _( "Append Page Layout Descr File" ), + KiBitmap( import_xpm ) ); +} /* Prepare the right-click pullup menu. * The menu already has a list of zoom commands. @@ -102,15 +114,7 @@ bool PL_EDITOR_FRAME::OnRightClick( const wxPoint& aPosition, wxMenu* aPopMenu ) if( ! busy ) { - AddMenuItem( aPopMenu, ID_POPUP_ITEM_ADD_LINE, _( "Add line" ), - KiBitmap( add_dashed_line_xpm ) ); - AddMenuItem( aPopMenu, ID_POPUP_ITEM_ADD_RECT, _( "Add rect" ), - KiBitmap( add_rectangle_xpm ) ); - AddMenuItem( aPopMenu, ID_POPUP_ITEM_ADD_TEXT, _( "Add text" ), - KiBitmap( add_text_xpm ) ); - AddMenuItem( aPopMenu, ID_POPUP_ITEM_ADD_POLY, _( "Import poly descr file" ), - KiBitmap( add_polygon_xpm ) ); - + AddNewItemsCommand( aPopMenu ); aPopMenu->AppendSeparator(); } diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp index 4e888c3fe1..72168ac6a9 100644 --- a/pagelayout_editor/page_layout_writer.cpp +++ b/pagelayout_editor/page_layout_writer.cpp @@ -7,9 +7,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2013 Jean-Pierre Charras . - * Copyright (C) 1992-2013 KiCad Developers, see change_log.txt for contributors. - * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index b31f79e68e..42ef6e708e 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -6,8 +6,8 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/pl_editor_config.cpp b/pagelayout_editor/pl_editor_config.cpp index 183d146ed4..b5b8f12866 100644 --- a/pagelayout_editor/pl_editor_config.cpp +++ b/pagelayout_editor/pl_editor_config.cpp @@ -1,8 +1,13 @@ +/** + * @file pl_editor_config.cpp + * @brief page layout editor configuration. +*/ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,11 +27,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file pl_editor_config.cpp - * @brief page layout editor configuration. -*/ - #include #include #include diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 3e18ba0ee8..6cd2d4522c 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -1,8 +1,12 @@ +/** + * @file pl_editor_frame.cpp + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,10 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file pl_editor_frame.cpp - */ - #include #include #include diff --git a/pagelayout_editor/pl_editor_frame.h b/pagelayout_editor/pl_editor_frame.h index 660e02d1b8..c88ed638eb 100644 --- a/pagelayout_editor/pl_editor_frame.h +++ b/pagelayout_editor/pl_editor_frame.h @@ -1,9 +1,12 @@ +/** + * @file pl_editor_frame.h + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr * Copyright (C) 2013 CERN - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -23,10 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file pl_editor_frame.h - */ - #ifndef _PL_EDITOR_FRAME_H #define _PL_EDITOR_FRAME_H diff --git a/pagelayout_editor/pl_editor_id.h b/pagelayout_editor/pl_editor_id.h index 6f7b0c5be6..0a607bdc07 100644 --- a/pagelayout_editor/pl_editor_id.h +++ b/pagelayout_editor/pl_editor_id.h @@ -1,3 +1,31 @@ +/** + * @file pl_editor_id.h + */ + +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + #ifndef _PL_EDITOR_ID_H_ #define _PL_EDITOR_ID_H_ @@ -22,12 +50,12 @@ enum pl_editor_ids ID_DESIGN_TREE_FRAME, ID_SHOW_REAL_MODE, - ID_SHOW_LPEDITOR_MODE, + ID_SHOW_PL_EDITOR_MODE, ID_SELECT_COORDINATE_ORIGIN, ID_LOAD_DEFAULT_PAGE_LAYOUT, ID_SELECT_PAGE_NUMBER, - ID_OPEN_POLYGON_DESCR_FILE, + ID_APPEND_DESCR_FILE, ID_POPUP_START_RANGE, ID_POPUP_ITEM_DELETE, @@ -35,7 +63,7 @@ enum pl_editor_ids ID_POPUP_ITEM_ADD_LINE, ID_POPUP_ITEM_ADD_RECT, ID_POPUP_ITEM_ADD_TEXT, - ID_POPUP_ITEM_ADD_POLY, + ID_POPUP_ITEM_APPEND_PAGE_LAYOUT, ID_POPUP_ITEM_MOVE, ID_POPUP_ITEM_PLACE, ID_POPUP_ITEM_MOVE_START_POINT, diff --git a/pagelayout_editor/pl_editor_undo_redo.cpp b/pagelayout_editor/pl_editor_undo_redo.cpp index d40708c822..390aebb498 100644 --- a/pagelayout_editor/pl_editor_undo_redo.cpp +++ b/pagelayout_editor/pl_editor_undo_redo.cpp @@ -1,13 +1,13 @@ /** * @file pl_editor_undo_redo.cpp - * @brief page layout editor: undo and redo functions + * @brief page layout editor: undo and redo functions */ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License diff --git a/pagelayout_editor/properties_frame.cpp b/pagelayout_editor/properties_frame.cpp index db700d1d4e..6adba13182 100644 --- a/pagelayout_editor/properties_frame.cpp +++ b/pagelayout_editor/properties_frame.cpp @@ -1,8 +1,12 @@ +/** + * @file properties_frame.cpp + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,10 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file properties_frame.cpp - */ - #include #include #include diff --git a/pagelayout_editor/properties_frame.h b/pagelayout_editor/properties_frame.h index e603cac5e8..75557c1681 100644 --- a/pagelayout_editor/properties_frame.h +++ b/pagelayout_editor/properties_frame.h @@ -1,8 +1,12 @@ +/** + * @file properties_frame.h + */ + /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -22,10 +26,6 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -/** - * @file properties_frame.h - */ - #ifndef _PROPERTIES_FRAME_H #define _PROPERTIES_FRAME_H diff --git a/pagelayout_editor/toolbars_pl_editor.cpp b/pagelayout_editor/toolbars_pl_editor.cpp index e11232273e..83af71a423 100644 --- a/pagelayout_editor/toolbars_pl_editor.cpp +++ b/pagelayout_editor/toolbars_pl_editor.cpp @@ -1,14 +1,14 @@ /** - * @file toolbars_gerber.cpp + * @file toolbars_pl_editor.cpp * @brief Build tool bars */ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 2013 Jean-Pierre Charras, jp.charras at wanadoo.fr - * Copyright (C) 1992-2013 KiCad Developers, see AUTHORS.txt for contributors. + * Copyright (C) 2013 CERN + * @author Jean-Pierre Charras, jp.charras at wanadoo.fr * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -90,12 +90,14 @@ void PL_EDITOR_FRAME::ReCreateHToolbar( void ) // Display mode switch m_mainToolBar->AddSeparator(); - m_mainToolBar->AddTool( ID_SHOW_REAL_MODE, wxEmptyString, KiBitmap( pagelayout_normal_view_mode_xpm ), + m_mainToolBar->AddTool( ID_SHOW_REAL_MODE, wxEmptyString, + KiBitmap( pagelayout_normal_view_mode_xpm ), _( "Show title block like it will be displayed in applications\n" "texts with format are replaced by the full text"), wxITEM_CHECK ); - m_mainToolBar->AddTool( ID_SHOW_LPEDITOR_MODE, wxEmptyString, KiBitmap( pagelayout_special_view_mode_xpm ), - _( "how title block in edit mode: texts are shown as is\n" + m_mainToolBar->AddTool( ID_SHOW_PL_EDITOR_MODE, + wxEmptyString, KiBitmap( pagelayout_special_view_mode_xpm ), + _( "Show title block in edit mode: texts are shown as is:\n" "texts with format are displayed with no change"), wxITEM_CHECK ); diff --git a/pcbnew/dialogs/dialog_copper_zones.cpp b/pcbnew/dialogs/dialog_copper_zones.cpp index d5af4bbc7f..c94d095333 100644 --- a/pcbnew/dialogs/dialog_copper_zones.cpp +++ b/pcbnew/dialogs/dialog_copper_zones.cpp @@ -250,6 +250,7 @@ void DIALOG_COPPER_ZONE::initDialog() int layerCount = board->GetCopperLayerCount(); wxImageList* imageList = new wxImageList( LAYER_BITMAP_SIZE_X, LAYER_BITMAP_SIZE_Y ); m_LayerSelectionCtrl->AssignImageList( imageList, wxIMAGE_LIST_SMALL ); + int ctrlWidth = 0; // Min width for m_LayerSelectionCtrl to show the layers names for( LAYER_NUM ii = FIRST_LAYER; ii < layerCount; ++ii ) { LAYER_NUM layerNumber = LAYER_N_BACK; @@ -268,9 +269,19 @@ void DIALOG_COPPER_ZONE::initDialog() if( m_settings.m_CurrentZone_Layer == layerNumber ) m_LayerSelectionCtrl->Select( itemIndex ); + + wxSize tsize( GetTextSize( msg, m_LayerSelectionCtrl ) ); + ctrlWidth = std::max( ctrlWidth, tsize.x ); } - m_LayerSelectionCtrl->SetColumnWidth( 0, wxLIST_AUTOSIZE); + // The most easy way to ensure the right size is to use wxLIST_AUTOSIZE + // unfortunately this option does not work well both on + // wxWidgets 2.8 ( column witdth too small), and + // wxWidgets 2.9 ( column witdth too large) + ctrlWidth += LAYER_BITMAP_SIZE_X + 16; // Add bitmap width + margin between bitmap and text + m_LayerSelectionCtrl->SetColumnWidth( 0, ctrlWidth ); + ctrlWidth += 4; // add small margin between text and window borders + m_LayerSelectionCtrl->SetMinSize( wxSize(ctrlWidth, -1)); wxString netNameDoNotShowFilter = wxT( "N-*" ); if( m_Config ) From 19c49fa82b36bb1b12ff47e68a2a280ec393c980 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Tue, 13 Aug 2013 19:04:41 -0400 Subject: [PATCH 25/42] Eeschema bus label test bug fixes. (fixes lp:1209424) * Use a regular expression to enforce more stringent bus label testing. * Add validator to edit label dialog to prevent space character from being used in labels. --- eeschema/class_netlist_object.cpp | 39 ++++++++++++++++----- eeschema/class_netlist_object.h | 6 +--- eeschema/dialogs/dialog_edit_label.cpp | 10 ++++-- eeschema/dialogs/dialog_edit_label_base.cpp | 7 +++- eeschema/dialogs/dialog_edit_label_base.fbp | 8 ++--- eeschema/dialogs/dialog_edit_label_base.h | 6 +++- 6 files changed, 54 insertions(+), 22 deletions(-) diff --git a/eeschema/class_netlist_object.cpp b/eeschema/class_netlist_object.cpp index 5cb1dfed27..e5e73c7e46 100644 --- a/eeschema/class_netlist_object.cpp +++ b/eeschema/class_netlist_object.cpp @@ -35,6 +35,26 @@ #include #include +#include + + +/** + * The regular expression string for label bus notation. Valid bus labels are defined as + * one or more non-whitespace characters from the beginning of the string followed by the + * bus notation [nn...mm] with no characters after the closing bracket. + */ +static wxRegEx busLabelRe( wxT( "^([^[:space:]]+)(\\[[\\d]+\\.+[\\d]+\\])$" ), wxRE_ADVANCED ); + + +bool IsBusLabel( const wxString& aLabel ) +{ + wxCHECK_MSG( busLabelRe.IsValid(), false, + wxT( "Invalid regular expression in IsBusLabel()." ) ); + + return busLabelRe.Matches( aLabel ); +} + + #if defined(DEBUG) #include @@ -220,31 +240,32 @@ void NETLIST_OBJECT::ConvertBusToNetListItems( NETLIST_OBJECT_LIST& aNetListItem wxCHECK_RET( false, wxT( "Net list object type is not valid." ) ); unsigned i; - wxString tmp, busName; + wxString tmp, busName, busNumber; long begin, end, member; - /* Search for '[' because a bus label is like "busname[nn..mm]" */ - i = m_Label.Find( '[' ); + busName = busLabelRe.GetMatch( m_Label, 1 ); + busNumber = busLabelRe.GetMatch( m_Label, 2 ); - busName = m_Label.Left( i ); + /* Search for '[' because a bus label is like "busname[nn..mm]" */ + i = busNumber.Find( '[' ); i++; - while( m_Label[i] != '.' && i < m_Label.Len() ) + while( busNumber[i] != '.' && i < busNumber.Len() ) { - tmp.Append( m_Label[i] ); + tmp.Append( busNumber[i] ); i++; } tmp.ToLong( &begin ); - while( m_Label[i] == '.' && i < m_Label.Len() ) + while( busNumber[i] == '.' && i < busNumber.Len() ) i++; tmp.Empty(); - while( m_Label[i] != ']' && i < m_Label.Len() ) + while( busNumber[i] != ']' && i < busNumber.Len() ) { - tmp.Append( m_Label[i] ); + tmp.Append( busNumber[i] ); i++; } diff --git a/eeschema/class_netlist_object.h b/eeschema/class_netlist_object.h index b28dad9346..aca521468d 100644 --- a/eeschema/class_netlist_object.h +++ b/eeschema/class_netlist_object.h @@ -96,11 +96,7 @@ enum NET_CONNECTION_T { * @param aLabel A wxString object containing the label to test. * @return true if text is a bus notation format otherwise false is returned. */ -inline bool IsBusLabel( const wxString& aLabel ) -{ - /* Search for '[' because a bus label is like "busname[nn..mm]" */ - return aLabel.Find( '[' ) != wxNOT_FOUND; -} +extern bool IsBusLabel( const wxString& aLabel ); class NETLIST_OBJECT diff --git a/eeschema/dialogs/dialog_edit_label.cpp b/eeschema/dialogs/dialog_edit_label.cpp index edc191d350..addeb7cee6 100644 --- a/eeschema/dialogs/dialog_edit_label.cpp +++ b/eeschema/dialogs/dialog_edit_label.cpp @@ -102,13 +102,19 @@ void DIALOG_LABEL_EDITOR::InitDialog() if( m_CurrentText->IsMultilineAllowed() ) { m_textLabel = m_textLabelMultiLine; - m_textLabelSingleLine->Show(false); + m_textLabelSingleLine->Show( false ); multiLine = true; } else { m_textLabel = m_textLabelSingleLine; - m_textLabelMultiLine->Show(false); + m_textLabelMultiLine->Show( false ); + wxTextValidator* validator = (wxTextValidator*) m_textLabel->GetValidator(); + wxArrayString excludes; + + // Add invalid label characters to this list. + excludes.Add( wxT( " " ) ); + validator->SetExcludes( excludes ); } m_textLabel->SetValue( m_CurrentText->GetText() ); diff --git a/eeschema/dialogs/dialog_edit_label_base.cpp b/eeschema/dialogs/dialog_edit_label_base.cpp index 1384ffec8c..739f6a03d0 100644 --- a/eeschema/dialogs/dialog_edit_label_base.cpp +++ b/eeschema/dialogs/dialog_edit_label_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Apr 30 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -32,9 +32,13 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID bSizeText = new wxBoxSizer( wxVERTICAL ); m_textLabelSingleLine = new wxTextCtrl( this, wxID_VALUESINGLE, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); + m_textLabelSingleLine->SetMaxLength( 0 ); + m_textLabelSingleLine->SetValidator( wxTextValidator( wxFILTER_EXCLUDE_CHAR_LIST, &m_labelText ) ); + bSizeText->Add( m_textLabelSingleLine, 0, wxEXPAND|wxLEFT, 3 ); m_textLabelMultiLine = new wxTextCtrl( this, wxID_VALUEMULTI, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER ); + m_textLabelMultiLine->SetMaxLength( 0 ); m_textLabelMultiLine->SetMinSize( wxSize( -1,60 ) ); bSizeText->Add( m_textLabelMultiLine, 1, wxEXPAND|wxLEFT, 3 ); @@ -50,6 +54,7 @@ DIALOG_LABEL_EDITOR_BASE::DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID bSizeCtrlSizer = new wxBoxSizer( wxHORIZONTAL ); m_TextSize = new wxTextCtrl( this, wxID_SIZE, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + m_TextSize->SetMaxLength( 0 ); bSizeCtrlSizer->Add( m_TextSize, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT|wxRIGHT, 3 ); m_staticSizeUnits = new wxStaticText( this, wxID_ANY, _("units"), wxDefaultPosition, wxDefaultSize, 0 ); diff --git a/eeschema/dialogs/dialog_edit_label_base.fbp b/eeschema/dialogs/dialog_edit_label_base.fbp index b9c2ab73a0..3008bf2acc 100644 --- a/eeschema/dialogs/dialog_edit_label_base.fbp +++ b/eeschema/dialogs/dialog_edit_label_base.fbp @@ -253,10 +253,10 @@ 0 - - wxFILTER_NONE - wxDefaultValidator - + wxString + wxFILTER_EXCLUDE_CHAR_LIST + wxTextValidator + m_labelText diff --git a/eeschema/dialogs/dialog_edit_label_base.h b/eeschema/dialogs/dialog_edit_label_base.h index 689550b57d..c704426370 100644 --- a/eeschema/dialogs/dialog_edit_label_base.h +++ b/eeschema/dialogs/dialog_edit_label_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 10 2012) +// C++ code generated with wxFormBuilder (version Apr 30 2013) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -11,6 +11,8 @@ #include #include #include +class DIALOG_SHIM; + #include "dialog_shim.h" #include #include @@ -19,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -62,6 +65,7 @@ class DIALOG_LABEL_EDITOR_BASE : public DIALOG_SHIM public: + wxString m_labelText; DIALOG_LABEL_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Text Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_LABEL_EDITOR_BASE(); From 8c45f18409a47fe568627958e2fb2e7c75c4c093 Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Thu, 15 Aug 2013 17:20:25 +0200 Subject: [PATCH 26/42] - Rogue int as LAYER_MSK (will break with more than 32 layers) - Comment fix --- pcbnew/block.cpp | 2 +- pcbnew/class_board.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pcbnew/block.cpp b/pcbnew/block.cpp index 20c6b848a3..06d63ca524 100644 --- a/pcbnew/block.cpp +++ b/pcbnew/block.cpp @@ -381,7 +381,7 @@ bool PCB_EDIT_FRAME::HandleBlockEnd( wxDC* DC ) void PCB_EDIT_FRAME::Block_SelectItems() { - int layerMask; + LAYER_MSK layerMask; GetScreen()->m_BlockLocate.Normalize(); diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index 67917a52b1..df63b410b4 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -614,7 +614,7 @@ public: void SetZoneSettings( const ZONE_SETTINGS& aSettings ) { m_zoneSettings = aSettings; } /** - * Function SetColorSettings + * Function GetColorSettings * @return the current COLORS_DESIGN_SETTINGS in use */ COLORS_DESIGN_SETTINGS* GetColorsSettings() const { return m_colorsSettings; } From 7cbe1c0a44d69cfd93b802e8fb5472ea9776fe5f Mon Sep 17 00:00:00 2001 From: Marco Mattila Date: Fri, 16 Aug 2013 14:51:35 +0300 Subject: [PATCH 27/42] Pcbnew: fix filleting of zones with parallel adjacent edges --- polygon/PolyLine.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index 13c5d08cf9..ee819f8b11 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -448,6 +448,10 @@ CPolyLine* CPolyLine::Fillet( unsigned int aRadius, unsigned int aSegments ) double radius = aRadius; double denom = sqrt( 2.0 / ( 1 + cosine ) - 1 ); + // Do nothing in case of parallel edges + if( isinf( denom ) ) + continue; + // Limit rounding distance to one half of an edge if( 0.5 * lena * denom < radius ) radius = 0.5 * lena * denom; From 1ef99e657f568ef49a99daf89f79320120e6969e Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 16 Aug 2013 10:25:34 -0400 Subject: [PATCH 28/42] Fix MinGW build issue for missing isinf() in PolyLine.cpp. --- polygon/PolyLine.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/polygon/PolyLine.cpp b/polygon/PolyLine.cpp index ee819f8b11..d134aafdac 100644 --- a/polygon/PolyLine.cpp +++ b/polygon/PolyLine.cpp @@ -17,6 +17,7 @@ #include #include + CPolyLine::CPolyLine() { m_hatchStyle = NO_HATCH; @@ -449,7 +450,7 @@ CPolyLine* CPolyLine::Fillet( unsigned int aRadius, unsigned int aSegments ) double denom = sqrt( 2.0 / ( 1 + cosine ) - 1 ); // Do nothing in case of parallel edges - if( isinf( denom ) ) + if( std::isinf( denom ) ) continue; // Limit rounding distance to one half of an edge From de0c051e511ccb814b6f282e8f4553f3ba6c7fb8 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 16 Aug 2013 14:41:09 -0400 Subject: [PATCH 29/42] Fix layer alignment target default size. --- pcbnew/mirepcb.cpp | 45 ++++++++++++++++++++++++++++++++++----------- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/pcbnew/mirepcb.cpp b/pcbnew/mirepcb.cpp index ca9101ae9b..d937793e73 100644 --- a/pcbnew/mirepcb.cpp +++ b/pcbnew/mirepcb.cpp @@ -1,6 +1,31 @@ +/* + * This program source code file is part of KiCad, a free EDA CAD application. + * + * Copyright (C) 2004 Jean-Pierre Charras, jean-pierre.charras@gipsa-lab.inpg.fr + * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. + * + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, you may find one here: + * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html + * or you may search the http://www.gnu.org website for the version 2 license, + * or you may write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + */ + /** * @file mirepcb.cpp - * @brief Functions to edit targets (class MIRE). + * @brief Functions to edit targets (class #PCB_TARGET). */ #include @@ -24,16 +49,17 @@ static void ShowTargetShapeWhileMovingMouse( EDA_DRAW_PANEL* aPanel, bool aErase ); // Local variables : -static int MireDefaultSize = 5000; +static int MireDefaultSize = Millimeter2iu( 5 ); + static PCB_TARGET s_TargetCopy( NULL ); /* Used to store "old" values of the * current item parameters before * edition (used in undo/redo or * cancel operations) */ -/************************************/ +/*****************************************/ /* class TARGET_PROPERTIES_DIALOG_EDITOR */ -/************************************/ +/*****************************************/ class TARGET_PROPERTIES_DIALOG_EDITOR : public wxDialog { @@ -192,18 +218,17 @@ static void AbortMoveAndEditTarget( EDA_DRAW_PANEL* Panel, wxDC* DC ) if( ( target->GetFlags() & (IN_EDIT | IS_MOVED) ) ) { target->SetPosition( s_TargetCopy.GetPosition() ); - target->SetWidth( s_TargetCopy.GetWidth() ); - target->SetSize( s_TargetCopy.GetSize() ); - target->SetShape( s_TargetCopy.GetShape() ); + target->SetWidth( s_TargetCopy.GetWidth() ); + target->SetSize( s_TargetCopy.GetSize() ); + target->SetShape( s_TargetCopy.GetShape() ); } + target->ClearFlags(); target->Draw( Panel, DC, GR_OR ); } } -/* Draw Symbol PCB type MIRE. - */ PCB_TARGET* PCB_EDIT_FRAME::CreateTarget( wxDC* DC ) { PCB_TARGET* target = new PCB_TARGET( GetBoard() ); @@ -223,8 +248,6 @@ PCB_TARGET* PCB_EDIT_FRAME::CreateTarget( wxDC* DC ) } -/* Routine to initialize the displacement of a focal - */ void PCB_EDIT_FRAME::BeginMoveTarget( PCB_TARGET* aTarget, wxDC* DC ) { if( aTarget == NULL ) From 3f7d24bccf1e0aba94a54ee05472b907a7517bdb Mon Sep 17 00:00:00 2001 From: Brian Sidebotham Date: Fri, 16 Aug 2013 23:31:37 +0100 Subject: [PATCH 30/42] * Fix the last parts of Bug 1204712 by removing DateAndTime from library file and documentation file formats. They weren't being loaded anyway. --- eeschema/class_library.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/eeschema/class_library.cpp b/eeschema/class_library.cpp index 53e69728d7..e06cad7bb2 100644 --- a/eeschema/class_library.cpp +++ b/eeschema/class_library.cpp @@ -731,7 +731,7 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter ) try { - aFormatter.Print( 0, "%s Date: %s\n", DOCFILE_IDENT, TO_UTF8( DateAndTime() ) ); + aFormatter.Print( 0, "%s\n", DOCFILE_IDENT ); for( LIB_ALIAS_MAP::iterator it=aliases.begin(); it!=aliases.end(); it++ ) { @@ -752,8 +752,8 @@ bool CMP_LIBRARY::SaveDocs( OUTPUTFORMATTER& aFormatter ) bool CMP_LIBRARY::SaveHeader( OUTPUTFORMATTER& aFormatter ) { - aFormatter.Print( 0, "%s %d.%d Date: %s\n", LIBFILE_IDENT, - LIB_VERSION_MAJOR, LIB_VERSION_MINOR, TO_UTF8( DateAndTime() ) ); + aFormatter.Print( 0, "%s %d.%d\n", LIBFILE_IDENT, + LIB_VERSION_MAJOR, LIB_VERSION_MINOR ); aFormatter.Print( 0, "#encoding utf-8\n"); From 4e1da2b6d0ae44b82d8dd7ef7d35bfaae1a4a9a3 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sun, 18 Aug 2013 17:49:04 +0200 Subject: [PATCH 31/42] Pl_Editor: fix minor issues in multi-lines texts Others: fix very minor issues. --- .../page_layout/class_worksheet_dataitem.cpp | 38 + common/page_layout/title_block_shapes.cpp | 3 +- common/worksheet.cpp | 4 +- include/class_worksheet_dataitem.h | 8 + pagelayout_editor/page_layout_writer.cpp | 4 +- pagelayout_editor/properties_frame.cpp | 13 +- pcb_calculator/transline/transline.cpp | 11 +- pcb_calculator/transline/units.h | 9 - pcbnew/dialogs/dialog_mask_clearance_base.cpp | 22 +- pcbnew/dialogs/dialog_mask_clearance_base.fbp | 2742 ++++++++--------- pcbnew/dialogs/dialog_mask_clearance_base.h | 3 +- 11 files changed, 1434 insertions(+), 1423 deletions(-) diff --git a/common/page_layout/class_worksheet_dataitem.cpp b/common/page_layout/class_worksheet_dataitem.cpp index c141960e20..90d88ad600 100644 --- a/common/page_layout/class_worksheet_dataitem.cpp +++ b/common/page_layout/class_worksheet_dataitem.cpp @@ -462,6 +462,43 @@ void WORKSHEET_DATAITEM_TEXT::IncrementLabel( int aIncr ) m_FullText << (wxChar) ( aIncr + lbchar ); } +// Replace the '\''n' sequence by EOL +// and the sequence '\''\' by only one '\' in m_FullText +// if m_FullTextis a multiline text (i;e.contains '\n') return true +bool WORKSHEET_DATAITEM_TEXT::ReplaceAntiSlashSequence() +{ + bool multiline = false; + + for( unsigned ii = 0; ii < m_FullText.Len(); ii++ ) + { + if( m_FullText[ii] == '\n' ) + multiline = true; + + else if( m_FullText[ii] == '\\' ) + { + if( ++ii >= m_FullText.Len() ) + break; + + if( m_FullText[ii] == '\\' ) + { + // a double \\ sequence is replaced by a single \ char + m_FullText.Remove(ii, 1); + ii--; + } + else if( m_FullText[ii] == 'n' ) + { + // Replace the "\n" sequence by a EOL char + multiline = true; + m_FullText[ii] = '\n'; + m_FullText.Remove(ii-1, 1); + ii--; + } + } + } + + return multiline; +} + void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize() { m_ConstrainedTextSize = m_TextSize; @@ -501,3 +538,4 @@ void WORKSHEET_DATAITEM_TEXT::SetConstrainedTextSize() m_ConstrainedTextSize.y *= m_BoundingBoxSize.y / size.y; } } + diff --git a/common/page_layout/title_block_shapes.cpp b/common/page_layout/title_block_shapes.cpp index 4c93661607..cfa814d414 100644 --- a/common/page_layout/title_block_shapes.cpp +++ b/common/page_layout/title_block_shapes.cpp @@ -152,8 +152,7 @@ void WS_DRAW_ITEM_LIST::BuildWorkSheetGraphicList( else { wsText->m_FullText = BuildFullText( wsText->m_TextBase ); - if( wsText->m_FullText.Replace( wxT("\\n" ), wxT("\n") ) > 0 ) - multilines = true; + multilines = wsText->ReplaceAntiSlashSequence(); } if( wsText->m_FullText.IsEmpty() ) diff --git a/common/worksheet.cpp b/common/worksheet.cpp index 7b3372141b..653552a030 100644 --- a/common/worksheet.cpp +++ b/common/worksheet.cpp @@ -136,8 +136,8 @@ wxString WS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase ) msg << aTextbase[ii]; continue; } - ii++; - if( ii >= aTextbase.Len() ) + + if( ++ii >= aTextbase.Len() ) break; wxChar format = aTextbase[ii]; diff --git a/include/class_worksheet_dataitem.h b/include/class_worksheet_dataitem.h index 6a2e30927b..bb2c208a37 100644 --- a/include/class_worksheet_dataitem.h +++ b/include/class_worksheet_dataitem.h @@ -420,6 +420,14 @@ public: */ void SetConstrainedTextSize(); + + /** Replace the '\''n' sequence by EOL + * and the sequence '\''\' by only one '\' + * inside m_FullText + * @return true if the EOL symbol is found or is inserted (multiline text) + */ + bool ReplaceAntiSlashSequence(); + /** * @return true is a bold font should be selected */ diff --git a/pagelayout_editor/page_layout_writer.cpp b/pagelayout_editor/page_layout_writer.cpp index 72168ac6a9..c28166a061 100644 --- a/pagelayout_editor/page_layout_writer.cpp +++ b/pagelayout_editor/page_layout_writer.cpp @@ -98,7 +98,7 @@ public: } catch( IO_ERROR ioe ) { - wxMessageBox( ioe.errorText, _("Write Page Layout Error" ) ); + wxMessageBox( ioe.errorText, _("Error writing page layout descr file" ) ); } } @@ -125,7 +125,7 @@ public: } catch( IO_ERROR ioe ) { - wxMessageBox( ioe.errorText, _("Write Page Layout Error" ) ); + wxMessageBox( ioe.errorText, _("Error writing page layout descr file" ) ); } } diff --git a/pagelayout_editor/properties_frame.cpp b/pagelayout_editor/properties_frame.cpp index 6adba13182..dc7a60fd8a 100644 --- a/pagelayout_editor/properties_frame.cpp +++ b/pagelayout_editor/properties_frame.cpp @@ -194,9 +194,10 @@ void PROPERTIES_FRAME::CopyPrmsFromItemToPanel( WORKSHEET_DATAITEM* aItem ) m_SizerTextIncrementLabel->Show( true ); WORKSHEET_DATAITEM_TEXT* item = (WORKSHEET_DATAITEM_TEXT*) aItem; - wxString text = item->m_TextBase; - text.Replace(wxT("\\n"), wxT("\n") ); - m_textCtrlText->SetValue( text ); + item->m_FullText = item->m_TextBase; + // Replace our '\' 'n' sequence by the EOL char + item->ReplaceAntiSlashSequence();; + m_textCtrlText->SetValue( item->m_FullText ); msg.Printf( wxT("%d"), item->m_IncrementLabel ); m_textCtrlTextIncrement->SetValue( msg ); @@ -285,7 +286,12 @@ void PROPERTIES_FRAME::OnAcceptPrms( wxCommandEvent& event ) WORKSHEET_DATAITEM* item = m_parent->GetSelectedItem(); if( item ) + { CopyPrmsFromPanelToItem( item ); + // Be sure what is displayed is waht is set for item + // (mainly, texts can be modified if they contain "\n") + CopyPrmsFromItemToPanel( item ); + } CopyPrmsFromPanelToGeneral(); @@ -392,7 +398,6 @@ bool PROPERTIES_FRAME::CopyPrmsFromPanelToItem( WORKSHEET_DATAITEM* aItem ) WORKSHEET_DATAITEM_TEXT* item = (WORKSHEET_DATAITEM_TEXT*) aItem; item->m_TextBase = m_textCtrlText->GetValue(); - item->m_TextBase.Replace( wxT("\n"), wxT("\\n") ); msg = m_textCtrlTextIncrement->GetValue(); msg.ToLong( &itmp ); diff --git a/pcb_calculator/transline/transline.cpp b/pcb_calculator/transline/transline.cpp index 34f85b7ee4..8d65ca00d4 100644 --- a/pcb_calculator/transline/transline.cpp +++ b/pcb_calculator/transline/transline.cpp @@ -25,8 +25,6 @@ #include #include -using namespace std; - #ifndef INFINITY #define INFINITY std::numeric_limits::infinity() @@ -37,13 +35,6 @@ using namespace std; #define M_PI_2 (M_PI/2) #endif -#ifndef HAVE_CMATH_ISINF -inline bool isinf(double x) -{ - return x == INFINITY; // return true if x is infinity -} -#endif - // Functions to Read/Write parameters in pcb_calculator main frame: // They are wrapper to actual functions, so all transline functions do not @@ -148,7 +139,7 @@ void TRANSLINE::ellipke( double arg, double& k, double& e ) k = INFINITY; // infinite e = 0; } - else if( isinf( arg ) && arg < 0 ) + else if( std::isinf( arg ) && arg < 0 ) { k = 0; e = INFINITY; // infinite diff --git a/pcb_calculator/transline/units.h b/pcb_calculator/transline/units.h index a900e7bbdc..d7c68709ed 100644 --- a/pcb_calculator/transline/units.h +++ b/pcb_calculator/transline/units.h @@ -58,15 +58,6 @@ inline double atanh( double x ) } #endif - -#ifndef M_PI -#define M_PI 3.1415926535897932384626433832795029 /* pi */ -#endif - -#ifndef M_E -#define M_E 2.7182818284590452353602874713526625 /* e */ -#endif - #define MU0 12.566370614e-7 // magnetic constant #define C0 299792458.0 // speed of light in vacuum #define ZF0 376.73031346958504364963 // wave resistance in vacuum diff --git a/pcbnew/dialogs/dialog_mask_clearance_base.cpp b/pcbnew/dialogs/dialog_mask_clearance_base.cpp index 4def2ad1d1..7480510472 100644 --- a/pcbnew/dialogs/dialog_mask_clearance_base.cpp +++ b/pcbnew/dialogs/dialog_mask_clearance_base.cpp @@ -22,20 +22,17 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare bMainSizer = new wxBoxSizer( wxVERTICAL ); wxBoxSizer* bMainUpperSizer; - bMainUpperSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxStaticBoxSizer* sbMiddleRightSizer; - sbMiddleRightSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Dimensions:") ), wxVERTICAL ); + bMainUpperSizer = new wxBoxSizer( wxVERTICAL ); m_staticTextInfo = new wxStaticText( this, wxID_ANY, _("Note: For clearance values:\n- a positive value means a mask bigger than a pad\n- a negative value means a mask smaller than a pad\n"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextInfo->Wrap( -1 ); - sbMiddleRightSizer->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT, 5 ); + bMainUpperSizer->Add( m_staticTextInfo, 0, wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - sbMiddleRightSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + bMainUpperSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); wxFlexGridSizer* fgGridSolderMaskSizer; - fgGridSolderMaskSizer = new wxFlexGridSizer( 4, 3, 0, 0 ); + fgGridSolderMaskSizer = new wxFlexGridSizer( 0, 3, 0, 0 ); fgGridSolderMaskSizer->AddGrowableCol( 1 ); fgGridSolderMaskSizer->SetFlexibleDirection( wxBOTH ); fgGridSolderMaskSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); @@ -106,17 +103,14 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare fgGridSolderMaskSizer->Add( m_SolderPasteRatioMarginUnits, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 ); - sbMiddleRightSizer->Add( fgGridSolderMaskSizer, 1, wxEXPAND, 5 ); + bMainUpperSizer->Add( fgGridSolderMaskSizer, 1, wxEXPAND, 5 ); - - bMainUpperSizer->Add( sbMiddleRightSizer, 1, wxEXPAND, 5 ); + m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainUpperSizer->Add( m_staticline11, 0, wxEXPAND | wxALL, 5 ); bMainSizer->Add( bMainUpperSizer, 1, wxEXPAND, 5 ); - m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bMainSizer->Add( m_staticline11, 0, wxEXPAND | wxALL, 5 ); - m_sdbButtonsSizer = new wxStdDialogButtonSizer(); m_sdbButtonsSizerOK = new wxButton( this, wxID_OK ); m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerOK ); @@ -124,7 +118,7 @@ DIALOG_PADS_MASK_CLEARANCE_BASE::DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* pare m_sdbButtonsSizer->AddButton( m_sdbButtonsSizerCancel ); m_sdbButtonsSizer->Realize(); - bMainSizer->Add( m_sdbButtonsSizer, 0, wxBOTTOM|wxALIGN_RIGHT, 5 ); + bMainSizer->Add( m_sdbButtonsSizer, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM, 5 ); this->SetSizer( bMainSizer ); diff --git a/pcbnew/dialogs/dialog_mask_clearance_base.fbp b/pcbnew/dialogs/dialog_mask_clearance_base.fbp index 57a1e9919f..44681b5a44 100644 --- a/pcbnew/dialogs/dialog_mask_clearance_base.fbp +++ b/pcbnew/dialogs/dialog_mask_clearance_base.fbp @@ -42,7 +42,7 @@ DIALOG_PADS_MASK_CLEARANCE_BASE - 361,292 + 361,304 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER DIALOG_SHIM; dialog_shim.h Pads Mask Clearance @@ -98,23 +98,191 @@ bMainUpperSizer - wxHORIZONTAL + wxVERTICAL none + + 5 + wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Note: For clearance values: - a positive value means a mask bigger than a pad - a negative value means a mask smaller than a pad + + 0 + + + 0 + + 1 + m_staticTextInfo + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND 1 - - wxID_ANY - Dimensions: + + 3 + wxBOTH + 1 + + 0 - sbMiddleRightSizer - wxVERTICAL + fgGridSolderMaskSizer + wxFLEX_GROWMODE_SPECIFIED none - + 0 + 0 5 - wxALIGN_CENTER_HORIZONTAL|wxRIGHT|wxLEFT + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 1 @@ -144,7 +312,7 @@ 0 0 wxID_ANY - Note: For clearance values: - a positive value means a mask bigger than a pad - a negative value means a mask smaller than a pad + Solder mask clearance: 0 @@ -152,7 +320,438 @@ 0 1 - m_staticTextInfo + m_MaskClearanceTitle + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the global clearance between pads and the solder mask This value can be superseded by local values for a footprint or a pad. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxALL|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderMaskMarginCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inch + + 0 + + + 0 + + 1 + m_SolderMaskMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder mask min width: + + 0 + + + 0 + + 1 + m_staticTextMinWidth + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Min dist between 2 pad areas. Two pad areas nearer than this value will be merged during plotting. This parameter is used only to plot solder mask layers. + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderMaskMinWidthCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inch + + 0 + + + 0 + + 1 + m_solderMaskMinWidthUnit 1 @@ -234,7 +833,7 @@ 0 1 - m_staticline1 + m_staticline3 1 @@ -278,1381 +877,768 @@ 5 - wxEXPAND - 1 - - 3 - wxBOTH - 1 - - 0 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 - fgGridSolderMaskSizer - wxFLEX_GROWMODE_SPECIFIED - none - 4 - 0 - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder mask clearance: - - 0 - - - 0 - - 1 - m_MaskClearanceTitle - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the global clearance between pads and the solder mask This value can be superseded by local values for a footprint or a pad. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxALL|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderMaskMarginCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inch - - 0 - - - 0 - - 1 - m_SolderMaskMarginUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder mask min width: - - 0 - - - 0 - - 1 - m_staticTextMinWidth - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Min dist between 2 pad areas. Two pad areas nearer than this value will be merged during plotting. This parameter is used only to plot solder mask layers. - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderMaskMinWidthCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inch - - 0 - - - 0 - - 1 - m_solderMaskMinWidthUnit - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline3 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline4 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline5 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder paste clearance: - - 0 - - - 0 - - 1 - m_staticTextSolderPaste - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the global clearance between pads and the solder paste This value can be superseded by local values for a footprint or a pad. The final clearance value is the sum of this value and the clearance value ratio - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderPasteMarginCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Inch - - 0 - - - 0 - - 1 - m_SolderPasteMarginUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Solder paste ratio clearance: - - 0 - - - 0 - - 1 - m_staticTextRatio - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - This is the global clearance ratio in per cent between pads and the solder paste A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by local values for a footprint or a pad. The final clearance value is the sum of this value and the clearance value - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 - - 1 - m_SolderPasteMarginRatioCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - % - - 0 - - - 0 - - 1 - m_SolderPasteRatioMarginUnits - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - - - -1 - - - - - - - - - - - - - - - - - - - - - - - - - + 1 + m_staticline4 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline5 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste clearance: + + 0 + + + 0 + + 1 + m_staticTextSolderPaste + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the global clearance between pads and the solder paste This value can be superseded by local values for a footprint or a pad. The final clearance value is the sum of this value and the clearance value ratio + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderPasteMarginCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Inch + + 0 + + + 0 + + 1 + m_SolderPasteMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Solder paste ratio clearance: + + 0 + + + 0 + + 1 + m_staticTextRatio + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + This is the global clearance ratio in per cent between pads and the solder paste A value of 10 means the clearance value is 10 per cent of the pad size This value can be superseded by local values for a footprint or a pad. The final clearance value is the sum of this value and the clearance value + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_SolderPasteMarginRatioCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + % + + 0 + + + 0 + + 1 + m_SolderPasteRatioMarginUnits + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + + + -1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline11 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline11 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxALIGN_RIGHT + wxALIGN_RIGHT|wxTOP|wxBOTTOM 0 0 diff --git a/pcbnew/dialogs/dialog_mask_clearance_base.h b/pcbnew/dialogs/dialog_mask_clearance_base.h index 402807d619..894d619ea6 100644 --- a/pcbnew/dialogs/dialog_mask_clearance_base.h +++ b/pcbnew/dialogs/dialog_mask_clearance_base.h @@ -23,7 +23,6 @@ class DIALOG_SHIM; #include #include #include -#include #include #include @@ -72,7 +71,7 @@ class DIALOG_PADS_MASK_CLEARANCE_BASE : public DIALOG_SHIM public: - DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pads Mask Clearance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 361,292 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PADS_MASK_CLEARANCE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Pads Mask Clearance"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 361,304 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PADS_MASK_CLEARANCE_BASE(); }; From 49ce5eecdf44f4363296bfa1f11f1260686a98d7 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Mon, 19 Aug 2013 09:08:13 +0200 Subject: [PATCH 32/42] Pl_Editor: fix crash on Linux when closing Pl_Editor --- pagelayout_editor/pl_editor_frame.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 6cd2d4522c..a517ae2a39 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -66,8 +66,8 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, m_HotkeysZoomAndGridList = s_PlEditor_Hokeys_Descr; m_originSelectChoice = 0; - m_designTreeWidth = 100; - m_propertiesFrameWidth = 150; + m_designTreeWidth = 150; + m_propertiesFrameWidth = 200; if( m_canvas ) m_canvas->SetEnableBlockCommands( false ); @@ -178,7 +178,6 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( wxWindow* aParent, const wxString& aTitle, PL_EDITOR_FRAME::~PL_EDITOR_FRAME() { - wxGetApp().SaveCurrentSetupValues( m_configSettings ); } @@ -230,8 +229,14 @@ void PL_EDITOR_FRAME::OnCloseWindow( wxCloseEvent& Event ) } SaveSettings(); + wxGetApp().SaveCurrentSetupValues( m_configSettings ); + // do not show the window because we do not want any paint event Show( false ); + + // On Linux, m_propertiesPagelayout must be destroyed + // before deleting the main frame to avoid a crash when closing + m_propertiesPagelayout->Destroy(); Destroy(); } From 179862b10a3dd834d432f3572ce0f14a29e94ecf Mon Sep 17 00:00:00 2001 From: Lorenzo Marcantonio Date: Tue, 20 Aug 2013 15:44:42 +0200 Subject: [PATCH 33/42] Fixed issues when opening a pagelayout from the command line --- pagelayout_editor/pl_editor.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pagelayout_editor/pl_editor.cpp b/pagelayout_editor/pl_editor.cpp index 42ef6e708e..7f3faf6c36 100644 --- a/pagelayout_editor/pl_editor.cpp +++ b/pagelayout_editor/pl_editor.cpp @@ -103,7 +103,6 @@ bool EDA_APP::OnInit() if( fn.IsOk() ) { - wxSetWorkingDirectory( fn.GetPath() ); bool success = frame->LoadPageLayoutDescrFile( fn.GetFullPath() ); if( !success ) { @@ -113,7 +112,10 @@ bool EDA_APP::OnInit() wxMessageBox( msg ); } else + { descrLoaded = true; + frame->OnNewPageLayout(); + } } } From 6a25e05e3cae7b3e91c681b95cf2e185484edea0 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Tue, 20 Aug 2013 13:03:21 -0500 Subject: [PATCH 34/42] Lay basis for a more full featured usage of boost, including compiled libraries such as unit_test_framework, system, etc. Move headers now into boost_root/include/boost/. --- .bzrignore | 2 +- 3d-viewer/CMakeLists.txt | 1 - CMakeLists.txt | 428 +++++++++++---------- CMakeModules/config.h.cmake | 4 + CMakeModules/download_boost.cmake | 143 ++++++- common/CMakeLists.txt | 1 - cvpcb/CMakeLists.txt | 61 +-- eeschema/CMakeLists.txt | 1 - include/class_board_design_settings.h | 2 +- kicad/CMakeLists.txt | 1 - pcbnew/CMakeLists.txt | 174 +++++---- pcbnew/github/CMakeLists.txt | 33 ++ pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt | 18 +- 13 files changed, 520 insertions(+), 349 deletions(-) create mode 100644 pcbnew/github/CMakeLists.txt diff --git a/.bzrignore b/.bzrignore index de20aa512d..03bd5c449c 100644 --- a/.bzrignore +++ b/.bzrignore @@ -1,4 +1,4 @@ -include/boost +boost_root .downloads-by-cmake common/netlist_keywords.* common/netlist_lexer.h diff --git a/3d-viewer/CMakeLists.txt b/3d-viewer/CMakeLists.txt index 26e834be43..56af4eba6a 100644 --- a/3d-viewer/CMakeLists.txt +++ b/3d-viewer/CMakeLists.txt @@ -2,7 +2,6 @@ add_definitions(-DPCBNEW) include_directories(BEFORE ${INC_BEFORE}) include_directories( - ${Boost_INCLUDE_DIR} ../pcbnew ../polygon ${INC_AFTER} diff --git a/CMakeLists.txt b/CMakeLists.txt index fe85f4c05a..5e5747a661 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,10 +1,10 @@ -project(kicad) +project( kicad ) -cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR) +cmake_minimum_required( VERSION 2.8.4 FATAL_ERROR ) # because of http://public.kitware.com/Bug/view.php?id=10395 # Path to local CMake modules. -set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) +set( CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules ) # # KiCad build options should be added below. @@ -15,32 +15,32 @@ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeModules) # # Russian GOST patch -option(wxUSE_UNICODE "enable/disable building unicode (default OFF)") -option(KICAD_GOST "enable/disable building using GOST notation for multiple gates per package (default OFF)") +option( wxUSE_UNICODE "enable/disable building unicode ( default OFF)" ) +option( KICAD_GOST "enable/disable building using GOST notation for multiple gates per package ( default OFF)" ) #for those who bored with uppercase -option(KICAD_KEEPCASE "turn-off automatic component name conversion to uppercase if selected") +option( KICAD_KEEPCASE "turn-off automatic component name conversion to uppercase if selected" ) -option(USE_WX_GRAPHICS_CONTEXT - "Use wxGraphicsContext for rendering (default OFF). Warning, this is experimental") +option( USE_WX_GRAPHICS_CONTEXT + "Use wxGraphicsContext for rendering ( default OFF). Warning, this is experimental" ) -option(USE_WX_OVERLAY - "Use wxOverlay: Always ON for MAC (default OFF). Warning, this is experimental") +option( USE_WX_OVERLAY + "Use wxOverlay: Always ON for MAC ( default OFF). Warning, this is experimental" ) #One of these 2 option *must* be set to ON: -option(KICAD_STABLE_VERSION +option( KICAD_STABLE_VERSION "set this option to ON to build the stable version of KICAD. mainly used to set version ID (default OFF)" ) -option(KICAD_SCRIPTING +option( KICAD_SCRIPTING "set this option ON to build the scripting support inside kicad binaries" ) -option(KICAD_SCRIPTING_MODULES +option( KICAD_SCRIPTING_MODULES "set this option ON to build kicad modules that can be used from scripting languages" ) -option(KICAD_SCRIPTING_WXPYTHON +option( KICAD_SCRIPTING_WXPYTHON "set this option ON to build wxpython implementation for wx interface building in python and py.shell" ) @@ -51,13 +51,16 @@ option(KICAD_SCRIPTING_WXPYTHON # python binary file should be is exec path. -option(USE_FP_LIB_TABLE "Use the new footprint library table implementation. (default OFF)") +option( USE_FP_LIB_TABLE "Use the new footprint library table implementation. ( default OFF)" ) + +#option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." OFF ) + #Set version option (stable or testing) -if(KICAD_STABLE_VERSION) - add_definitions(-DKICAD_STABLE_VERSION) - message( "Building stable version of KiCad") +if( KICAD_STABLE_VERSION) + add_definitions( -DKICAD_STABLE_VERSION ) + message( STATUS "Building stable version of KiCad" ) endif() # All CMake downloads go here. Suggested is up in the source tree, not in the build dir where they @@ -72,14 +75,14 @@ set( DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/.downloads-by-cmake # Set flags for GCC. #================================================ -if(CMAKE_COMPILER_IS_GNUCXX) +if( CMAKE_COMPILER_IS_GNUCXX ) - set(KICAD_GCC_RELEASE_BUILD_FLAGS "-O2") - set(KICAD_GCC_RELEASE_DEBUG_FLAGS "") + set( KICAD_GCC_RELEASE_BUILD_FLAGS "-O2" ) + set( KICAD_GCC_RELEASE_DEBUG_FLAGS "" ) - execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion + execute_process( COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE) + OUTPUT_STRIP_TRAILING_WHITESPACE ) # Added -Wno-narrowing on 10/7/12 to prevent a huge number of warnings when # compiling with GCC 4.7. This appears to be caused by and int to unsigned @@ -88,38 +91,38 @@ if(CMAKE_COMPILER_IS_GNUCXX) # see if the problem has been resolved. Wayne. # # Also note the optimization level is -O1 instead of the usual -O2 level - # because boost::polygon has a function (inflate polygon) broken by + # because boost::polygon has a function ( inflate polygon) broken by # the -O2 level with GCC 4.7 (works fine with with GCC 4.6). # This lower optimization level does not have a significant change on the speed. # # As newer versions of GCC and/or Boost are released, this code needs reviewed to # determine if the problems above have been fixed either in Boost or GCC. - if(GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7) - set(KICAD_GCC_RELEASE_BUILD_FLAGS "-Wno-narrowing -O1") - set(KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing") + if( GCC_VERSION VERSION_GREATER 4.7 OR GCC_VERSION VERSION_EQUAL 4.7 ) + set( KICAD_GCC_RELEASE_BUILD_FLAGS "-Wno-narrowing -O1" ) + set( KICAD_GCC_DEBUG_BUILD_FLAGS "-Wno-narrowing" ) endif() - if(CMAKE_BUILD_TYPE STREQUAL Debug) - message(STATUS - "Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_DEBUG_BUILD_FLAGS}\"") + if( CMAKE_BUILD_TYPE STREQUAL Debug ) + message( STATUS + "Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_DEBUG_BUILD_FLAGS}\"" ) else() - message(STATUS - "Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_RELEASE_BUILD_FLAGS}\"") + message( STATUS + "Setting GCC version ${GCC_VERSION} build flags \"${KICAD_GCC_RELEASE_BUILD_FLAGS}\"" ) endif() - if(MINGW) + if( MINGW ) # According to some sources, under Windows -fPIC option is not needed: # http://mingw.5.n7.nabble.com/Option-fPIC-not-supported-td18480.html # Set default flags for Release build. - set(CMAKE_C_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc -static-libstdc++") + set( CMAKE_C_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG" ) + set( CMAKE_CXX_FLAGS_RELEASE "-Wall ${KICAD_GCC_RELEASE_BUILD_FLAGS} -DNDEBUG" ) + set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s -static-libgcc -static-libstdc++" ) # Set default flags for Debug build. - set(CMAKE_C_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG") - set(CMAKE_CXX_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG") - set(CMAKE_MODULE_LINKER_FLAGS "-static-libgcc -static-libstdc++") # SWIG macros on Windows + set( CMAKE_C_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG" ) + set( CMAKE_CXX_FLAGS_DEBUG "-Wall ${KICAD_GCC_DEBUG_BUILD_FLAGS} -g3 -ggdb3 -DDEBUG" ) + set( CMAKE_MODULE_LINKER_FLAGS "-static-libgcc -static-libstdc++") # SWIG macros on Windows else() # We build DLL/DSOs from static libraries, so create position independent code @@ -129,17 +132,17 @@ if(CMAKE_COMPILER_IS_GNUCXX) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) # Thou shalt not link vaporware and tell us it's a valid DSO: - set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined") - set(CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined") # needed by SWIG macros on linux + set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" ) + set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" ) # needed by SWIG macros on linux # Set default flags for Release build. - set(CMAKE_C_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG") - set(CMAKE_EXE_LINKER_FLAGS_RELEASE "-s") + set( CMAKE_C_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG" ) + set( CMAKE_CXX_FLAGS_RELEASE "${KICAD_GCC_RELEASE_BUILD_FLAGS} -Wall -DNDEBUG" ) + set( CMAKE_EXE_LINKER_FLAGS_RELEASE "-s" ) # Set default flags for Debug build. - set(CMAKE_C_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG") - set(CMAKE_CXX_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG") + set( CMAKE_C_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG" ) + set( CMAKE_CXX_FLAGS_DEBUG "${KICAD_GCC_DEBUG_BUILD_FLAGS} -Wall -g3 -ggdb3 -DDEBUG" ) endif() # quiet GCC 4.8.1 while in boost @@ -147,110 +150,109 @@ if(CMAKE_COMPILER_IS_GNUCXX) set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-local-typedefs" ) endif() -endif(CMAKE_COMPILER_IS_GNUCXX) +endif( CMAKE_COMPILER_IS_GNUCXX ) -if(wxUSE_UNICODE) - add_definitions(-DwxUSE_UNICODE) +if( wxUSE_UNICODE ) + add_definitions( -DwxUSE_UNICODE ) endif() -if(KICAD_GOST) - add_definitions(-DKICAD_GOST) +if( KICAD_GOST ) + add_definitions( -DKICAD_GOST ) endif() -if(KICAD_KEEPCASE) - add_definitions(-DKICAD_KEEPCASE) +if( KICAD_KEEPCASE ) + add_definitions( -DKICAD_KEEPCASE ) endif() -if(USE_WX_OVERLAY OR APPLE) - add_definitions(-DUSE_WX_OVERLAY) +if( USE_WX_OVERLAY OR APPLE ) + add_definitions( -DUSE_WX_OVERLAY ) endif() -if(KICAD_SCRIPTING) - add_definitions(-DKICAD_SCRIPTING) +if( KICAD_SCRIPTING ) + add_definitions( -DKICAD_SCRIPTING ) endif() -if(KICAD_SCRIPTING_MODULES) - add_definitions(-DKICAD_SCRIPTING_MODULES) +if( KICAD_SCRIPTING_MODULES ) + add_definitions( -DKICAD_SCRIPTING_MODULES ) endif() -if(KICAD_SCRIPTING_WXPYTHON) - add_definitions(-DKICAD_SCRIPTING_WXPYTHON) +if( KICAD_SCRIPTING_WXPYTHON ) + add_definitions( -DKICAD_SCRIPTING_WXPYTHON ) endif() -if(USE_WX_GRAPHICS_CONTEXT) - add_definitions(-DUSE_WX_GRAPHICS_CONTEXT) +if( USE_WX_GRAPHICS_CONTEXT ) + add_definitions( -DUSE_WX_GRAPHICS_CONTEXT ) endif() # Allow user to override the default settings for adding images to menu items. By default # images in menu items are enabled on all platforms except OSX. This can be over ridden by # defining -DUSE_IMAGES_IN_MENUS=ON/OFF to force the preferred behavior. -if(NOT DEFINED USE_IMAGES_IN_MENUS) - if(NOT APPLE) - set(USE_IMAGES_IN_MENUS ON) +if( NOT DEFINED USE_IMAGES_IN_MENUS ) + if( NOT APPLE ) + set( USE_IMAGES_IN_MENUS ON ) endif() else() - if(USE_IMAGES_IN_MENUS) - set(USE_IMAGES_IN_MENUS ON) + if( USE_IMAGES_IN_MENUS ) + set( USE_IMAGES_IN_MENUS ON ) endif() endif() # Locations for install targets. -set(KICAD_BIN bin - CACHE PATH "Location of KiCad binaries.") +set( KICAD_BIN bin + CACHE PATH "Location of KiCad binaries." ) -if(UNIX) +if( UNIX ) # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. - set(KICAD_PLUGINS lib/kicad/plugins - CACHE PATH "Location of KiCad plugins.") - set(KICAD_DATA share/kicad - CACHE PATH "Location of KiCad data files.") - set(KICAD_DOCS share/doc/kicad - CACHE PATH "Location of KiCad documentation files.") + set( KICAD_PLUGINS lib/kicad/plugins + CACHE PATH "Location of KiCad plugins." ) + set( KICAD_DATA share/kicad + CACHE PATH "Location of KiCad data files." ) + set( KICAD_DOCS share/doc/kicad + CACHE PATH "Location of KiCad documentation files." ) endif() -if(MINGW) +if( MINGW ) # Like all variables, CMAKE_INSTALL_PREFIX can be over-ridden on the command line. - set(CMAKE_INSTALL_PREFIX c:/kicad - CACHE PATH "") + set( CMAKE_INSTALL_PREFIX c:/kicad + CACHE PATH "" ) # Everything without leading / is relative to CMAKE_INSTALL_PREFIX. - set(KICAD_PLUGINS ${KICAD_BIN}/plugins - CACHE PATH "Location of KiCad plugins.") - set(KICAD_DATA share - CACHE PATH "Location of KiCad data files.") - set(KICAD_DOCS doc - CACHE PATH "Location of KiCad documentation files.") + set( KICAD_PLUGINS ${KICAD_BIN}/plugins + CACHE PATH "Location of KiCad plugins." ) + set( KICAD_DATA share + CACHE PATH "Location of KiCad data files." ) + set( KICAD_DOCS doc + CACHE PATH "Location of KiCad documentation files." ) endif() -set(KICAD_DEMOS ${KICAD_DATA}/demos - CACHE PATH "Location of KiCad demo files.") -set(KICAD_TEMPLATE ${KICAD_DATA}/template - CACHE PATH "Location of KiCad template files.") +set( KICAD_DEMOS ${KICAD_DATA}/demos + CACHE PATH "Location of KiCad demo files." ) +set( KICAD_TEMPLATE ${KICAD_DATA}/template + CACHE PATH "Location of KiCad template files." ) -mark_as_advanced(KICAD_BIN +mark_as_advanced( KICAD_BIN KICAD_PLUGINS KICAD_DATA KICAD_DOCS KICAD_DEMOS - KICAD_TEMPLATE) + KICAD_TEMPLATE ) -include(Functions) +include( Functions ) include( ExternalProject ) #================================================ # Find libraries that are needed to build KiCad. #================================================ -include(CheckFindPackageResult) +include( CheckFindPackageResult ) ####################### # Find OpenGL library # ####################### -find_package(OpenGL QUIET) -check_find_package_result(OPENGL_FOUND "OpenGL") +find_package( OpenGL QUIET ) +check_find_package_result( OPENGL_FOUND "OpenGL" ) -########################## -# Download Boost library # -########################## +# Download boost and possibly build parts of it +################################################# include( download_boost ) @@ -262,115 +264,129 @@ include( download_boost ) # http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html # On Apple only wxwidgets 2.9 or higher doesn't need to find aui part of base -if(APPLE) - find_package(wxWidgets COMPONENTS gl adv html core net base xml QUIET) -else(APPLE) - find_package(wxWidgets COMPONENTS gl aui adv html core net base xml QUIET) -endif(APPLE) -check_find_package_result(wxWidgets_FOUND "wxWidgets") +if( APPLE ) + find_package( wxWidgets COMPONENTS gl adv html core net base xml QUIET ) +else( APPLE ) + find_package( wxWidgets COMPONENTS gl aui adv html core net base xml QUIET ) +endif( APPLE ) +check_find_package_result( wxWidgets_FOUND "wxWidgets" ) # Include wxWidgets macros. -include(${wxWidgets_USE_FILE}) +include( ${wxWidgets_USE_FILE} ) # Include MinGW resource compiler. -include(MinGWResourceCompiler) +include( MinGWResourceCompiler ) # Generate build system specific header file. -include(PerformFeatureChecks) +include( PerformFeatureChecks ) perform_feature_checks() # Find GDI+ on windows if wxGraphicsContext is available. -if(MINGW AND USE_WX_GRAPHICS_CONTEXT) - find_package(GdiPlus) - check_find_package_result(GDI_PLUS_FOUND "GDI+") +if( MINGW AND USE_WX_GRAPHICS_CONTEXT ) + find_package( GdiPlus ) + check_find_package_result( GDI_PLUS_FOUND "GDI+" ) endif() -# Find Python and other scripting resources -if(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) - set(PythonInterp_FIND_VERSION) - find_package(PythonInterp) - check_find_package_result(PYTHONINTERP_FOUND "Python Interpreter") - - # Get the correct Python site package install path from the Python interpreter found by - # FindPythonInterp unless the user specifically defined a custom path. - if(NOT PYTHON_SITE_PACKAGE_PATH) - execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()" - OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - if(NOT PYTHON_SITE_PACKAGE_PATH) - message(FATAL_ERROR "Error occurred while attemping to find the Python site library path.") - endif() - endif() - - set(PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}" CACHE PATH "Python module install path.") - mark_as_advanced(PYTHON_DEST) - message( STATUS "Python module install path: ${PYTHON_DEST}") - find_package(PythonLibs) - include_directories(${PYTHON_INCLUDE_DIRS} - ./scripting) -endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) - - - -# Automagically create version header file. -include(CreateBzrVersionHeader) -create_bzr_version_header() - -if(EXISTS ${CMAKE_SOURCE_DIR}/include/config.h) - # This file may exist (created by an alternate process to the svn test above), - # e.g. could be created by a checkout script that produces a source tar file. - # This directive means the about box will have the svn date & revision in it, - # but the hard coded release date (program version) will be preserved. - add_definitions(-DHAVE_SVN_REVISION) -endif() - -# For include_directories(BEFORE ...), which _reverses_ -# the order during insertion, so put first wanted last, which is -# ${CMAKE_SOURCE_DIR/include. Use '.' for current source dir since -# we don't want expansion here and now, and don't need expansion of -# ${CMAKE_CURRENT_SOURCE_DIR}, '.' will work for any source directory. -set(INC_BEFORE +# Assist with header file searching optimization: +# INC_BEFORE and INC_AFTER are two lists which go at the front and back of the +# header file search lists, respectively. +# INC_BEFORE is for use with "include_directories( BEFORE ...)", which _reverses_ +# the order during insertion. (So put first wanted last, which is +# ${CMAKE_SOURCE_DIR/include.) Use '.' for current source dir since +# we don't want expansion here and now, which would happen if using ${CMAKE_CURRENT_SOURCE_DIR}. +# Instead we use '.' which is applicable to any source directory below here as a result of +# this lack of expansion. +set( INC_BEFORE . ${CMAKE_SOURCE_DIR}/include ) -set(INC_AFTER +set( INC_AFTER + ${Boost_INCLUDE_DIR} #include ${CMAKE_BINARY_DIR} ) + +# Find Python and other scripting resources +if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) + set( PythonInterp_FIND_VERSION ) + find_package( PythonInterp ) + check_find_package_result( PYTHONINTERP_FOUND "Python Interpreter" ) + + # Get the correct Python site package install path from the Python interpreter found by + # FindPythonInterp unless the user specifically defined a custom path. + if( NOT PYTHON_SITE_PACKAGE_PATH ) + execute_process( COMMAND ${PYTHON_EXECUTABLE} -c "import distutils.sysconfig;print\"%s\"%distutils.sysconfig.get_python_lib()" + OUTPUT_VARIABLE PYTHON_SITE_PACKAGE_PATH + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + if( NOT PYTHON_SITE_PACKAGE_PATH ) + message( FATAL_ERROR "Error occurred while attemping to find the Python site library path." ) + endif() + endif() + + set( PYTHON_DEST "${PYTHON_SITE_PACKAGE_PATH}" CACHE PATH "Python module install path." ) + mark_as_advanced( PYTHON_DEST ) + message( STATUS "Python module install path: ${PYTHON_DEST}" ) + + find_package( PythonLibs ) + + #message( STATUS "PYTHON_INCLUDE_DIRS:${PYTHON_INCLUDE_DIRS}" ) + + # Infrequently needed headers go at end of search paths, append to INC_AFTER which + # although is used for all components, should be a harmless hit for something like eeschema + # so long as unused search paths are at the end like this. + set( INC_AFTER ${INC_AFTER} ${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/scripting ) + + #message( STATUS "/ INC_AFTER:${INC_AFTER}" ) + +endif() + + +# Automagically create version header file. +include( CreateBzrVersionHeader ) +create_bzr_version_header() + +if( EXISTS ${CMAKE_SOURCE_DIR}/include/config.h ) + # This file may exist ( created by an alternate process to the svn test above), + # e.g. could be created by a checkout script that produces a source tar file. + # This directive means the about box will have the svn date & revision in it, + # but the hard coded release date ( program version) will be preserved. + add_definitions( -DHAVE_SVN_REVISION ) +endif() + + #================================================ # Let CMake look in these directories for nested # 'CMakeLists.txt' files to process #================================================ ############################ -# Binaries (CMake targets) # +# Binaries ( CMake targets ) # ############################ -add_subdirectory(bitmaps_png) -add_subdirectory(common) -add_subdirectory(3d-viewer) -add_subdirectory(cvpcb) -add_subdirectory(eeschema) -add_subdirectory(gerbview) -add_subdirectory(kicad) -add_subdirectory(pcbnew) -add_subdirectory(pcbnew/pcad2kicadpcb_plugin) -add_subdirectory(polygon) -add_subdirectory(pagelayout_editor) -add_subdirectory(potrace) -add_subdirectory(bitmap2component) -add_subdirectory(pcb_calculator) -add_subdirectory(tools) -#add_subdirectory(new) +add_subdirectory( bitmaps_png ) +add_subdirectory( common ) +add_subdirectory( 3d-viewer ) +add_subdirectory( cvpcb ) +add_subdirectory( eeschema ) +add_subdirectory( gerbview ) +add_subdirectory( kicad ) +add_subdirectory( pcbnew ) +add_subdirectory( polygon ) +add_subdirectory( pagelayout_editor ) +add_subdirectory( potrace ) +add_subdirectory( bitmap2component ) +add_subdirectory( pcb_calculator ) +add_subdirectory( tools ) +#add_subdirectory( new ) # Make all libs and executables depend on ExternalProject_Add( boost ), -# except perhaps bitmap lib +# except perhaps bitmap lib. This allows a multi-threaded build to succeed. add_dependencies( pcbnew boost ) add_dependencies( eeschema boost ) add_dependencies( cvpcb boost ) @@ -385,14 +401,14 @@ add_dependencies( pl_editor boost ) ############# # Resources # ############# -add_subdirectory(demos) -add_subdirectory(template) +add_subdirectory( demos ) +add_subdirectory( template ) #================================================ # Doxygen Output #================================================ -find_package(Doxygen) -if(DOXYGEN_FOUND) +find_package( Doxygen ) +if( DOXYGEN_FOUND ) add_custom_target( doxygen-docs ${CMAKE_COMMAND} -E remove_directory Documentation/doxygen COMMAND ${DOXYGEN_EXECUTABLE} @@ -411,67 +427,67 @@ endif() configure_file( "${CMAKE_MODULE_PATH}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) + IMMEDIATE @ONLY ) -add_custom_target(uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +add_custom_target( uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" ) #================================================ # Installation parameters #================================================ -install(FILES INSTALL.txt +install( FILES INSTALL.txt DESTINATION ${KICAD_DOCS} - COMPONENT resources) + COMPONENT resources ) -install(FILES resources/freeroute.jnlp +install( FILES resources/freeroute.jnlp DESTINATION ${KICAD_BIN} - COMPONENT resources) + COMPONENT resources ) ### # Install scripts ### -if(UNIX) - install(DIRECTORY scripts +if( UNIX ) + install( DIRECTORY scripts DESTINATION ${KICAD_DOCS} COMPONENT resources - PATTERN ".svn" EXCLUDE) + PATTERN ".svn" EXCLUDE ) endif() ### # FreeDesktop .desktop and MIME resources ### -if(UNIX) +if( UNIX ) # Set paths - set(UNIX_MIME_DIR resources/linux/mime) - set(UNIX_MIMELNK_FILES ${UNIX_MIME_DIR}/mimelnk) - set(UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime) - set(UNIX_ICONS_FILES ${UNIX_MIME_DIR}/icons) - set(UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications) + set( UNIX_MIME_DIR resources/linux/mime ) + set( UNIX_MIMELNK_FILES ${UNIX_MIME_DIR}/mimelnk ) + set( UNIX_MIME_FILES ${UNIX_MIME_DIR}/mime ) + set( UNIX_ICONS_FILES ${UNIX_MIME_DIR}/icons ) + set( UNIX_APPLICATIONS_FILES ${UNIX_MIME_DIR}/applications ) # Install Mimelnk directory - install(DIRECTORY ${UNIX_MIMELNK_FILES} + install( DIRECTORY ${UNIX_MIMELNK_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share COMPONENT resources - PATTERN ".svn" EXCLUDE) + PATTERN ".svn" EXCLUDE ) # Install Mime directory - install(DIRECTORY ${UNIX_ICONS_FILES} + install( DIRECTORY ${UNIX_ICONS_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share COMPONENT resources - PATTERN ".svn" EXCLUDE) + PATTERN ".svn" EXCLUDE ) # Install Icons - install(DIRECTORY ${UNIX_MIME_FILES} + install( DIRECTORY ${UNIX_MIME_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share COMPONENT resources - PATTERN ".svn" EXCLUDE) + PATTERN ".svn" EXCLUDE ) # Install Applications directory (.desktop files) - install(DIRECTORY ${UNIX_APPLICATIONS_FILES} + install( DIRECTORY ${UNIX_APPLICATIONS_FILES} DESTINATION ${CMAKE_INSTALL_PREFIX}/share COMPONENT resources - PATTERN ".svn" EXCLUDE) + PATTERN ".svn" EXCLUDE ) endif() -include(CTest) +include( CTest ) diff --git a/CMakeModules/config.h.cmake b/CMakeModules/config.h.cmake index eec9fc8547..db9ba8ee84 100644 --- a/CMakeModules/config.h.cmake +++ b/CMakeModules/config.h.cmake @@ -81,4 +81,8 @@ /// Definition to compile with Pcbnew footprint library table implementation. #cmakedefine USE_FP_LIB_TABLE +/// When defined, build the GITHUB_PLUGIN for pcbnew. +#cmakedefine BUILD_GITHUB_PLUGIN + + #endif // CONFIG_H_ diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index aa183b0282..b4667d4874 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -22,11 +22,38 @@ -# Download and patch boost headers to a particular version. -# Assumes include( ExternalProject ) was done inline previous to this file. +# Download a particular boost version, and patch it [and build it if BUILD_GITHUB_PLUGIN]. +# Assumes include( ExternalProject ) was done inline previous to this file +# and that set( DOWNLOAD_DIR ... ) was set in a higher context. + + +#--------------------------------------------------------------------- set( BOOST_RELEASE 1.53.0 ) -set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change +set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change + +# The boost headers [and static libs if built] go here, at the top of KiCad +# source tree in boost_root. +set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" ) + + +if( BUILD_GITHUB_PLUGIN ) + # Space separated list which indicates the subset of boost libraries to compile. + set( BOOST_LIBS_BUILT + filesystem + system + regex + program_options + date_time + thread + exception + unit_test_framework + ) +endif() + +#-------------------------------------------------------------------- + + string( REGEX REPLACE "\\." "_" BOOST_VERS "${BOOST_RELEASE}" ) set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} ) @@ -36,26 +63,101 @@ set( PREFIX ${DOWNLOAD_DIR}/boost_${BOOST_VERS} ) # download, the patch is applied. This lets you regenerate a new patch at any time # easily, simply by editing the working tree in and doing "bzr diff" in there. -# include only the headers in the repo. -# repo = "${headers}/../.bzr" = "/.bzr" -set( headers ${PREFIX}/src/boost/boost ) +# path to the boost headers in the repo. +# repo = "${headers_src}/../.bzr" = "/.bzr" +set( headers_src "${PREFIX}/src/boost/boost" ) -ExternalProject_Add( boost - PREFIX ${PREFIX} - DOWNLOAD_DIR ${DOWNLOAD_DIR} - URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2 - URL_MD5 ${BOOST_MD5} +# don't look at this: +function( set_boost_lib_names libs ) + foreach( lib IN LISTS ${libs} ) + string( TOUPPER ${lib} LIB ) + message( STATUS "LIB:${LIB} lib:${lib}" ) + set( Boost_${LIB}_LIBRARY, "${BOOST_ROOT}/lib/libboost_${lib}.a" PARENT_SCOPE ) + set( Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${LIB}_LIBRARY} PARENT_SCOPE ) + endforeach() +endfunction() - # The patch command executes with the working directory set to - PATCH_COMMAND bzr patch -p0 ${PROJECT_SOURCE_DIR}/patches/boost.patch - CONFIGURE_COMMAND "" +if( BUILD_GITHUB_PLUGIN ) - # remove then re-copy into the include/boost directory during next two steps: - BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${PROJECT_SOURCE_DIR}/include/boost - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${headers} ${PROJECT_SOURCE_DIR}/include/boost - ) + message( FATAL_ERROR + "BUILD_GITHUB_PLUGIN not functional. With this commit we get merely a greenfield for better boost usage and building." + ) + + # (BTW "test" yields "unit_test_framework" when passed to bootstrap.{sh,bat} ). + message( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" ) + string( REPLACE "unit_test_framework" "test" libs_csv "${BOOST_LIBS_BUILT}" ) + message( STATUS "REPLACE libs_csv:${libs_csv}" ) + + string( REGEX REPLACE "\\;" "," libs_csv "${libs_csv}" ) + message( STATUS "libs_csv:${libs_csv}" ) + + if( MINGW ) + set( bootstrap "bootstart.bat mingw" ) + else() + set( bootstrap bootstrap.sh ) + endif() + + ExternalProject_Add( boost + PREFIX "${PREFIX}" + DOWNLOAD_DIR "${DOWNLOAD_DIR}" + URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2 + URL_MD5 ${BOOST_MD5} + + # The patch command executes with the working directory set to + PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch" + + # [Mis-]use this step to erase all the boost headers and libraries before + # replacing them below. + UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${BOOST_ROOT}" + + BINARY_DIR "${PREFIX}/src/boost/" + CONFIGURE_COMMAND ${bootstrap} + --with-libraries=${libs_csv} + + BUILD_COMMAND b2 + variant=release + threading=multi + toolset=gcc + link=static + --prefix=${BOOST_ROOT} + install + + INSTALL_COMMAND "" + ) + + +else( BUILD_GITHUB_PLUGIN ) + + + ExternalProject_Add( boost + PREFIX "${PREFIX}" + DOWNLOAD_DIR "${DOWNLOAD_DIR}" + URL http://downloads.sourceforge.net/project/boost/boost/${BOOST_RELEASE}/boost_${BOOST_VERS}.tar.bz2 + URL_MD5 ${BOOST_MD5} + + # The patch command executes with the working directory set to + PATCH_COMMAND bzr patch -p0 "${PROJECT_SOURCE_DIR}/patches/boost.patch" + + # Dick 18-Aug-2013: + # [mis-]use this UPDATE_COMMAND opportunity to remove the old place of boost headers. + # Can eventually remove this step after headers are moved from /include/boost + # to /boost_root/include/boost over the next several months. + UPDATE_COMMAND ${CMAKE_COMMAND} -E remove_directory "${PROJECT_SOURCE_DIR}/include/boost" + + CONFIGURE_COMMAND "" + + # remove then re-copy into the include/boost directory during next two steps: + BUILD_COMMAND ${CMAKE_COMMAND} -E remove_directory ${BOOST_ROOT} + INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory "${headers_src}" "${BOOST_ROOT}/include/boost" + ) + + # Until my find_package() support is done for my boost. + set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost library directory" ) + + +endif( BUILD_GITHUB_PLUGIN ) ExternalProject_Add_Step( boost bzr_commit_boost @@ -66,8 +168,8 @@ ExternalProject_Add_Step( boost bzr_commit_boost ExternalProject_Add_Step( boost bzr_add_boost - # add only the headers to the scratch repo, repo = "../.bzr" from ${headers} - COMMAND bzr add -q ${headers} + # add only the headers to the scratch repo, repo = "../.bzr" from ${headers_src} + COMMAND bzr add -q ${headers_src} COMMENT "adding pristine boost files to 'boost scratch repo'" DEPENDERS bzr_commit_boost ) @@ -79,3 +181,4 @@ ExternalProject_Add_Step( boost bzr_init_boost DEPENDERS bzr_add_boost DEPENDEES download ) + diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index c105dffdc3..45a7662fc1 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -3,7 +3,6 @@ include_directories(BEFORE ${INC_BEFORE}) include_directories( ./dialogs ./dialog_about - ${Boost_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt index 4cb273bf1f..2447f4cd3e 100644 --- a/cvpcb/CMakeLists.txt +++ b/cvpcb/CMakeLists.txt @@ -1,13 +1,12 @@ -add_definitions(-DCVPCB) +add_definitions( -DCVPCB ) ### # Includes ### -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( ./dialogs - ${Boost_INCLUDE_DIR} ../3d-viewer ../pcbnew ../polygon @@ -18,14 +17,14 @@ include_directories( ### # Sources ### -set(CVPCB_DIALOGS +set( CVPCB_DIALOGS dialogs/dialog_cvpcb_config.cpp dialogs/dialog_cvpcb_config_fbp.cpp dialogs/dialog_display_options.cpp dialogs/dialog_display_options_base.cpp ) -set(CVPCB_SRCS +set( CVPCB_SRCS ../common/base_units.cpp ../pcbnew/board_items_to_polygon_shape_transform.cpp ../pcbnew/class_drc_item.cpp @@ -46,32 +45,35 @@ set(CVPCB_SRCS ### # Windows resource file ### -if(WIN32) - if(MINGW) +if( WIN32 ) + if( MINGW ) # CVPCB_RESOURCES variable is set by the macro. - mingw_resource_compiler(cvpcb) - else(MINGW) - set(CVPCB_RESOURCES cvpcb.rc) - endif(MINGW) -endif(WIN32) + mingw_resource_compiler( cvpcb ) + else() + set( CVPCB_RESOURCES cvpcb.rc ) + endif() +endif() ### # Apple resource files ### -if(APPLE) - set(CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE cvpcb.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb) -endif(APPLE) +if( APPLE ) + set( CVPCB_RESOURCES cvpcb.icns cvpcb_doc.icns ) + + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb.icns" + PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) + + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/cvpcb_doc.icns" + PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) + + set( MACOSX_BUNDLE_ICON_FILE cvpcb.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.cvpcb ) +endif() ### # Create the cvpcb executable ### -add_executable(cvpcb WIN32 MACOSX_BUNDLE +add_executable( cvpcb WIN32 MACOSX_BUNDLE ${CVPCB_SRCS} ${CVPCB_DIALOGS} ${CVPCB_RESOURCES} @@ -80,14 +82,14 @@ add_executable(cvpcb WIN32 MACOSX_BUNDLE ### # Set properties for APPLE on cvpcb target ### -if(APPLE) - set_target_properties(cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) +if( APPLE ) + set_target_properties( cvpcb PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +endif() ### # Link executable target cvpcb with correct libraries ### -target_link_libraries(cvpcb +target_link_libraries( cvpcb 3d-viewer pcbcommon pcad2kicadpcb @@ -102,6 +104,7 @@ target_link_libraries(cvpcb ### # Add cvpcb as install target ### -install(TARGETS cvpcb - DESTINATION ${KICAD_BIN} - COMPONENT binary) +install( TARGETS cvpcb + DESTINATION ${KICAD_BIN} + COMPONENT binary + ) diff --git a/eeschema/CMakeLists.txt b/eeschema/CMakeLists.txt index 6c22e75182..049c14c65e 100644 --- a/eeschema/CMakeLists.txt +++ b/eeschema/CMakeLists.txt @@ -6,7 +6,6 @@ include_directories( ./dialogs ../common ../common/dialogs - ${Boost_INCLUDE_DIR} ${INC_AFTER} ) diff --git a/include/class_board_design_settings.h b/include/class_board_design_settings.h index 3e18736f50..75a22dc99d 100644 --- a/include/class_board_design_settings.h +++ b/include/class_board_design_settings.h @@ -18,7 +18,7 @@ class BOARD_DESIGN_SETTINGS { public: bool m_MicroViasAllowed; ///< true to allow micro vias - int m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_TROUGHT VIA_MICROVIA) + int m_CurrentViaType; ///< via type (VIA_BLIND_BURIED, VIA_THROUGH VIA_MICROVIA) /// if true, when creating a new track starting on an existing track, use this track width bool m_UseConnectedTrackWidth; diff --git a/kicad/CMakeLists.txt b/kicad/CMakeLists.txt index e1993fa18a..b86d4b5035 100644 --- a/kicad/CMakeLists.txt +++ b/kicad/CMakeLists.txt @@ -2,7 +2,6 @@ add_definitions(-DKICAD) include_directories(BEFORE ${INC_BEFORE}) include_directories( - ${Boost_INCLUDE_DIR} ${INC_AFTER} ) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index be4a999279..805ef45788 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -1,33 +1,35 @@ -add_definitions(-DPCBNEW) +add_definitions( -DPCBNEW ) -if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) - file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting) - find_package(SWIG REQUIRED) - include(${SWIG_USE_FILE}) -endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) +if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) + file( MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/scripting ) + find_package( SWIG REQUIRED ) + include( ${SWIG_USE_FILE} ) + + # Infrequently needed headers go at end of search paths, append to INC_AFTER + set( INC_AFTER ${INC_AFTER} ${CMAKE_CURRENT_SOURCE_DIR}/scripting ) + + #message( STATUS "pcbnew INC_AFTER:${INC_AFTER}" ) +endif() ### # Includes ### -include_directories(BEFORE ${INC_BEFORE}) +include_directories( BEFORE ${INC_BEFORE} ) include_directories( ./dialogs ./autorouter ../3d-viewer ../common - ${Boost_INCLUDE_DIR} ../polygon ../common/dialogs - ./scripting ${INC_AFTER} ) - ### # Sources # -set(PCBNEW_DIALOGS +set( PCBNEW_DIALOGS dialogs/dialog_block_options_base.cpp dialogs/dialog_cleaning_options_base.cpp dialogs/dialog_cleaning_options.cpp @@ -105,7 +107,7 @@ set(PCBNEW_DIALOGS dialogs/dialog_footprint_wizard_list.cpp ) -set(PCBNEW_AUTOROUTER_SRCS +set( PCBNEW_AUTOROUTER_SRCS autorouter/automove.cpp autorouter/autoplac.cpp autorouter/autorout.cpp @@ -117,7 +119,7 @@ set(PCBNEW_AUTOROUTER_SRCS autorouter/work.cpp ) -set(PCBNEW_CLASS_SRCS +set( PCBNEW_CLASS_SRCS tool_modview.cpp modview.cpp modview_frame.cpp @@ -218,12 +220,12 @@ set(PCBNEW_CLASS_SRCS class_footprint_wizard.cpp ) -set(PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS}) +set( PCBNEW_SRCS ${PCBNEW_AUTOROUTER_SRCS} ${PCBNEW_CLASS_SRCS} ${PCBNEW_DIALOGS} ) ### # We need some extra sources from common ### -set(PCBNEW_COMMON_SRCS +set( PCBNEW_COMMON_SRCS ../common/dialogs/dialog_page_settings.cpp ../common/base_units.cpp ) @@ -231,36 +233,42 @@ set(PCBNEW_COMMON_SRCS ## # Scripting sources ## -set(PCBNEW_SCRIPTING_DIALOGS +set( PCBNEW_SCRIPTING_DIALOGS dialogs/dialog_scripting_base.cpp dialogs/dialog_scripting.cpp ) -set(PCBNEW_SCRIPTING_PYTHON_HELPERS +set( PCBNEW_SCRIPTING_PYTHON_HELPERS ../scripting/wx_python_helpers.cpp ../scripting/python_scripting.cpp scripting/pcbnew_scripting_helpers.cpp scripting/pcbnew_footprint_wizards.cpp ) -if (KICAD_SCRIPTING) - set(PCBNEW_SCRIPTING_SRCS +if( KICAD_SCRIPTING ) + set( PCBNEW_SCRIPTING_SRCS ${PCBNEW_SCRIPTING_DIALOGS} pcbnew_wrap.cxx ${PCBNEW_SCRIPTING_PYTHON_HELPERS} ) -endif(KICAD_SCRIPTING) +endif() ## # Scripting build ## -if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) +if( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) - set(SWIG_FLAGS -I${CMAKE_CURRENT_SOURCE_DIR}/../.. -I${CMAKE_CURRENT_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/../include -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting ) - if (DEBUG) - set(SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG) + set( SWIG_FLAGS + -I${CMAKE_CURRENT_SOURCE_DIR}/../.. + -I${CMAKE_CURRENT_SOURCE_DIR} + -I${CMAKE_CURRENT_SOURCE_DIR}/../include + -I${CMAKE_CURRENT_SOURCE_DIR}/../scripting + ) + + if( DEBUG ) + set( SWIG_FLAGS ${SWIG_FLAGS} -DDEBUG ) endif() # collect CFLAGS , and pass them to swig later @@ -270,10 +278,10 @@ if (KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) set( SWIG_FLAGS ${SWIG_FLAGS} -D${d} ) endforeach() -endif(KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) +endif() -if (KICAD_SCRIPTING) +if( KICAD_SCRIPTING ) set( SWIG_OPTS -python -c++ -outdir ${CMAKE_CURRENT_BINARY_DIR} ${SWIG_FLAGS} ) @@ -295,25 +303,25 @@ if (KICAD_SCRIPTING) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} ) -endif(KICAD_SCRIPTING) +endif() ### # _pcbnew DLL/DSO file creation ### -if ((KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES) AND NOT WIN32 AND NOT APPLE) +if( ( KICAD_SCRIPTING OR KICAD_SCRIPTING_MODULES ) AND NOT WIN32 AND NOT APPLE ) set ( PCBNEW_EXTRA_LIBS "rt" ) endif() -if (KICAD_SCRIPTING_MODULES) +if( KICAD_SCRIPTING_MODULES ) #message( "building pcbnew scripting" ) - set(CMAKE_SWIG_FLAGS ${SWIG_FLAGS}) - set_source_files_properties(scripting/pcbnew.i PROPERTIES CPLUSPLUS ON) - swig_add_module(pcbnew python scripting/pcbnew.i ${PCBNEW_SCRIPTING_PYTHON_HELPERS} ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS}) - swig_link_libraries(pcbnew + set( CMAKE_SWIG_FLAGS ${SWIG_FLAGS} ) + set_source_files_properties( scripting/pcbnew.i PROPERTIES CPLUSPLUS ON ) + swig_add_module( pcbnew python scripting/pcbnew.i ${PCBNEW_SCRIPTING_PYTHON_HELPERS} ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ) + swig_link_libraries( pcbnew 3d-viewer pcbcommon common @@ -327,33 +335,33 @@ if (KICAD_SCRIPTING_MODULES) ${PCBNEW_EXTRA_LIBS} ) -endif (KICAD_SCRIPTING_MODULES) +endif() ### # Windows resource file ### -if(WIN32) - if(MINGW) +if( WIN32 ) + if( MINGW ) # PCBNEW_RESOURCES variable is set by the macro. - mingw_resource_compiler(pcbnew) - else(MINGW) - set(PCBNEW_RESOURCES pcbnew.rc) - endif(MINGW) -endif(WIN32) + mingw_resource_compiler( pcbnew ) + else() + set( PCBNEW_RESOURCES pcbnew.rc ) + endif() +endif() ### # Set properties for APPLE on pcbnew target ### -if(APPLE) - set(PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" - PROPERTIES MACOSX_PACKAGE_LOCATION Resources) - set(MACOSX_BUNDLE_ICON_FILE pcbnew.icns) - set(MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew) - set(MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) +if( APPLE ) + set( PCBNEW_RESOURCES pcbnew.icns pcbnew_doc.icns ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew.icns" + PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) + set_source_files_properties( "${CMAKE_CURRENT_SOURCE_DIR}/pcbnew_doc.icns" + PROPERTIES MACOSX_PACKAGE_LOCATION Resources ) + set( MACOSX_BUNDLE_ICON_FILE pcbnew.icns ) + set( MACOSX_BUNDLE_GUI_IDENTIFIER org.kicad-eda.pcbnew ) + set( MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +endif() # Create a C++ compilable string initializer containing html text into a *.h file: add_custom_command( @@ -385,10 +393,20 @@ make_lexer( ) +### +# subcomponents of pcbnew +### +add_subdirectory( pcad2kicadpcb_plugin ) +if( BUILD_GITHUB_PLUGIN ) + add_subdirectory( github ) +endif() + + + ### # Create the pcbnew executable ### -add_executable(pcbnew WIN32 MACOSX_BUNDLE +add_executable( pcbnew WIN32 MACOSX_BUNDLE ${PCBNEW_SRCS} ${PCBNEW_COMMON_SRCS} ${PCBNEW_SCRIPTING_SRCS} @@ -398,15 +416,15 @@ add_executable(pcbnew WIN32 MACOSX_BUNDLE ### # Set properties for APPLE on pcbnew target ### -if(APPLE) - set_target_properties(pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) -endif(APPLE) +if( APPLE ) + set_target_properties( pcbnew PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist ) +endif() ### # Link executable target pcbnew with correct libraries ### -target_link_libraries(pcbnew +target_link_libraries( pcbnew 3d-viewer pcbcommon common @@ -423,48 +441,48 @@ target_link_libraries(pcbnew ### # Add pcbnew as install target ### -install(TARGETS pcbnew +install( TARGETS pcbnew DESTINATION ${KICAD_BIN} - COMPONENT binary) + COMPONENT binary ) -if(KICAD_SCRIPTING) - add_custom_target(FixSwigImportsScripting ALL +if( KICAD_SCRIPTING ) + add_custom_target( FixSwigImportsScripting ALL COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py DEPENDS pcbnew COMMENT "Fixing swig_import_helper in Kicad scripting" ) - install(FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST}) -endif(KICAD_SCRIPTING) + install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} ) +endif() -if (KICAD_SCRIPTING_MODULES) - add_custom_target(FixSwigImportsModuleScripting ALL +if( KICAD_SCRIPTING_MODULES ) + add_custom_target( FixSwigImportsModuleScripting ALL COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../scripting/fixswigimports.py ${CMAKE_CURRENT_BINARY_DIR}/pcbnew.py DEPENDS _pcbnew COMMENT "Fixing swig_import_helper in Kicad scripting modules" ) - install(FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST}) + install( FILES ${CMAKE_BINARY_DIR}/pcbnew/pcbnew.py DESTINATION ${PYTHON_DEST} ) - if (WIN32) - install(FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST}) - else(WIN32) - install(FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST}) - endif(WIN32) - -endif(KICAD_SCRIPTING_MODULES) + if( WIN32 ) + install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.pyd DESTINATION ${PYTHON_DEST} ) + else() + install( FILES ${CMAKE_BINARY_DIR}/pcbnew/_pcbnew.so DESTINATION ${PYTHON_DEST} ) + endif() +endif() # The specctra test fails to build properly using MS Visual Studio. -if(NOT MSVC) +if( NOT MSVC ) # This one gets made only when testing. - add_executable(specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp) - target_link_libraries(specctra_test common ${wxWidgets_LIBRARIES}) -endif(NOT MSVC) + add_executable( specctra_test EXCLUDE_FROM_ALL specctra_test.cpp specctra.cpp ) + target_link_libraries( specctra_test common ${wxWidgets_LIBRARIES} ) +endif() # This one gets made only when testing. -add_executable(layer_widget_test WIN32 EXCLUDE_FROM_ALL +add_executable( layer_widget_test WIN32 EXCLUDE_FROM_ALL layer_widget.cpp ) -target_link_libraries(layer_widget_test common ${wxWidgets_LIBRARIES}) +target_link_libraries( layer_widget_test common ${wxWidgets_LIBRARIES} ) + diff --git a/pcbnew/github/CMakeLists.txt b/pcbnew/github/CMakeLists.txt new file mode 100644 index 0000000000..5407515c91 --- /dev/null +++ b/pcbnew/github/CMakeLists.txt @@ -0,0 +1,33 @@ +# This program source code file is part of KICAD, a free EDA CAD application. +# +# Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck +# Copyright (C) 2013 Kicad Developers, see AUTHORS.txt for contributors. +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, you may find one here: +# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html +# or you may search the http://www.gnu.org website for the version 2 license, +# or you may write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + + + + +include_directories( . ) + + +set( GITHUB_PLUGIN_SRCS + github_plugin.cpp + PARENT_SCOPE # tell links based in 'directory pcbnew' about it, i.e. "../" + ) + diff --git a/pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt b/pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt index 91929c3189..90492ed2df 100644 --- a/pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt +++ b/pcbnew/pcad2kicadpcb_plugin/CMakeLists.txt @@ -1,14 +1,12 @@ -add_definitions(-DPCBNEW) -include_directories(BEFORE ${INC_BEFORE}) -include_directories( - ../../include - ../../pcbnew - ../../polygon - ${INC_AFTER} - ) +# Sources for the pcbnew PLUGIN called PCAD_PLUGIN -set(PCAD2PCBNEW_SRCS +# This CMakeLists.txt is included from pcbnew, so we are inheriting its include_directories(), +# simply add the current source dir to inherited include_directories() for sources in here only. +include_directories( . ) + + +set( PCAD2PCBNEW_SRCS pcad2kicad_common.cpp pcad_plugin.cpp pcb.cpp @@ -30,4 +28,4 @@ set(PCAD2PCBNEW_SRCS s_expr_loader.cpp ) -add_library(pcad2kicadpcb STATIC ${PCAD2PCBNEW_SRCS}) +add_library( pcad2kicadpcb STATIC ${PCAD2PCBNEW_SRCS} ) From 6033b3599e04d539b8c5ae43b069d2fcb336ae9d Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 23 Aug 2013 08:38:57 +0200 Subject: [PATCH 35/42] Pcbnew: Fix a bug when reading a netlist which forces pcbnew to read lib files to find a footprint even if the right footprint is already loaded (which explains the long time to load netlists) Netlist dialog: add option to report only most important messages. Useful for large boards. class REPORTER: add features to allow a basic message filtering (flags to report all/warning/error messages) Fix Bug #1214599 ( tools are deselected on Move command ) --- common/reporter.cpp | 1 - demos/interf_u/interf_u-cache.lib | 2 +- demos/interf_u/interf_u.cmp | 2 +- demos/interf_u/interf_u.kicad_pcb | 1333 +++++++++------- demos/interf_u/interf_u.net | 2110 ++++++++++++++----------- demos/interf_u/interf_u.sch | 24 +- include/reporter.h | 47 + pcbnew/class_board.cpp | 34 +- pcbnew/dialogs/dialog_netlist.cpp | 5 + pcbnew/dialogs/dialog_netlist.h | 8 +- pcbnew/dialogs/dialog_netlist_fbp.cpp | 77 +- pcbnew/dialogs/dialog_netlist_fbp.fbp | 922 ++++++----- pcbnew/dialogs/dialog_netlist_fbp.h | 21 +- pcbnew/edit.cpp | 10 +- pcbnew/netlist.cpp | 59 +- 15 files changed, 2698 insertions(+), 1957 deletions(-) diff --git a/common/reporter.cpp b/common/reporter.cpp index 19fd3a0dac..d3297fe4a9 100644 --- a/common/reporter.cpp +++ b/common/reporter.cpp @@ -28,7 +28,6 @@ #include #include - REPORTER& REPORTER::Report( const char* aText ) { Report( FROM_UTF8( aText ) ); diff --git a/demos/interf_u/interf_u-cache.lib b/demos/interf_u/interf_u-cache.lib index e46721dd67..5d770dc528 100644 --- a/demos/interf_u/interf_u-cache.lib +++ b/demos/interf_u/interf_u-cache.lib @@ -1,4 +1,4 @@ -EESchema-LIBRARY Version 2.3 Date: 07/08/2013 15:43:07 +EESchema-LIBRARY Version 2.3 #encoding utf-8 # # 4003APG120 diff --git a/demos/interf_u/interf_u.cmp b/demos/interf_u/interf_u.cmp index a9ae3e11e0..89275c3531 100644 --- a/demos/interf_u/interf_u.cmp +++ b/demos/interf_u/interf_u.cmp @@ -1,4 +1,4 @@ -Cmp-Mod V01 Created by CvPCB (2011-03-30 BZR 2935)-testing date = 02/04/2011 13:22:13 +Cmp-Mod V01 Created by CvPcb (2013-08-20 BZR 4294)-product date = 21/08/2013 18:12:43 BeginCmp TimeStamp = /322D3011; diff --git a/demos/interf_u/interf_u.kicad_pcb b/demos/interf_u/interf_u.kicad_pcb index eafd7123c2..168294fa30 100644 --- a/demos/interf_u/interf_u.kicad_pcb +++ b/demos/interf_u/interf_u.kicad_pcb @@ -1,4 +1,4 @@ -(kicad_pcb (version 3) (host pcbnew "(2013-08-06 BZR 4275)-product") +(kicad_pcb (version 3) (host pcbnew "(2013-08-20 BZR 4294)-product") (general (links 200) @@ -9,7 +9,7 @@ (tracks 779) (zones 0) (modules 25) - (nets 111) + (nets 174) ) (page A4) @@ -196,16 +196,79 @@ (net 98 /WR-) (net 99 /WR_REG) (net 100 GND) - (net 101 N-000071) - (net 102 N-000104) - (net 103 N-000105) - (net 104 N-000106) - (net 105 N-000107) - (net 106 N-000108) - (net 107 N-000109) - (net 108 N-000145) - (net 109 N-000146) - (net 110 VCC) + (net 101 N-000001) + (net 102 N-0000010) + (net 103 N-00000103) + (net 104 N-00000104) + (net 105 N-00000107) + (net 106 N-00000108) + (net 107 N-00000109) + (net 108 N-0000011) + (net 109 N-00000110) + (net 110 N-00000111) + (net 111 N-0000012) + (net 112 N-00000124) + (net 113 N-00000126) + (net 114 N-00000127) + (net 115 N-00000129) + (net 116 N-0000013) + (net 117 N-00000130) + (net 118 N-00000132) + (net 119 N-00000133) + (net 120 N-00000135) + (net 121 N-00000136) + (net 122 N-00000138) + (net 123 N-0000014) + (net 124 N-00000140) + (net 125 N-00000141) + (net 126 N-00000142) + (net 127 N-00000143) + (net 128 N-00000145) + (net 129 N-00000146) + (net 130 N-00000155) + (net 131 N-0000018) + (net 132 N-000002) + (net 133 N-0000024) + (net 134 N-0000025) + (net 135 N-0000026) + (net 136 N-0000027) + (net 137 N-0000028) + (net 138 N-0000029) + (net 139 N-000003) + (net 140 N-0000030) + (net 141 N-0000031) + (net 142 N-0000032) + (net 143 N-0000033) + (net 144 N-0000034) + (net 145 N-0000035) + (net 146 N-0000036) + (net 147 N-0000037) + (net 148 N-0000038) + (net 149 N-0000039) + (net 150 N-000004) + (net 151 N-0000040) + (net 152 N-0000041) + (net 153 N-0000042) + (net 154 N-0000043) + (net 155 N-0000044) + (net 156 N-0000045) + (net 157 N-0000046) + (net 158 N-0000047) + (net 159 N-0000048) + (net 160 N-0000049) + (net 161 N-000005) + (net 162 N-0000050) + (net 163 N-0000051) + (net 164 N-0000058) + (net 165 N-0000059) + (net 166 N-000006) + (net 167 N-0000060) + (net 168 N-0000062) + (net 169 N-000007) + (net 170 N-0000072) + (net 171 N-000008) + (net 172 N-000009) + (net 173 VCC) (net_class Default "" (clearance 0.254) @@ -314,15 +377,78 @@ (add_net /STROBE) (add_net /WR-) (add_net /WR_REG) - (add_net N-000071) - (add_net N-000104) - (add_net N-000105) - (add_net N-000106) - (add_net N-000107) - (add_net N-000108) - (add_net N-000109) - (add_net N-000145) - (add_net N-000146) + (add_net N-000001) + (add_net N-0000010) + (add_net N-00000103) + (add_net N-00000104) + (add_net N-00000107) + (add_net N-00000108) + (add_net N-00000109) + (add_net N-0000011) + (add_net N-00000110) + (add_net N-00000111) + (add_net N-0000012) + (add_net N-00000124) + (add_net N-00000126) + (add_net N-00000127) + (add_net N-00000129) + (add_net N-0000013) + (add_net N-00000130) + (add_net N-00000132) + (add_net N-00000133) + (add_net N-00000135) + (add_net N-00000136) + (add_net N-00000138) + (add_net N-0000014) + (add_net N-00000140) + (add_net N-00000141) + (add_net N-00000142) + (add_net N-00000143) + (add_net N-00000145) + (add_net N-00000146) + (add_net N-00000155) + (add_net N-0000018) + (add_net N-000002) + (add_net N-0000024) + (add_net N-0000025) + (add_net N-0000026) + (add_net N-0000027) + (add_net N-0000028) + (add_net N-0000029) + (add_net N-000003) + (add_net N-0000030) + (add_net N-0000031) + (add_net N-0000032) + (add_net N-0000033) + (add_net N-0000034) + (add_net N-0000035) + (add_net N-0000036) + (add_net N-0000037) + (add_net N-0000038) + (add_net N-0000039) + (add_net N-000004) + (add_net N-0000040) + (add_net N-0000041) + (add_net N-0000042) + (add_net N-0000043) + (add_net N-0000044) + (add_net N-0000045) + (add_net N-0000046) + (add_net N-0000047) + (add_net N-0000048) + (add_net N-0000049) + (add_net N-000005) + (add_net N-0000050) + (add_net N-0000051) + (add_net N-0000058) + (add_net N-0000059) + (add_net N-000006) + (add_net N-0000060) + (add_net N-0000062) + (add_net N-000007) + (add_net N-0000072) + (add_net N-000008) + (add_net N-000009) ) (net_class Power "" @@ -337,7 +463,7 @@ ) (module "" (layer Composant) (tedit 4C43F7B1) (tstamp 513C86E6) - (at 107.1 180.5) + (at 25.9 181.9) (fp_text reference G1 (at 0 12.192) (layer F.SilkS) hide (effects (font (thickness 0.3048))) ) @@ -477,6 +603,7 @@ (fp_line (start -16.51 16.51) (end 15.24 16.51) (layer F.SilkS) (width 0.3048)) (pad N1 thru_hole circle (at 15.24 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 119 N-00000133) ) (pad N2 thru_hole circle (at 12.7 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -484,12 +611,15 @@ ) (pad N3 thru_hole circle (at 10.16 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 114 N-00000127) ) (pad M1 thru_hole circle (at 15.24 -12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 118 N-00000132) ) (pad M2 thru_hole circle (at 12.7 -12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 112 N-00000124) ) (pad M3 thru_hole circle (at 10.16 -12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -497,7 +627,7 @@ ) (pad L1 thru_hole circle (at 15.24 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 108 N-000145) + (net 128 N-00000145) ) (pad L2 thru_hole circle (at 12.7 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -505,7 +635,7 @@ ) (pad L3 thru_hole circle (at 10.16 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad K1 thru_hole circle (at 15.24 -7.62 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -529,6 +659,7 @@ ) (pad J3 thru_hole circle (at 10.16 -5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 113 N-00000126) ) (pad H1 thru_hole circle (at 15.24 -2.54 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -571,9 +702,11 @@ ) (pad E2 thru_hole circle (at 12.7 5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 163 N-0000051) ) (pad E3 thru_hole circle (at 10.16 5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 162 N-0000050) ) (pad D1 thru_hole circle (at 15.24 7.62 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -597,7 +730,7 @@ ) (pad C3 thru_hole circle (at 10.16 10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad C4 thru_hole circle (at 7.62 10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -605,6 +738,7 @@ ) (pad C5 thru_hole circle (at 5.08 10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 157 N-0000046) ) (pad C6 thru_hole circle (at 2.54 10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -627,7 +761,7 @@ ) (pad C11 thru_hole circle (at -10.16 10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad C12 thru_hole circle (at -12.7 10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -639,6 +773,7 @@ ) (pad B1 thru_hole circle (at 15.24 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 160 N-0000049) ) (pad B2 thru_hole circle (at 12.7 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -650,9 +785,11 @@ ) (pad B4 thru_hole circle (at 7.62 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 156 N-0000045) ) (pad B5 thru_hole circle (at 5.08 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 154 N-0000043) ) (pad B6 thru_hole circle (at 2.54 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -672,26 +809,31 @@ ) (pad B10 thru_hole circle (at -7.62 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 127 N-00000143) ) (pad B11 thru_hole circle (at -10.16 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad B12 thru_hole circle (at -12.7 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad B13 thru_hole circle (at -15.24 12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 104 N-00000104) ) (pad A1 thru_hole rect (at 15.24 15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 159 N-0000048) ) (pad A2 thru_hole circle (at 12.7 15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 158 N-0000047) ) (pad A3 thru_hole circle (at 10.16 15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 155 N-0000044) ) (pad A4 thru_hole circle (at 7.62 15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -739,6 +881,7 @@ ) (pad N5 thru_hole circle (at 5.08 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 117 N-00000130) ) (pad N6 thru_hole circle (at 2.54 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -766,6 +909,7 @@ ) (pad N12 thru_hole circle (at -12.7 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 124 N-00000140) ) (pad N13 thru_hole circle (at -15.24 -15.24 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -785,7 +929,7 @@ ) (pad M7 thru_hole circle (at 0 -12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad M8 thru_hole circle (at -2.54 -12.7 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -816,9 +960,11 @@ ) (pad L5 thru_hole circle (at 5.08 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 115 N-00000129) ) (pad L6 thru_hole circle (at 2.54 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 125 N-00000141) ) (pad L7 thru_hole circle (at 0 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -830,10 +976,11 @@ ) (pad L9 thru_hole circle (at -5.08 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 126 N-00000142) ) (pad L10 thru_hole circle (at -7.62 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad L11 thru_hole circle (at -10.16 -10.16 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -853,6 +1000,7 @@ ) (pad K12 thru_hole circle (at -12.7 -7.62 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 122 N-00000138) ) (pad K13 thru_hole circle (at -15.24 -7.62 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -860,6 +1008,7 @@ ) (pad J11 thru_hole circle (at -10.16 -5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 121 N-00000136) ) (pad J12 thru_hole circle (at -12.7 -5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -887,7 +1036,7 @@ ) (pad G12 thru_hole circle (at -12.7 0 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad G13 thru_hole circle (at -15.24 0 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -907,6 +1056,7 @@ ) (pad E11 thru_hole circle (at -10.16 5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) + (net 120 N-00000135) ) (pad E12 thru_hole circle (at -12.7 5.08 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -918,7 +1068,7 @@ ) (pad D11 thru_hole circle (at -10.16 7.62 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad D12 thru_hole circle (at -12.7 7.62 180) (size 1.397 1.397) (drill 0.787399) (layers *.Cu *.Mask F.SilkS) @@ -953,7 +1103,7 @@ (fp_line (start -10.16 1.27) (end -10.16 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -11.43 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad 2 thru_hole circle (at -8.89 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -989,6 +1139,7 @@ ) (pad 10 thru_hole circle (at 11.43 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) + (net 130 N-00000155) ) (model discret/r_pack9.wrl (at (xyz 0 0 0)) @@ -1021,11 +1172,11 @@ (fp_line (start -5.334 15.748) (end -5.842 15.24) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -2.54 0 270) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 108 N-000145) + (net 128 N-00000145) ) (pad 2 thru_hole circle (at 2.54 0 270) (size 1.778 1.778) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 109 N-000146) + (net 129 N-00000146) ) (model discret\xtal\crystal_hc18u_horizontal.wrl (at (xyz 0 0 0)) @@ -1034,125 +1185,6 @@ ) ) - (module 24dip300 (layer Composant) (tedit 200000) (tstamp 322D321C) - (at 137.795 109.22) - (descr "Module Dil 24 pins, pads ronds, e=300 mils") - (tags DIL) - (path /322D321C) - (fp_text reference U8 (at -8.89 -1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_text value EP600 (at 6.35 1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_line (start -16.51 -1.27) (end -15.24 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -15.24 -1.27) (end -15.24 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -15.24 1.27) (end -16.51 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -16.51 1.27) (end -16.51 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -16.51 -2.54) (end 16.51 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 16.51 -2.54) (end 16.51 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 16.51 2.54) (end -16.51 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -16.51 2.54) (end -16.51 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -13.97 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 2 thru_hole circle (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 47 /MATCHL) - ) - (pad 3 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 104 N-000106) - ) - (pad 4 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 105 N-000107) - ) - (pad 5 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 106 N-000108) - ) - (pad 6 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 107 N-000109) - ) - (pad 7 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 82 /PC-WR) - ) - (pad 8 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 9 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 10 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 11 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 93 /RSTL) - ) - (pad 12 thru_hole circle (at 13.97 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 13 thru_hole circle (at 13.97 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 99 /WR_REG) - ) - (pad 14 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 80 /PC-RD) - ) - (pad 15 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 99 /WR_REG) - ) - (pad 16 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 13 /CLKLCA) - ) - (pad 17 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 23 /DIR) - ) - (pad 18 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 94 /SEL_LPT) - ) - (pad 19 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 84 /PROG-) - ) - (pad 20 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 24 /DONE) - ) - (pad 21 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 15 /D0) - ) - (pad 22 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 25 /ENBBUF) - ) - (pad 23 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) - ) - (pad 24 thru_hole circle (at -13.97 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) - ) - (model dil/dil_24-w300.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - (module C1 (layer Composant) (tedit 3F92C496) (tstamp 32307ECF) (at 122.555 91.44) (descr "Condensateur e = 1 pas") @@ -1171,7 +1203,7 @@ (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 108 N-000145) + (net 128 N-00000145) ) (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1202,7 +1234,7 @@ (fp_line (start -2.54 -0.635) (end -1.905 -1.27) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 109 N-000146) + (net 129 N-00000146) ) (pad 2 thru_hole circle (at 1.27 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1215,320 +1247,6 @@ ) ) - (module 20dip300 (layer Composant) (tedit 200000) (tstamp 322D31F4) - (at 163.195 120.65) - (descr "Module Dil 20 pins, pads ronds") - (tags DIL) - (path /322D31F4) - (fp_text reference U1 (at -8.89 -1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_text value 74LS245 (at 6.35 1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 23 /DIR) - ) - (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 70 /PC-DB0) - ) - (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 71 /PC-DB1) - ) - (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 72 /PC-DB2) - ) - (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 73 /PC-DB3) - ) - (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 74 /PC-DB4) - ) - (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 75 /PC-DB5) - ) - (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 76 /PC-DB6) - ) - (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 77 /PC-DB7) - ) - (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 22 /D7) - ) - (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 21 /D6) - ) - (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 20 /D5) - ) - (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 19 /D4) - ) - (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 18 /D3) - ) - (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 17 /D2) - ) - (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 16 /D1) - ) - (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 15 /D0) - ) - (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 25 /ENBBUF) - ) - (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) - ) - (model dil/dil_20.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 20dip300 (layer Composant) (tedit 44D23E05) (tstamp 322D31CA) - (at 135.255 120.65) - (descr "Module Dil 20 pins, pads ronds") - (tags DIL) - (path /4A087146) - (fp_text reference U3 (at -8.89 -1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_text value 74LS541 (at 6.35 1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 58 /PC-A1) - ) - (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 57 /PC-A0) - ) - (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 61 /PC-A2) - ) - (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 62 /PC-A3) - ) - (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 79 /PC-IOW) - ) - (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 78 /PC-IOR) - ) - (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 81 /PC-RST) - ) - (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 81 /PC-RST) - ) - (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - ) - (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 93 /RSTL) - ) - (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 80 /PC-RD) - ) - (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 82 /PC-WR) - ) - (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 107 N-000109) - ) - (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 106 N-000108) - ) - (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 105 N-000107) - ) - (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 104 N-000106) - ) - (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) - ) - (model dil/dil_20.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - - (module 20dip300 (layer Composant) (tedit 200000) (tstamp 322D35B4) - (at 107.315 120.65) - (descr "Module Dil 20 pins, pads ronds") - (tags DIL) - (path /322D35B4) - (fp_text reference U2 (at -8.89 -1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_text value 74LS688 (at 6.35 1.27) (layer F.SilkS) - (effects (font (size 1.778 1.143) (thickness 0.28702))) - ) - (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) - (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) - (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) - (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 69 /PC-AEN) - ) - (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 64 /PC-A5) - ) - (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 88 /REF5) - ) - (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 67 /PC-A8) - ) - (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 91 /REF8) - ) - (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 68 /PC-A9) - ) - (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 92 /REF9) - ) - (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 60 /PC-A11) - ) - (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 86 /REF11) - ) - (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 100 GND) - ) - (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 59 /PC-A10) - ) - (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 85 /REF10) - ) - (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 66 /PC-A7) - ) - (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 90 /REF7) - ) - (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 65 /PC-A6) - ) - (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 89 /REF6) - ) - (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 63 /PC-A4) - ) - (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 87 /REF4) - ) - (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 47 /MATCHL) - ) - (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.812799) - (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) - ) - (model dil/dil_20.wrl - (at (xyz 0 0 0)) - (scale (xyz 1 1 1)) - (rotate (xyz 0 0 0)) - ) - ) - (module CP6 (layer Composant) (tedit 4CCA67CE) (tstamp 32307DE2) (at 90.805 83.82) (descr "Condensateur polarise") @@ -1552,7 +1270,7 @@ (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole trapezoid (at -7.62 0) (size 1.397 3.937) (rect_delta 0 1.27 ) (drill 1.016) (layers *.Cu *.Paste *.Mask F.Adhes F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad 2 thru_hole trapezoid (at 7.62 0) (size 3.937 1.397) (rect_delta 1.27 0 ) (drill 1.016) (layers *.Cu *.Mask F.Paste F.SilkS) @@ -1589,7 +1307,7 @@ (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -7.62 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad 2 thru_hole circle (at 7.62 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1625,7 +1343,7 @@ (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -7.62 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad 2 thru_hole circle (at 7.62 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1661,7 +1379,7 @@ (fp_line (start 6.604 1.524) (end 6.604 0) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -7.62 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (pad 2 thru_hole circle (at 7.62 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1696,11 +1414,11 @@ (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 90) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 109 N-000146) + (net 129 N-00000146) ) (pad 2 thru_hole circle (at 3.81 0 90) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 108 N-000145) + (net 128 N-00000145) ) (model discret/resistor.wrl (at (xyz 0 0 0)) @@ -1735,7 +1453,7 @@ ) (pad 2 thru_hole circle (at 3.81 0 270) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 109 N-000146) + (net 129 N-00000146) ) (model discret/resistor.wrl (at (xyz 0 0 0)) @@ -1766,11 +1484,11 @@ (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 101 N-000071) + (net 170 N-0000072) ) (pad 2 thru_hole circle (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (model discret/resistor.wrl (at (xyz 0 0 0)) @@ -1801,7 +1519,7 @@ (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 103 N-000105) + (net 105 N-00000107) ) (pad 2 thru_hole circle (at 3.81 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1836,7 +1554,7 @@ (fp_line (start -3.302 -0.508) (end -2.794 -1.016) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole circle (at -3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 102 N-000104) + (net 103 N-00000103) ) (pad 2 thru_hole circle (at 3.81 0) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1866,7 +1584,7 @@ (fp_line (start 1.905 0.635) (end 2.54 0.635) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -1.27 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 102 N-000104) + (net 103 N-00000103) ) (pad 2 thru_hole circle (at 1.27 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1896,7 +1614,7 @@ (fp_line (start 1.905 0.635) (end 2.54 0.635) (layer F.SilkS) (width 0.3048)) (pad 1 thru_hole rect (at -1.27 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 103 N-000105) + (net 105 N-00000107) ) (pad 2 thru_hole circle (at 1.27 0 180) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -1934,34 +1652,43 @@ ) (pad 3 connect rect (at 33.02 0) (size 1.778 7.62) (layers Cuivre B.Mask) - (net 110 VCC) + (net 173 VCC) ) (pad 4 connect rect (at 30.48 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 142 N-0000032) ) (pad 5 connect rect (at 27.94 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 141 N-0000031) ) (pad 6 connect rect (at 25.4 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 140 N-0000030) ) (pad 7 connect rect (at 22.86 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 138 N-0000029) ) (pad 8 connect rect (at 20.32 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 137 N-0000028) ) (pad 9 connect rect (at 17.78 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 136 N-0000027) ) (pad 10 connect rect (at 15.24 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 135 N-0000026) ) (pad 11 connect rect (at 12.7 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 134 N-0000025) ) (pad 12 connect rect (at 10.16 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 131 N-0000018) ) (pad 13 connect rect (at 7.62 0) (size 1.778 7.62) (layers Cuivre B.Mask) @@ -1973,52 +1700,67 @@ ) (pad 15 connect rect (at 2.54 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 123 N-0000014) ) (pad 16 connect rect (at 0 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 116 N-0000013) ) (pad 17 connect rect (at -2.54 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 111 N-0000012) ) (pad 18 connect rect (at -5.08 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 108 N-0000011) ) (pad 19 connect rect (at -7.62 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 102 N-0000010) ) (pad 20 connect rect (at -10.16 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 172 N-000009) ) (pad 21 connect rect (at -12.7 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 171 N-000008) ) (pad 22 connect rect (at -15.24 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 169 N-000007) ) (pad 23 connect rect (at -17.78 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 166 N-000006) ) (pad 24 connect rect (at -20.32 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 161 N-000005) ) (pad 25 connect rect (at -22.86 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 150 N-000004) ) (pad 26 connect rect (at -25.4 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 139 N-000003) ) (pad 27 connect rect (at -27.94 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 132 N-000002) ) (pad 28 connect rect (at -30.48 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 101 N-000001) ) (pad 29 connect rect (at -33.02 0) (size 1.778 7.62) (layers Cuivre B.Mask) - (net 110 VCC) + (net 173 VCC) ) (pad 30 connect rect (at -35.56 0) (size 1.778 7.62) (layers Cuivre B.Mask) + (net 153 N-0000042) ) (pad 31 connect rect (at -38.1 0) (size 1.778 7.62) (layers Cuivre B.Mask) @@ -2026,6 +1768,7 @@ ) (pad 32 connect rect (at 38.1 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 152 N-0000041) ) (pad 33 connect rect (at 35.56 0) (size 1.778 7.62) (layers Composant F.Mask) @@ -2061,6 +1804,7 @@ ) (pad 41 connect rect (at 15.24 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 151 N-0000040) ) (pad 42 connect rect (at 12.7 0) (size 1.778 7.62) (layers Composant F.Mask) @@ -2068,27 +1812,35 @@ ) (pad 43 connect rect (at 10.16 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 133 N-0000024) ) (pad 44 connect rect (at 7.62 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 149 N-0000039) ) (pad 45 connect rect (at 5.08 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 148 N-0000038) ) (pad 46 connect rect (at 2.54 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 147 N-0000037) ) (pad 47 connect rect (at 0 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 146 N-0000036) ) (pad 48 connect rect (at -2.54 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 145 N-0000035) ) (pad 49 connect rect (at -5.08 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 144 N-0000034) ) (pad 50 connect rect (at -7.62 0) (size 1.778 7.62) (layers Composant F.Mask) + (net 143 N-0000033) ) (pad 51 connect rect (at -10.16 0) (size 1.778 7.62) (layers Composant F.Mask) @@ -2361,7 +2113,7 @@ ) (pad 30 thru_hole circle (at -13.97 -7.62) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 101 N-000071) + (net 170 N-0000072) ) (pad 31 thru_hole circle (at -16.51 -7.62) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) @@ -2369,7 +2121,7 @@ ) (pad 32 thru_hole circle (at -19.05 -7.62) (size 1.397 1.397) (drill 0.812799) (layers *.Cu *.Mask F.SilkS) - (net 110 VCC) + (net 173 VCC) ) (model dil/dil_32-w600.wrl (at (xyz 0 0 0)) @@ -2522,6 +2274,443 @@ ) ) + (module DIP-20__300 (layer Composant) (tedit 200000) (tstamp 5214E8D1) + (at 163.195 120.65) + (descr "20 pins DIL package, round pads") + (tags DIL) + (path /322D31F4) + (fp_text reference U1 (at -8.89 -1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value 74LS245 (at 6.35 1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 23 /DIR) + ) + (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 70 /PC-DB0) + ) + (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 71 /PC-DB1) + ) + (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 72 /PC-DB2) + ) + (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 73 /PC-DB3) + ) + (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 74 /PC-DB4) + ) + (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 75 /PC-DB5) + ) + (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 76 /PC-DB6) + ) + (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 77 /PC-DB7) + ) + (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 22 /D7) + ) + (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 21 /D6) + ) + (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 20 /D5) + ) + (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 19 /D4) + ) + (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 18 /D3) + ) + (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 17 /D2) + ) + (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 16 /D1) + ) + (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 15 /D0) + ) + (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 25 /ENBBUF) + ) + (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 173 VCC) + ) + (model dil/dil_20.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module DIP-20__300 (layer Composant) (tedit 200000) (tstamp 5214E8EF) + (at 107.315 120.65) + (descr "20 pins DIL package, round pads") + (tags DIL) + (path /322D35B4) + (fp_text reference U2 (at -8.89 -1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value 74LS688 (at 6.35 1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 69 /PC-AEN) + ) + (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 64 /PC-A5) + ) + (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 88 /REF5) + ) + (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 67 /PC-A8) + ) + (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 91 /REF8) + ) + (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 68 /PC-A9) + ) + (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 92 /REF9) + ) + (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 60 /PC-A11) + ) + (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 86 /REF11) + ) + (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 59 /PC-A10) + ) + (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 85 /REF10) + ) + (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 66 /PC-A7) + ) + (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 90 /REF7) + ) + (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 65 /PC-A6) + ) + (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 89 /REF6) + ) + (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 63 /PC-A4) + ) + (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 87 /REF4) + ) + (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 47 /MATCHL) + ) + (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 173 VCC) + ) + (model dil/dil_20.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module DIP-20__300 (layer Composant) (tedit 200000) (tstamp 5214E90D) + (at 135.255 120.65) + (descr "20 pins DIL package, round pads") + (tags DIL) + (path /4A087146) + (fp_text reference U3 (at -8.89 -1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value 74LS541 (at 6.35 1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_line (start -13.97 -1.27) (end -12.7 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 -1.27) (end -12.7 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -12.7 1.27) (end -13.97 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 -2.54) (end 13.97 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 -2.54) (end 13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 13.97 2.54) (end -13.97 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -13.97 2.54) (end -13.97 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 2 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 58 /PC-A1) + ) + (pad 3 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 57 /PC-A0) + ) + (pad 4 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 61 /PC-A2) + ) + (pad 5 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 62 /PC-A3) + ) + (pad 6 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 79 /PC-IOW) + ) + (pad 7 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 78 /PC-IOR) + ) + (pad 8 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 81 /PC-RST) + ) + (pad 9 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 81 /PC-RST) + ) + (pad 10 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 11 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 168 N-0000062) + ) + (pad 12 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 93 /RSTL) + ) + (pad 13 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 80 /PC-RD) + ) + (pad 14 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 82 /PC-WR) + ) + (pad 15 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 110 N-00000111) + ) + (pad 16 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 109 N-00000110) + ) + (pad 17 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 107 N-00000109) + ) + (pad 18 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 106 N-00000108) + ) + (pad 19 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 20 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 173 VCC) + ) + (model dil/dil_20.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + + (module DIP-24__300 (layer Composant) (tedit 200000) (tstamp 5214E92B) + (at 137.795 109.22) + (descr "24 pins DIL package, round pads") + (tags DIL) + (path /322D321C) + (fp_text reference U8 (at -8.89 -1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_text value EP600 (at 6.35 1.27) (layer F.SilkS) + (effects (font (size 1.778 1.143) (thickness 0.3048))) + ) + (fp_line (start -16.51 -1.27) (end -15.24 -1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -15.24 -1.27) (end -15.24 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -15.24 1.27) (end -16.51 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 1.27) (end -16.51 1.27) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 -2.54) (end 16.51 -2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 16.51 -2.54) (end 16.51 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start 16.51 2.54) (end -16.51 2.54) (layer F.SilkS) (width 0.381)) + (fp_line (start -16.51 2.54) (end -16.51 -2.54) (layer F.SilkS) (width 0.381)) + (pad 1 thru_hole rect (at -13.97 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 2 thru_hole circle (at -11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 47 /MATCHL) + ) + (pad 3 thru_hole circle (at -8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 106 N-00000108) + ) + (pad 4 thru_hole circle (at -6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 107 N-00000109) + ) + (pad 5 thru_hole circle (at -3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 109 N-00000110) + ) + (pad 6 thru_hole circle (at -1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 110 N-00000111) + ) + (pad 7 thru_hole circle (at 1.27 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 82 /PC-WR) + ) + (pad 8 thru_hole circle (at 3.81 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 167 N-0000060) + ) + (pad 9 thru_hole circle (at 6.35 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 165 N-0000059) + ) + (pad 10 thru_hole circle (at 8.89 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 164 N-0000058) + ) + (pad 11 thru_hole circle (at 11.43 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 93 /RSTL) + ) + (pad 12 thru_hole circle (at 13.97 3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 100 GND) + ) + (pad 13 thru_hole circle (at 13.97 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 99 /WR_REG) + ) + (pad 14 thru_hole circle (at 11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 80 /PC-RD) + ) + (pad 15 thru_hole circle (at 8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 99 /WR_REG) + ) + (pad 16 thru_hole circle (at 6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 13 /CLKLCA) + ) + (pad 17 thru_hole circle (at 3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 23 /DIR) + ) + (pad 18 thru_hole circle (at 1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 94 /SEL_LPT) + ) + (pad 19 thru_hole circle (at -1.27 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 84 /PROG-) + ) + (pad 20 thru_hole circle (at -3.81 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 24 /DONE) + ) + (pad 21 thru_hole circle (at -6.35 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 15 /D0) + ) + (pad 22 thru_hole circle (at -8.89 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 25 /ENBBUF) + ) + (pad 23 thru_hole circle (at -11.43 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 173 VCC) + ) + (pad 24 thru_hole circle (at -13.97 -3.81) (size 1.397 1.397) (drill 0.8128) + (layers *.Cu *.Mask F.SilkS) + (net 173 VCC) + ) + (model dil/dil_24-w300.wrl + (at (xyz 0 0 0)) + (scale (xyz 1 1 1)) + (rotate (xyz 0 0 0)) + ) + ) + (dimension 99.06 (width 0.20066) (layer Cmts.User) (gr_text "99,060 mm" (at 75.946 83.947 270) (layer Cmts.User) (effects (font (size 2.032 1.524) (thickness 0.20066))) @@ -3274,91 +3463,91 @@ (segment (start 145.415 121.92) (end 126.365 121.92) (width 0.5588) (layer Cuivre) (net 100)) (segment (start 121.285 105.41) (end 121.285 110.49) (width 0.5588) (layer Composant) (net 100)) (segment (start 156.845 71.12) (end 158.115 69.85) (width 0.5588) (layer Composant) (net 100) (status 400)) - (segment (start 92.075 57.15) (end 92.075 60.96) (width 0.4318) (layer Cuivre) (net 101) (status C00)) - (segment (start 168.275 41.91) (end 168.275 38.1) (width 0.4318) (layer Composant) (net 102) (status C00)) - (segment (start 158.115 39.37) (end 158.115 38.1) (width 0.4318) (layer Composant) (net 103) (status 400)) - (segment (start 155.575 41.91) (end 158.115 39.37) (width 0.4318) (layer Composant) (net 103) (status 800)) - (segment (start 128.905 116.84) (end 128.905 113.03) (width 0.4318) (layer Composant) (net 104) (status C00)) - (segment (start 131.445 116.84) (end 131.445 113.03) (width 0.4318) (layer Composant) (net 105) (status C00)) - (segment (start 133.985 116.84) (end 133.985 113.03) (width 0.4318) (layer Composant) (net 106) (status C00)) - (segment (start 136.525 116.84) (end 136.525 113.03) (width 0.4318) (layer Composant) (net 107) (status C00)) - (segment (start 117.475 91.44) (end 114.935 91.44) (width 0.4318) (layer Cuivre) (net 108) (status 800)) - (segment (start 133.985 92.71) (end 142.875 92.71) (width 0.4318) (layer Cuivre) (net 108) (status 400)) - (segment (start 133.35 93.345) (end 133.985 92.71) (width 0.4318) (layer Cuivre) (net 108)) - (segment (start 114.935 91.44) (end 113.665 92.71) (width 0.4318) (layer Cuivre) (net 108) (status 400)) - (segment (start 121.285 91.44) (end 123.19 93.345) (width 0.4318) (layer Cuivre) (net 108) (status 800)) - (segment (start 121.285 91.44) (end 117.475 91.44) (width 0.4318) (layer Cuivre) (net 108) (status C00)) - (segment (start 123.19 93.345) (end 133.35 93.345) (width 0.4318) (layer Cuivre) (net 108)) - (segment (start 122.555 97.79) (end 126.365 97.79) (width 0.4318) (layer Cuivre) (net 109)) - (segment (start 114.935 99.06) (end 113.665 97.79) (width 0.4318) (layer Cuivre) (net 109) (status 400)) - (segment (start 126.365 97.79) (end 127.635 99.06) (width 0.4318) (layer Cuivre) (net 109) (status 400)) - (segment (start 121.285 99.06) (end 117.475 99.06) (width 0.4318) (layer Cuivre) (net 109) (status C00)) - (segment (start 117.475 99.06) (end 114.935 99.06) (width 0.4318) (layer Cuivre) (net 109) (status 800)) - (segment (start 121.285 99.06) (end 122.555 97.79) (width 0.4318) (layer Cuivre) (net 109) (status 800)) - (segment (start 86.995 60.96) (end 83.185 64.77) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 86.995 59.69) (end 86.995 60.96) (width 0.5588) (layer Composant) (net 110) (status 400)) - (segment (start 97.155 118.11) (end 95.885 116.84) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 127.635 118.11) (end 127.635 109.22) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 147.955 92.71) (end 149.225 93.98) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 149.225 93.98) (end 156.845 93.98) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 152.0825 115.57) (end 159.0675 115.57) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 122.555 118.11) (end 97.155 118.11) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 149.225 73.66) (end 167.005 73.66) (width 0.5588) (layer Cuivre) (net 110)) - (via (at 170.815 119.38) (size 1.524) (layers Composant Cuivre) (net 110)) - (segment (start 97.155 120.65) (end 97.155 125.73) (width 0.5588) (layer Composant) (net 110)) - (segment (start 147.955 72.39) (end 149.225 73.66) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 98.425 132.08) (end 98.425 138.43) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 123.825 116.84) (end 122.555 118.11) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 168.275 74.93) (end 168.275 72.39) (width 0.5588) (layer Composant) (net 110) (status C00)) - (segment (start 97.155 125.73) (end 98.425 127) (width 0.5588) (layer Composant) (net 110)) - (segment (start 170.815 128.27) (end 165.735 133.35) (width 0.5588) (layer Composant) (net 110)) - (via (at 98.425 132.08) (size 1.524) (layers Composant Cuivre) (net 110)) - (segment (start 172.085 68.58) (end 172.085 53.975) (width 0.5588) (layer Composant) (net 110)) - (segment (start 95.885 116.84) (end 95.885 119.38) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 83.185 64.77) (end 83.185 83.82) (width 0.5588) (layer Composant) (net 110) (status 400)) - (segment (start 165.735 92.71) (end 164.465 93.98) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 168.275 72.39) (end 168.275 69.85) (width 0.5588) (layer Composant) (net 110) (status C00)) - (segment (start 165.735 133.35) (end 164.465 134.62) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 164.465 93.98) (end 159.385 93.98) (width 0.5588) (layer Cuivre) (net 110)) - (via (at 165.735 133.35) (size 1.524) (layers Composant Cuivre) (net 110)) - (segment (start 170.815 52.705) (end 170.815 52.07) (width 0.5588) (layer Composant) (net 110) (status 400)) - (segment (start 159.0675 115.57) (end 159.385 115.2525) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 156.845 93.98) (end 158.115 95.25) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 167.005 73.66) (end 168.275 72.39) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 165.735 92.71) (end 165.735 74.93) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 168.275 69.85) (end 170.815 69.85) (width 0.5588) (layer Cuivre) (net 110) (status C00)) - (segment (start 151.765 115.8875) (end 152.0825 115.57) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 125.095 118.11) (end 123.825 116.84) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 83.185 83.82) (end 83.185 87.63) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 98.425 127) (end 98.425 132.08) (width 0.5588) (layer Composant) (net 110)) - (segment (start 159.385 96.52) (end 158.115 95.25) (width 0.5588) (layer Composant) (net 110) (status 400)) - (segment (start 170.815 69.85) (end 172.085 68.58) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 83.185 87.63) (end 86.995 91.44) (width 0.5588) (layer Composant) (net 110)) - (segment (start 95.885 116.84) (end 95.885 113.03) (width 0.5588) (layer Composant) (net 110) (status C00)) - (segment (start 150.495 118.11) (end 127.635 118.11) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 126.365 107.95) (end 126.365 105.41) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 127.635 118.11) (end 125.095 118.11) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 169.545 81.28) (end 170.815 82.55) (width 0.5588) (layer Composant) (net 110) (status 400)) - (segment (start 159.385 111.76) (end 159.385 96.52) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 95.885 113.03) (end 86.995 113.03) (width 0.5588) (layer Cuivre) (net 110) (status C00)) - (segment (start 127.635 109.22) (end 126.365 107.95) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 168.275 74.93) (end 169.545 76.2) (width 0.5588) (layer Composant) (net 110) (status 800)) - (via (at 165.735 74.93) (size 1.143) (layers Composant Cuivre) (net 110)) - (segment (start 159.385 93.98) (end 158.115 95.25) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 151.765 116.84) (end 150.495 118.11) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 151.765 116.84) (end 154.305 119.38) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 164.465 134.62) (end 164.465 138.43) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 126.365 105.41) (end 123.825 105.41) (width 0.5588) (layer Cuivre) (net 110) (status C00)) - (segment (start 151.765 116.84) (end 151.765 115.8875) (width 0.5588) (layer Cuivre) (net 110) (status 800)) - (segment (start 172.085 53.975) (end 170.815 52.705) (width 0.5588) (layer Composant) (net 110)) - (segment (start 169.545 76.2) (end 169.545 81.28) (width 0.5588) (layer Composant) (net 110)) - (segment (start 95.885 119.38) (end 97.155 120.65) (width 0.5588) (layer Composant) (net 110)) - (segment (start 154.305 119.38) (end 170.815 119.38) (width 0.5588) (layer Cuivre) (net 110)) - (segment (start 165.735 74.93) (end 168.275 74.93) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 159.385 115.2525) (end 159.385 111.76) (width 0.5588) (layer Cuivre) (net 110) (status 400)) - (segment (start 86.995 113.03) (end 86.995 91.44) (width 0.5588) (layer Composant) (net 110) (status 800)) - (segment (start 170.815 119.38) (end 170.815 128.27) (width 0.5588) (layer Composant) (net 110)) - (segment (start 84.455 57.15) (end 86.995 59.69) (width 0.5588) (layer Composant) (net 110) (status 800)) + (segment (start 168.275 41.91) (end 168.275 38.1) (width 0.4318) (layer Composant) (net 103) (status C00)) + (segment (start 158.115 39.37) (end 158.115 38.1) (width 0.4318) (layer Composant) (net 105) (status 400)) + (segment (start 155.575 41.91) (end 158.115 39.37) (width 0.4318) (layer Composant) (net 105) (status 800)) + (segment (start 128.905 116.84) (end 128.905 113.03) (width 0.4318) (layer Composant) (net 106) (status C00)) + (segment (start 131.445 116.84) (end 131.445 113.03) (width 0.4318) (layer Composant) (net 107) (status C00)) + (segment (start 133.985 116.84) (end 133.985 113.03) (width 0.4318) (layer Composant) (net 109) (status C00)) + (segment (start 136.525 116.84) (end 136.525 113.03) (width 0.4318) (layer Composant) (net 110) (status C00)) + (segment (start 117.475 91.44) (end 114.935 91.44) (width 0.4318) (layer Cuivre) (net 128) (status 800)) + (segment (start 133.985 92.71) (end 142.875 92.71) (width 0.4318) (layer Cuivre) (net 128) (status 400)) + (segment (start 133.35 93.345) (end 133.985 92.71) (width 0.4318) (layer Cuivre) (net 128)) + (segment (start 114.935 91.44) (end 113.665 92.71) (width 0.4318) (layer Cuivre) (net 128) (status 400)) + (segment (start 121.285 91.44) (end 123.19 93.345) (width 0.4318) (layer Cuivre) (net 128) (status 800)) + (segment (start 121.285 91.44) (end 117.475 91.44) (width 0.4318) (layer Cuivre) (net 128) (status C00)) + (segment (start 123.19 93.345) (end 133.35 93.345) (width 0.4318) (layer Cuivre) (net 128)) + (segment (start 122.555 97.79) (end 126.365 97.79) (width 0.4318) (layer Cuivre) (net 129)) + (segment (start 114.935 99.06) (end 113.665 97.79) (width 0.4318) (layer Cuivre) (net 129) (status 400)) + (segment (start 126.365 97.79) (end 127.635 99.06) (width 0.4318) (layer Cuivre) (net 129) (status 400)) + (segment (start 121.285 99.06) (end 117.475 99.06) (width 0.4318) (layer Cuivre) (net 129) (status C00)) + (segment (start 117.475 99.06) (end 114.935 99.06) (width 0.4318) (layer Cuivre) (net 129) (status 800)) + (segment (start 121.285 99.06) (end 122.555 97.79) (width 0.4318) (layer Cuivre) (net 129) (status 800)) + (segment (start 92.075 57.15) (end 92.075 60.96) (width 0.4318) (layer Cuivre) (net 170) (status C00)) + (segment (start 86.995 60.96) (end 83.185 64.77) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 86.995 59.69) (end 86.995 60.96) (width 0.5588) (layer Composant) (net 173) (status 400)) + (segment (start 97.155 118.11) (end 95.885 116.84) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 127.635 118.11) (end 127.635 109.22) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 147.955 92.71) (end 149.225 93.98) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 149.225 93.98) (end 156.845 93.98) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 152.0825 115.57) (end 159.0675 115.57) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 122.555 118.11) (end 97.155 118.11) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 149.225 73.66) (end 167.005 73.66) (width 0.5588) (layer Cuivre) (net 173)) + (via (at 170.815 119.38) (size 1.524) (layers Composant Cuivre) (net 173)) + (segment (start 97.155 120.65) (end 97.155 125.73) (width 0.5588) (layer Composant) (net 173)) + (segment (start 147.955 72.39) (end 149.225 73.66) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 98.425 132.08) (end 98.425 138.43) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 123.825 116.84) (end 122.555 118.11) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 168.275 74.93) (end 168.275 72.39) (width 0.5588) (layer Composant) (net 173) (status C00)) + (segment (start 97.155 125.73) (end 98.425 127) (width 0.5588) (layer Composant) (net 173)) + (segment (start 170.815 128.27) (end 165.735 133.35) (width 0.5588) (layer Composant) (net 173)) + (via (at 98.425 132.08) (size 1.524) (layers Composant Cuivre) (net 173)) + (segment (start 172.085 68.58) (end 172.085 53.975) (width 0.5588) (layer Composant) (net 173)) + (segment (start 95.885 116.84) (end 95.885 119.38) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 83.185 64.77) (end 83.185 83.82) (width 0.5588) (layer Composant) (net 173) (status 400)) + (segment (start 165.735 92.71) (end 164.465 93.98) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 168.275 72.39) (end 168.275 69.85) (width 0.5588) (layer Composant) (net 173) (status C00)) + (segment (start 165.735 133.35) (end 164.465 134.62) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 164.465 93.98) (end 159.385 93.98) (width 0.5588) (layer Cuivre) (net 173)) + (via (at 165.735 133.35) (size 1.524) (layers Composant Cuivre) (net 173)) + (segment (start 170.815 52.705) (end 170.815 52.07) (width 0.5588) (layer Composant) (net 173) (status 400)) + (segment (start 159.0675 115.57) (end 159.385 115.2525) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 156.845 93.98) (end 158.115 95.25) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 167.005 73.66) (end 168.275 72.39) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 165.735 92.71) (end 165.735 74.93) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 168.275 69.85) (end 170.815 69.85) (width 0.5588) (layer Cuivre) (net 173) (status C00)) + (segment (start 151.765 115.8875) (end 152.0825 115.57) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 125.095 118.11) (end 123.825 116.84) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 83.185 83.82) (end 83.185 87.63) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 98.425 127) (end 98.425 132.08) (width 0.5588) (layer Composant) (net 173)) + (segment (start 159.385 96.52) (end 158.115 95.25) (width 0.5588) (layer Composant) (net 173) (status 400)) + (segment (start 170.815 69.85) (end 172.085 68.58) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 83.185 87.63) (end 86.995 91.44) (width 0.5588) (layer Composant) (net 173)) + (segment (start 95.885 116.84) (end 95.885 113.03) (width 0.5588) (layer Composant) (net 173) (status C00)) + (segment (start 150.495 118.11) (end 127.635 118.11) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 126.365 107.95) (end 126.365 105.41) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 127.635 118.11) (end 125.095 118.11) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 169.545 81.28) (end 170.815 82.55) (width 0.5588) (layer Composant) (net 173) (status 400)) + (segment (start 159.385 111.76) (end 159.385 96.52) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 95.885 113.03) (end 86.995 113.03) (width 0.5588) (layer Cuivre) (net 173) (status C00)) + (segment (start 127.635 109.22) (end 126.365 107.95) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 168.275 74.93) (end 169.545 76.2) (width 0.5588) (layer Composant) (net 173) (status 800)) + (via (at 165.735 74.93) (size 1.143) (layers Composant Cuivre) (net 173)) + (segment (start 159.385 93.98) (end 158.115 95.25) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 151.765 116.84) (end 150.495 118.11) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 151.765 116.84) (end 154.305 119.38) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 164.465 134.62) (end 164.465 138.43) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 126.365 105.41) (end 123.825 105.41) (width 0.5588) (layer Cuivre) (net 173) (status C00)) + (segment (start 151.765 116.84) (end 151.765 115.8875) (width 0.5588) (layer Cuivre) (net 173) (status 800)) + (segment (start 172.085 53.975) (end 170.815 52.705) (width 0.5588) (layer Composant) (net 173)) + (segment (start 169.545 76.2) (end 169.545 81.28) (width 0.5588) (layer Composant) (net 173)) + (segment (start 95.885 119.38) (end 97.155 120.65) (width 0.5588) (layer Composant) (net 173)) + (segment (start 154.305 119.38) (end 170.815 119.38) (width 0.5588) (layer Cuivre) (net 173)) + (segment (start 165.735 74.93) (end 168.275 74.93) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 159.385 115.2525) (end 159.385 111.76) (width 0.5588) (layer Cuivre) (net 173) (status 400)) + (segment (start 86.995 113.03) (end 86.995 91.44) (width 0.5588) (layer Composant) (net 173) (status 800)) + (segment (start 170.815 119.38) (end 170.815 128.27) (width 0.5588) (layer Composant) (net 173)) + (segment (start 84.455 57.15) (end 86.995 59.69) (width 0.5588) (layer Composant) (net 173) (status 800)) (zone (net 100) (net_name GND) (layer Cuivre) (tstamp 4CDEC22B) (hatch edge 0.508) (connect_pads (clearance 0.508)) diff --git a/demos/interf_u/interf_u.net b/demos/interf_u/interf_u.net index 7ae2070dab..712b84c3c4 100644 --- a/demos/interf_u/interf_u.net +++ b/demos/interf_u/interf_u.net @@ -1,933 +1,1177 @@ -# EESchema Netlist Version 1.1 created 23/01/2012 08:38:24 -( - ( /4A087146 $noname U3 74LS541 {Lib=74LS541} - ( 1 GND ) - ( 2 /PC-A1 ) - ( 3 /PC-A0 ) - ( 4 /PC-A2 ) - ( 5 /PC-A3 ) - ( 6 /PC-IOW ) - ( 7 /PC-IOR ) - ( 8 /PC-RST ) - ( 9 /PC-RST ) - ( 10 GND ) - ( 11 ? ) - ( 12 /RSTL ) - ( 13 /PC-RD ) - ( 14 /PC-WR ) - ( 15 N-000111 ) - ( 16 N-000110 ) - ( 17 N-000109 ) - ( 18 N-000108 ) - ( 19 GND ) - ( 20 VCC ) - ) - ( /32568D1E pin_array_8x2 JP1 CONN_8X2 {Lib=CONN_8X2} - ( 1 GND ) - ( 2 /REF10 ) - ( 3 GND ) - ( 4 /REF11 ) - ( 5 GND ) - ( 6 /REF7 ) - ( 7 GND ) - ( 8 /REF9 ) - ( 9 GND ) - ( 10 /REF6 ) - ( 11 GND ) - ( 12 /REF8 ) - ( 13 GND ) - ( 14 /REF4 ) - ( 15 GND ) - ( 16 /REF5 ) - ) - ( /325679C1 r_pack9 RR1 9x1K {Lib=RR9} - ( 1 VCC ) - ( 2 /REF5 ) - ( 3 /REF4 ) - ( 4 /REF8 ) - ( 5 /REF6 ) - ( 6 /REF9 ) - ( 7 /REF7 ) - ( 8 /REF11 ) - ( 9 /REF10 ) - ( 10 ? ) - ) - ( /3256759C DB25FC P1 DB25FEMELLE {Lib=DB25} - ( 1 /STROBE ) - ( 2 /BIT0 ) - ( 3 /BIT1 ) - ( 4 /BIT2 ) - ( 5 /BIT3 ) - ( 6 /BIT4 ) - ( 7 /BIT5 ) - ( 8 /BIT6 ) - ( 9 /BIT7 ) - ( 10 /ACK ) - ( 11 /BUST+ ) - ( 12 /PE+ ) - ( 13 /SLCT+ ) - ( 14 /AUTOFD- ) - ( 15 /ERROR- ) - ( 16 /INIT- ) - ( 17 /SLCTIN- ) - ( 18 GND ) - ( 19 GND ) - ( 20 GND ) - ( 21 GND ) - ( 22 GND ) - ( 23 GND ) - ( 24 GND ) - ( 25 GND ) - ) - ( /324002E6 R3 R3 10K {Lib=R} - ( 1 N-000072 ) - ( 2 VCC ) - ) - ( /3240023F 32dip600 U5 628128 {Lib=628128} - ( 2 /MA16 ) - ( 3 /MA14 ) - ( 4 /MA12 ) - ( 5 /MA7 ) - ( 6 /MA6 ) - ( 7 /MA5 ) - ( 8 /MA4 ) - ( 9 /MA3 ) - ( 10 /MA2 ) - ( 11 /MA1 ) - ( 12 /MA0 ) - ( 13 /MD0 ) - ( 14 /MD1 ) - ( 15 /MD2 ) - ( 16 GND ) - ( 17 /MD3 ) - ( 18 /MD4 ) - ( 19 /MD5 ) - ( 20 /MD6 ) - ( 21 /MD7 ) - ( 22 /CS1- ) - ( 23 /MA10 ) - ( 24 /OE- ) - ( 25 /MA11 ) - ( 26 /MA9 ) - ( 27 /MA8 ) - ( 28 /MA13 ) - ( 29 /WR- ) - ( 30 N-000072 ) - ( 31 /MA15 ) - ( 32 VCC ) - ) - ( /32307ED4 C1 C3 47pF {Lib=C} - ( 1 N-000146 ) - ( 2 GND ) - ) - ( /32307ECF C1 C2 47pF {Lib=C} - ( 1 N-000145 ) - ( 2 GND ) - ) - ( /32307EC0 HC-18UH X1 8MHz {Lib=CRYSTAL} - ( 1 N-000145 ) - ( 2 N-000146 ) - ) - ( /32307EAA R3 R2 1K {Lib=R} - ( 1 /8MH-OUT ) - ( 2 N-000146 ) - ) - ( /32307EA1 R3 R1 100K {Lib=R} - ( 1 N-000146 ) - ( 2 N-000145 ) - ) - ( /32307DE2 CP6 C1 47uF {Lib=CP} - ( 1 VCC ) - ( 2 GND ) - ) - ( /32307DCF CP6 C4 47uF {Lib=CP} - ( 1 VCC ) - ( 2 GND ) - ) - ( /32307DCA CP6 C5 47uF {Lib=CP} - ( 1 VCC ) - ( 2 GND ) - ) - ( /32307DC0 CP6 C6 47uF {Lib=CP} - ( 1 VCC ) - ( 2 GND ) - ) - ( /322D35B4 20dip300 U2 74LS688 {Lib=74LS688} - ( 1 /PC-AEN ) - ( 2 /PC-A5 ) - ( 3 /REF5 ) - ( 4 /PC-A8 ) - ( 5 /REF8 ) - ( 6 /PC-A9 ) - ( 7 /REF9 ) - ( 8 /PC-A11 ) - ( 9 /REF11 ) - ( 10 GND ) - ( 11 /PC-A10 ) - ( 12 /REF10 ) - ( 13 /PC-A7 ) - ( 14 /REF7 ) - ( 15 /PC-A6 ) - ( 16 /REF6 ) - ( 17 /PC-A4 ) - ( 18 /REF4 ) - ( 19 /MATCHL ) - ( 20 VCC ) - ) - ( /322D32FA PGA120 U9 4003APG120 {Lib=4003APG120} - ( A1 ? ) - ( A2 ? ) - ( A3 ? ) - ( A4 /MA9 ) - ( A5 /MD1 ) - ( A6 /MD3 ) - ( A7 /MD4 ) - ( A8 /MD5 ) - ( A9 /MD6 ) - ( A10 /CS1- ) - ( A11 /MA0 ) - ( A12 /STROBE ) - ( A13 /WR- ) - ( B1 ? ) - ( B2 /MA1 ) - ( B3 /MA7 ) - ( B4 ? ) - ( B5 ? ) - ( B6 /MD2 ) - ( B7 GND ) - ( B8 /MD7 ) - ( B9 /OE- ) - ( B10 ? ) - ( B11 VCC ) - ( B12 VCC ) - ( B13 ? ) - ( C1 /MA13 ) - ( C2 /MA3 ) - ( C3 VCC ) - ( C4 GND ) - ( C5 ? ) - ( C6 /MD0 ) - ( C8 /MA16 ) - ( C9 /MA10 ) - ( C10 GND ) - ( C11 VCC ) - ( C12 /AUTOFD- ) - ( C13 /MA5 ) - ( D1 /MA14 ) - ( D2 /MA11 ) - ( D3 /MA2 ) - ( D11 VCC ) - ( D12 /BIT0 ) - ( D13 /ERROR- ) - ( E1 /MA4 ) - ( E2 ? ) - ( E3 ? ) - ( E11 ? ) - ( E12 /INIT- ) - ( E13 /BIT1 ) - ( F1 /MA15 ) - ( F2 /MA6 ) - ( F3 /MA12 ) - ( F11 /SLCTIN- ) - ( F12 /BIT2 ) - ( F13 /LED2 ) - ( G1 /MA8 ) - ( G2 GND ) - ( G11 GND ) - ( G12 VCC ) - ( G13 /BIT3 ) - ( H1 /PC-A8 ) - ( H2 /PC-A7 ) - ( H3 /PC-A4 ) - ( H11 /BIT7 ) - ( H12 /BIT5 ) - ( H13 /BIT4 ) - ( J1 /PC-A6 ) - ( J2 /PC-A5 ) - ( J3 ? ) - ( J11 ? ) - ( J12 /BUST+ ) - ( J13 /BIT6 ) - ( K1 /8MH-OUT ) - ( K2 /PC-A3 ) - ( K3 GND ) - ( K11 GND ) - ( K12 ? ) - ( K13 /ACK ) - ( L1 N-000145 ) - ( L2 /SEL_LPT ) - ( L3 VCC ) - ( L4 /CLKLCA ) - ( L5 ? ) - ( L6 ? ) - ( L7 GND ) - ( L8 /PC-A10 ) - ( L9 ? ) - ( L10 VCC ) - ( L11 /DONE ) - ( L12 /D7 ) - ( L13 /PE+ ) - ( M1 ? ) - ( M2 ? ) - ( M3 /LED1 ) - ( M4 /CLKLCA ) - ( M5 /PC-A2 ) - ( M6 /PC-A0 ) - ( M7 VCC ) - ( M8 /PC-RD ) - ( M9 /D3 ) - ( M10 /D4 ) - ( M11 /D6 ) - ( M12 /PROG- ) - ( N1 ? ) - ( N2 /D0 ) - ( N3 ? ) - ( N4 /PC-A1 ) - ( N5 ? ) - ( N6 /PC-WR ) - ( N7 /PC-A9 ) - ( N8 /D1 ) - ( N9 /D2 ) - ( N10 /PC-AEN ) - ( N11 /D5 ) - ( N12 ? ) - ( N13 /SLCT+ ) - ) - ( /322D32BE LEDV D2 LED {Lib=LED} - ( 1 N-000103 ) - ( 2 GND ) - ) - ( /322D32AC LEDV D1 LED {Lib=LED} - ( 1 N-000107 ) - ( 2 GND ) - ) - ( /322D32A0 R3 R5 330 {Lib=R} - ( 1 N-000103 ) - ( 2 /LED2 ) - ) - ( /322D3295 R3 R4 330 {Lib=R} - ( 1 N-000107 ) - ( 2 /LED1 ) - ) - ( /322D321C 24dip300 U8 EP600 {Lib=EP600} - ( 1 GND ) - ( 2 /MATCHL ) - ( 3 N-000108 ) - ( 4 N-000109 ) - ( 5 N-000110 ) - ( 6 N-000111 ) - ( 7 /PC-WR ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ( 11 /RSTL ) - ( 12 GND ) - ( 13 /WR_REG ) - ( 14 /PC-RD ) - ( 15 /WR_REG ) - ( 16 /CLKLCA ) - ( 17 /DIR ) - ( 18 /SEL_LPT ) - ( 19 /PROG- ) - ( 20 /DONE ) - ( 21 /D0 ) - ( 22 /ENBBUF ) - ( 23 VCC ) - ( 24 VCC ) - ) - ( /322D31F4 20dip300 U1 74LS245 {Lib=74LS245} - ( 1 /DIR ) - ( 2 /PC-DB0 ) - ( 3 /PC-DB1 ) - ( 4 /PC-DB2 ) - ( 5 /PC-DB3 ) - ( 6 /PC-DB4 ) - ( 7 /PC-DB5 ) - ( 8 /PC-DB6 ) - ( 9 /PC-DB7 ) - ( 10 GND ) - ( 11 /D7 ) - ( 12 /D6 ) - ( 13 /D5 ) - ( 14 /D4 ) - ( 15 /D3 ) - ( 16 /D2 ) - ( 17 /D1 ) - ( 18 /D0 ) - ( 19 /ENBBUF ) - ( 20 VCC ) - ) - ( /322D3011 BUS_PC BUS1 BUSPC {Lib=BUSPC} - ( 1 GND ) - ( 2 /PC-RST ) - ( 3 VCC ) - ( 4 ? ) - ( 5 ? ) - ( 6 ? ) - ( 7 ? ) - ( 8 ? ) - ( 9 ? ) - ( 10 ? ) - ( 11 ? ) - ( 12 ? ) - ( 13 /PC-IOW ) - ( 14 /PC-IOR ) - ( 15 ? ) - ( 16 ? ) - ( 17 ? ) - ( 18 ? ) - ( 19 ? ) - ( 20 ? ) - ( 21 ? ) - ( 22 ? ) - ( 23 ? ) - ( 24 ? ) - ( 25 ? ) - ( 26 ? ) - ( 27 ? ) - ( 28 ? ) - ( 29 VCC ) - ( 30 ? ) - ( 31 GND ) - ( 32 ? ) - ( 33 /PC-DB7 ) - ( 34 /PC-DB6 ) - ( 35 /PC-DB5 ) - ( 36 /PC-DB4 ) - ( 37 /PC-DB3 ) - ( 38 /PC-DB2 ) - ( 39 /PC-DB1 ) - ( 40 /PC-DB0 ) - ( 41 ? ) - ( 42 /PC-AEN ) - ( 43 ? ) - ( 44 ? ) - ( 45 ? ) - ( 46 ? ) - ( 47 ? ) - ( 48 ? ) - ( 49 ? ) - ( 50 ? ) - ( 51 /PC-A11 ) - ( 52 /PC-A10 ) - ( 53 /PC-A9 ) - ( 54 /PC-A8 ) - ( 55 /PC-A7 ) - ( 56 /PC-A6 ) - ( 57 /PC-A5 ) - ( 58 /PC-A4 ) - ( 59 /PC-A3 ) - ( 60 /PC-A2 ) - ( 61 /PC-A1 ) - ( 62 /PC-A0 ) - ) -) -* -{ Allowed footprints by component: -$component P1 - DB25* -$endlist -$component R3 - R? - SM0603 - SM0805 - R?-* - SM1206 -$endlist -$component C3 - SM* - C? - C1-1 -$endlist -$component C2 - SM* - C? - C1-1 -$endlist -$component R2 - R? - SM0603 - SM0805 - R?-* - SM1206 -$endlist -$component R1 - R? - SM0603 - SM0805 - R?-* - SM1206 -$endlist -$component C1 - CP* - SM* -$endlist -$component C4 - CP* - SM* -$endlist -$component C5 - CP* - SM* -$endlist -$component C6 - CP* - SM* -$endlist -$component D2 - LED-3MM - LED-5MM - LED-10MM - LED-0603 - LED-0805 - LED-1206 - LEDV -$endlist -$component D1 - LED-3MM - LED-5MM - LED-10MM - LED-0603 - LED-0805 - LED-1206 - LEDV -$endlist -$component R5 - R? - SM0603 - SM0805 - R?-* - SM1206 -$endlist -$component R4 - R? - SM0603 - SM0805 - R?-* - SM1206 -$endlist -$endfootprintlist -} -{ Pin List by Nets -Net 15 "/PC-RST" "PC-RST" - BUS1 2 - U3 8 - U3 9 -Net 16 "/PC-IOR" "PC-IOR" - BUS1 14 - U3 7 -Net 17 "/PC-IOW" "PC-IOW" - U3 6 - BUS1 13 -Net 19 "/PC-A1" "PC-A1" - BUS1 61 - U9 N4 - U3 2 -Net 20 "/PC-A0" "PC-A0" - U9 M6 - BUS1 62 - U3 3 -Net 21 "GND" "GND" - P1 18 - U9 G11 - U9 K11 - U9 C10 - U9 G2 - BUS1 1 - D2 2 - U1 10 - U9 C4 - P1 20 - D1 2 - U9 K3 - U8 1 - U9 L7 - U9 B7 - JP1 13 - JP1 11 - P1 25 - U5 16 - P1 24 - P1 23 - JP1 15 - U8 12 - P1 22 - P1 21 - C1 2 - C4 2 - C5 2 - C6 2 - U2 10 - C3 2 - U3 10 - U3 19 - U3 1 - JP1 7 - JP1 5 - JP1 3 - JP1 1 - C2 2 - BUS1 31 - P1 19 - JP1 9 -Net 22 "VCC" "VCC" - C1 1 - C4 1 - U8 24 - C5 1 - U8 23 - C6 1 - U2 20 - U9 B12 - U9 L3 - U9 M7 - U3 20 - U9 D11 - U1 20 - U9 C11 - U9 B11 - R3 2 - BUS1 3 - BUS1 29 - U9 G12 - U5 32 - U9 C3 - U9 L10 - RR1 1 -Net 23 "/PC-AEN" "PC-AEN" - U9 N10 - BUS1 42 - U2 1 -Net 52 "/MA8" "MA8" - U9 G1 - U5 27 -Net 53 "/MD4" "MD4" - U9 A7 - U5 18 -Net 54 "/MA13" "MA13" - U5 28 - U9 C1 -Net 55 "/MD5" "MD5" - U9 A8 - U5 19 -Net 56 "/WR-" "WR-" - U5 29 - U9 A13 -Net 57 "/MD3" "MD3" - U5 17 - U9 A6 -Net 61 "/RSTL" "RSTL" - U3 12 - U8 11 -Net 63 "/MA16" "MA16" - U9 C8 - U5 2 -Net 64 "/MA14" "MA14" - U5 3 - U9 D1 -Net 65 "/MA12" "MA12" - U9 F3 - U5 4 -Net 66 "/MA7" "MA7" - U5 5 - U9 B3 -Net 67 "/MA6" "MA6" - U9 F2 - U5 6 -Net 68 "/MA5" "MA5" - U9 C13 - U5 7 -Net 69 "/MA4" "MA4" - U9 E1 - U5 8 -Net 70 "/MA3" "MA3" - U5 9 - U9 C2 -Net 71 "/MD6" "MD6" - U9 A9 - U5 20 -Net 72 "" "" - R3 1 - U5 30 -Net 73 "/MD7" "MD7" - U5 21 - U9 B8 -Net 74 "/MA15" "MA15" - U5 31 - U9 F1 -Net 75 "/MA0" "MA0" - U5 12 - U9 A11 -Net 76 "/CS1-" "CS1-" - U9 A10 - U5 22 -Net 77 "/MD0" "MD0" - U9 C6 - U5 13 -Net 78 "/MA10" "MA10" - U5 23 - U9 C9 -Net 79 "/MD1" "MD1" - U5 14 - U9 A5 -Net 80 "/OE-" "OE-" - U5 24 - U9 B9 -Net 81 "/MD2" "MD2" - U5 15 - U9 B6 -Net 82 "/MA11" "MA11" - U5 25 - U9 D2 -Net 83 "/MA9" "MA9" - U5 26 - U9 A4 -Net 84 "/DIR" "DIR" - U8 17 - U1 1 -Net 85 "/ENBBUF" "ENBBUF" - U8 22 - U1 19 -Net 86 "/PC-RD" "PC-RD" - U8 14 - U3 13 - U9 M8 -Net 87 "/SEL_LPT" "SEL_LPT" - U8 18 - U9 L2 -Net 88 "/PC-DB0" "PC-DB0" - U1 2 - BUS1 40 -Net 89 "/PC-DB1" "PC-DB1" - U1 3 - BUS1 39 -Net 90 "/PC-DB2" "PC-DB2" - U1 4 - BUS1 38 -Net 91 "/PC-DB3" "PC-DB3" - U1 5 - BUS1 37 -Net 92 "/PC-DB4" "PC-DB4" - BUS1 36 - U1 6 -Net 93 "/PC-DB5" "PC-DB5" - U1 7 - BUS1 35 -Net 94 "/PC-DB6" "PC-DB6" - U1 8 - BUS1 34 -Net 95 "/PC-DB7" "PC-DB7" - BUS1 33 - U1 9 -Net 96 "/D7" "D7" - U9 L12 - U1 11 -Net 97 "/D6" "D6" - U9 M11 - U1 12 -Net 98 "/D5" "D5" - U9 N11 - U1 13 -Net 99 "/D4" "D4" - U9 M10 - U1 14 -Net 100 "/D3" "D3" - U9 M9 - U1 15 -Net 101 "/D2" "D2" - U1 16 - U9 N9 -Net 102 "/D1" "D1" - U1 17 - U9 N8 -Net 103 "" "" - D2 1 - R5 1 -Net 105 "/LED2" "LED2" - R5 2 - U9 F13 -Net 106 "/D0" "D0" - U8 21 - U9 N2 - U1 18 -Net 107 "" "" - D1 1 - R4 1 -Net 108 "" "" - U3 18 - U8 3 -Net 109 "" "" - U3 17 - U8 4 -Net 110 "" "" - U3 16 - U8 5 -Net 111 "" "" - U3 15 - U8 6 -Net 112 "/PC-WR" "PC-WR" - U8 7 - U9 N6 - U3 14 -Net 113 "/PC-A6" "PC-A6" - U9 J1 - BUS1 56 - U2 15 -Net 114 "/PC-A9" "PC-A9" - U9 N7 - BUS1 53 - U2 6 -Net 115 "/PC-A8" "PC-A8" - U2 4 - U9 H1 - BUS1 54 -Net 116 "/PC-A7" "PC-A7" - BUS1 55 - U9 H2 - U2 13 -Net 117 "/PC-A5" "PC-A5" - BUS1 57 - U2 2 - U9 J2 -Net 118 "/PC-A4" "PC-A4" - BUS1 58 - U9 H3 - U2 17 -Net 119 "/PC-A3" "PC-A3" - U3 5 - U9 K2 - BUS1 59 -Net 120 "/PC-A2" "PC-A2" - U3 4 - U9 M5 - BUS1 60 -Net 121 "/PC-A11" "PC-A11" - U2 8 - BUS1 51 -Net 122 "/PC-A10" "PC-A10" - U9 L8 - BUS1 52 - U2 11 -Net 123 "/LED1" "LED1" - U9 M3 - R4 2 -Net 125 "/MA2" "MA2" - U9 D3 - U5 10 -Net 128 "/CLKLCA" "CLKLCA" - U8 16 - U9 L4 - U9 M4 -Net 131 "/MATCHL" "MATCHL" - U2 19 - U8 2 -Net 134 "/MA1" "MA1" - U5 11 - U9 B2 -Net 137 "/DONE" "DONE" - U8 20 - U9 L11 -Net 139 "/PROG-" "PROG-" - U8 19 - U9 M12 -Net 144 "/WR_REG" "WR_REG" - U8 13 - U8 15 -Net 145 "" "" - X1 1 - C2 1 - R1 2 - U9 L1 -Net 146 "" "" - X1 2 - R1 1 - C3 1 - R2 2 -Net 147 "/BIT6" "BIT6" - U9 J13 - P1 8 -Net 148 "/BIT7" "BIT7" - P1 9 - U9 H11 -Net 149 "/ACK" "ACK" - P1 10 - U9 K13 -Net 150 "/BUST+" "BUST+" - U9 J12 - P1 11 -Net 151 "/PE+" "PE+" - P1 12 - U9 L13 -Net 152 "/SLCT+" "SLCT+" - P1 13 - U9 N13 -Net 153 "/BIT5" "BIT5" - U9 H12 - P1 7 -Net 154 "/8MH-OUT" "8MH-OUT" - R2 1 - U9 K1 -Net 156 "/STROBE" "STROBE" - P1 1 - U9 A12 -Net 157 "/AUTOFD-" "AUTOFD-" - P1 14 - U9 C12 -Net 158 "/ERROR-" "ERROR-" - P1 15 - U9 D13 -Net 159 "/BIT2" "BIT2" - U9 F12 - P1 4 -Net 160 "/INIT-" "INIT-" - P1 16 - U9 E12 -Net 161 "/SLCTIN-" "SLCTIN-" - P1 17 - U9 F11 -Net 162 "/BIT0" "BIT0" - U9 D12 - P1 2 -Net 163 "/BIT1" "BIT1" - P1 3 - U9 E13 -Net 164 "/BIT3" "BIT3" - U9 G13 - P1 5 -Net 165 "/BIT4" "BIT4" - P1 6 - U9 H13 -Net 166 "/REF10" "REF10" - U2 12 - JP1 2 - RR1 9 -Net 167 "/REF11" "REF11" - JP1 4 - RR1 8 - U2 9 -Net 168 "/REF7" "REF7" - JP1 6 - RR1 7 - U2 14 -Net 169 "/REF9" "REF9" - JP1 8 - U2 7 - RR1 6 -Net 170 "/REF6" "REF6" - U2 16 - RR1 5 - JP1 10 -Net 171 "/REF8" "REF8" - RR1 4 - U2 5 - JP1 12 -Net 172 "/REF4" "REF4" - RR1 3 - U2 18 - JP1 14 -Net 173 "/REF5" "REF5" - JP1 16 - RR1 2 - U2 3 -} -#End +(export (version D) + (design + (source F:/kicad/share/demos/interf_u/interf_u.sch) + (date "21/08/2013 18:14:13") + (tool "eeschema (2013-08-20 BZR 4294)-product")) + (components + (comp (ref U3) + (value 74LS541) + (footprint DIP-20__300) + (libsource (lib 74xx) (part 74LS541)) + (sheetpath (names /) (tstamps /)) + (tstamp 4A087146)) + (comp (ref JP1) + (value CONN_8X2) + (footprint pin_array_8x2) + (libsource (lib conn) (part CONN_8X2)) + (sheetpath (names /) (tstamps /)) + (tstamp 32568D1E)) + (comp (ref RR1) + (value 9x1K) + (footprint r_pack9) + (libsource (lib device) (part RR9)) + (sheetpath (names /) (tstamps /)) + (tstamp 325679C1)) + (comp (ref P1) + (value DB25FEMELLE) + (footprint DB25FC) + (libsource (lib conn) (part DB25)) + (sheetpath (names /) (tstamps /)) + (tstamp 3256759C)) + (comp (ref R3) + (value 10K) + (footprint R3) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 324002E6)) + (comp (ref U5) + (value 628128) + (footprint DIP-32__600) + (libsource (lib memory) (part 628128)) + (sheetpath (names /) (tstamps /)) + (tstamp 3240023F)) + (comp (ref C3) + (value 47pF) + (footprint C1) + (libsource (lib device) (part C)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307ED4)) + (comp (ref C2) + (value 47pF) + (footprint C1) + (libsource (lib device) (part C)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307ECF)) + (comp (ref X1) + (value 8MHz) + (footprint HC-18UH) + (libsource (lib device) (part CRYSTAL)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307EC0)) + (comp (ref R2) + (value 1K) + (footprint R3) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307EAA)) + (comp (ref R1) + (value 100K) + (footprint R3) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307EA1)) + (comp (ref C1) + (value 47uF) + (footprint CP6) + (libsource (lib device) (part CP)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307DE2)) + (comp (ref C4) + (value 47uF) + (footprint CP6) + (libsource (lib device) (part CP)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307DCF)) + (comp (ref C5) + (value 47uF) + (footprint CP6) + (libsource (lib device) (part CP)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307DCA)) + (comp (ref C6) + (value 47uF) + (footprint CP6) + (libsource (lib device) (part CP)) + (sheetpath (names /) (tstamps /)) + (tstamp 32307DC0)) + (comp (ref U2) + (value 74LS688) + (footprint DIP-20__300) + (libsource (lib 74xx) (part 74LS688)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D35B4)) + (comp (ref U9) + (value 4003APG120) + (footprint PGA120) + (fields + (field (name price) 50$) + (field (name Field5) test)) + (libsource (lib xilinx) (part 4003APG120)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D32FA)) + (comp (ref D2) + (value LED) + (footprint LEDV) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D32BE)) + (comp (ref D1) + (value LED) + (footprint LEDV) + (libsource (lib device) (part LED)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D32AC)) + (comp (ref R5) + (value 330) + (footprint R3) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D32A0)) + (comp (ref R4) + (value 330) + (footprint R3) + (libsource (lib device) (part R)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D3295)) + (comp (ref U8) + (value EP600) + (footprint DIP-24__300) + (libsource (lib special) (part EP600)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D321C)) + (comp (ref U1) + (value 74LS245) + (footprint DIP-20__300) + (libsource (lib 74xx) (part 74LS245)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D31F4)) + (comp (ref BUS1) + (value BUSPC) + (footprint BUS_PC) + (libsource (lib conn) (part BUSPC)) + (sheetpath (names /) (tstamps /)) + (tstamp 322D3011))) + (libparts + (libpart (lib device) (part C) + (description "Condensateur non polarise") + (footprints + (fp SM*) + (fp C?) + (fp C1-1)) + (fields + (field (name Reference) C) + (field (name Value) C)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)))) + (libpart (lib device) (part CP) + (description "Condensateur polarise") + (footprints + (fp CP*) + (fp SM*)) + (fields + (field (name Reference) C) + (field (name Value) CP)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)))) + (libpart (lib device) (part CRYSTAL) + (fields + (field (name Reference) X) + (field (name Value) CRYSTAL)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)))) + (libpart (lib device) (part LED) + (footprints + (fp LED-3MM) + (fp LED-5MM) + (fp LED-10MM) + (fp LED-0603) + (fp LED-0805) + (fp LED-1206) + (fp LEDV)) + (fields + (field (name Reference) D) + (field (name Value) LED)) + (pins + (pin (num 1) (name A) (type passive)) + (pin (num 2) (name K) (type passive)))) + (libpart (lib device) (part R) + (description Resistance) + (footprints + (fp R?) + (fp SM0603) + (fp SM0805) + (fp R?-*) + (fp SM1206)) + (fields + (field (name Reference) R) + (field (name Value) R)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)))) + (libpart (lib device) (part RR9) + (fields + (field (name Reference) RR) + (field (name Value) RR9)) + (pins + (pin (num 1) (name COM) (type passive)) + (pin (num 2) (name 2) (type passive)) + (pin (num 3) (name 3) (type passive)) + (pin (num 4) (name 4) (type passive)) + (pin (num 5) (name 5) (type passive)) + (pin (num 6) (name 6) (type passive)) + (pin (num 7) (name 7) (type passive)) + (pin (num 8) (name 8) (type passive)) + (pin (num 9) (name 9) (type passive)) + (pin (num 10) (name 10) (type passive)))) + (libpart (lib conn) (part BUSPC) + (description "Connecteur BUS ISA 8 Bits") + (fields + (field (name Reference) BUS) + (field (name Value) BUSPC)) + (pins + (pin (num 1) (name GND) (type passive)) + (pin (num 2) (name RESET) (type output)) + (pin (num 3) (name VCC) (type passive)) + (pin (num 4) (name INQ2) (type passive)) + (pin (num 5) (name -5V) (type passive)) + (pin (num 6) (name DRQ2) (type passive)) + (pin (num 7) (name -12V) (type passive)) + (pin (num 8) (name UNUSED) (type passive)) + (pin (num 9) (name +12V) (type passive)) + (pin (num 10) (name GND) (type passive)) + (pin (num 11) (name MEM) (type output)) + (pin (num 12) (name MEM) (type output)) + (pin (num 13) (name IOW) (type output)) + (pin (num 14) (name IOR) (type output)) + (pin (num 15) (name DACK3) (type passive)) + (pin (num 16) (name DRQ3) (type passive)) + (pin (num 17) (name DACK1) (type passive)) + (pin (num 18) (name DRQ1) (type passive)) + (pin (num 19) (name DACK0) (type passive)) + (pin (num 20) (name CLK) (type output)) + (pin (num 21) (name IRQ7) (type passive)) + (pin (num 22) (name IRQ6) (type passive)) + (pin (num 23) (name IRQ5) (type passive)) + (pin (num 24) (name IRQ4) (type passive)) + (pin (num 25) (name IRQ3) (type passive)) + (pin (num 26) (name DACK2) (type passive)) + (pin (num 27) (name TC) (type passive)) + (pin (num 28) (name ALE) (type output)) + (pin (num 29) (name VCC) (type passive)) + (pin (num 30) (name OSC) (type output)) + (pin (num 31) (name GND) (type passive)) + (pin (num 32) (name IO) (type passive)) + (pin (num 33) (name DB7) (type 3state)) + (pin (num 34) (name DB6) (type 3state)) + (pin (num 35) (name DB5) (type 3state)) + (pin (num 36) (name DB4) (type 3state)) + (pin (num 37) (name DB3) (type 3state)) + (pin (num 38) (name DB2) (type 3state)) + (pin (num 39) (name DB1) (type 3state)) + (pin (num 40) (name DB0) (type 3state)) + (pin (num 41) (name IO_READY) (type passive)) + (pin (num 42) (name AEN) (type output)) + (pin (num 43) (name BA19) (type 3state)) + (pin (num 44) (name BA18) (type 3state)) + (pin (num 45) (name BA17) (type 3state)) + (pin (num 46) (name BA16) (type 3state)) + (pin (num 47) (name BA15) (type 3state)) + (pin (num 48) (name BA14) (type 3state)) + (pin (num 49) (name BA13) (type 3state)) + (pin (num 50) (name BA12) (type 3state)) + (pin (num 51) (name BA11) (type 3state)) + (pin (num 52) (name BA10) (type 3state)) + (pin (num 53) (name BA09) (type 3state)) + (pin (num 54) (name BA08) (type 3state)) + (pin (num 55) (name BA07) (type 3state)) + (pin (num 56) (name BA06) (type 3state)) + (pin (num 57) (name BA05) (type 3state)) + (pin (num 58) (name BA04) (type 3state)) + (pin (num 59) (name BA03) (type 3state)) + (pin (num 60) (name BA02) (type 3state)) + (pin (num 61) (name BA01) (type 3state)) + (pin (num 62) (name BA00) (type 3state)))) + (libpart (lib conn) (part CONN_8X2) + (description "ymbole general de connecteur") + (fields + (field (name Reference) P) + (field (name Value) CONN_8X2)) + (pins + (pin (num 1) (name ~) (type passive)) + (pin (num 2) (name ~) (type passive)) + (pin (num 3) (name ~) (type passive)) + (pin (num 4) (name ~) (type passive)) + (pin (num 5) (name ~) (type passive)) + (pin (num 6) (name ~) (type passive)) + (pin (num 7) (name ~) (type passive)) + (pin (num 8) (name ~) (type passive)) + (pin (num 9) (name ~) (type passive)) + (pin (num 10) (name ~) (type passive)) + (pin (num 11) (name ~) (type passive)) + (pin (num 12) (name ~) (type passive)) + (pin (num 13) (name ~) (type passive)) + (pin (num 14) (name ~) (type passive)) + (pin (num 15) (name ~) (type passive)) + (pin (num 16) (name ~) (type passive)))) + (libpart (lib conn) (part DB25) + (footprints + (fp DB25*)) + (fields + (field (name Reference) J) + (field (name Value) DB25)) + (pins + (pin (num 1) (name 1) (type passive)) + (pin (num 2) (name 2) (type passive)) + (pin (num 3) (name 3) (type passive)) + (pin (num 4) (name 4) (type passive)) + (pin (num 5) (name 5) (type passive)) + (pin (num 6) (name 6) (type passive)) + (pin (num 7) (name 7) (type passive)) + (pin (num 8) (name 8) (type passive)) + (pin (num 9) (name 9) (type passive)) + (pin (num 10) (name 10) (type passive)) + (pin (num 11) (name 11) (type passive)) + (pin (num 12) (name 12) (type passive)) + (pin (num 13) (name 13) (type passive)) + (pin (num 14) (name P14) (type passive)) + (pin (num 15) (name P15) (type passive)) + (pin (num 16) (name P16) (type passive)) + (pin (num 17) (name P17) (type passive)) + (pin (num 18) (name P18) (type passive)) + (pin (num 19) (name P19) (type passive)) + (pin (num 20) (name P20) (type passive)) + (pin (num 21) (name P21) (type passive)) + (pin (num 22) (name P22) (type passive)) + (pin (num 23) (name P23) (type passive)) + (pin (num 24) (name P24) (type passive)) + (pin (num 25) (name P25) (type passive)))) + (libpart (lib 74xx) (part 74LS245) + (description "Octal BUS Transceivers, 3 State out") + (fields + (field (name Reference) U) + (field (name Value) 74LS245)) + (pins + (pin (num 1) (name A->B) (type input)) + (pin (num 2) (name A0) (type 3state)) + (pin (num 3) (name A1) (type 3state)) + (pin (num 4) (name A2) (type 3state)) + (pin (num 5) (name A3) (type 3state)) + (pin (num 6) (name A4) (type 3state)) + (pin (num 7) (name A5) (type 3state)) + (pin (num 8) (name A6) (type 3state)) + (pin (num 9) (name A7) (type 3state)) + (pin (num 10) (name GND) (type power_in)) + (pin (num 11) (name B7) (type 3state)) + (pin (num 12) (name B6) (type 3state)) + (pin (num 13) (name B5) (type 3state)) + (pin (num 14) (name B4) (type 3state)) + (pin (num 15) (name B3) (type 3state)) + (pin (num 16) (name B2) (type 3state)) + (pin (num 17) (name B1) (type 3state)) + (pin (num 18) (name B0) (type 3state)) + (pin (num 19) (name CE) (type input)) + (pin (num 20) (name VCC) (type power_in)))) + (libpart (lib 74xx) (part 74LS541) + (description "8bits Buffer/Line Driver 3 state Out") + (fields + (field (name Reference) U) + (field (name Value) 74LS541)) + (pins + (pin (num 1) (name G1) (type input)) + (pin (num 2) (name A0) (type input)) + (pin (num 3) (name A1) (type input)) + (pin (num 4) (name A2) (type input)) + (pin (num 5) (name A3) (type input)) + (pin (num 6) (name A4) (type input)) + (pin (num 7) (name A5) (type input)) + (pin (num 8) (name A6) (type input)) + (pin (num 9) (name A7) (type input)) + (pin (num 10) (name GND) (type power_in)) + (pin (num 11) (name Y7) (type 3state)) + (pin (num 12) (name Y6) (type 3state)) + (pin (num 13) (name Y5) (type 3state)) + (pin (num 14) (name Y4) (type 3state)) + (pin (num 15) (name Y3) (type 3state)) + (pin (num 16) (name Y2) (type 3state)) + (pin (num 17) (name Y1) (type 3state)) + (pin (num 18) (name Y0) (type 3state)) + (pin (num 19) (name G2) (type input)) + (pin (num 20) (name VCC) (type power_in)))) + (libpart (lib 74xx) (part 74LS688) + (description "8 bits Comparator") + (fields + (field (name Reference) U) + (field (name Value) 74LS688)) + (pins + (pin (num 1) (name G) (type input)) + (pin (num 2) (name P0) (type input)) + (pin (num 3) (name R0) (type input)) + (pin (num 4) (name P1) (type input)) + (pin (num 5) (name R1) (type input)) + (pin (num 6) (name P2) (type input)) + (pin (num 7) (name R2) (type input)) + (pin (num 8) (name P3) (type input)) + (pin (num 9) (name R3) (type input)) + (pin (num 10) (name GND) (type power_in)) + (pin (num 11) (name P4) (type input)) + (pin (num 12) (name R4) (type input)) + (pin (num 13) (name P5) (type input)) + (pin (num 14) (name R5) (type input)) + (pin (num 15) (name P6) (type input)) + (pin (num 16) (name R6) (type input)) + (pin (num 17) (name P7) (type input)) + (pin (num 18) (name R7) (type input)) + (pin (num 19) (name P=R) (type output)) + (pin (num 20) (name VCC) (type power_in)))) + (libpart (lib memory) (part 628128) + (description "RAM 128 Ko") + (fields + (field (name Reference) U) + (field (name Value) 628128)) + (pins + (pin (num 2) (name A16) (type input)) + (pin (num 3) (name A14) (type input)) + (pin (num 4) (name A12) (type input)) + (pin (num 5) (name A7) (type input)) + (pin (num 6) (name A6) (type input)) + (pin (num 7) (name A5) (type input)) + (pin (num 8) (name A4) (type input)) + (pin (num 9) (name A3) (type input)) + (pin (num 10) (name A2) (type input)) + (pin (num 11) (name A1) (type input)) + (pin (num 12) (name A0) (type input)) + (pin (num 13) (name Q0) (type 3state)) + (pin (num 14) (name Q1) (type 3state)) + (pin (num 15) (name Q2) (type 3state)) + (pin (num 16) (name GND) (type power_in)) + (pin (num 17) (name Q3) (type 3state)) + (pin (num 18) (name Q4) (type 3state)) + (pin (num 19) (name Q5) (type 3state)) + (pin (num 20) (name Q6) (type 3state)) + (pin (num 21) (name Q7) (type 3state)) + (pin (num 22) (name CS1) (type input)) + (pin (num 23) (name A10) (type input)) + (pin (num 24) (name OE) (type input)) + (pin (num 25) (name A11) (type input)) + (pin (num 26) (name A9) (type input)) + (pin (num 27) (name A8) (type input)) + (pin (num 28) (name A13) (type input)) + (pin (num 29) (name WR) (type input)) + (pin (num 30) (name CS2) (type input)) + (pin (num 31) (name A15) (type input)) + (pin (num 32) (name VCC) (type power_in)))) + (libpart (lib xilinx) (part 4003APG120) + (fields + (field (name Reference) U) + (field (name Value) 4003APG120) + (field (name Footprint) PGA120)) + (pins + (pin (num A1) (name NC) (type passive)) + (pin (num A2) (name NC) (type passive)) + (pin (num A3) (name NC) (type passive)) + (pin (num A4) (name P) (type passive)) + (pin (num A5) (name P) (type passive)) + (pin (num A6) (name P) (type passive)) + (pin (num A7) (name P) (type passive)) + (pin (num A8) (name P) (type passive)) + (pin (num A9) (name P) (type passive)) + (pin (num A10) (name P) (type passive)) + (pin (num A11) (name P) (type passive)) + (pin (num A12) (name SGCK2) (type passive)) + (pin (num A13) (name HDC) (type output)) + (pin (num B1) (name NC) (type passive)) + (pin (num B2) (name PGCK1/A16) (type passive)) + (pin (num B3) (name P/A17) (type passive)) + (pin (num B4) (name TCK) (type passive)) + (pin (num B5) (name TMS) (type passive)) + (pin (num B6) (name P) (type passive)) + (pin (num B7) (name GND) (type power_in)) + (pin (num B8) (name P) (type passive)) + (pin (num B9) (name P) (type passive)) + (pin (num B10) (name NC) (type passive)) + (pin (num B11) (name M1) (type input)) + (pin (num B12) (name M2) (type BiDi)) + (pin (num B13) (name NC) (type passive)) + (pin (num C1) (name P/A12) (type passive)) + (pin (num C2) (name P/A14) (type passive)) + (pin (num C3) (name VCC) (type power_in)) + (pin (num C4) (name GND) (type power_in)) + (pin (num C5) (name TDI) (type passive)) + (pin (num C6) (name P) (type passive)) + (pin (num C8) (name P) (type passive)) + (pin (num C9) (name P) (type passive)) + (pin (num C10) (name GND) (type power_in)) + (pin (num C11) (name M0) (type input)) + (pin (num C12) (name PGCK2) (type passive)) + (pin (num C13) (name LDC) (type output)) + (pin (num D1) (name P/A11) (type passive)) + (pin (num D2) (name P/A13) (type passive)) + (pin (num D3) (name SGCK1) (type passive)) + (pin (num D11) (name VCC) (type power_in)) + (pin (num D12) (name P) (type passive)) + (pin (num D13) (name P) (type passive)) + (pin (num E1) (name P) (type passive)) + (pin (num E2) (name NC) (type passive)) + (pin (num E3) (name NC) (type passive)) + (pin (num E11) (name NC) (type passive)) + (pin (num E12) (name P) (type passive)) + (pin (num E13) (name P) (type passive)) + (pin (num F1) (name P/A9) (type passive)) + (pin (num F2) (name P) (type passive)) + (pin (num F3) (name P/A10) (type passive)) + (pin (num F11) (name P) (type passive)) + (pin (num F12) (name P) (type BiDi)) + (pin (num F13) (name INIT) (type BiDi)) + (pin (num G1) (name P/A8) (type passive)) + (pin (num G2) (name GND) (type power_in)) + (pin (num G11) (name GND) (type power_in)) + (pin (num G12) (name VCC) (type power_in)) + (pin (num G13) (name P) (type passive)) + (pin (num H1) (name P/A7) (type passive)) + (pin (num H2) (name P/A6) (type passive)) + (pin (num H3) (name P) (type passive)) + (pin (num H11) (name P) (type passive)) + (pin (num H12) (name P) (type passive)) + (pin (num H13) (name P) (type passive)) + (pin (num J1) (name P) (type passive)) + (pin (num J2) (name P/A4) (type passive)) + (pin (num J3) (name NC) (type passive)) + (pin (num J11) (name NC) (type passive)) + (pin (num J12) (name P) (type passive)) + (pin (num J13) (name P) (type passive)) + (pin (num K1) (name P/A5) (type passive)) + (pin (num K2) (name P/CS1/A2) (type passive)) + (pin (num K3) (name GND) (type power_in)) + (pin (num K11) (name GND) (type power_in)) + (pin (num K12) (name NC) (type passive)) + (pin (num K13) (name P) (type passive)) + (pin (num L1) (name P/A3) (type passive)) + (pin (num L2) (name P/A0/WS) (type passive)) + (pin (num L3) (name VCC) (type power_in)) + (pin (num L4) (name CCLK) (type input)) + (pin (num L5) (name NC) (type passive)) + (pin (num L6) (name P/D2) (type passive)) + (pin (num L7) (name GND) (type power_in)) + (pin (num L8) (name P) (type passive)) + (pin (num L9) (name NC) (type passive)) + (pin (num L10) (name VCC) (type power_in)) + (pin (num L11) (name DONE) (type output)) + (pin (num L12) (name SGCK3) (type passive)) + (pin (num L13) (name P) (type passive)) + (pin (num M1) (name NC) (type passive)) + (pin (num M2) (name TDO) (type passive)) + (pin (num M3) (name DOUT-SGKC4) (type output)) + (pin (num M4) (name NC) (type passive)) + (pin (num M5) (name P/D1) (type passive)) + (pin (num M6) (name P) (type passive)) + (pin (num M7) (name VCC) (type power_in)) + (pin (num M8) (name P/D4) (type passive)) + (pin (num M9) (name P/D5) (type passive)) + (pin (num M10) (name P/D6) (type passive)) + (pin (num M11) (name P/D7) (type passive)) + (pin (num M12) (name PROG) (type input)) + (pin (num N1) (name PGCK4/A1) (type passive)) + (pin (num N2) (name DIN) (type BiDi)) + (pin (num N3) (name P/RCLK/BSY/RDY) (type passive)) + (pin (num N4) (name P) (type passive)) + (pin (num N5) (name P) (type passive)) + (pin (num N6) (name P/RS) (type passive)) + (pin (num N7) (name P/D3) (type passive)) + (pin (num N8) (name P) (type passive)) + (pin (num N9) (name P) (type passive)) + (pin (num N10) (name P/CS0) (type passive)) + (pin (num N11) (name P) (type passive)) + (pin (num N12) (name NC) (type passive)) + (pin (num N13) (name PGCK3) (type passive)))) + (libpart (lib special) (part EP600) + (fields + (field (name Reference) U) + (field (name Value) EP600)) + (pins + (pin (num 1) (name CLK1) (type input)) + (pin (num 2) (name IN2) (type input)) + (pin (num 3) (name I/O3) (type passive)) + (pin (num 4) (name I/O4) (type passive)) + (pin (num 5) (name I/O5) (type passive)) + (pin (num 6) (name I/O6) (type passive)) + (pin (num 7) (name I/O7) (type passive)) + (pin (num 8) (name I/O8) (type passive)) + (pin (num 9) (name I/O9) (type passive)) + (pin (num 10) (name I/O10) (type passive)) + (pin (num 11) (name IN11) (type input)) + (pin (num 12) (name GND) (type input)) + (pin (num 13) (name CLK2) (type input)) + (pin (num 14) (name IN14) (type input)) + (pin (num 15) (name I/O15) (type passive)) + (pin (num 16) (name I/O16) (type passive)) + (pin (num 17) (name I/O17) (type passive)) + (pin (num 18) (name I/O18) (type passive)) + (pin (num 19) (name I/O19) (type passive)) + (pin (num 20) (name I/O20) (type passive)) + (pin (num 21) (name I/O21) (type passive)) + (pin (num 22) (name I/O22) (type passive)) + (pin (num 23) (name IN23) (type input)) + (pin (num 24) (name VCC) (type input))))) + (libraries + (library (logical device) + (uri F:\kicad\share\library\device.lib)) + (library (logical conn) + (uri F:\kicad\share\library\conn.lib)) + (library (logical 74xx) + (uri F:\kicad\share\library\74xx.lib)) + (library (logical memory) + (uri F:\kicad\share\library\memory.lib)) + (library (logical xilinx) + (uri F:\kicad\share\library\xilinx.lib)) + (library (logical special) + (uri F:\kicad\share\library\special.lib))) + (nets + (net (code 1) (name "") + (node (ref BUS1) (pin 28))) + (net (code 2) (name "") + (node (ref BUS1) (pin 27))) + (net (code 3) (name "") + (node (ref BUS1) (pin 26))) + (net (code 4) (name "") + (node (ref BUS1) (pin 25))) + (net (code 5) (name "") + (node (ref BUS1) (pin 24))) + (net (code 6) (name "") + (node (ref BUS1) (pin 23))) + (net (code 7) (name "") + (node (ref BUS1) (pin 22))) + (net (code 8) (name "") + (node (ref BUS1) (pin 21))) + (net (code 9) (name "") + (node (ref BUS1) (pin 20))) + (net (code 10) (name "") + (node (ref BUS1) (pin 19))) + (net (code 11) (name "") + (node (ref BUS1) (pin 18))) + (net (code 12) (name "") + (node (ref BUS1) (pin 17))) + (net (code 13) (name "") + (node (ref BUS1) (pin 16))) + (net (code 14) (name "") + (node (ref BUS1) (pin 15))) + (net (code 15) (name /PC-RST) + (node (ref BUS1) (pin 2)) + (node (ref U3) (pin 8)) + (node (ref U3) (pin 9))) + (net (code 16) (name /PC-IOR) + (node (ref BUS1) (pin 14)) + (node (ref U3) (pin 7))) + (net (code 17) (name /PC-IOW) + (node (ref U3) (pin 6)) + (node (ref BUS1) (pin 13))) + (net (code 18) (name "") + (node (ref BUS1) (pin 12))) + (net (code 19) (name /PC-A1) + (node (ref BUS1) (pin 61)) + (node (ref U9) (pin N4)) + (node (ref U3) (pin 2))) + (net (code 20) (name /PC-A0) + (node (ref U9) (pin M6)) + (node (ref BUS1) (pin 62)) + (node (ref U3) (pin 3))) + (net (code 21) (name GND) + (node (ref P1) (pin 18)) + (node (ref U9) (pin G11)) + (node (ref U9) (pin K11)) + (node (ref U9) (pin C10)) + (node (ref U9) (pin G2)) + (node (ref BUS1) (pin 1)) + (node (ref D2) (pin 2)) + (node (ref U1) (pin 10)) + (node (ref U9) (pin C4)) + (node (ref P1) (pin 20)) + (node (ref D1) (pin 2)) + (node (ref U9) (pin K3)) + (node (ref U8) (pin 1)) + (node (ref U9) (pin L7)) + (node (ref U9) (pin B7)) + (node (ref JP1) (pin 13)) + (node (ref JP1) (pin 11)) + (node (ref P1) (pin 25)) + (node (ref U5) (pin 16)) + (node (ref P1) (pin 24)) + (node (ref P1) (pin 23)) + (node (ref JP1) (pin 15)) + (node (ref U8) (pin 12)) + (node (ref P1) (pin 22)) + (node (ref P1) (pin 21)) + (node (ref C1) (pin 2)) + (node (ref C4) (pin 2)) + (node (ref C5) (pin 2)) + (node (ref C6) (pin 2)) + (node (ref U2) (pin 10)) + (node (ref C3) (pin 2)) + (node (ref U3) (pin 10)) + (node (ref U3) (pin 19)) + (node (ref U3) (pin 1)) + (node (ref JP1) (pin 7)) + (node (ref JP1) (pin 5)) + (node (ref JP1) (pin 3)) + (node (ref JP1) (pin 1)) + (node (ref C2) (pin 2)) + (node (ref BUS1) (pin 31)) + (node (ref P1) (pin 19)) + (node (ref JP1) (pin 9))) + (net (code 22) (name VCC) + (node (ref C1) (pin 1)) + (node (ref C4) (pin 1)) + (node (ref U8) (pin 24)) + (node (ref C5) (pin 1)) + (node (ref U8) (pin 23)) + (node (ref C6) (pin 1)) + (node (ref U2) (pin 20)) + (node (ref U9) (pin B12)) + (node (ref U9) (pin L3)) + (node (ref U9) (pin M7)) + (node (ref U3) (pin 20)) + (node (ref U9) (pin D11)) + (node (ref U1) (pin 20)) + (node (ref U9) (pin C11)) + (node (ref U9) (pin B11)) + (node (ref R3) (pin 2)) + (node (ref BUS1) (pin 3)) + (node (ref BUS1) (pin 29)) + (node (ref U9) (pin G12)) + (node (ref U5) (pin 32)) + (node (ref U9) (pin C3)) + (node (ref U9) (pin L10)) + (node (ref RR1) (pin 1))) + (net (code 23) (name /PC-AEN) + (node (ref U9) (pin N10)) + (node (ref BUS1) (pin 42)) + (node (ref U2) (pin 1))) + (net (code 24) (name "") + (node (ref BUS1) (pin 43))) + (net (code 25) (name "") + (node (ref BUS1) (pin 11))) + (net (code 26) (name "") + (node (ref BUS1) (pin 10))) + (net (code 27) (name "") + (node (ref BUS1) (pin 9))) + (net (code 28) (name "") + (node (ref BUS1) (pin 8))) + (net (code 29) (name "") + (node (ref BUS1) (pin 7))) + (net (code 30) (name "") + (node (ref BUS1) (pin 6))) + (net (code 31) (name "") + (node (ref BUS1) (pin 5))) + (net (code 32) (name "") + (node (ref BUS1) (pin 4))) + (net (code 33) (name "") + (node (ref BUS1) (pin 50))) + (net (code 34) (name "") + (node (ref BUS1) (pin 49))) + (net (code 35) (name "") + (node (ref BUS1) (pin 48))) + (net (code 36) (name "") + (node (ref BUS1) (pin 47))) + (net (code 37) (name "") + (node (ref BUS1) (pin 46))) + (net (code 38) (name "") + (node (ref BUS1) (pin 45))) + (net (code 39) (name "") + (node (ref BUS1) (pin 44))) + (net (code 40) (name "") + (node (ref BUS1) (pin 41))) + (net (code 41) (name "") + (node (ref BUS1) (pin 32))) + (net (code 42) (name "") + (node (ref BUS1) (pin 30))) + (net (code 43) (name "") + (node (ref U9) (pin B5))) + (net (code 44) (name "") + (node (ref U9) (pin A3))) + (net (code 45) (name "") + (node (ref U9) (pin B4))) + (net (code 46) (name "") + (node (ref U9) (pin C5))) + (net (code 47) (name "") + (node (ref U9) (pin A2))) + (net (code 48) (name "") + (node (ref U9) (pin A1))) + (net (code 49) (name "") + (node (ref U9) (pin B1))) + (net (code 50) (name "") + (node (ref U9) (pin E3))) + (net (code 51) (name "") + (node (ref U9) (pin E2))) + (net (code 52) (name /MA8) + (node (ref U9) (pin G1)) + (node (ref U5) (pin 27))) + (net (code 53) (name /MD4) + (node (ref U9) (pin A7)) + (node (ref U5) (pin 18))) + (net (code 54) (name /MA13) + (node (ref U5) (pin 28)) + (node (ref U9) (pin C1))) + (net (code 55) (name /MD5) + (node (ref U9) (pin A8)) + (node (ref U5) (pin 19))) + (net (code 56) (name /WR-) + (node (ref U5) (pin 29)) + (node (ref U9) (pin A13))) + (net (code 57) (name /MD3) + (node (ref U5) (pin 17)) + (node (ref U9) (pin A6))) + (net (code 58) (name "") + (node (ref U8) (pin 10))) + (net (code 59) (name "") + (node (ref U8) (pin 9))) + (net (code 60) (name "") + (node (ref U8) (pin 8))) + (net (code 61) (name /RSTL) + (node (ref U3) (pin 12)) + (node (ref U8) (pin 11))) + (net (code 62) (name "") + (node (ref U3) (pin 11))) + (net (code 63) (name /MA16) + (node (ref U9) (pin C8)) + (node (ref U5) (pin 2))) + (net (code 64) (name /MA14) + (node (ref U5) (pin 3)) + (node (ref U9) (pin D1))) + (net (code 65) (name /MA12) + (node (ref U9) (pin F3)) + (node (ref U5) (pin 4))) + (net (code 66) (name /MA7) + (node (ref U5) (pin 5)) + (node (ref U9) (pin B3))) + (net (code 67) (name /MA6) + (node (ref U9) (pin F2)) + (node (ref U5) (pin 6))) + (net (code 68) (name /MA5) + (node (ref U9) (pin C13)) + (node (ref U5) (pin 7))) + (net (code 69) (name /MA4) + (node (ref U9) (pin E1)) + (node (ref U5) (pin 8))) + (net (code 70) (name /MA3) + (node (ref U5) (pin 9)) + (node (ref U9) (pin C2))) + (net (code 71) (name /MD6) + (node (ref U9) (pin A9)) + (node (ref U5) (pin 20))) + (net (code 72) (name "") + (node (ref R3) (pin 1)) + (node (ref U5) (pin 30))) + (net (code 73) (name /MD7) + (node (ref U5) (pin 21)) + (node (ref U9) (pin B8))) + (net (code 74) (name /MA15) + (node (ref U5) (pin 31)) + (node (ref U9) (pin F1))) + (net (code 75) (name /MA0) + (node (ref U5) (pin 12)) + (node (ref U9) (pin A11))) + (net (code 76) (name /CS1-) + (node (ref U9) (pin A10)) + (node (ref U5) (pin 22))) + (net (code 77) (name /MD0) + (node (ref U9) (pin C6)) + (node (ref U5) (pin 13))) + (net (code 78) (name /MA10) + (node (ref U5) (pin 23)) + (node (ref U9) (pin C9))) + (net (code 79) (name /MD1) + (node (ref U5) (pin 14)) + (node (ref U9) (pin A5))) + (net (code 80) (name /OE-) + (node (ref U5) (pin 24)) + (node (ref U9) (pin B9))) + (net (code 81) (name /MD2) + (node (ref U5) (pin 15)) + (node (ref U9) (pin B6))) + (net (code 82) (name /MA11) + (node (ref U5) (pin 25)) + (node (ref U9) (pin D2))) + (net (code 83) (name /MA9) + (node (ref U5) (pin 26)) + (node (ref U9) (pin A4))) + (net (code 84) (name /DIR) + (node (ref U8) (pin 17)) + (node (ref U1) (pin 1))) + (net (code 85) (name /ENBBUF) + (node (ref U8) (pin 22)) + (node (ref U1) (pin 19))) + (net (code 86) (name /PC-RD) + (node (ref U8) (pin 14)) + (node (ref U3) (pin 13)) + (node (ref U9) (pin M8))) + (net (code 87) (name /SEL_LPT) + (node (ref U8) (pin 18)) + (node (ref U9) (pin L2))) + (net (code 88) (name /PC-DB0) + (node (ref U1) (pin 2)) + (node (ref BUS1) (pin 40))) + (net (code 89) (name /PC-DB1) + (node (ref U1) (pin 3)) + (node (ref BUS1) (pin 39))) + (net (code 90) (name /PC-DB2) + (node (ref U1) (pin 4)) + (node (ref BUS1) (pin 38))) + (net (code 91) (name /PC-DB3) + (node (ref U1) (pin 5)) + (node (ref BUS1) (pin 37))) + (net (code 92) (name /PC-DB4) + (node (ref BUS1) (pin 36)) + (node (ref U1) (pin 6))) + (net (code 93) (name /PC-DB5) + (node (ref U1) (pin 7)) + (node (ref BUS1) (pin 35))) + (net (code 94) (name /PC-DB6) + (node (ref U1) (pin 8)) + (node (ref BUS1) (pin 34))) + (net (code 95) (name /PC-DB7) + (node (ref BUS1) (pin 33)) + (node (ref U1) (pin 9))) + (net (code 96) (name /D7) + (node (ref U9) (pin L12)) + (node (ref U1) (pin 11))) + (net (code 97) (name /D6) + (node (ref U9) (pin M11)) + (node (ref U1) (pin 12))) + (net (code 98) (name /D5) + (node (ref U9) (pin N11)) + (node (ref U1) (pin 13))) + (net (code 99) (name /D4) + (node (ref U9) (pin M10)) + (node (ref U1) (pin 14))) + (net (code 100) (name /D3) + (node (ref U9) (pin M9)) + (node (ref U1) (pin 15))) + (net (code 101) (name /D2) + (node (ref U1) (pin 16)) + (node (ref U9) (pin N9))) + (net (code 102) (name /D1) + (node (ref U1) (pin 17)) + (node (ref U9) (pin N8))) + (net (code 103) (name "") + (node (ref D2) (pin 1)) + (node (ref R5) (pin 1))) + (net (code 104) (name "") + (node (ref U9) (pin B13))) + (net (code 105) (name /LED2) + (node (ref R5) (pin 2)) + (node (ref U9) (pin F13))) + (net (code 106) (name /D0) + (node (ref U8) (pin 21)) + (node (ref U9) (pin N2)) + (node (ref U1) (pin 18))) + (net (code 107) (name "") + (node (ref D1) (pin 1)) + (node (ref R4) (pin 1))) + (net (code 108) (name "") + (node (ref U3) (pin 18)) + (node (ref U8) (pin 3))) + (net (code 109) (name "") + (node (ref U3) (pin 17)) + (node (ref U8) (pin 4))) + (net (code 110) (name "") + (node (ref U3) (pin 16)) + (node (ref U8) (pin 5))) + (net (code 111) (name "") + (node (ref U3) (pin 15)) + (node (ref U8) (pin 6))) + (net (code 112) (name /PC-WR) + (node (ref U8) (pin 7)) + (node (ref U9) (pin N6)) + (node (ref U3) (pin 14))) + (net (code 113) (name /PC-A6) + (node (ref U9) (pin J1)) + (node (ref BUS1) (pin 56)) + (node (ref U2) (pin 15))) + (net (code 114) (name /PC-A9) + (node (ref U9) (pin N7)) + (node (ref BUS1) (pin 53)) + (node (ref U2) (pin 6))) + (net (code 115) (name /PC-A8) + (node (ref U2) (pin 4)) + (node (ref U9) (pin H1)) + (node (ref BUS1) (pin 54))) + (net (code 116) (name /PC-A7) + (node (ref BUS1) (pin 55)) + (node (ref U9) (pin H2)) + (node (ref U2) (pin 13))) + (net (code 117) (name /PC-A5) + (node (ref BUS1) (pin 57)) + (node (ref U2) (pin 2)) + (node (ref U9) (pin J2))) + (net (code 118) (name /PC-A4) + (node (ref BUS1) (pin 58)) + (node (ref U9) (pin H3)) + (node (ref U2) (pin 17))) + (net (code 119) (name /PC-A3) + (node (ref U3) (pin 5)) + (node (ref U9) (pin K2)) + (node (ref BUS1) (pin 59))) + (net (code 120) (name /PC-A2) + (node (ref U3) (pin 4)) + (node (ref U9) (pin M5)) + (node (ref BUS1) (pin 60))) + (net (code 121) (name /PC-A11) + (node (ref U2) (pin 8)) + (node (ref BUS1) (pin 51))) + (net (code 122) (name /PC-A10) + (node (ref U9) (pin L8)) + (node (ref BUS1) (pin 52)) + (node (ref U2) (pin 11))) + (net (code 123) (name /LED1) + (node (ref U9) (pin M3)) + (node (ref R4) (pin 2))) + (net (code 124) (name "") + (node (ref U9) (pin M2))) + (net (code 125) (name /MA2) + (node (ref U9) (pin D3)) + (node (ref U5) (pin 10))) + (net (code 126) (name "") + (node (ref U9) (pin J3))) + (net (code 127) (name "") + (node (ref U9) (pin N3))) + (net (code 128) (name /CLKLCA) + (node (ref U8) (pin 16)) + (node (ref U9) (pin L4)) + (node (ref U9) (pin M4))) + (net (code 129) (name "") + (node (ref U9) (pin L5))) + (net (code 130) (name "") + (node (ref U9) (pin N5))) + (net (code 131) (name /MATCHL) + (node (ref U2) (pin 19)) + (node (ref U8) (pin 2))) + (net (code 132) (name "") + (node (ref U9) (pin M1))) + (net (code 133) (name "") + (node (ref U9) (pin N1))) + (net (code 134) (name /MA1) + (node (ref U5) (pin 11)) + (node (ref U9) (pin B2))) + (net (code 135) (name "") + (node (ref U9) (pin E11))) + (net (code 136) (name "") + (node (ref U9) (pin J11))) + (net (code 137) (name /DONE) + (node (ref U8) (pin 20)) + (node (ref U9) (pin L11))) + (net (code 138) (name "") + (node (ref U9) (pin K12))) + (net (code 139) (name /PROG-) + (node (ref U8) (pin 19)) + (node (ref U9) (pin M12))) + (net (code 140) (name "") + (node (ref U9) (pin N12))) + (net (code 141) (name "") + (node (ref U9) (pin L6))) + (net (code 142) (name "") + (node (ref U9) (pin L9))) + (net (code 143) (name "") + (node (ref U9) (pin B10))) + (net (code 144) (name /WR_REG) + (node (ref U8) (pin 13)) + (node (ref U8) (pin 15))) + (net (code 145) (name "") + (node (ref X1) (pin 1)) + (node (ref C2) (pin 1)) + (node (ref R1) (pin 2)) + (node (ref U9) (pin L1))) + (net (code 146) (name "") + (node (ref X1) (pin 2)) + (node (ref R1) (pin 1)) + (node (ref C3) (pin 1)) + (node (ref R2) (pin 2))) + (net (code 147) (name /BIT6) + (node (ref U9) (pin J13)) + (node (ref P1) (pin 8))) + (net (code 148) (name /BIT7) + (node (ref P1) (pin 9)) + (node (ref U9) (pin H11))) + (net (code 149) (name /ACK) + (node (ref P1) (pin 10)) + (node (ref U9) (pin K13))) + (net (code 150) (name /BUST+) + (node (ref U9) (pin J12)) + (node (ref P1) (pin 11))) + (net (code 151) (name /PE+) + (node (ref P1) (pin 12)) + (node (ref U9) (pin L13))) + (net (code 152) (name /SLCT+) + (node (ref P1) (pin 13)) + (node (ref U9) (pin N13))) + (net (code 153) (name /BIT5) + (node (ref U9) (pin H12)) + (node (ref P1) (pin 7))) + (net (code 154) (name /8MH-OUT) + (node (ref R2) (pin 1)) + (node (ref U9) (pin K1))) + (net (code 155) (name "") + (node (ref RR1) (pin 10))) + (net (code 156) (name /STROBE) + (node (ref P1) (pin 1)) + (node (ref U9) (pin A12))) + (net (code 157) (name /AUTOFD-) + (node (ref P1) (pin 14)) + (node (ref U9) (pin C12))) + (net (code 158) (name /ERROR-) + (node (ref P1) (pin 15)) + (node (ref U9) (pin D13))) + (net (code 159) (name /BIT2) + (node (ref U9) (pin F12)) + (node (ref P1) (pin 4))) + (net (code 160) (name /INIT-) + (node (ref P1) (pin 16)) + (node (ref U9) (pin E12))) + (net (code 161) (name /SLCTIN-) + (node (ref P1) (pin 17)) + (node (ref U9) (pin F11))) + (net (code 162) (name /BIT0) + (node (ref U9) (pin D12)) + (node (ref P1) (pin 2))) + (net (code 163) (name /BIT1) + (node (ref P1) (pin 3)) + (node (ref U9) (pin E13))) + (net (code 164) (name /BIT3) + (node (ref U9) (pin G13)) + (node (ref P1) (pin 5))) + (net (code 165) (name /BIT4) + (node (ref P1) (pin 6)) + (node (ref U9) (pin H13))) + (net (code 166) (name /REF10) + (node (ref U2) (pin 12)) + (node (ref JP1) (pin 2)) + (node (ref RR1) (pin 9))) + (net (code 167) (name /REF11) + (node (ref JP1) (pin 4)) + (node (ref RR1) (pin 8)) + (node (ref U2) (pin 9))) + (net (code 168) (name /REF7) + (node (ref JP1) (pin 6)) + (node (ref RR1) (pin 7)) + (node (ref U2) (pin 14))) + (net (code 169) (name /REF9) + (node (ref JP1) (pin 8)) + (node (ref U2) (pin 7)) + (node (ref RR1) (pin 6))) + (net (code 170) (name /REF6) + (node (ref U2) (pin 16)) + (node (ref RR1) (pin 5)) + (node (ref JP1) (pin 10))) + (net (code 171) (name /REF8) + (node (ref RR1) (pin 4)) + (node (ref U2) (pin 5)) + (node (ref JP1) (pin 12))) + (net (code 172) (name /REF4) + (node (ref RR1) (pin 3)) + (node (ref U2) (pin 18)) + (node (ref JP1) (pin 14))) + (net (code 173) (name /REF5) + (node (ref JP1) (pin 16)) + (node (ref RR1) (pin 2)) + (node (ref U2) (pin 3))))) \ No newline at end of file diff --git a/demos/interf_u/interf_u.sch b/demos/interf_u/interf_u.sch index ce1eb3feb0..4cdaa086ef 100644 --- a/demos/interf_u/interf_u.sch +++ b/demos/interf_u/interf_u.sch @@ -27,7 +27,7 @@ Comment3 "Comment 3" Comment4 "Comment 4" $EndDescr $Bitmap -Pos 9250 10500 +Pos 9350 10600 Scale 1,000000 Data 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 E5 00 00 01 0E 08 02 00 00 00 F9 5F 47 @@ -1181,7 +1181,7 @@ BF FD 96 77 9E 38 7E F1 EC E1 55 E2 AF 2F E0 1B 5F F9 FC FE BD 4F B9 56 EB C9 C9 29 65 D5 9A 89 35 EB 37 F6 E3 02 4F 95 57 89 BF 1E 63 D9 CA D5 CB 7E 65 BC F3 FF E1 D5 7A 1F CE A2 94 8E 79 E6 79 49 E6 FD 75 9E B9 C4 BC BF CE 33 97 98 F7 D7 79 E6 12 F3 FE 3A CF 5C E2 E7 E2 03 93 93 93 FD BA 8E 79 E6 39 19 8E FB EB DC 15 0B E6 F9 D5 61 7E 3F 30 CF 5C 62 DE 5F E7 99 4B -FC 1F 94 BD 62 D3 EE A5 8B 6B 00 00 00 00 49 45 4E 44 AE 42 60 82 11 +FC 1F 94 BD 62 D3 EE A5 8B 6B 00 00 00 00 49 45 4E 44 AE 42 60 82 10 EndData $EndBitmap Wire Bus Line @@ -1794,7 +1794,7 @@ U 1 1 4A087146 P 5250 1950 F 0 "U3" H 5250 2525 60 0000 C BNN F 1 "74LS541" H 5250 1375 60 0000 C TNN -F 2 "" H 5250 1950 60 0001 C CNN +F 2 "DIP-20__300" H 5250 1250 60 0000 C CNN F 3 "" H 5250 1950 60 0001 C CNN 1 5250 1950 1 0 0 -1 @@ -2049,7 +2049,7 @@ U 1 1 32568D1E P 1700 7250 F 0 "JP1" H 1700 7750 70 0000 C CNN F 1 "CONN_8X2" V 1700 7250 70 0000 C CNN -F 2 "pin_array_8x2" H 1700 7800 60 0000 C CNN +F 2 "pin_array_8x2" H 1700 7850 60 0000 C CNN F 3 "" H 1700 7250 60 0001 C CNN 1 1700 7250 1 0 0 1 @@ -2384,7 +2384,7 @@ U 1 1 3240023F P 7700 9050 F 0 "U5" H 7750 10200 70 0000 C CNN F 1 "628128" H 7700 7900 70 0000 C CNN -F 2 "32dip600" H 7700 7800 60 0000 C CNN +F 2 "DIP-32__600" H 7700 7800 60 0000 C CNN F 3 "" H 7700 9050 60 0001 C CNN 1 7700 9050 1 0 0 -1 @@ -2742,7 +2742,7 @@ U 1 1 322D35B4 P 4600 6900 F 0 "U2" H 4600 7850 60 0000 C CNN F 1 "74LS688" H 4600 5950 60 0000 C CIB -F 2 "20dip300" H 4600 5850 60 0000 C CNB +F 2 "DIP-20__300" H 4600 5850 60 0000 C CNB F 3 "" H 4600 6900 60 0001 C CNN 1 4600 6900 1 0 0 -1 @@ -2809,8 +2809,8 @@ L EP600 U8 U 1 1 322D321C P 7650 1800 F 0 "U8" H 7650 1900 70 0000 C CNN -F 1 "EP600" H 7650 1300 70 0000 C CNN -F 2 "24dip300" H 7700 1000 60 0000 C CNN +F 1 "EP600" H 7650 850 70 0000 C CNN +F 2 "DIP-24__300" H 7700 750 60 0000 C CNN F 3 "" H 7650 1800 60 0001 C CNN 1 7650 1800 1 0 0 -1 @@ -2821,7 +2821,7 @@ U 1 1 322D31F4 P 5200 3600 F 0 "U1" H 5300 4175 60 0000 L BNN F 1 "74LS245" H 5250 3025 60 0000 L TNN -F 2 "20dip300" H 5350 3100 60 0000 C CNN +F 2 "DIP-20__300" H 5400 2900 60 0000 C CNN F 3 "" H 5200 3600 60 0001 C CNN 1 5200 3600 1 0 0 -1 @@ -2830,9 +2830,9 @@ $Comp L BUSPC BUS1 U 1 1 322D3011 P 2250 2950 -F 0 "BUS1" H 2250 3050 70 0000 C CNN -F 1 "BUSPC" H 2250 2850 70 0000 C CNN -F 2 "BUS_PC" H 2250 1250 60 0000 C CNN +F 0 "BUS1" H 2200 4600 70 0000 C CNN +F 1 "BUSPC" H 2200 1250 70 0000 C CNN +F 2 "BUS_PC" H 2202 1160 60 0000 C CNN F 3 "" H 2250 2950 60 0001 C CNN 1 2250 2950 1 0 0 -1 diff --git a/include/reporter.h b/include/reporter.h index 5c88de6449..0fcbb7eec7 100644 --- a/include/reporter.h +++ b/include/reporter.h @@ -47,9 +47,18 @@ class wxTextCtrl; *
  • know too much about the caller's UI, i.e. wx.
  • *
  • stop after the first error
  • * + * the reporter has 3 levels (flags) for filtering: + * no filter + * report warning + * report errors + * They are indicators for the calling code, filtering is not made here */ class REPORTER { + bool m_reportAll; // Filter flag: set to true to report all messages + bool m_reportWarnings; // Filter flag: set to true to report warning + bool m_reportErrors; // Filter flag: set to true to report errors + public: /** * Function Report @@ -68,6 +77,41 @@ public: REPORTER& operator <<( wxChar aChar ) { return Report( wxString( aChar ) ); } REPORTER& operator <<( const char* aText ) { return Report( aText ); } + + /** + * Returns true if all messages should be reported + */ + bool ReportAll() { return m_reportAll; } + + /** + * Returns true if all messages or warning messages should be reported + */ + bool ReportWarnings() { return m_reportAll | m_reportWarnings; } + + /** + * Returns true if all messages or error messages should be reported + */ + bool ReportErrors() { return m_reportAll | m_reportErrors; } + + /** + * Set the report filter state, for all messages + * @param aEnable = filter state (true/false) + */ + void SetReportAll( bool aEnable) { m_reportAll = aEnable; } + + /** + * Set the report filter state, for warning messages + * note: report can be disable only if m_reportAll = false + * @param aEnable = filter state (true/false) + */ + void SetReportWarnings( bool aEnable) { m_reportWarnings = aEnable; } + + /** + * Set the report filter state, for error messages + * note: report can be disable only if m_reportAll = false + * @param aEnable = filter state (true/false) + */ + void SetReportErrors( bool aEnable) { m_reportErrors = aEnable; } }; @@ -84,6 +128,9 @@ public: REPORTER(), m_textCtrl( aTextCtrl ) { + SetReportAll( true ); + SetReportWarnings( true ); + SetReportErrors( true ); } REPORTER& Report( const wxString& aText ); diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index 47a1df6ccb..c6c18742aa 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2368,7 +2368,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) { component = aNetlist.GetComponent( i ); - if( aReporter ) + if( aReporter && aReporter->ReportAll() ) { msg.Printf( _( "Checking netlist component footprint \"%s:%s:%s\".\n" ), GetChars( component->GetReference() ), @@ -2387,18 +2387,26 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) if( aReporter ) { if( component->GetModule() != NULL ) + { msg.Printf( _( "Adding new component \"%s:%s\" footprint \"%s\".\n" ), GetChars( component->GetReference() ), GetChars( component->GetTimeStamp() ), GetChars( component->GetFootprintName() ) ); + + if( aReporter->ReportWarnings() ) + aReporter->Report( msg ); + } else + { msg.Printf( _( "Cannot add new component \"%s:%s\" due to missing " "footprint \"%s\".\n" ), GetChars( component->GetReference() ), GetChars( component->GetTimeStamp() ), GetChars( component->GetFootprintName() ) ); - aReporter->Report( msg ); + if( aReporter->ReportErrors() ) + aReporter->Report( msg ); + } } if( !aNetlist.IsDryRun() && (component->GetModule() != NULL) ) @@ -2422,20 +2430,28 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) if( aReporter ) { if( component->GetModule() != NULL ) + { msg.Printf( _( "Replacing component \"%s:%s\" footprint \"%s\" with " "\"%s\".\n" ), GetChars( footprint->GetReference() ), GetChars( footprint->GetPath() ), GetChars( footprint->GetLibRef() ), GetChars( component->GetFootprintName() ) ); + + if( aReporter->ReportWarnings() ) + aReporter->Report( msg ); + } else + { msg.Printf( _( "Cannot replace component \"%s:%s\" due to missing " "footprint \"%s\".\n" ), GetChars( footprint->GetReference() ), GetChars( footprint->GetPath() ), GetChars( component->GetFootprintName() ) ); - aReporter->Report( msg ); + if( aReporter->ReportErrors() ) + aReporter->Report( msg ); + } } if( !aNetlist.IsDryRun() && (component->GetModule() != NULL) ) @@ -2459,7 +2475,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) // Test for reference designator field change. if( footprint->GetReference() != component->GetReference() ) { - if( aReporter ) + if( aReporter && aReporter->ReportWarnings()) { msg.Printf( _( "Changing footprint \"%s:%s\" reference to \"%s\".\n" ), GetChars( footprint->GetReference() ), @@ -2475,7 +2491,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) // Test for value field change. if( footprint->GetValue() != component->GetValue() ) { - if( aReporter ) + if( aReporter && aReporter->ReportAll() ) { msg.Printf( _( "Changing footprint \"%s:%s\" value from \"%s\" to \"%s\".\n" ), GetChars( footprint->GetReference() ), @@ -2492,7 +2508,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) // Test for time stamp change. if( footprint->GetPath() != component->GetTimeStamp() ) { - if( aReporter ) + if( aReporter && aReporter->ReportWarnings() ) { msg.Printf( _( "Changing footprint path \"%s:%s\" to \"%s\".\n" ), GetChars( footprint->GetReference() ), @@ -2518,7 +2534,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) { if( !pad->GetNetname().IsEmpty() ) { - if( aReporter ) + if( aReporter && aReporter->ReportAll() ) { msg.Printf( _( "Clearing component \"%s:%s\" pin \"%s\" net name.\n" ), GetChars( footprint->GetReference() ), @@ -2535,7 +2551,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) { if( net.GetNetName() != pad->GetNetname() ) { - if( aReporter ) + if( aReporter && aReporter->ReportAll() ) { msg.Printf( _( "Changing component \"%s:%s\" pin \"%s\" net name from " "\"%s\" to \"%s\".\n" ), @@ -2573,7 +2589,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) if( component == NULL ) { - if( aReporter ) + if( aReporter && aReporter->ReportWarnings() ) { msg.Printf( _( "Removing footprint \"%s:%s\".\n" ), GetChars( module->GetReference() ), diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 6284cf2cdf..19d70b36b3 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -46,6 +46,7 @@ #include #define NETLIST_SILENTMODE_KEY wxT("SilentMode") +#define NETLIST_FULLMESSAGES_KEY wxT("NetlistReportAllMsg") void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) { @@ -95,9 +96,11 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC, m_dc = aDC; m_config = wxGetApp().GetSettings(); m_silentMode = m_config->Read( NETLIST_SILENTMODE_KEY, 0l ); + m_reportAll = m_config->Read( NETLIST_FULLMESSAGES_KEY, 1l ); m_NetlistFilenameCtrl->SetValue( aNetlistFullFilename ); m_cmpNameSourceOpt->SetSelection( m_parent->GetUseCmpFileForFpNames() ? 1 : 0 ); m_checkBoxSilentMode->SetValue( m_silentMode ); + m_checkBoxFullMessages->SetValue( m_reportAll ); GetSizer()->SetSizeHints( this ); } @@ -105,6 +108,7 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC, DIALOG_NETLIST::~DIALOG_NETLIST() { m_config->Write( NETLIST_SILENTMODE_KEY, (long) m_silentMode ); + m_config->Write( NETLIST_FULLMESSAGES_KEY, (long) m_reportAll ); } void DIALOG_NETLIST::OnOpenNetlistClick( wxCommandEvent& event ) @@ -176,6 +180,7 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event ) } WX_TEXT_CTRL_REPORTER reporter( m_MessageWindow ); + reporter.SetReportAll( m_reportAll ); m_parent->ReadPcbNetlist( netlistFileName, cmpFileName, &reporter, m_ChangeExistingFootprintCtrl->GetSelection() == 1, diff --git a/pcbnew/dialogs/dialog_netlist.h b/pcbnew/dialogs/dialog_netlist.h index 800926c8ce..475588bce0 100644 --- a/pcbnew/dialogs/dialog_netlist.h +++ b/pcbnew/dialogs/dialog_netlist.h @@ -40,7 +40,9 @@ class DIALOG_NETLIST : public DIALOG_NETLIST_FBP private: PCB_EDIT_FRAME* m_parent; wxDC* m_dc; - bool m_silentMode; + bool m_silentMode; // if true, do not display warning message about undo + bool m_reportAll; // If true report all messages, + // false, report only warnings or errors wxConfig* m_config; public: @@ -96,6 +98,10 @@ private: { m_silentMode = m_checkBoxSilentMode->GetValue(); } + void OnClickFullMessages( wxCommandEvent& event ) + { + m_reportAll = m_checkBoxFullMessages->GetValue(); + } void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& aEvent ); void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& aEvent ); diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index 0d3466cabe..a4f709f8b4 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -72,7 +72,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w m_RemoveExtraFootprintsCtrl->SetSelection( 0 ); m_RemoveExtraFootprintsCtrl->SetToolTip( _("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed") ); - bTracksSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxALL|wxEXPAND, 5 ); + bTracksSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); bnetlistOptSizer->Add( bTracksSizer, 1, wxEXPAND, 5 ); @@ -80,31 +80,12 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bleftSizer->Add( bnetlistOptSizer, 1, wxEXPAND, 5 ); - wxBoxSizer* bCenterSizer; - bCenterSizer = new wxBoxSizer( wxVERTICAL ); - - m_checkDryRun = new wxCheckBox( this, wxID_ANY, _("Dry run. Only report changes in message panel"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkDryRun->SetToolTip( _("Dry Run:\nThe netlist is read, but no change is actually made on board.\nChanges are only reported in message panel, for info") ); - - bCenterSizer->Add( m_checkDryRun, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_checkBoxSilentMode = new wxCheckBox( this, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); - m_checkBoxSilentMode->SetToolTip( _("Silent mode:\nDo not show the warning message before reading the netlist") ); - - bCenterSizer->Add( m_checkBoxSilentMode, 0, wxRIGHT|wxLEFT, 5 ); - - - bleftSizer->Add( bCenterSizer, 0, wxALL|wxEXPAND, 5 ); - bUpperSizer->Add( bleftSizer, 1, wxEXPAND, 5 ); wxBoxSizer* bRightSizerButtons; bRightSizerButtons = new wxBoxSizer( wxVERTICAL ); - m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizerButtons->Add( m_buttonBrowse, 0, wxEXPAND|wxALL, 5 ); - m_buttonRead = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonRead->SetDefault(); m_buttonRead->SetToolTip( _("Read the current netlist and update connections and connectivity info") ); @@ -128,28 +109,62 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bRightSizerButtons->Add( m_buttonSaveMessages, 0, wxALL|wxEXPAND, 5 ); - bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); + bUpperSizer->Add( bRightSizerButtons, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 ); bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); - wxBoxSizer* bLowerSizer; - bLowerSizer = new wxBoxSizer( wxVERTICAL ); + m_staticline11 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline11, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bCenterSizer; + bCenterSizer = new wxBoxSizer( wxVERTICAL ); + + m_checkDryRun = new wxCheckBox( this, wxID_ANY, _("Dry run. Only report changes in message panel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkDryRun->SetToolTip( _("Dry Run:\nThe netlist is read, but no change is actually made on board.\nChanges are only reported in message panel, for info") ); + + bCenterSizer->Add( m_checkDryRun, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_checkBoxSilentMode = new wxCheckBox( this, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxSilentMode->SetToolTip( _("Silent mode:\nDo not show the warning message before reading the netlist") ); + + bCenterSizer->Add( m_checkBoxSilentMode, 0, wxRIGHT|wxLEFT, 5 ); + + m_checkBoxFullMessages = new wxCheckBox( this, wxID_ANY, _("Display all messages"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxFullMessages->SetValue(true); + m_checkBoxFullMessages->SetToolTip( _("Messages filter:\nIf checked: show all messages when reading the netlist\nIf not checked: show only warning or error messages") ); + + bCenterSizer->Add( m_checkBoxFullMessages, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + + bMainSizer->Add( bCenterSizer, 0, wxALL|wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bLowerSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + wxBoxSizer* bLowerSizer; + bLowerSizer = new wxBoxSizer( wxVERTICAL ); m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextNetfilename->Wrap( -1 ); bLowerSizer->Add( m_staticTextNetfilename, 0, wxRIGHT|wxLEFT, 5 ); + wxBoxSizer* bSizerNetlistFilename; + bSizerNetlistFilename = new wxBoxSizer( wxHORIZONTAL ); + m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_NetlistFilenameCtrl->SetMaxLength( 0 ); - bLowerSizer->Add( m_NetlistFilenameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + bSizerNetlistFilename->Add( m_NetlistFilenameCtrl, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT ); + bSizerNetlistFilename->Add( m_buttonBrowse, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + + + bLowerSizer->Add( bSizerNetlistFilename, 0, wxEXPAND, 5 ); m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( -1 ); - bLowerSizer->Add( m_staticText1, 0, wxRIGHT|wxLEFT, 5 ); + bLowerSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP ); m_MessageWindow->SetMaxLength( 0 ); @@ -166,8 +181,6 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bMainSizer->Fit( this ); // Connect Events - m_checkBoxSilentMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this ); - m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); m_buttonRead->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); m_buttonRead->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); @@ -177,13 +190,14 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w m_buttonRebild->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonSaveMessages->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this ); m_buttonSaveMessages->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this ); + m_checkBoxSilentMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this ); + m_checkBoxFullMessages->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickFullMessages ), NULL, this ); + m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); } DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP() { // Disconnect Events - m_checkBoxSilentMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this ); - m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); m_buttonRead->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); m_buttonRead->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); @@ -193,5 +207,8 @@ DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP() m_buttonRebild->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonSaveMessages->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this ); m_buttonSaveMessages->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this ); + m_checkBoxSilentMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this ); + m_checkBoxFullMessages->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickFullMessages ), NULL, this ); + m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index be1ecef1b8..a4c4c8e3ff 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -500,7 +500,7 @@
    5 - wxALL|wxEXPAND + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 1 @@ -592,292 +592,17 @@
    - - 5 - wxALL|wxEXPAND - 0 - - - bCenterSizer - wxVERTICAL - none - - 5 - wxBOTTOM|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Dry run. Only report changes in message panel - - 0 - - - 0 - - 1 - m_checkDryRun - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Dry Run: The netlist is read, but no change is actually made on board. Changes are only reported in message panel, for info - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Silent mode - - 0 - - - 0 - - 1 - m_checkBoxSilentMode - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - Silent mode: Do not show the warning message before reading the netlist - - wxFILTER_NONE - wxDefaultValidator - - - - - - OnClickSilentMode - - - - - - - - - - - - - - - - - - - - - - - - - -
    5 - wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT + wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL 0 bRightSizerButtons wxVERTICAL none - - 5 - wxEXPAND|wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - ID_OPEN_NELIST - Browse Netlist Files - - 0 - - - 0 - - 1 - m_buttonBrowse - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnOpenNetlistClick - - - - - - - - - - - - - - - - - - - - - - - - - 5 wxEXPAND|wxALL @@ -1324,18 +1049,99 @@ 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 1 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline11 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 - bLowerSizer + bCenterSizer wxVERTICAL none 5 - wxEXPAND | wxALL + wxBOTTOM|wxRIGHT|wxLEFT 0 - + 1 1 1 @@ -1349,6 +1155,7 @@ 1 0 + 0 1 1 @@ -1363,6 +1170,7 @@ 0 0 wxID_ANY + Dry run. Only report changes in message panel 0 @@ -1370,7 +1178,7 @@ 0 1 - m_staticline1 + m_checkDryRun 1 @@ -1380,14 +1188,19 @@ Resizable 1 - wxLI_HORIZONTAL + 0 - + Dry Run: The netlist is read, but no change is actually made on board. Changes are only reported in message panel, for info + + wxFILTER_NONE + wxDefaultValidator + + @@ -1412,6 +1225,274 @@ + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Silent mode + + 0 + + + 0 + + 1 + m_checkBoxSilentMode + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Silent mode: Do not show the warning message before reading the netlist + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnClickSilentMode + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Display all messages + + 0 + + + 0 + + 1 + m_checkBoxFullMessages + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Messages filter: If checked: show all messages when reading the netlist If not checked: show only warning or error messages + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnClickFullMessages + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND | wxALL + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + 0 + + 1 + m_staticline1 + 1 + + + protected + 1 + + Resizable + 1 + + wxLI_HORIZONTAL + + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 1 + + + bLowerSizer + wxVERTICAL + none 5 wxRIGHT|wxLEFT @@ -1497,98 +1578,197 @@ 5 - wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT + wxEXPAND 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - 0 - - 0 + - 1 - m_NetlistFilenameCtrl - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + bSizerNetlistFilename + wxHORIZONTAL + none + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + 0 + + 0 + + 1 + m_NetlistFilenameCtrl + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + ID_OPEN_NELIST + Browse + + 0 + + + 0 + + 1 + m_buttonBrowse + 1 + + + protected + 1 + + Resizable + 1 + + wxBU_EXACTFIT + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnOpenNetlistClick + + + + + + + + + + + + + + + + + + + + + + + + + 5 - wxRIGHT|wxLEFT + wxTOP|wxRIGHT|wxLEFT 0 1 diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index 36492e80ca..e5befa18aa 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -21,9 +21,9 @@ class DIALOG_SHIM; #include #include #include -#include #include #include +#include #include #include #include @@ -40,10 +40,10 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM protected: enum { - ID_OPEN_NELIST = 1000, - ID_READ_NETLIST_FILE, + ID_READ_NETLIST_FILE = 1000, ID_TEST_NETLIST, - ID_COMPILE_RATSNEST + ID_COMPILE_RATSNEST, + ID_OPEN_NELIST }; wxRadioBox* m_Select_By_Timestamp; @@ -51,23 +51,23 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM wxRadioBox* m_ChangeExistingFootprintCtrl; wxRadioBox* m_DeleteBadTracks; wxRadioBox* m_RemoveExtraFootprintsCtrl; - wxCheckBox* m_checkDryRun; - wxCheckBox* m_checkBoxSilentMode; - wxButton* m_buttonBrowse; wxButton* m_buttonRead; wxButton* m_buttonClose; wxButton* m_buttonFPTest; wxButton* m_buttonRebild; wxButton* m_buttonSaveMessages; + wxStaticLine* m_staticline11; + wxCheckBox* m_checkDryRun; + wxCheckBox* m_checkBoxSilentMode; + wxCheckBox* m_checkBoxFullMessages; wxStaticLine* m_staticline1; wxStaticText* m_staticTextNetfilename; wxTextCtrl* m_NetlistFilenameCtrl; + wxButton* m_buttonBrowse; wxStaticText* m_staticText1; wxTextCtrl* m_MessageWindow; // Virtual event handlers, overide them in your derived class - virtual void OnClickSilentMode( wxCommandEvent& event ) { event.Skip(); } - virtual void OnOpenNetlistClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnReadNetlistFileClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& event ) { event.Skip(); } virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } @@ -75,6 +75,9 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnSaveMessagesToFile( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void OnClickSilentMode( wxCommandEvent& event ) { event.Skip(); } + virtual void OnClickFullMessages( wxCommandEvent& event ) { event.Skip(); } + virtual void OnOpenNetlistClick( wxCommandEvent& event ) { event.Skip(); } public: diff --git a/pcbnew/edit.cpp b/pcbnew/edit.cpp index 93d380fee9..a74c844019 100755 --- a/pcbnew/edit.cpp +++ b/pcbnew/edit.cpp @@ -122,6 +122,7 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_SELECT_LAYER_PAIR: case ID_POPUP_PCB_SELECT_NO_CU_LAYER: case ID_POPUP_PCB_MOVE_TRACK_NODE: + case ID_POPUP_PCB_MOVE_TEXTEPCB_REQUEST: case ID_POPUP_PCB_DRAG_TRACK_SEGMENT_KEEP_SLOPE: case ID_POPUP_PCB_DRAG_TRACK_SEGMENT: case ID_POPUP_PCB_MOVE_TRACK_SEGMENT: @@ -145,6 +146,10 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) case ID_POPUP_PCB_EDIT_DRAWING: case ID_POPUP_PCB_GETINFO_MARKER: case ID_POPUP_PCB_MOVE_TEXT_DIMENSION_REQUEST: + case ID_POPUP_PCB_DRAG_MODULE_REQUEST: + case ID_POPUP_PCB_MOVE_MODULE_REQUEST: + case ID_POPUP_PCB_MOVE_TEXTMODULE_REQUEST: + case ID_POPUP_PCB_MOVE_MIRE_REQUEST: break; case ID_POPUP_CANCEL_CURRENT_COMMAND: @@ -286,11 +291,6 @@ void PCB_EDIT_FRAME::Process_Special_Functions( wxCommandEvent& event ) InstallNetlistFrame( &dc ); break; - case ID_GET_TOOLS: - - // InstalloolsFrame(this, wxPoint(-1,-1) ); - break; - case ID_FIND_ITEMS: InstallFindFrame(); break; diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 5b40506808..d0478195b6 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -56,6 +56,11 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, NETLIST netlist; NETLIST_READER* netlistReader; + netlist.SetIsDryRun( aIsDryRun ); + netlist.SetFindByTimeStamp( aSelectByTimeStamp ); + netlist.SetDeleteExtraFootprints( aDeleteExtraFootprints ); + netlist.SetReplaceFootprints( aChangeFootprints ); + try { netlistReader = NETLIST_READER::GetNetlistReader( &netlist, aNetlistFileName, @@ -80,11 +85,6 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, return; } - netlist.SetIsDryRun( aIsDryRun ); - netlist.SetFindByTimeStamp( aSelectByTimeStamp ); - netlist.SetDeleteExtraFootprints( aDeleteExtraFootprints ); - netlist.SetReplaceFootprints( aChangeFootprints ); - // Clear undo and redo lists to avoid inconsistencies between lists if( !netlist.IsDryRun() ) GetScreen()->ClearUndoRedoList(); @@ -164,7 +164,6 @@ MODULE* PCB_EDIT_FRAME::ListAndSelectModuleName() void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) throw( IO_ERROR, PARSE_ERROR ) { - bool loadFootprint; wxString msg; wxString lastFootprintLibName; COMPONENT* component; @@ -204,8 +203,27 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) else fpOnBoard = m_Pcb->FindModule( aNetlist.GetComponent( ii )->GetReference() ); - loadFootprint = (fpOnBoard == NULL) || - (fpOnBoard->GetPath() != component->GetFootprintName()); + bool footprintMisMatch = fpOnBoard && + fpOnBoard->GetLibRef() != component->GetFootprintName(); + + if( footprintMisMatch && !aNetlist.GetReplaceFootprints() ) + { + if( aReporter ) + { + msg.Printf( _( "* Warning: component `%s` has footprint <%s> and should be <%s>\n" ), + GetChars( component->GetReference() ), + GetChars( fpOnBoard->GetLibRef() ), + GetChars( component->GetFootprintName() ) ); + aReporter->Report( msg ); + } + + continue; + } + + if( !aNetlist.GetReplaceFootprints() ) + footprintMisMatch = false; + + bool loadFootprint = (fpOnBoard == NULL) || footprintMisMatch; if( loadFootprint && (component->GetFootprintName() != lastFootprintLibName) ) { @@ -244,7 +262,6 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) { if( aReporter ) { - wxString msg; msg.Printf( _( "*** Warning: component `%s` footprint <%s> was not found in " "any libraries. ***\n" ), GetChars( component->GetReference() ), @@ -274,7 +291,6 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) throw( IO_ERROR, PARSE_ERROR ) { - bool loadFootprint; wxString msg; wxString lastFootprintLibName; COMPONENT* component; @@ -309,8 +325,27 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) else fpOnBoard = m_Pcb->FindModule( aNetlist.GetComponent( ii )->GetReference() ); - loadFootprint = (fpOnBoard == NULL) || - (fpOnBoard->GetPath() != component->GetFootprintName()); + bool footprintMisMatch = fpOnBoard && + fpOnBoard->GetLibRef() != component->GetFootprintName(); + + if( footprintMisMatch && !aNetlist.GetReplaceFootprints() ) + { + if( aReporter ) + { + msg.Printf( _( "* Warning: component `%s` has footprint <%s> and should be <%s>\n" ), + GetChars( component->GetReference() ), + GetChars( fpOnBoard->GetLibRef() ), + GetChars( component->GetFootprintName() ) ); + aReporter->Report( msg ); + } + + continue; + } + + if( !aNetlist.GetReplaceFootprints() ) + footprintMisMatch = false; + + bool loadFootprint = (fpOnBoard == NULL) || footprintMisMatch; if( loadFootprint && (component->GetFootprintName() != lastFootprintLibName) ) { From c015153e21d470a1293409a67a4beb5095b43d63 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Fri, 23 Aug 2013 11:22:19 +0200 Subject: [PATCH 36/42] Pcbnew: add more test when reading a netlist file: verify if all pads found in netlist are found in corresponding footprints (no missing pads). --- pcbnew/class_board.cpp | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index c6c18742aa..c71c0f3f78 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -2339,7 +2339,6 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) wxString msg; D_PAD* pad; MODULE* footprint; - COMPONENT* component; COMPONENT_NET net; if( !IsEmpty() ) @@ -2350,7 +2349,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) if( bbbox.GetWidth() || bbbox.GetHeight() ) { bestPosition.x = bbbox.Centre().x; - bestPosition.y = bbbox.GetBottom() + DMils2iu( 5000 ); + bestPosition.y = bbbox.GetBottom() + Millimeter2iu( 10 ); } } else @@ -2366,7 +2365,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) for( i = 0; i < aNetlist.GetCount(); i++ ) { - component = aNetlist.GetComponent( i ); + COMPONENT* component = aNetlist.GetComponent( i ); if( aReporter && aReporter->ReportAll() ) { @@ -2574,6 +2573,7 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) if( aNetlist.GetDeleteExtraFootprints() ) { MODULE* nextModule; + const COMPONENT* component; for( MODULE* module = m_Modules; module != NULL; module = nextModule ) { @@ -2602,5 +2602,39 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) } } } + + // Last step: verify all pads found in netlist: + // They should exist in footprints, otherwise the footprint is wrong + // note also references or time stamps are updated, so we use only + // the reference to find a footprint + if( aReporter && aReporter->ReportErrors() ) + { + wxString padname; + for( i = 0; i < aNetlist.GetCount(); i++ ) + { + const COMPONENT* component = aNetlist.GetComponent( i ); + MODULE* footprint = FindModuleByReference( component->GetReference() ); + + if( footprint == NULL ) // It can be missing in partial designs + continue; + + // Explore all pins/pads in component + for( unsigned jj = 0; jj < component->GetNetCount(); jj++ ) + { + net = component->GetNet( jj ); + padname = net.GetPinName(); + + if( footprint->FindPadByName( padname ) ) + continue; // OK, pad found + + // not found: bad footprint, report error + msg.Printf( _( "** Error: Component \"%s\" pad <%s> not found in footprint \"%s\" **\n" ), + GetChars( component->GetReference() ), + GetChars( padname ), + GetChars( footprint->GetLibRef() ) ); + aReporter->Report( msg ); + } + } + } } From 6ab2f35f742b9ce98a9b8f82137154b309ec841a Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 24 Aug 2013 10:08:55 +0200 Subject: [PATCH 37/42] Pcbnew: read netlist enhancements: add option to remove single pads nets, add enforce tests to report non existing netnames in zones. Fix also some very minor errors in comments. --- include/wxPcbStruct.h | 3 + pcbnew/class_board.cpp | 77 ++++++++++++++++++++++- pcbnew/class_board.h | 5 +- pcbnew/class_netinfo.h | 2 +- pcbnew/class_netinfolist.cpp | 2 +- pcbnew/dialogs/dialog_netlist.cpp | 6 ++ pcbnew/dialogs/dialog_netlist_fbp.cpp | 6 ++ pcbnew/dialogs/dialog_netlist_fbp.fbp | 90 +++++++++++++++++++++++++++ pcbnew/dialogs/dialog_netlist_fbp.h | 1 + pcbnew/netlist.cpp | 3 +- 10 files changed, 189 insertions(+), 6 deletions(-) diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index a37d22e02d..5fb8256601 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -1451,6 +1451,8 @@ public: * @param aSelectByTimestamp if true, use timestamp instead of reference to identify * footprints from components (use after reannotation of the * schematic) + * @param aDeleteSinglePadNets if true, remove nets counting only one pad + * and set net code to 0 for these pads * @param aIsDryRun performs a dry run without making any changes if true. */ void ReadPcbNetlist( const wxString& aNetlistFileName, @@ -1460,6 +1462,7 @@ public: bool aDeleteBadTracks, bool aDeleteExtraFootprints, bool aSelectByTimestamp, + bool aDeleteSinglePadNets, bool aIsDryRun ); /** diff --git a/pcbnew/class_board.cpp b/pcbnew/class_board.cpp index c71c0f3f78..46ea086b93 100644 --- a/pcbnew/class_board.cpp +++ b/pcbnew/class_board.cpp @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -2332,7 +2333,8 @@ bool BOARD::NormalizeAreaPolygon( PICKED_ITEMS_LIST * aNewZonesList, ZONE_CONTAI } -void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) +void BOARD::ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, + REPORTER* aReporter ) { unsigned i; wxPoint bestPosition; @@ -2603,7 +2605,53 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) } } - // Last step: verify all pads found in netlist: + // If needed, remove the single pad nets: + if( aDeleteSinglePadNets && !aNetlist.IsDryRun() ) + { + BuildListOfNets(); + std::vector padlist = GetPads(); + // padlist is the list of pads, sorted by netname. + int count = 0; + wxString netname; + D_PAD * pad = NULL; + D_PAD * previouspad = NULL; + for( unsigned ii = 0; ii < padlist.size(); ii++ ) + { + pad = padlist[ii]; + + if( pad->GetNetname().IsEmpty() ) + continue; + + if( netname != pad->GetNetname() ) // End of net + { + if( previouspad && count == 1 ) + { + if( aReporter && aReporter->ReportAll() ) + { + msg.Printf( _( "Remove single pad net \"%s\" on \"%s\" pad <%s>\n" ), + GetChars( pad->GetNetname() ), + GetChars( pad->GetParent()->GetReference() ), + GetChars( previouspad->GetPadName() ) ); + aReporter->Report( msg ); + } + previouspad->SetNetname( wxEmptyString ); + } + netname = pad->GetNetname(); + count = 1; + } + else + count++; + + previouspad = pad; + } + + // Examine last pad + if( pad && count == 1 ) + pad->SetNetname( wxEmptyString ); + } + + // Last step: Some tests: + // verify all pads found in netlist: // They should exist in footprints, otherwise the footprint is wrong // note also references or time stamps are updated, so we use only // the reference to find a footprint @@ -2636,5 +2684,30 @@ void BOARD::ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter ) } } } + + // Verify zone net names validity: + // After schematic changes, a zone can have a non existing net name. + // It should be reported + if( aReporter && aReporter->ReportErrors() ) + { + //Loop through all copper zones + for( i = 0; i < m_ZoneDescriptorList.size(); i++ ) + { + ZONE_CONTAINER* zone = m_ZoneDescriptorList[i]; + + if( zone->GetNet() >= 0 || !zone->IsOnCopperLayer() ) + continue; + + // Net name not valid, report error + wxString coord; + coord << zone->GetPosition(); + msg.Printf( _( "** Error: Zone %s layer <%s>" + " has non-existent net name \"%s\" **\n" ), + GetChars( coord ), + GetChars( zone->GetLayerName() ), + GetChars( zone->GetNetName() ) ); + aReporter->Report( msg ); + } + } } diff --git a/pcbnew/class_board.h b/pcbnew/class_board.h index df63b410b4..5ba5c2174d 100644 --- a/pcbnew/class_board.h +++ b/pcbnew/class_board.h @@ -927,10 +927,13 @@ public: * any extra unlock footprints are removed from the #BOARD. * * @param aNetlist is the new netlist to revise the contents of the #BOARD with. + * @param aDeleteSinglePadNets if true, remove nets counting only one pad + * and set net code to 0 for these pads * @param aReporter is a #REPORTER object to report the changes \a aNetlist makes to * the #BOARD. If NULL, no change reporting occurs. */ - void ReplaceNetlist( NETLIST& aNetlist, REPORTER* aReporter = NULL ); + void ReplaceNetlist( NETLIST& aNetlist, bool aDeleteSinglePadNets, + REPORTER* aReporter = NULL ); /** * Function ReturnSortedNetnamesList diff --git a/pcbnew/class_netinfo.h b/pcbnew/class_netinfo.h index 926d5c1c56..427a7b5685 100644 --- a/pcbnew/class_netinfo.h +++ b/pcbnew/class_netinfo.h @@ -197,7 +197,7 @@ private: void clear(); /** - * Function BuildListOfNets + * Function buildListOfNets * builds or rebuilds the list of NETINFO_ITEMs * The list is sorted by names. */ diff --git a/pcbnew/class_netinfolist.cpp b/pcbnew/class_netinfolist.cpp index 955907ba9d..df5f8039de 100644 --- a/pcbnew/class_netinfolist.cpp +++ b/pcbnew/class_netinfolist.cpp @@ -72,7 +72,7 @@ static bool padlistSortByNetnames( const D_PAD* a, const D_PAD* b ) * Be aware NETINFO_ITEM* BOARD::FindNet( const wxString& aNetname ) * when search a net by its net name does a binary search * and expects to have a nets list sorted by an alphabetic case sensitive sort - * So do not change Build_Pads_Full_List() taht build a sorted list of pads + * So do not change Build_Pads_Full_List() which build a sorted list of pads */ void NETINFO_LIST::buildListOfNets() { diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 19d70b36b3..2137cf886c 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -47,6 +47,7 @@ #define NETLIST_SILENTMODE_KEY wxT("SilentMode") #define NETLIST_FULLMESSAGES_KEY wxT("NetlistReportAllMsg") +#define NETLIST_DELETESINGLEPADNETS_KEY wxT("NetlistDeleteSinglePadNets") void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) { @@ -97,6 +98,8 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC, m_config = wxGetApp().GetSettings(); m_silentMode = m_config->Read( NETLIST_SILENTMODE_KEY, 0l ); m_reportAll = m_config->Read( NETLIST_FULLMESSAGES_KEY, 1l ); + bool tmp = m_config->Read( NETLIST_DELETESINGLEPADNETS_KEY, 0l ); + m_rbSingleNets->SetSelection( tmp == 0 ? 0 : 1); m_NetlistFilenameCtrl->SetValue( aNetlistFullFilename ); m_cmpNameSourceOpt->SetSelection( m_parent->GetUseCmpFileForFpNames() ? 1 : 0 ); m_checkBoxSilentMode->SetValue( m_silentMode ); @@ -109,6 +112,8 @@ DIALOG_NETLIST::~DIALOG_NETLIST() { m_config->Write( NETLIST_SILENTMODE_KEY, (long) m_silentMode ); m_config->Write( NETLIST_FULLMESSAGES_KEY, (long) m_reportAll ); + m_config->Write( NETLIST_DELETESINGLEPADNETS_KEY, + (long) m_rbSingleNets->GetSelection() ); } void DIALOG_NETLIST::OnOpenNetlistClick( wxCommandEvent& event ) @@ -187,6 +192,7 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event ) m_DeleteBadTracks->GetSelection() == 1, m_RemoveExtraFootprintsCtrl->GetSelection() == 1, m_Select_By_Timestamp->GetSelection() == 1, + m_rbSingleNets->GetSelection() == 1, m_checkDryRun->GetValue() ); } diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index a4f709f8b4..243f306f69 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -74,6 +74,12 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bTracksSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + wxString m_rbSingleNetsChoices[] = { _("Keep"), _("Delete") }; + int m_rbSingleNetsNChoices = sizeof( m_rbSingleNetsChoices ) / sizeof( wxString ); + m_rbSingleNets = new wxRadioBox( this, wxID_ANY, _("Single Pad Nets"), wxDefaultPosition, wxDefaultSize, m_rbSingleNetsNChoices, m_rbSingleNetsChoices, 1, wxRA_SPECIFY_COLS ); + m_rbSingleNets->SetSelection( 0 ); + bTracksSizer->Add( m_rbSingleNets, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bnetlistOptSizer->Add( bTracksSizer, 1, wxEXPAND, 5 ); diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index a4c4c8e3ff..35f547a11d 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -588,6 +588,96 @@ + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Keep" "Delete" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Single Pad Nets + 1 + + 0 + + + 0 + + 1 + m_rbSingleNets + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index e5befa18aa..6ecadf84da 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -51,6 +51,7 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM wxRadioBox* m_ChangeExistingFootprintCtrl; wxRadioBox* m_DeleteBadTracks; wxRadioBox* m_RemoveExtraFootprintsCtrl; + wxRadioBox* m_rbSingleNets; wxButton* m_buttonRead; wxButton* m_buttonClose; wxButton* m_buttonFPTest; diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index d0478195b6..6df4c7e10e 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -50,6 +50,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, bool aDeleteUnconnectedTracks, bool aDeleteExtraFootprints, bool aSelectByTimeStamp, + bool aDeleteSinglePadNets, bool aIsDryRun ) { wxString msg; @@ -90,7 +91,7 @@ void PCB_EDIT_FRAME::ReadPcbNetlist( const wxString& aNetlistFileName, GetScreen()->ClearUndoRedoList(); netlist.SortByReference(); - GetBoard()->ReplaceNetlist( netlist, aReporter ); + GetBoard()->ReplaceNetlist( netlist, aDeleteSinglePadNets, aReporter ); // If it was a dry run, nothing has changed so we're done. if( netlist.IsDryRun() ) From b7bc4ea43e5f21ecea5710d3a6d157cb8fe5b1d2 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 24 Aug 2013 15:03:59 +0200 Subject: [PATCH 38/42] Pcbnew: speedup netlist read, when some footprints are not found, by caching the non-existent footprint names, which are searched only once in libs. When a non existent footprint is used by many components, this footprint was previoulsy searched in libs for each component, which is very time consumming. --- pcbnew/netlist.cpp | 32 +++++++++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 3 deletions(-) diff --git a/pcbnew/netlist.cpp b/pcbnew/netlist.cpp index 6df4c7e10e..d0a80154e5 100644 --- a/pcbnew/netlist.cpp +++ b/pcbnew/netlist.cpp @@ -4,8 +4,10 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2011 Jean-Pierre Charras. - * Copyright (C) 1992-2011 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-2013 Jean-Pierre Charras, jp.charras at wanadoo.fr + * Copyright (C) 2013 SoftPLC Corporation, Dick Hollenbeck + * Copyright (C) 2013 Wayne Stambaugh + * Copyright (C) 1992-2013 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -167,10 +169,15 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) { wxString msg; wxString lastFootprintLibName; + wxArrayString nofoundFootprints; // A list of footprints used in netlist + // but not found in any library + // to avoid a full search in all libs + // each time a non existent footprint is needed COMPONENT* component; MODULE* module = 0; MODULE* fpOnBoard; + if( aNetlist.IsEmpty() ) return; @@ -230,6 +237,23 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) { module = NULL; + // Speed up the search: a search for a non existent footprint + // is hightly costly in time becuse the full set of libs is read. + // So it should be made only once. + // Therefore search in not found list first: + bool alreadySearched = false; + for( unsigned ii = 0; ii < nofoundFootprints.GetCount(); ii++ ) + { + if( component->GetFootprintName() == nofoundFootprints[ii] ) + { + alreadySearched = true; + break; + } + } + + if( alreadySearched ) + continue; + for( unsigned ii = 0; ii < g_LibraryNames.GetCount(); ii++ ) { fn = wxFileName( wxEmptyString, g_LibraryNames[ii], @@ -259,7 +283,7 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) } } - if( module == NULL ) + if( module == NULL && !alreadySearched ) { if( aReporter ) { @@ -270,6 +294,8 @@ void PCB_EDIT_FRAME::loadFootprints( NETLIST& aNetlist, REPORTER* aReporter ) aReporter->Report( msg ); } + nofoundFootprints.Add( component->GetFootprintName() ); + continue; } } From 0d68dfcbc198e778354b59e7c8dc08d8bd5db7e7 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 26 Aug 2013 15:15:00 -0500 Subject: [PATCH 39/42] enhanced beautification, better formatting, upgrade to 0.60 uncrustify.cfg --- uncrustify.cfg | 976 +++++++++++++++++++++++++++---------------------- 1 file changed, 543 insertions(+), 433 deletions(-) diff --git a/uncrustify.cfg b/uncrustify.cfg index b7419db25a..3d52d457fd 100644 --- a/uncrustify.cfg +++ b/uncrustify.cfg @@ -1,37 +1,37 @@ -# Uncrustify 0.59 +# Uncrustify 0.60 # # General options # # The type of line endings -newlines = auto # auto/lf/crlf/cr +newlines = auto # auto/lf/crlf/cr # The original size of tabs in the input -input_tab_size = 4 # number +input_tab_size = 4 # number # The size of tabs in the output (only used if align_with_tabs=true) -output_tab_size = 4 # number +output_tab_size = 4 # number # The ASCII value of the string escape char, usually 92 (\) or 94 (^). (Pawn) -string_escape_char = 92 # number +string_escape_char = 92 # number # Alternate string escape char for Pawn. Only works right before the quote char. -string_escape_char2 = 0 # number +string_escape_char2 = 0 # number # Allow interpreting '>=' and '>>=' as part of a template in 'void f(list>=val);'. # If true (default), 'assert(x<0 && y>=3)' will be broken. # Improvements to template detection may make this option obsolete. -tok_split_gte = false # false/true +tok_split_gte = false # false/true # Control what to do with the UTF-8 BOM (recommend 'remove') -utf8_bom = ignore # ignore/add/remove/force +utf8_bom = ignore # ignore/add/remove/force # If the file contains bytes with values between 128 and 255, but is not UTF-8, then output as UTF-8 -utf8_byte = false # false/true +utf8_byte = true # false/true # Force the output encoding to UTF-8 -utf8_force = false # false/true +utf8_force = true # false/true # # Indenting @@ -39,1429 +39,1539 @@ utf8_force = false # false/true # The number of columns to indent per level. # Usually 2, 3, 4, or 8. -indent_columns = 4 # number +indent_columns = 4 # number # The continuation indent. If non-zero, this overrides the indent of '(' and '=' continuation indents. # For FreeBSD, this is set to 4. Negative value is absolute and not increased for each ( level -indent_continue = 0 # number +indent_continue = 0 # number # How to use tabs when indenting code # 0=spaces only # 1=indent with tabs to brace level, align with spaces # 2=indent and align with tabs, using spaces when not on a tabstop -indent_with_tabs = 0 # number +indent_with_tabs = 0 # number # Comments that are not a brace level are indented with tabs on a tabstop. # Requires indent_with_tabs=2. If false, will use spaces. -indent_cmt_with_tabs = false # false/true +indent_cmt_with_tabs = false # false/true # Whether to indent strings broken by '\' so that they line up -indent_align_string = true # false/true +indent_align_string = true # false/true # The number of spaces to indent multi-line XML strings. # Requires indent_align_string=True -indent_xml_string = 0 # number +indent_xml_string = 0 # number # Spaces to indent '{' from level -indent_brace = 0 # number +indent_brace = 0 # number # Whether braces are indented to the body level -indent_braces = false # false/true +indent_braces = false # false/true # Disabled indenting function braces if indent_braces is true -indent_braces_no_func = false # false/true +indent_braces_no_func = false # false/true # Disabled indenting class braces if indent_braces is true -indent_braces_no_class = false # false/true +indent_braces_no_class = false # false/true # Disabled indenting struct braces if indent_braces is true -indent_braces_no_struct = false # false/true +indent_braces_no_struct = false # false/true # Indent based on the size of the brace parent, i.e. 'if' => 3 spaces, 'for' => 4 spaces, etc. -indent_brace_parent = false # false/true +indent_brace_parent = false # false/true # Whether the 'namespace' body is indented -indent_namespace = false # false/true +indent_namespace = false # false/true # The number of spaces to indent a namespace block -indent_namespace_level = 0 # number +indent_namespace_level = 0 # number # If the body of the namespace is longer than this number, it won't be indented. # Requires indent_namespace=true. Default=0 (no limit) -indent_namespace_limit = 0 # number +indent_namespace_limit = 0 # number # Whether the 'extern "C"' body is indented -indent_extern = false # false/true +indent_extern = false # false/true # Whether the 'class' body is indented -indent_class = true # false/true +indent_class = true # false/true # Whether to indent the stuff after a leading class colon -indent_class_colon = false # false/true +indent_class_colon = false # false/true # Virtual indent from the ':' for member initializers. Default is 2 -indent_ctor_init_leading = 2 # number +indent_ctor_init_leading = 2 # number # Additional indenting for constructor initializer list -indent_ctor_init = 0 # number +indent_ctor_init = 0 # number # False=treat 'else\nif' as 'else if' for indenting purposes # True=indent the 'if' one level -indent_else_if = true # false/true +indent_else_if = true # false/true # Amount to indent variable declarations after a open brace. neg=relative, pos=absolute -indent_var_def_blk = 0 # number +indent_var_def_blk = 0 # number # Indent continued variable declarations instead of aligning. -indent_var_def_cont = false # false/true +indent_var_def_cont = false # false/true # True: force indentation of function definition to start in column 1 # False: use the default behavior -indent_func_def_force_col1 = false # false/true +indent_func_def_force_col1 = false # false/true # True: indent continued function call parameters one indent level # False: align parameters under the open paren -indent_func_call_param = false # false/true +indent_func_call_param = true # false/true # Same as indent_func_call_param, but for function defs -indent_func_def_param = false # false/true +indent_func_def_param = true # false/true # Same as indent_func_call_param, but for function protos -indent_func_proto_param = false # false/true +indent_func_proto_param = true # false/true # Same as indent_func_call_param, but for class declarations -indent_func_class_param = false # false/true +indent_func_class_param = true # false/true # Same as indent_func_call_param, but for class variable constructors -indent_func_ctor_var_param = false # false/true +indent_func_ctor_var_param = true # false/true # Same as indent_func_call_param, but for templates -indent_template_param = false # false/true +indent_template_param = true # false/true # Double the indent for indent_func_xxx_param options -indent_func_param_double = false # false/true +indent_func_param_double = true # false/true # Indentation column for standalone 'const' function decl/proto qualifier -indent_func_const = 0 # number +indent_func_const = 0 # number # Indentation column for standalone 'throw' function decl/proto qualifier -indent_func_throw = 0 # number +indent_func_throw = 1 # number # The number of spaces to indent a continued '->' or '.' # Usually set to 0, 1, or indent_columns. -indent_member = 0 # number +indent_member = 0 # number # Spaces to indent single line ('//') comments on lines before code -indent_sing_line_comments = 0 # number +indent_sing_line_comments = 0 # number # If set, will indent trailing single line ('//') comments relative # to the code instead of trying to keep the same absolute column -indent_relative_single_line_comments = false # false/true +indent_relative_single_line_comments = false # false/true # Spaces to indent 'case' from 'switch' # Usually 0 or indent_columns. -indent_switch_case = 0 # number +indent_switch_case = 0 # number # Spaces to shift the 'case' line, without affecting any other lines # Usually 0. -indent_case_shift = 0 # number +indent_case_shift = 0 # number # Spaces to indent '{' from 'case'. # By default, the brace will appear under the 'c' in case. # Usually set to 0 or indent_columns. -indent_case_brace = 4 # number +indent_case_brace = 4 # number # Whether to indent comments found in first column -indent_col1_comment = false # false/true +indent_col1_comment = false # false/true # How to indent goto labels # >0 : absolute column where 1 is the leftmost column # <=0 : subtract from brace indent -indent_label = 1 # number +indent_label = 1 # number # Same as indent_label, but for access specifiers that are followed by a colon -indent_access_spec = 1 # number +indent_access_spec = 1 # number # Indent the code after an access specifier by one level. # If set, this option forces 'indent_access_spec=0' -indent_access_spec_body = false # false/true +indent_access_spec_body = false # false/true # If an open paren is followed by a newline, indent the next line so that it lines up after the open paren (not recommended) -indent_paren_nl = false # false/true +indent_paren_nl = false # false/true # Controls the indent of a close paren after a newline. # 0: Indent to body level # 1: Align under the open paren # 2: Indent to the brace level -indent_paren_close = 0 # number +indent_paren_close = 0 # number # Controls the indent of a comma when inside a paren.If TRUE, aligns under the open paren -indent_comma_paren = false # false/true +indent_comma_paren = false # false/true # Controls the indent of a BOOL operator when inside a paren.If TRUE, aligns under the open paren -indent_bool_paren = false # false/true +indent_bool_paren = false # false/true # If 'indent_bool_paren' is true, controls the indent of the first expression. If TRUE, aligns the first expression to the following ones -indent_first_bool_expr = true # false/true +indent_first_bool_expr = true # false/true # If an open square is followed by a newline, indent the next line so that it lines up after the open square (not recommended) -indent_square_nl = false # false/true +indent_square_nl = false # false/true # Don't change the relative indent of ESQL/C 'EXEC SQL' bodies -indent_preserve_sql = false # false/true +indent_preserve_sql = false # false/true # Align continued statements at the '='. Default=True # If FALSE or the '=' is followed by a newline, the next line is indent one tab. -indent_align_assign = true # false/true +indent_align_assign = true # false/true + +# Indent OC blocks at brace level instead of usual rules. +indent_oc_block = false # false/true + +# Indent OC blocks in a message relative to the parameter name. +# 0=use indent_oc_block rules, 1+=spaces to indent +indent_oc_block_msg = 0 # number + +# Minimum indent for subsequent parameters +indent_oc_msg_colon = 0 # number # # Spacing options # # Add or remove space around arithmetic operator '+', '-', '/', '*', etc -sp_arith = force # ignore/add/remove/force +sp_arith = force # ignore/add/remove/force # Add or remove space around assignment operator '=', '+=', etc -sp_assign = force # ignore/add/remove/force +sp_assign = force # ignore/add/remove/force # Add or remove space around '=' in C++11 lambda capture specifications. Overrides sp_assign -sp_cpp_lambda_assign = ignore # ignore/add/remove/force +sp_cpp_lambda_assign = ignore # ignore/add/remove/force # Add or remove space after the capture specification in C++11 lambda. -sp_cpp_lambda_paren = ignore # ignore/add/remove/force +sp_cpp_lambda_paren = ignore # ignore/add/remove/force # Add or remove space around assignment operator '=' in a prototype -sp_assign_default = ignore # ignore/add/remove/force +sp_assign_default = ignore # ignore/add/remove/force # Add or remove space before assignment operator '=', '+=', etc. Overrides sp_assign. -sp_before_assign = ignore # ignore/add/remove/force +sp_before_assign = ignore # ignore/add/remove/force # Add or remove space after assignment operator '=', '+=', etc. Overrides sp_assign. -sp_after_assign = ignore # ignore/add/remove/force +sp_after_assign = ignore # ignore/add/remove/force # Add or remove space around assignment '=' in enum -sp_enum_assign = ignore # ignore/add/remove/force +sp_enum_assign = ignore # ignore/add/remove/force # Add or remove space before assignment '=' in enum. Overrides sp_enum_assign. -sp_enum_before_assign = ignore # ignore/add/remove/force +sp_enum_before_assign = ignore # ignore/add/remove/force # Add or remove space after assignment '=' in enum. Overrides sp_enum_assign. -sp_enum_after_assign = ignore # ignore/add/remove/force +sp_enum_after_assign = ignore # ignore/add/remove/force # Add or remove space around preprocessor '##' concatenation operator. Default=Add -sp_pp_concat = add # ignore/add/remove/force +sp_pp_concat = add # ignore/add/remove/force -# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. Default=Add -sp_pp_stringify = add # ignore/add/remove/force +# Add or remove space after preprocessor '#' stringify operator. Also affects the '#@' charizing operator. +sp_pp_stringify = add # ignore/add/remove/force + +# Add or remove space before preprocessor '#' stringify operator as in '#define x(y) L#y'. +sp_before_pp_stringify = ignore # ignore/add/remove/force # Add or remove space around boolean operators '&&' and '||' -sp_bool = ignore # ignore/add/remove/force +sp_bool = ignore # ignore/add/remove/force # Add or remove space around compare operator '<', '>', '==', etc -sp_compare = ignore # ignore/add/remove/force +sp_compare = ignore # ignore/add/remove/force # Add or remove space inside '(' and ')' -sp_inside_paren = ignore # ignore/add/remove/force +sp_inside_paren = ignore # ignore/add/remove/force -# Add or remove space between nested parens -sp_paren_paren = ignore # ignore/add/remove/force +# Add or remove space between nested parens: '((' vs ') )' +sp_paren_paren = ignore # ignore/add/remove/force + +# Add or remove space between back-to-back parens: ')(' vs ') (' +sp_cparen_oparen = ignore # ignore/add/remove/force # Whether to balance spaces inside nested parens -sp_balance_nested_parens = true # false/true +sp_balance_nested_parens = true # false/true # Add or remove space between ')' and '{' -sp_paren_brace = add # ignore/add/remove/force +sp_paren_brace = add # ignore/add/remove/force # Add or remove space before pointer star '*' -sp_before_ptr_star = remove # ignore/add/remove/force +sp_before_ptr_star = remove # ignore/add/remove/force # Add or remove space before pointer star '*' that isn't followed by a variable name # If set to 'ignore', sp_before_ptr_star is used instead. -sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force +sp_before_unnamed_ptr_star = ignore # ignore/add/remove/force # Add or remove space between pointer stars '*' -sp_between_ptr_star = remove # ignore/add/remove/force +sp_between_ptr_star = remove # ignore/add/remove/force # Add or remove space after pointer star '*', if followed by a word. -sp_after_ptr_star = force # ignore/add/remove/force +sp_after_ptr_star = force # ignore/add/remove/force # Add or remove space after a pointer star '*', if followed by a func proto/def. -sp_after_ptr_star_func = ignore # ignore/add/remove/force +sp_after_ptr_star_func = ignore # ignore/add/remove/force + +# Add or remove space after a pointer star '*', if followed by an open paren (function types). +sp_ptr_star_paren = ignore # ignore/add/remove/force # Add or remove space before a pointer star '*', if followed by a func proto/def. -sp_before_ptr_star_func = ignore # ignore/add/remove/force +sp_before_ptr_star_func = ignore # ignore/add/remove/force # Add or remove space before a reference sign '&' -sp_before_byref = remove # ignore/add/remove/force +sp_before_byref = remove # ignore/add/remove/force # Add or remove space before a reference sign '&' that isn't followed by a variable name # If set to 'ignore', sp_before_byref is used instead. -sp_before_unnamed_byref = ignore # ignore/add/remove/force +sp_before_unnamed_byref = ignore # ignore/add/remove/force # Add or remove space after reference sign '&', if followed by a word. -sp_after_byref = force # ignore/add/remove/force +sp_after_byref = force # ignore/add/remove/force # Add or remove space after a reference sign '&', if followed by a func proto/def. -sp_after_byref_func = ignore # ignore/add/remove/force +sp_after_byref_func = ignore # ignore/add/remove/force # Add or remove space before a reference sign '&', if followed by a func proto/def. -sp_before_byref_func = ignore # ignore/add/remove/force +sp_before_byref_func = ignore # ignore/add/remove/force # Add or remove space between type and word. Default=Force -sp_after_type = force # ignore/add/remove/force +sp_after_type = force # ignore/add/remove/force # Add or remove space before the paren in the D constructs 'template Foo(' and 'class Foo('. -sp_before_template_paren = ignore # ignore/add/remove/force +sp_before_template_paren = ignore # ignore/add/remove/force # Add or remove space in 'template <' vs 'template<'. # If set to ignore, sp_before_angle is used. -sp_template_angle = force # ignore/add/remove/force +sp_template_angle = force # ignore/add/remove/force # Add or remove space before '<>' -sp_before_angle = ignore # ignore/add/remove/force +sp_before_angle = ignore # ignore/add/remove/force # Add or remove space inside '<' and '>' -sp_inside_angle = remove # ignore/add/remove/force +sp_inside_angle = remove # ignore/add/remove/force # Add or remove space after '<>' -sp_after_angle = force # ignore/add/remove/force +sp_after_angle = force # ignore/add/remove/force # Add or remove space between '<>' and '(' as found in 'new List();' -sp_angle_paren = ignore # ignore/add/remove/force +sp_angle_paren = ignore # ignore/add/remove/force # Add or remove space between '<>' and a word as in 'List m;' -sp_angle_word = ignore # ignore/add/remove/force +sp_angle_word = ignore # ignore/add/remove/force # Add or remove space between '>' and '>' in '>>' (template stuff C++/C# only). Default=Add -sp_angle_shift = add # ignore/add/remove/force +sp_angle_shift = add # ignore/add/remove/force # Permit removal of the space between '>>' in 'foo >' (C++11 only). Default=False # sp_angle_shift cannot remove the space without this option. -sp_permit_cpp11_shift = false # false/true +sp_permit_cpp11_shift = false # false/true # Add or remove space before '(' of 'if', 'for', 'switch', and 'while' -sp_before_sparen = remove # ignore/add/remove/force +sp_before_sparen = remove # ignore/add/remove/force # Add or remove space inside if-condition '(' and ')' -sp_inside_sparen = add # ignore/add/remove/force +sp_inside_sparen = add # ignore/add/remove/force # Add or remove space before if-condition ')'. Overrides sp_inside_sparen. -sp_inside_sparen_close = ignore # ignore/add/remove/force +sp_inside_sparen_close = ignore # ignore/add/remove/force + +# Add or remove space before if-condition '('. Overrides sp_inside_sparen. +sp_inside_sparen_open = ignore # ignore/add/remove/force # Add or remove space after ')' of 'if', 'for', 'switch', and 'while' -sp_after_sparen = ignore # ignore/add/remove/force +sp_after_sparen = ignore # ignore/add/remove/force # Add or remove space between ')' and '{' of 'if', 'for', 'switch', and 'while' -sp_sparen_brace = add # ignore/add/remove/force +sp_sparen_brace = add # ignore/add/remove/force # Add or remove space between 'invariant' and '(' in the D language. -sp_invariant_paren = ignore # ignore/add/remove/force +sp_invariant_paren = ignore # ignore/add/remove/force # Add or remove space after the ')' in 'invariant (C) c' in the D language. -sp_after_invariant_paren = ignore # ignore/add/remove/force +sp_after_invariant_paren = ignore # ignore/add/remove/force # Add or remove space before empty statement ';' on 'if', 'for' and 'while' -sp_special_semi = add # ignore/add/remove/force +sp_special_semi = add # ignore/add/remove/force # Add or remove space before ';'. Default=Remove -sp_before_semi = remove # ignore/add/remove/force +sp_before_semi = remove # ignore/add/remove/force # Add or remove space before ';' in non-empty 'for' statements -sp_before_semi_for = remove # ignore/add/remove/force +sp_before_semi_for = remove # ignore/add/remove/force # Add or remove space before a semicolon of an empty part of a for statement. -sp_before_semi_for_empty = add # ignore/add/remove/force +sp_before_semi_for_empty = add # ignore/add/remove/force # Add or remove space after ';', except when followed by a comment. Default=Add -sp_after_semi = add # ignore/add/remove/force +sp_after_semi = add # ignore/add/remove/force # Add or remove space after ';' in non-empty 'for' statements. Default=Force -sp_after_semi_for = force # ignore/add/remove/force +sp_after_semi_for = force # ignore/add/remove/force # Add or remove space after the final semicolon of an empty part of a for statement: for ( ; ; ). -sp_after_semi_for_empty = ignore # ignore/add/remove/force +sp_after_semi_for_empty = ignore # ignore/add/remove/force # Add or remove space before '[' (except '[]') -sp_before_square = remove # ignore/add/remove/force +sp_before_square = remove # ignore/add/remove/force # Add or remove space before '[]' -sp_before_squares = ignore # ignore/add/remove/force +sp_before_squares = ignore # ignore/add/remove/force # Add or remove space inside a non-empty '[' and ']' -sp_inside_square = ignore # ignore/add/remove/force +sp_inside_square = ignore # ignore/add/remove/force # Add or remove space after ',' -sp_after_comma = force # ignore/add/remove/force +sp_after_comma = force # ignore/add/remove/force # Add or remove space before ',' -sp_before_comma = remove # ignore/add/remove/force +sp_before_comma = remove # ignore/add/remove/force # Add or remove space between an open paren and comma: '(,' vs '( ,' -sp_paren_comma = force # ignore/add/remove/force +sp_paren_comma = force # ignore/add/remove/force # Add or remove space before the variadic '...' when preceded by a non-punctuator -sp_before_ellipsis = ignore # ignore/add/remove/force +sp_before_ellipsis = ignore # ignore/add/remove/force # Add or remove space after class ':' -sp_after_class_colon = ignore # ignore/add/remove/force +sp_after_class_colon = ignore # ignore/add/remove/force # Add or remove space before class ':' -sp_before_class_colon = ignore # ignore/add/remove/force +sp_before_class_colon = ignore # ignore/add/remove/force # Add or remove space before case ':'. Default=Remove -sp_before_case_colon = remove # ignore/add/remove/force +sp_before_case_colon = remove # ignore/add/remove/force # Add or remove space between 'operator' and operator sign -sp_after_operator = ignore # ignore/add/remove/force +sp_after_operator = ignore # ignore/add/remove/force # Add or remove space between the operator symbol and the open paren, as in 'operator ++(' -sp_after_operator_sym = ignore # ignore/add/remove/force +sp_after_operator_sym = ignore # ignore/add/remove/force # Add or remove space after C/D cast, i.e. 'cast(int)a' vs 'cast(int) a' or '(int)a' vs '(int) a' -sp_after_cast = force # ignore/add/remove/force +sp_after_cast = force # ignore/add/remove/force # Add or remove spaces inside cast parens -sp_inside_paren_cast = remove # ignore/add/remove/force +sp_inside_paren_cast = remove # ignore/add/remove/force # Add or remove space between the type and open paren in a C++ cast, i.e. 'int(exp)' vs 'int (exp)' -sp_cpp_cast_paren = ignore # ignore/add/remove/force +sp_cpp_cast_paren = ignore # ignore/add/remove/force # Add or remove space between 'sizeof' and '(' -sp_sizeof_paren = remove # ignore/add/remove/force +sp_sizeof_paren = remove # ignore/add/remove/force # Add or remove space after the tag keyword (Pawn) -sp_after_tag = ignore # ignore/add/remove/force +sp_after_tag = ignore # ignore/add/remove/force # Add or remove space inside enum '{' and '}' -sp_inside_braces_enum = add # ignore/add/remove/force +sp_inside_braces_enum = add # ignore/add/remove/force # Add or remove space inside struct/union '{' and '}' -sp_inside_braces_struct = add # ignore/add/remove/force +sp_inside_braces_struct = add # ignore/add/remove/force # Add or remove space inside '{' and '}' -sp_inside_braces = add # ignore/add/remove/force +sp_inside_braces = add # ignore/add/remove/force # Add or remove space inside '{}' -sp_inside_braces_empty = ignore # ignore/add/remove/force +sp_inside_braces_empty = remove # ignore/add/remove/force # Add or remove space between return type and function name # A minimum of 1 is forced except for pointer return types. -sp_type_func = add # ignore/add/remove/force +sp_type_func = add # ignore/add/remove/force # Add or remove space between function name and '(' on function declaration -sp_func_proto_paren = remove # ignore/add/remove/force +sp_func_proto_paren = remove # ignore/add/remove/force # Add or remove space between function name and '(' on function definition -sp_func_def_paren = remove # ignore/add/remove/force +sp_func_def_paren = remove # ignore/add/remove/force # Add or remove space inside empty function '()' -sp_inside_fparens = remove # ignore/add/remove/force +sp_inside_fparens = remove # ignore/add/remove/force # Add or remove space inside function '(' and ')' -sp_inside_fparen = add # ignore/add/remove/force +sp_inside_fparen = add # ignore/add/remove/force + +# Add or remove space inside the first parens in the function type: 'void (*x)(...)' +sp_inside_tparen = ignore # ignore/add/remove/force + +# Add or remove between the parens in the function type: 'void (*x)(...)' +sp_after_tparen_close = remove # ignore/add/remove/force # Add or remove space between ']' and '(' when part of a function call. -sp_square_fparen = ignore # ignore/add/remove/force +sp_square_fparen = ignore # ignore/add/remove/force # Add or remove space between ')' and '{' of function -sp_fparen_brace = add # ignore/add/remove/force +sp_fparen_brace = add # ignore/add/remove/force # Add or remove space between function name and '(' on function calls -sp_func_call_paren = remove # ignore/add/remove/force +sp_func_call_paren = remove # ignore/add/remove/force # Add or remove space between function name and '()' on function calls without parameters. # If set to 'ignore' (the default), sp_func_call_paren is used. -sp_func_call_paren_empty = ignore # ignore/add/remove/force +sp_func_call_paren_empty = remove # ignore/add/remove/force # Add or remove space between the user function name and '(' on function calls # You need to set a keyword to be a user function, like this: 'set func_call_user _' in the config file. -sp_func_call_user_paren = ignore # ignore/add/remove/force +sp_func_call_user_paren = ignore # ignore/add/remove/force # Add or remove space between a constructor/destructor and the open paren -sp_func_class_paren = remove # ignore/add/remove/force +sp_func_class_paren = remove # ignore/add/remove/force # Add or remove space between 'return' and '(' -sp_return_paren = add # ignore/add/remove/force +sp_return_paren = add # ignore/add/remove/force # Add or remove space between '__attribute__' and '(' -sp_attribute_paren = ignore # ignore/add/remove/force +sp_attribute_paren = ignore # ignore/add/remove/force # Add or remove space between 'defined' and '(' in '#if defined (FOO)' -sp_defined_paren = remove # ignore/add/remove/force +sp_defined_paren = remove # ignore/add/remove/force # Add or remove space between 'throw' and '(' in 'throw (something)' -sp_throw_paren = ignore # ignore/add/remove/force +sp_throw_paren = ignore # ignore/add/remove/force + +# Add or remove space between 'throw' and anything other than '(' as in '@throw [...];' +sp_after_throw = add # ignore/add/remove/force # Add or remove space between 'catch' and '(' in 'catch (something) { }' # If set to ignore, sp_before_sparen is used. -sp_catch_paren = remove # ignore/add/remove/force +sp_catch_paren = remove # ignore/add/remove/force # Add or remove space between 'version' and '(' in 'version (something) { }' (D language) # If set to ignore, sp_before_sparen is used. -sp_version_paren = ignore # ignore/add/remove/force +sp_version_paren = ignore # ignore/add/remove/force # Add or remove space between 'scope' and '(' in 'scope (something) { }' (D language) # If set to ignore, sp_before_sparen is used. -sp_scope_paren = ignore # ignore/add/remove/force +sp_scope_paren = ignore # ignore/add/remove/force # Add or remove space between macro and value -sp_macro = add # ignore/add/remove/force +sp_macro = add # ignore/add/remove/force # Add or remove space between macro function ')' and value -sp_macro_func = add # ignore/add/remove/force +sp_macro_func = add # ignore/add/remove/force # Add or remove space between 'else' and '{' if on the same line -sp_else_brace = add # ignore/add/remove/force +sp_else_brace = add # ignore/add/remove/force # Add or remove space between '}' and 'else' if on the same line -sp_brace_else = ignore # ignore/add/remove/force +sp_brace_else = ignore # ignore/add/remove/force # Add or remove space between '}' and the name of a typedef on the same line -sp_brace_typedef = ignore # ignore/add/remove/force +sp_brace_typedef = ignore # ignore/add/remove/force # Add or remove space between 'catch' and '{' if on the same line -sp_catch_brace = add # ignore/add/remove/force +sp_catch_brace = add # ignore/add/remove/force # Add or remove space between '}' and 'catch' if on the same line -sp_brace_catch = add # ignore/add/remove/force +sp_brace_catch = add # ignore/add/remove/force # Add or remove space between 'finally' and '{' if on the same line -sp_finally_brace = add # ignore/add/remove/force +sp_finally_brace = add # ignore/add/remove/force # Add or remove space between '}' and 'finally' if on the same line -sp_brace_finally = add # ignore/add/remove/force +sp_brace_finally = add # ignore/add/remove/force # Add or remove space between 'try' and '{' if on the same line -sp_try_brace = add # ignore/add/remove/force +sp_try_brace = add # ignore/add/remove/force # Add or remove space between get/set and '{' if on the same line -sp_getset_brace = add # ignore/add/remove/force +sp_getset_brace = add # ignore/add/remove/force + +# Add or remove space between a variable and '{' for C++ uniform initialization +sp_word_brace = add # ignore/add/remove/force + +# Add or remove space between a variable and '{' for a namespace +sp_word_brace_ns = add # ignore/add/remove/force # Add or remove space before the '::' operator -sp_before_dc = ignore # ignore/add/remove/force +sp_before_dc = ignore # ignore/add/remove/force # Add or remove space after the '::' operator -sp_after_dc = ignore # ignore/add/remove/force +sp_after_dc = ignore # ignore/add/remove/force # Add or remove around the D named array initializer ':' operator -sp_d_array_colon = ignore # ignore/add/remove/force +sp_d_array_colon = ignore # ignore/add/remove/force # Add or remove space after the '!' (not) operator. Default=Remove -sp_not = remove # ignore/add/remove/force +sp_not = remove # ignore/add/remove/force # Add or remove space after the '~' (invert) operator. Default=Remove -sp_inv = remove # ignore/add/remove/force +sp_inv = remove # ignore/add/remove/force # Add or remove space after the '&' (address-of) operator. Default=Remove # This does not affect the spacing after a '&' that is part of a type. -sp_addr = remove # ignore/add/remove/force +sp_addr = remove # ignore/add/remove/force # Add or remove space around the '.' or '->' operators. Default=Remove -sp_member = remove # ignore/add/remove/force +sp_member = remove # ignore/add/remove/force # Add or remove space after the '*' (dereference) operator. Default=Remove # This does not affect the spacing after a '*' that is part of a type. -sp_deref = remove # ignore/add/remove/force +sp_deref = remove # ignore/add/remove/force # Add or remove space after '+' or '-', as in 'x = -5' or 'y = +7'. Default=Remove -sp_sign = remove # ignore/add/remove/force +sp_sign = remove # ignore/add/remove/force # Add or remove space before or after '++' and '--', as in '(--x)' or 'y++;'. Default=Remove -sp_incdec = remove # ignore/add/remove/force +sp_incdec = remove # ignore/add/remove/force # Add or remove space before a backslash-newline at the end of a line. Default=Add -sp_before_nl_cont = add # ignore/add/remove/force +sp_before_nl_cont = add # ignore/add/remove/force # Add or remove space after the scope '+' or '-', as in '-(void) foo;' or '+(int) bar;' -sp_after_oc_scope = ignore # ignore/add/remove/force +sp_after_oc_scope = ignore # ignore/add/remove/force # Add or remove space after the colon in message specs # '-(int) f:(int) x;' vs '-(int) f: (int) x;' -sp_after_oc_colon = ignore # ignore/add/remove/force +sp_after_oc_colon = ignore # ignore/add/remove/force # Add or remove space before the colon in message specs # '-(int) f: (int) x;' vs '-(int) f : (int) x;' -sp_before_oc_colon = ignore # ignore/add/remove/force +sp_before_oc_colon = ignore # ignore/add/remove/force + +# Add or remove space after the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};' +sp_after_oc_dict_colon = ignore # ignore/add/remove/force + +# Add or remove space before the colon in immutable dictionary expression +# 'NSDictionary *test = @{@"foo" :@"bar"};' +sp_before_oc_dict_colon = ignore # ignore/add/remove/force # Add or remove space after the colon in message specs # '[object setValue:1];' vs '[object setValue: 1];' -sp_after_send_oc_colon = ignore # ignore/add/remove/force +sp_after_send_oc_colon = ignore # ignore/add/remove/force # Add or remove space before the colon in message specs # '[object setValue:1];' vs '[object setValue :1];' -sp_before_send_oc_colon = ignore # ignore/add/remove/force +sp_before_send_oc_colon = ignore # ignore/add/remove/force # Add or remove space after the (type) in message specs # '-(int)f: (int) x;' vs '-(int)f: (int)x;' -sp_after_oc_type = add # ignore/add/remove/force +sp_after_oc_type = add # ignore/add/remove/force # Add or remove space after the first (type) in message specs # '-(int) f:(int)x;' vs '-(int)f:(int)x;' -sp_after_oc_return_type = ignore # ignore/add/remove/force +sp_after_oc_return_type = ignore # ignore/add/remove/force # Add or remove space between '@selector' and '(' # '@selector(msgName)' vs '@selector (msgName)' # Also applies to @protocol() constructs -sp_after_oc_at_sel = ignore # ignore/add/remove/force +sp_after_oc_at_sel = ignore # ignore/add/remove/force # Add or remove space between '@selector(x)' and the following word # '@selector(foo) a:' vs '@selector(foo)a:' -sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force +sp_after_oc_at_sel_parens = ignore # ignore/add/remove/force # Add or remove space inside '@selector' parens # '@selector(foo)' vs '@selector( foo )' # Also applies to @protocol() constructs -sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force +sp_inside_oc_at_sel_parens = ignore # ignore/add/remove/force # Add or remove space before a block pointer caret # '^int (int arg){...}' vs. ' ^int (int arg){...}' -sp_before_oc_block_caret = ignore # ignore/add/remove/force +sp_before_oc_block_caret = ignore # ignore/add/remove/force # Add or remove space after a block pointer caret # '^int (int arg){...}' vs. '^ int (int arg){...}' -sp_after_oc_block_caret = ignore # ignore/add/remove/force +sp_after_oc_block_caret = ignore # ignore/add/remove/force + +# Add or remove space between the receiver and selector in a message. +# '[receiver selector ...]' +sp_after_oc_msg_receiver = ignore # ignore/add/remove/force + +# Add or remove space after @property. +sp_after_oc_property = ignore # ignore/add/remove/force # Add or remove space around the ':' in 'b ? t : f' -sp_cond_colon = add # ignore/add/remove/force +sp_cond_colon = add # ignore/add/remove/force + +# Add or remove space before the ':' in 'b ? t : f'. Overrides sp_cond_colon. +sp_cond_colon_before = ignore # ignore/add/remove/force + +# Add or remove space after the ':' in 'b ? t : f'. Overrides sp_cond_colon. +sp_cond_colon_after = ignore # ignore/add/remove/force # Add or remove space around the '?' in 'b ? t : f' -sp_cond_question = add # ignore/add/remove/force +sp_cond_question = add # ignore/add/remove/force + +# Add or remove space before the '?' in 'b ? t : f'. Overrides sp_cond_question. +sp_cond_question_before = ignore # ignore/add/remove/force + +# Add or remove space after the '?' in 'b ? t : f'. Overrides sp_cond_question. +sp_cond_question_after = ignore # ignore/add/remove/force # Fix the spacing between 'case' and the label. Only 'ignore' and 'force' make sense here. -sp_case_label = force # ignore/add/remove/force +sp_case_label = force # ignore/add/remove/force # Control the space around the D '..' operator. -sp_range = ignore # ignore/add/remove/force +sp_range = ignore # ignore/add/remove/force + +# Control the spacing after ':' in 'for (TYPE VAR : EXPR)' (Java) +sp_after_for_colon = force # ignore/add/remove/force + +# Control the spacing before ':' in 'for (TYPE VAR : EXPR)' (Java) +sp_before_for_colon = force # ignore/add/remove/force + +# Control the spacing in 'extern (C)' (D) +sp_extern_paren = ignore # ignore/add/remove/force # Control the space after the opening of a C++ comment '// A' vs '//A' -sp_cmt_cpp_start = force # ignore/add/remove/force +sp_cmt_cpp_start = force # ignore/add/remove/force # Controls the spaces between #else or #endif and a trailing comment -sp_endif_cmt = force # ignore/add/remove/force +sp_endif_cmt = force # ignore/add/remove/force # Controls the spaces after 'new', 'delete', and 'delete[]' -sp_after_new = force # ignore/add/remove/force +sp_after_new = force # ignore/add/remove/force # Controls the spaces before a trailing or embedded comment -sp_before_tr_emb_cmt = add # ignore/add/remove/force +sp_before_tr_emb_cmt = add # ignore/add/remove/force # Number of spaces before a trailing or embedded comment -sp_num_before_tr_emb_cmt = 4 # number +sp_num_before_tr_emb_cmt = 4 # number + +# Control space between a Java annotation and the open paren. +sp_annotation_paren = ignore # ignore/add/remove/force # # Code alignment (not left column spaces/tabs) # # Whether to keep non-indenting tabs -align_keep_tabs = false # false/true +align_keep_tabs = false # false/true # Whether to use tabs for aligning -align_with_tabs = false # false/true +align_with_tabs = false # false/true # Whether to bump out to the next tab when aligning -align_on_tabstop = true # false/true +align_on_tabstop = true # false/true # Whether to left-align numbers -align_number_left = true # false/true +align_number_left = true # false/true + +# Whether to keep whitespace not required for alignment. +align_keep_extra_space = false # false/true # Align variable definitions in prototypes and functions -align_func_params = true # false/true +align_func_params = false # false/true # Align parameters in single-line functions that have the same name. # The function names must already be aligned with each other. -align_same_func_call_params = false # false/true +align_same_func_call_params = false # false/true # The span for aligning variable definitions (0=don't align) -align_var_def_span = 3 # number +align_var_def_span = 1 # number # How to align the star in variable definitions. # 0=Part of the type 'void * foo;' # 1=Part of the variable 'void *foo;' # 2=Dangling 'void *foo;' -align_var_def_star_style = 0 # number +align_var_def_star_style = 0 # number # How to align the '&' in variable definitions. # 0=Part of the type # 1=Part of the variable # 2=Dangling -align_var_def_amp_style = 0 # number +align_var_def_amp_style = 0 # number # The threshold for aligning variable definitions (0=no limit) -align_var_def_thresh = 12 # number +align_var_def_thresh = 1 # number # The gap for aligning variable definitions -align_var_def_gap = 0 # number +align_var_def_gap = 1 # number # Whether to align the colon in struct bit fields -align_var_def_colon = false # false/true +align_var_def_colon = true # false/true # Whether to align any attribute after the variable name -align_var_def_attribute = false # false/true +align_var_def_attribute = false # false/true # Whether to align inline struct/enum/union variable definitions -align_var_def_inline = false # false/true +align_var_def_inline = false # false/true # The span for aligning on '=' in assignments (0=don't align) -align_assign_span = 1 # number +align_assign_span = 1 # number # The threshold for aligning on '=' in assignments (0=no limit) -align_assign_thresh = 4 # number +align_assign_thresh = 1 # number # The span for aligning on '=' in enums (0=don't align) -align_enum_equ_span = 3 # number +align_enum_equ_span = 1 # number # The threshold for aligning on '=' in enums (0=no limit) -align_enum_equ_thresh = 2 # number +align_enum_equ_thresh = 1 # number # The span for aligning struct/union (0=don't align) -align_var_struct_span = 1 # number +align_var_struct_span = 1 # number # The threshold for aligning struct/union member definitions (0=no limit) -align_var_struct_thresh = 0 # number +align_var_struct_thresh = 1 # number # The gap for aligning struct/union member definitions -align_var_struct_gap = 0 # number +align_var_struct_gap = 1 # number # The span for aligning struct initializer values (0=don't align) -align_struct_init_span = 1 # number +align_struct_init_span = 1 # number # The minimum space between the type and the synonym of a typedef -align_typedef_gap = 1 # number +align_typedef_gap = 1 # number # The span for aligning single-line typedefs (0=don't align) -align_typedef_span = 2 # number +align_typedef_span = 1 # number # How to align typedef'd functions with other typedefs # 0: Don't mix them at all # 1: align the open paren with the types # 2: align the function type name with the other type names -align_typedef_func = 0 # number +align_typedef_func = 0 # number # Controls the positioning of the '*' in typedefs. Just try it. # 0: Align on typedef type, ignore '*' # 1: The '*' is part of type name: typedef int *pint; # 2: The '*' is part of the type, but dangling: typedef int *pint; -align_typedef_star_style = 2 # number +align_typedef_star_style = 0 # number # Controls the positioning of the '&' in typedefs. Just try it. # 0: Align on typedef type, ignore '&' # 1: The '&' is part of type name: typedef int &pint; # 2: The '&' is part of the type, but dangling: typedef int &pint; -align_typedef_amp_style = 0 # number +align_typedef_amp_style = 0 # number # The span for aligning comments that end lines (0=don't align) -align_right_cmt_span = 3 # number +align_right_cmt_span = 3 # number # If aligning comments, mix with comments after '}' and #endif with less than 3 spaces before the comment -align_right_cmt_mix = false # false/true +align_right_cmt_mix = false # false/true # If a trailing comment is more than this number of columns away from the text it follows, # it will qualify for being aligned. This has to be > 0 to do anything. -align_right_cmt_gap = 0 # number +align_right_cmt_gap = 0 # number # Align trailing comment at or beyond column N; 'pulls in' comments as a bonus side effect (0=ignore) -align_right_cmt_at_col = 0 # number +align_right_cmt_at_col = 0 # number # The span for aligning function prototypes (0=don't align) -align_func_proto_span = 5 # number +align_func_proto_span = 1 # number # Minimum gap between the return type and the function name. -align_func_proto_gap = 0 # number +align_func_proto_gap = 0 # number # Align function protos on the 'operator' keyword instead of what follows -align_on_operator = true # false/true +align_on_operator = true # false/true # Whether to mix aligning prototype and variable declarations. # If true, align_var_def_XXX options are used instead of align_func_proto_XXX options. -align_mix_var_proto = false # false/true +align_mix_var_proto = false # false/true # Align single-line functions with function prototypes, uses align_func_proto_span -align_single_line_func = false # false/true +align_single_line_func = false # false/true # Aligning the open brace of single-line functions. # Requires align_single_line_func=true, uses align_func_proto_span -align_single_line_brace = false # false/true +align_single_line_brace = false # false/true # Gap for align_single_line_brace. -align_single_line_brace_gap = 0 # number +align_single_line_brace_gap = 0 # number # The span for aligning ObjC msg spec (0=don't align) -align_oc_msg_spec_span = 0 # number +align_oc_msg_spec_span = 0 # number # Whether to align macros wrapped with a backslash and a newline. # This will not work right if the macro contains a multi-line comment. -align_nl_cont = false # false/true +align_nl_cont = false # false/true # # Align macro functions and variables together -align_pp_define_together = false # false/true +align_pp_define_together = false # false/true # The minimum space between label and value of a preprocessor define -align_pp_define_gap = 1 # number +align_pp_define_gap = 1 # number # The span for aligning on '#define' bodies (0=don't align) -align_pp_define_span = 1 # number +align_pp_define_span = 2 # number # Align lines that start with '<<' with previous '<<'. Default=true -align_left_shift = true # false/true +align_left_shift = true # false/true # Span for aligning parameters in an Obj-C message call on the ':' (0=don't align) -align_oc_msg_colon_span = 0 # number +align_oc_msg_colon_span = 0 # number + +# If true, always align with the first parameter, even if it is too short. +align_oc_msg_colon_first = false # false/true # Aligning parameters in an Obj-C '+' or '-' declaration on the ':' -align_oc_decl_colon = false # false/true +align_oc_decl_colon = false # false/true # # Newline adding and removing options # # Whether to collapse empty blocks between '{' and '}' -nl_collapse_empty_body = false # false/true +nl_collapse_empty_body = false # false/true # Don't split one-line braced assignments - 'foo_t f = { 1, 2 };' -nl_assign_leave_one_liners = true # false/true +nl_assign_leave_one_liners = true # false/true # Don't split one-line braced statements inside a class xx { } body -nl_class_leave_one_liners = true # false/true +nl_class_leave_one_liners = true # false/true # Don't split one-line enums: 'enum foo { BAR = 15 };' -nl_enum_leave_one_liners = false # false/true +nl_enum_leave_one_liners = false # false/true # Don't split one-line get or set functions -nl_getset_leave_one_liners = false # false/true +nl_getset_leave_one_liners = false # false/true # Don't split one-line function definitions - 'int foo() { return 0; }' -nl_func_leave_one_liners = false # false/true +nl_func_leave_one_liners = false # false/true + +# Don't split one-line C++11 lambdas - '[]() { return 0; }' +nl_cpp_lambda_leave_one_liners = false # false/true # Don't split one-line if/else statements - 'if(a) b++;' -nl_if_leave_one_liners = false # false/true +nl_if_leave_one_liners = false # false/true + +# Don't split one-line OC messages +nl_oc_msg_leave_one_liner = false # false/true # Add or remove newlines at the start of the file -nl_start_of_file = ignore # ignore/add/remove/force +nl_start_of_file = ignore # ignore/add/remove/force # The number of newlines at the start of the file (only used if nl_start_of_file is 'add' or 'force' -nl_start_of_file_min = 0 # number +nl_start_of_file_min = 0 # number # Add or remove newline at the end of the file -nl_end_of_file = force # ignore/add/remove/force +nl_end_of_file = force # ignore/add/remove/force # The number of newlines at the end of the file (only used if nl_end_of_file is 'add' or 'force') -nl_end_of_file_min = 1 # number +nl_end_of_file_min = 1 # number # Add or remove newline between '=' and '{' -nl_assign_brace = add # ignore/add/remove/force +nl_assign_brace = add # ignore/add/remove/force # Add or remove newline between '=' and '[' (D only) -nl_assign_square = add # ignore/add/remove/force +nl_assign_square = add # ignore/add/remove/force # Add or remove newline after '= [' (D only). Will also affect the newline before the ']' -nl_after_square_assign = ignore # ignore/add/remove/force +nl_after_square_assign = ignore # ignore/add/remove/force # The number of blank lines after a block of variable definitions at the top of a function body # 0 = No change (default) -nl_func_var_def_blk = 1 # number +nl_func_var_def_blk = 1 # number # The number of newlines before a block of typedefs # 0 = No change (default) -nl_typedef_blk_start = 1 # number +nl_typedef_blk_start = 1 # number # The number of newlines after a block of typedefs # 0 = No change (default) -nl_typedef_blk_end = 1 # number +nl_typedef_blk_end = 1 # number # The maximum consecutive newlines within a block of typedefs # 0 = No change (default) -nl_typedef_blk_in = 0 # number +nl_typedef_blk_in = 0 # number # The number of newlines before a block of variable definitions not at the top of a function body # 0 = No change (default) -nl_var_def_blk_start = 0 # number +nl_var_def_blk_start = 0 # number # The number of newlines after a block of variable definitions not at the top of a function body # 0 = No change (default) -nl_var_def_blk_end = 1 # number +nl_var_def_blk_end = 1 # number # The maximum consecutive newlines within a block of variable definitions # 0 = No change (default) -nl_var_def_blk_in = 0 # number +nl_var_def_blk_in = 0 # number # Add or remove newline between a function call's ')' and '{', as in: # list_for_each(item, &list) { } -nl_fcall_brace = remove # ignore/add/remove/force +nl_fcall_brace = remove # ignore/add/remove/force # Add or remove newline between 'enum' and '{' -nl_enum_brace = remove # ignore/add/remove/force +nl_enum_brace = force # ignore/add/remove/force # Add or remove newline between 'struct and '{' -nl_struct_brace = add # ignore/add/remove/force +nl_struct_brace = force # ignore/add/remove/force # Add or remove newline between 'union' and '{' -nl_union_brace = add # ignore/add/remove/force +nl_union_brace = force # ignore/add/remove/force # Add or remove newline between 'if' and '{' -nl_if_brace = force # ignore/add/remove/force +nl_if_brace = force # ignore/add/remove/force # Add or remove newline between '}' and 'else' -nl_brace_else = force # ignore/add/remove/force +nl_brace_else = force # ignore/add/remove/force # Add or remove newline between 'else if' and '{' # If set to ignore, nl_if_brace is used instead -nl_elseif_brace = force # ignore/add/remove/force +nl_elseif_brace = force # ignore/add/remove/force # Add or remove newline between 'else' and '{' -nl_else_brace = force # ignore/add/remove/force +nl_else_brace = force # ignore/add/remove/force # Add or remove newline between 'else' and 'if' -nl_else_if = remove # ignore/add/remove/force +nl_else_if = remove # ignore/add/remove/force # Add or remove newline between '}' and 'finally' -nl_brace_finally = ignore # ignore/add/remove/force +nl_brace_finally = force # ignore/add/remove/force # Add or remove newline between 'finally' and '{' -nl_finally_brace = ignore # ignore/add/remove/force +nl_finally_brace = force # ignore/add/remove/force # Add or remove newline between 'try' and '{' -nl_try_brace = force # ignore/add/remove/force +nl_try_brace = force # ignore/add/remove/force # Add or remove newline between get/set and '{' -nl_getset_brace = ignore # ignore/add/remove/force +nl_getset_brace = ignore # ignore/add/remove/force # Add or remove newline between 'for' and '{' -nl_for_brace = force # ignore/add/remove/force +nl_for_brace = force # ignore/add/remove/force # Add or remove newline between 'catch' and '{' -nl_catch_brace = force # ignore/add/remove/force +nl_catch_brace = force # ignore/add/remove/force # Add or remove newline between '}' and 'catch' -nl_brace_catch = force # ignore/add/remove/force +nl_brace_catch = force # ignore/add/remove/force # Add or remove newline between 'while' and '{' -nl_while_brace = force # ignore/add/remove/force +nl_while_brace = force # ignore/add/remove/force # Add or remove newline between 'scope (x)' and '{' (D) -nl_scope_brace = ignore # ignore/add/remove/force +nl_scope_brace = ignore # ignore/add/remove/force # Add or remove newline between 'unittest' and '{' (D) -nl_unittest_brace = ignore # ignore/add/remove/force +nl_unittest_brace = ignore # ignore/add/remove/force # Add or remove newline between 'version (x)' and '{' (D) -nl_version_brace = ignore # ignore/add/remove/force +nl_version_brace = ignore # ignore/add/remove/force # Add or remove newline between 'using' and '{' -nl_using_brace = ignore # ignore/add/remove/force +nl_using_brace = ignore # ignore/add/remove/force # Add or remove newline between two open or close braces. # Due to general newline/brace handling, REMOVE may not work. -nl_brace_brace = ignore # ignore/add/remove/force +nl_brace_brace = ignore # ignore/add/remove/force # Add or remove newline between 'do' and '{' -nl_do_brace = ignore # ignore/add/remove/force +nl_do_brace = ignore # ignore/add/remove/force # Add or remove newline between '}' and 'while' of 'do' statement -nl_brace_while = remove # ignore/add/remove/force +nl_brace_while = remove # ignore/add/remove/force # Add or remove newline between 'switch' and '{' -nl_switch_brace = force # ignore/add/remove/force +nl_switch_brace = force # ignore/add/remove/force # Add a newline between ')' and '{' if the ')' is on a different line than the if/for/etc. # Overrides nl_for_brace, nl_if_brace, nl_switch_brace, nl_while_switch, and nl_catch_brace. -nl_multi_line_cond = false # false/true +nl_multi_line_cond = false # false/true # Force a newline in a define after the macro name for multi-line defines. -nl_multi_line_define = false # false/true +nl_multi_line_define = false # false/true # Whether to put a newline before 'case' statement -nl_before_case = true # false/true +nl_before_case = true # false/true # Add or remove newline between ')' and 'throw' -nl_before_throw = ignore # ignore/add/remove/force +nl_before_throw = ignore # ignore/add/remove/force # Whether to put a newline after 'case' statement -nl_after_case = true # false/true +nl_after_case = true # false/true # Add or remove a newline between a case ':' and '{'. Overrides nl_after_case. -nl_case_colon_brace = ignore # ignore/add/remove/force +nl_case_colon_brace = force # ignore/add/remove/force # Newline between namespace and { -nl_namespace_brace = ignore # ignore/add/remove/force +nl_namespace_brace = remove # ignore/add/remove/force # Add or remove newline between 'template<>' and whatever follows. -nl_template_class = force # ignore/add/remove/force +nl_template_class = force # ignore/add/remove/force # Add or remove newline between 'class' and '{' -nl_class_brace = force # ignore/add/remove/force +nl_class_brace = force # ignore/add/remove/force # Add or remove newline after each ',' in the constructor member initialization -nl_class_init_args = add # ignore/add/remove/force +nl_class_init_args = add # ignore/add/remove/force # Add or remove newline between return type and function name in a function definition -nl_func_type_name = remove # ignore/add/remove/force +nl_func_type_name = remove # ignore/add/remove/force # Add or remove newline between return type and function name inside a class {} # Uses nl_func_type_name or nl_func_proto_type_name if set to ignore. -nl_func_type_name_class = ignore # ignore/add/remove/force +nl_func_type_name_class = ignore # ignore/add/remove/force # Add or remove newline between function scope and name in a definition # Controls the newline after '::' in 'void A::f() { }' -nl_func_scope_name = remove # ignore/add/remove/force +nl_func_scope_name = remove # ignore/add/remove/force # Add or remove newline between return type and function name in a prototype -nl_func_proto_type_name = remove # ignore/add/remove/force +nl_func_proto_type_name = remove # ignore/add/remove/force # Add or remove newline between a function name and the opening '(' -nl_func_paren = remove # ignore/add/remove/force +nl_func_paren = remove # ignore/add/remove/force # Add or remove newline between a function name and the opening '(' in the definition -nl_func_def_paren = remove # ignore/add/remove/force +nl_func_def_paren = remove # ignore/add/remove/force # Add or remove newline after '(' in a function declaration -nl_func_decl_start = ignore # ignore/add/remove/force +nl_func_decl_start = remove # ignore/add/remove/force # Add or remove newline after '(' in a function definition -nl_func_def_start = ignore # ignore/add/remove/force +nl_func_def_start = remove # ignore/add/remove/force # Overrides nl_func_decl_start when there is only one parameter. -nl_func_decl_start_single = remove # ignore/add/remove/force +nl_func_decl_start_single = remove # ignore/add/remove/force # Overrides nl_func_def_start when there is only one parameter. -nl_func_def_start_single = remove # ignore/add/remove/force +nl_func_def_start_single = remove # ignore/add/remove/force # Add or remove newline after each ',' in a function declaration -nl_func_decl_args = ignore # ignore/add/remove/force +nl_func_decl_args = ignore # ignore/add/remove/force # Add or remove newline after each ',' in a function definition -nl_func_def_args = ignore # ignore/add/remove/force +nl_func_def_args = ignore # ignore/add/remove/force # Add or remove newline before the ')' in a function declaration -nl_func_decl_end = ignore # ignore/add/remove/force +nl_func_decl_end = ignore # ignore/add/remove/force # Add or remove newline before the ')' in a function definition -nl_func_def_end = ignore # ignore/add/remove/force +nl_func_def_end = ignore # ignore/add/remove/force # Overrides nl_func_decl_end when there is only one parameter. -nl_func_decl_end_single = remove # ignore/add/remove/force +nl_func_decl_end_single = remove # ignore/add/remove/force # Overrides nl_func_def_end when there is only one parameter. -nl_func_def_end_single = remove # ignore/add/remove/force +nl_func_def_end_single = remove # ignore/add/remove/force # Add or remove newline between '()' in a function declaration. -nl_func_decl_empty = remove # ignore/add/remove/force +nl_func_decl_empty = remove # ignore/add/remove/force # Add or remove newline between '()' in a function definition. -nl_func_def_empty = remove # ignore/add/remove/force +nl_func_def_empty = remove # ignore/add/remove/force + +# Whether to put each OC message parameter on a separate line +# See nl_oc_msg_leave_one_liner +nl_oc_msg_args = false # false/true # Add or remove newline between function signature and '{' -nl_fdef_brace = force # ignore/add/remove/force +nl_fdef_brace = force # ignore/add/remove/force + +# Add or remove newline between C++11 lambda signature and '{' +nl_cpp_ldef_brace = ignore # ignore/add/remove/force # Add or remove a newline between the return keyword and return expression. -nl_return_expr = remove # ignore/add/remove/force +nl_return_expr = remove # ignore/add/remove/force # Whether to put a newline after semicolons, except in 'for' statements -nl_after_semicolon = false # false/true +nl_after_semicolon = false # false/true # Whether to put a newline after brace open. # This also adds a newline before the matching brace close. -nl_after_brace_open = true # false/true +nl_after_brace_open = true # false/true # If nl_after_brace_open and nl_after_brace_open_cmt are true, a newline is # placed between the open brace and a trailing single-line comment. -nl_after_brace_open_cmt = true # false/true +nl_after_brace_open_cmt = true # false/true # Whether to put a newline after a virtual brace open with a non-empty body. # These occur in un-braced if/while/do/for statement bodies. -nl_after_vbrace_open = true # false/true +nl_after_vbrace_open = true # false/true # Whether to put a newline after a virtual brace open with an empty body. # These occur in un-braced if/while/do/for statement bodies. -nl_after_vbrace_open_empty = true # false/true +nl_after_vbrace_open_empty = true # false/true # Whether to put a newline after a brace close. # Does not apply if followed by a necessary ';'. -nl_after_brace_close = true # false/true +nl_after_brace_close = true # false/true # Whether to put a newline after a virtual brace close. # Would add a newline before return in: 'if (foo) a++; return;' -nl_after_vbrace_close = true # false/true +nl_after_vbrace_close = true # false/true + +# Control the newline between the close brace and 'b' in: 'struct { int a; } b;' +# Affects enums, unions, and structures. If set to ignore, uses nl_after_brace_close +nl_brace_struct_var = ignore # ignore/add/remove/force # Whether to alter newlines in '#define' macros -nl_define_macro = false # false/true +nl_define_macro = false # false/true # Whether to not put blanks after '#ifxx', '#elxx', or before '#endif' -nl_squeeze_ifdef = false # false/true +nl_squeeze_ifdef = false # false/true # Add or remove blank line before 'if' -nl_before_if = add # ignore/add/remove/force +nl_before_if = add # ignore/add/remove/force # Add or remove blank line after 'if' statement -nl_after_if = add # ignore/add/remove/force +nl_after_if = add # ignore/add/remove/force # Add or remove blank line before 'for' -nl_before_for = add # ignore/add/remove/force +nl_before_for = add # ignore/add/remove/force # Add or remove blank line after 'for' statement -nl_after_for = add # ignore/add/remove/force +nl_after_for = add # ignore/add/remove/force # Add or remove blank line before 'while' -nl_before_while = add # ignore/add/remove/force +nl_before_while = add # ignore/add/remove/force # Add or remove blank line after 'while' statement -nl_after_while = add # ignore/add/remove/force +nl_after_while = add # ignore/add/remove/force # Add or remove blank line before 'switch' -nl_before_switch = add # ignore/add/remove/force +nl_before_switch = add # ignore/add/remove/force # Add or remove blank line after 'switch' statement -nl_after_switch = add # ignore/add/remove/force +nl_after_switch = add # ignore/add/remove/force # Add or remove blank line before 'do' -nl_before_do = add # ignore/add/remove/force +nl_before_do = add # ignore/add/remove/force # Add or remove blank line after 'do/while' statement -nl_after_do = add # ignore/add/remove/force +nl_after_do = add # ignore/add/remove/force # Whether to double-space commented-entries in struct/enum -nl_ds_struct_enum_cmt = true # false/true +nl_ds_struct_enum_cmt = true # false/true # Whether to double-space before the close brace of a struct/union/enum # (lower priority than 'eat_blanks_before_close_brace') -nl_ds_struct_enum_close_brace = false # false/true +nl_ds_struct_enum_close_brace = false # false/true # Add or remove a newline around a class colon. # Related to pos_class_colon, nl_class_init_args, and pos_comma. -nl_class_colon = ignore # ignore/add/remove/force +nl_class_colon = ignore # ignore/add/remove/force # Change simple unbraced if statements into a one-liner # 'if(b)\n i++;' => 'if(b) i++;' -nl_create_if_one_liner = false # false/true +nl_create_if_one_liner = false # false/true # Change simple unbraced for statements into a one-liner # 'for (i=0;i<5;i++)\n foo(i);' => 'for (i=0;i<5;i++) foo(i);' -nl_create_for_one_liner = false # false/true +nl_create_for_one_liner = false # false/true # Change simple unbraced while statements into a one-liner # 'while (i<5)\n foo(i++);' => 'while (i<5) foo(i++);' -nl_create_while_one_liner = false # false/true +nl_create_while_one_liner = false # false/true # # Positioning options # # The position of arithmetic operators in wrapped expressions -pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_arith = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of assignment in wrapped expressions. # Do not affect '=' followed by '{' -pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_assign = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of boolean operators in wrapped expressions -pos_bool = lead # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_bool = lead # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of comparison operators in wrapped expressions -pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_compare = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of conditional (b ? t : f) operators in wrapped expressions -pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_conditional = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in wrapped expressions -pos_comma = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_comma = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of the comma in the constructor initialization list -pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_class_comma = ignore # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # The position of colons between constructor and member initialization -pos_class_colon = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force +pos_class_colon = trail # ignore/join/lead/lead_break/lead_force/trail/trail_break/trail_force # # Line Splitting options # # Try to limit code width to N number of columns -code_width = 99 # number +code_width = 100 # number # Whether to fully split long 'for' statements at semi-colons -ls_for_split_full = true # false/true +ls_for_split_full = true # false/true # Whether to fully split long function protos/calls at commas -ls_func_split_full = true # false/true +ls_func_split_full = true # false/true # Whether to split lines as close to code_width as possible and ignore some groupings -ls_code_width = false # false/true +ls_code_width = false # false/true # # Blank line options # # The maximum consecutive newlines -nl_max = 3 # number +nl_max = 3 # number # The number of newlines after a function prototype, if followed by another function prototype -nl_after_func_proto = 0 # number +nl_after_func_proto = 0 # number # The number of newlines after a function prototype, if not followed by another function prototype -nl_after_func_proto_group = 2 # number +nl_after_func_proto_group = 2 # number # The number of newlines after '}' of a multi-line function body -nl_after_func_body = 3 # number +nl_after_func_body = 3 # number # The number of newlines after '}' of a multi-line function body in a class declaration -nl_after_func_body_class = 2 # number +nl_after_func_body_class = 2 # number # The number of newlines after '}' of a single line function body -nl_after_func_body_one_liner = 1 # number +nl_after_func_body_one_liner = 1 # number # The minimum number of newlines before a multi-line comment. # Doesn't apply if after a brace open or another multi-line comment. -nl_before_block_comment = 1 # number +nl_before_block_comment = 1 # number # The minimum number of newlines before a single-line C comment. # Doesn't apply if after a brace open or other single-line C comments. -nl_before_c_comment = 1 # number +nl_before_c_comment = 1 # number # The minimum number of newlines before a CPP comment. # Doesn't apply if after a brace open or other CPP comments. -nl_before_cpp_comment = 1 # number +nl_before_cpp_comment = 1 # number # Whether to force a newline after a multi-line comment. -nl_after_multiline_comment = false # false/true +nl_after_multiline_comment = false # false/true # The number of newlines after '}' or ';' of a struct/enum/union definition -nl_after_struct = 0 # number +nl_after_struct = 0 # number # The number of newlines after '}' or ';' of a class definition -nl_after_class = 0 # number +nl_after_class = 0 # number # The number of newlines before a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. # Will not change the newline count if after a brace open. # 0 = No change. -nl_before_access_spec = 1 # number +nl_before_access_spec = 2 # number # The number of newlines after a 'private:', 'public:', 'protected:', 'signals:', or 'slots:' label. # 0 = No change. -nl_after_access_spec = 0 # number +nl_after_access_spec = 0 # number # The number of newlines between a function def and the function comment. # 0 = No change. -nl_comment_func_def = 0 # number +nl_comment_func_def = 0 # number # The number of newlines after a try-catch-finally block that isn't followed by a brace close. # 0 = No change. -nl_after_try_catch_finally = 1 # number +nl_after_try_catch_finally = 1 # number # The number of newlines before and after a property, indexer or event decl. # 0 = No change. -nl_around_cs_property = 0 # number +nl_around_cs_property = 0 # number # The number of newlines between the get/set/add/remove handlers in C#. # 0 = No change. -nl_between_get_set = 0 # number +nl_between_get_set = 0 # number # Add or remove newline between C# property and the '{' -nl_property_brace = ignore # ignore/add/remove/force +nl_property_brace = ignore # ignore/add/remove/force # Whether to remove blank lines after '{' -eat_blanks_after_open_brace = true # false/true +eat_blanks_after_open_brace = true # false/true # Whether to remove blank lines before '}' -eat_blanks_before_close_brace = true # false/true +eat_blanks_before_close_brace = true # false/true # How aggressively to remove extra newlines not in preproc. # 0: No change # 1: Remove most newlines not handled by other config # 2: Remove all newlines and reformat completely by config -nl_remove_extra_newlines = 0 # number +nl_remove_extra_newlines = 0 # number # Whether to put a blank line before 'return' statements, unless after an open brace. -nl_before_return = false # false/true +nl_before_return = false # false/true # Whether to put a blank line after 'return' statements, unless followed by a close brace. -nl_after_return = false # false/true +nl_after_return = false # false/true + +# Whether to put a newline after a Java annotation statement. +# Only affects annotations that are after a newline. +nl_after_annotation = ignore # ignore/add/remove/force + +# Controls the newline between two annotations. +nl_between_annotation = ignore # ignore/add/remove/force # # Code modifying options (non-whitespace) # # Add or remove braces on single-line 'do' statement -mod_full_brace_do = add # ignore/add/remove/force +mod_full_brace_do = add # ignore/add/remove/force # Add or remove braces on single-line 'for' statement -mod_full_brace_for = ignore # ignore/add/remove/force +mod_full_brace_for = ignore # ignore/add/remove/force # Add or remove braces on single-line function definitions. (Pawn) -mod_full_brace_function = ignore # ignore/add/remove/force +mod_full_brace_function = ignore # ignore/add/remove/force # Add or remove braces on single-line 'if' statement. Will not remove the braces if they contain an 'else'. -mod_full_brace_if = ignore # ignore/add/remove/force +mod_full_brace_if = ignore # ignore/add/remove/force # Make all if/elseif/else statements in a chain be braced or not. Overrides mod_full_brace_if. # If any must be braced, they are all braced. If all can be unbraced, then the braces are removed. -mod_full_brace_if_chain = false # false/true +mod_full_brace_if_chain = false # false/true # Don't remove braces around statements that span N newlines -mod_full_brace_nl = 3 # number +mod_full_brace_nl = 3 # number # Add or remove braces on single-line 'while' statement -mod_full_brace_while = ignore # ignore/add/remove/force +mod_full_brace_while = ignore # ignore/add/remove/force # Add or remove braces on single-line 'using ()' statement -mod_full_brace_using = ignore # ignore/add/remove/force +mod_full_brace_using = ignore # ignore/add/remove/force # Add or remove unnecessary paren on 'return' statement -mod_paren_on_return = remove # ignore/add/remove/force +mod_paren_on_return = remove # ignore/add/remove/force # Whether to change optional semicolons to real semicolons -mod_pawn_semicolon = false # false/true +mod_pawn_semicolon = false # false/true # Add parens on 'while' and 'if' statement around bools -mod_full_paren_if_bool = false # false/true +mod_full_paren_if_bool = false # false/true # Whether to remove superfluous semicolons -mod_remove_extra_semicolon = false # false/true +mod_remove_extra_semicolon = false # false/true # If a function body exceeds the specified number of newlines and doesn't have a comment after # the close brace, a comment will be added. -mod_add_long_function_closebrace_comment = 0 # number +mod_add_long_function_closebrace_comment = 0 # number + +# If a namespace body exceeds the specified number of newlines and doesn't have a comment after +# the close brace, a comment will be added. +mod_add_long_namespace_closebrace_comment = 0 # number # If a switch body exceeds the specified number of newlines and doesn't have a comment after # the close brace, a comment will be added. -mod_add_long_switch_closebrace_comment = 0 # number +mod_add_long_switch_closebrace_comment = 0 # number # If an #ifdef body exceeds the specified number of newlines and doesn't have a comment after # the #endif, a comment will be added. -mod_add_long_ifdef_endif_comment = 0 # number +mod_add_long_ifdef_endif_comment = 0 # number # If an #ifdef or #else body exceeds the specified number of newlines and doesn't have a comment after # the #else, a comment will be added. -mod_add_long_ifdef_else_comment = 0 # number +mod_add_long_ifdef_else_comment = 0 # number # If TRUE, will sort consecutive single-line 'import' statements [Java, D] -mod_sort_import = false # false/true +mod_sort_import = false # false/true # If TRUE, will sort consecutive single-line 'using' statements [C#] -mod_sort_using = false # false/true +mod_sort_using = false # false/true # If TRUE, will sort consecutive single-line '#include' statements [C/C++] and '#import' statements [Obj-C] # This is generally a bad idea, as it may break your code. -mod_sort_include = false # false/true +mod_sort_include = false # false/true # If TRUE, it will move a 'break' that appears after a fully braced 'case' before the close brace. -mod_move_case_break = false # false/true +mod_move_case_break = false # false/true # Will add or remove the braces around a fully braced case statement. # Will only remove the braces if there are no variable declarations in the block. -mod_case_brace = ignore # ignore/add/remove/force +mod_case_brace = ignore # ignore/add/remove/force # If TRUE, it will remove a void 'return;' that appears as the last statement in a function. -mod_remove_empty_return = true # false/true +mod_remove_empty_return = true # false/true # # Comment modifications # # Try to wrap comments at cmt_width columns -cmt_width = 0 # number +cmt_width = 0 # number # Set the comment reflow mode (default: 0) # 0: no reflowing (apart from the line wrapping due to cmt_width) # 1: no touching at all # 2: full reflow -cmt_reflow_mode = 0 # number +cmt_reflow_mode = 0 # number # If false, disable all multi-line comment changes, including cmt_width. keyword substitution, and leading chars. # Default is true. -cmt_indent_multi = true # false/true +cmt_indent_multi = true # false/true # Whether to group c-comments that look like they are in a block -cmt_c_group = false # false/true +cmt_c_group = false # false/true # Whether to put an empty '/*' on the first line of the combined c-comment -cmt_c_nl_start = false # false/true +cmt_c_nl_start = false # false/true # Whether to put a newline before the closing '*/' of the combined c-comment -cmt_c_nl_end = false # false/true +cmt_c_nl_end = false # false/true # Whether to group cpp-comments that look like they are in a block -cmt_cpp_group = false # false/true +cmt_cpp_group = false # false/true # Whether to put an empty '/*' on the first line of the combined cpp-comment -cmt_cpp_nl_start = false # false/true +cmt_cpp_nl_start = false # false/true # Whether to put a newline before the closing '*/' of the combined cpp-comment -cmt_cpp_nl_end = false # false/true +cmt_cpp_nl_end = false # false/true # Whether to change cpp-comments into c-comments -cmt_cpp_to_c = false # false/true +cmt_cpp_to_c = false # false/true # Whether to put a star on subsequent comment lines -cmt_star_cont = true # false/true +cmt_star_cont = true # false/true # The number of spaces to insert at the start of subsequent comment lines -cmt_sp_before_star_cont = 0 # number +cmt_sp_before_star_cont = 0 # number # The number of spaces to insert after the star on subsequent comment lines -cmt_sp_after_star_cont = 1 # number +cmt_sp_after_star_cont = 1 # number # For multi-line comments with a '*' lead, remove leading spaces if the first and last lines of # the comment are the same length. Default=True -cmt_multi_check_last = true # false/true +cmt_multi_check_last = true # false/true # The filename that contains text to insert at the head of a file if the file doesn't start with a C/C++ comment. # Will substitute $(filename) with the current file's name. -cmt_insert_file_header = "" # string +cmt_insert_file_header = "" # string # The filename that contains text to insert at the end of a file if the file doesn't end with a C/C++ comment. # Will substitute $(filename) with the current file's name. -cmt_insert_file_footer = "" # string +cmt_insert_file_footer = "" # string # The filename that contains text to insert before a function implementation if the function isn't preceded with a C/C++ comment. # Will substitute $(function) with the function name and $(javaparam) with the javadoc @param and @return stuff. # Will also substitute $(fclass) with the class name: void CFoo::Bar() { ... } -cmt_insert_func_header = "" # string +cmt_insert_func_header = "" # string # The filename that contains text to insert before a class if the class isn't preceded with a C/C++ comment. # Will substitute $(class) with the class name. -cmt_insert_class_header = "" # string +cmt_insert_class_header = "" # string # The filename that contains text to insert before a Obj-C message specification if the method isn't preceeded with a C/C++ comment. # Will substitute $(message) with the function name and $(javaparam) with the javadoc @param and @return stuff. -cmt_insert_oc_msg_header = "" # string +cmt_insert_oc_msg_header = "" # string # If a preprocessor is encountered when stepping backwards from a function name, then # this option decides whether the comment should be inserted. # Affects cmt_insert_oc_msg_header, cmt_insert_func_header and cmt_insert_class_header. -cmt_insert_before_preproc = false # false/true +cmt_insert_before_preproc = false # false/true # # Preprocessor options # # Control indent of preprocessors inside #if blocks at brace level 0 -pp_indent = ignore # ignore/add/remove/force +pp_indent = ignore # ignore/add/remove/force # Whether to indent #if/#else/#endif at the brace level (true) or from column 1 (false) -pp_indent_at_level = false # false/true +pp_indent_at_level = false # false/true # If pp_indent_at_level=false, specifies the number of columns to indent per level. Default=1. -pp_indent_count = 1 # number +pp_indent_count = 1 # number # Add or remove space after # based on pp_level of #if blocks -pp_space = ignore # ignore/add/remove/force +pp_space = ignore # ignore/add/remove/force # Sets the number of spaces added with pp_space -pp_space_count = 1 # number +pp_space_count = 1 # number # The indent for #region and #endregion in C# and '#pragma region' in C/C++ -pp_indent_region = 0 # number +pp_indent_region = 0 # number # Whether to indent the code between #region and #endregion -pp_region_indent_code = false # false/true +pp_region_indent_code = false # false/true # If pp_indent_at_level=true, sets the indent for #if, #else, and #endif when not at file-level -pp_indent_if = 1 # number +pp_indent_if = 1 # number # Control whether to indent the code between #if, #else and #endif when not at file-level -pp_if_indent_code = false # false/true +pp_if_indent_code = false # false/true # Whether to indent '#define' at the brace level (true) or from column 1 (false) -pp_define_at_level = false # false/true +pp_define_at_level = false # false/true # You can force a token to be a type with the 'type' option. # Example: From 681301ab9bcc12c473d0157fa121064e51cec202 Mon Sep 17 00:00:00 2001 From: Dick Hollenbeck Date: Mon, 26 Aug 2013 15:19:04 -0500 Subject: [PATCH 40/42] switch to newer boost version. --- CMakeModules/download_boost.cmake | 43 +++++++++++++++++-------------- 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/CMakeModules/download_boost.cmake b/CMakeModules/download_boost.cmake index b4667d4874..02d2add3e3 100644 --- a/CMakeModules/download_boost.cmake +++ b/CMakeModules/download_boost.cmake @@ -29,8 +29,13 @@ #--------------------------------------------------------------------- -set( BOOST_RELEASE 1.53.0 ) -set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change +if( false ) + set( BOOST_RELEASE 1.53.0 ) + set( BOOST_MD5 a00d22605d5dbcfb4c9936a9b35bc4c2 ) # re-calc this on every RELEASE change +else() + set( BOOST_RELEASE 1.54.0 ) + set( BOOST_MD5 15cb8c0803064faef0c4ddf5bc5ca279 ) # re-calc this on every RELEASE change +endif() # The boost headers [and static libs if built] go here, at the top of KiCad # source tree in boost_root. @@ -40,13 +45,13 @@ set( BOOST_ROOT "${PROJECT_SOURCE_DIR}/boost_root" ) if( BUILD_GITHUB_PLUGIN ) # Space separated list which indicates the subset of boost libraries to compile. set( BOOST_LIBS_BUILT - filesystem + #filesystem system - regex - program_options - date_time - thread - exception + #regex + #program_options + #date_time + #thread + #exception unit_test_framework ) endif() @@ -69,22 +74,17 @@ set( headers_src "${PREFIX}/src/boost/boost" ) # don't look at this: -function( set_boost_lib_names libs ) - foreach( lib IN LISTS ${libs} ) - string( TOUPPER ${lib} LIB ) - message( STATUS "LIB:${LIB} lib:${lib}" ) - set( Boost_${LIB}_LIBRARY, "${BOOST_ROOT}/lib/libboost_${lib}.a" PARENT_SCOPE ) - set( Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${LIB}_LIBRARY} PARENT_SCOPE ) +function( set_boost_lib_names libs output ) + foreach( lib ${libs} ) + set( fullpath_lib, "${BOOST_ROOT}/lib/libboost_${lib}.a" ) + message( STATUS "fullpath_lib:${fullpath_lib}" ) + set( output ${output} ${fullpath_lib} ) endforeach() endfunction() if( BUILD_GITHUB_PLUGIN ) - message( FATAL_ERROR - "BUILD_GITHUB_PLUGIN not functional. With this commit we get merely a greenfield for better boost usage and building." - ) - # (BTW "test" yields "unit_test_framework" when passed to bootstrap.{sh,bat} ). message( STATUS "BOOST_LIBS_BUILT:${BOOST_LIBS_BUILT}" ) string( REPLACE "unit_test_framework" "test" libs_csv "${BOOST_LIBS_BUILT}" ) @@ -127,6 +127,11 @@ if( BUILD_GITHUB_PLUGIN ) INSTALL_COMMAND "" ) + file( GLOB boost_libs "${BOOST_ROOT}/lib/*" ) + #message( STATUS BOOST_ROOT:${BOOST_ROOT} boost_libs:${boost_libs} ) + set( Boost_LIBRARIES ${boost_libs} CACHE FILEPATH "Boost libraries directory" ) + set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" ) + else( BUILD_GITHUB_PLUGIN ) @@ -154,7 +159,7 @@ else( BUILD_GITHUB_PLUGIN ) ) # Until my find_package() support is done for my boost. - set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost library directory" ) + set( Boost_INCLUDE_DIR "${BOOST_ROOT}/include" CACHE FILEPATH "Boost include directory" ) endif( BUILD_GITHUB_PLUGIN ) From 96774bb98c2bd00c73a5ee59c352bad879baa231 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 27 Aug 2013 10:14:26 +0200 Subject: [PATCH 41/42] Added missing Mac OS X icons for the pagelayout_editor. --- pagelayout_editor/pl_editor.icns | Bin 0 -> 12539 bytes pagelayout_editor/pl_editor_doc.icns | Bin 0 -> 55232 bytes 2 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 pagelayout_editor/pl_editor.icns create mode 100644 pagelayout_editor/pl_editor_doc.icns diff --git a/pagelayout_editor/pl_editor.icns b/pagelayout_editor/pl_editor.icns new file mode 100644 index 0000000000000000000000000000000000000000..c84b0a172eacb81c64f5aa2d6de389d056b521b9 GIT binary patch literal 12539 zcmeI1cUV-%`o|a0m_&^&YBVOfDPEJ@B#N3~H)@w568?wy?dIb7#)(0?IG}-sZwM zA4_iwnoJ~o(Z`EkwD!VSez0x-=o>GLn#Fb820cdr6l^C_qAxl65tgb=$ONZeMExK zVvqn^%d)|yj=1FK6HrD436PITK&(ZpOg1(FZ&);=j^AwftR9u%6>p+R=52k~w|<(8 zs_^JZIR6%=%;Vepw{G92`1w+Nye#V)YMU&A^YaR_pQION23!ujI3&2zPd;ZAgqB(4 z=A0>H@_83p}nT`m!<%ub)WVt?rH)sgx8 z`}*I*+0YC%^A{=y3LBGy=X*A3=g$nSEzFDeyX3E(zjyebk;Q}5u$#L1V+)|;@pJQU zC@6n2X8vj!11x}6sr1yC1pw#oyk^5^b=vu#?yfN1^m&qQ{^o7TF`Ku9-1hbLyL-pa z-}_AEEyoAee-;%M=Otv7JPrKacVC0TzTfe;BNVjoa7ON#e71yhnMMu1myI?*Y)U&` z0p@Stc=6E5U0xN34qIdI|1y66kN^A+OZ$EMf4{WmtThg2@H(pdQ=&0ABOFfmh=O$* zjGHp%8C9akaZ^U)C@45GHjb)M{+DCppo#A1o>8^>`DdW`U;eYQfg8f~MTRk68=?)Xju}1o8i21O)xIj#FYxr zmqOf~lhOWwQdyRnm8Feq>&ww9%Z!RDZbxW!zt_F`s`S)!O?^#Vj=H8CzNlVRQ zx4VYbG~{aP3$^vpQy2ErB0~L%CB2z6w1P;jY0H5P@HGMn>i2>91<&XMW(r1eJ*vzl zC$Z3xxJ-=Zy!V6YQnPcWgKA#;)6!N>X29b+AT9*;5s4Gp^ZDj|E50>eQjW?b?B?wF z%x5`|Q=K>Ug18XOP;tQc$SRY~GlEcsS|MV0)#PQ@CkA10flw?$uP@oZVU_93lc-XS z0s(iRyR|pP9mEAZfsl_zF4}MU)s7|WcrcEtlu{vYSYG7myr~Dod8+0wUjKgYms`Gi zzX??!>UU98tx|v?S7-!0G4I>u`&Vw5k)HQ&rm2W`S0ozXd(CcF4_x=4`r(+oE?8{r!W1b87qG)I7z zf}wWuyZbpqe6Q6v2zW99ah^+b1R3t+bPsa-OYAc~~DC2B@#O*V2U&>SeB=t`w;_QdKr6mr7|hb@i%B59f89-@eWl zaEHazOFZGlU3>TJ`FUF!DwQ}NK4HzSb0=)-%o~)lhKEJe%RFJI=WTCq%8gpJRF)G% zO^|}=ZEWN-hFEO2Fzzx(s3xKB$Yt=IpyfA+>xvolAqJDlkG;s|rawmF-%ChHj_+0# zQj-$0{6M@yFwEl%1oGtTVzGmnCEjAO)zK>Sk)tcg?e|+mlWUY)US43MC)radf7lZo zW?r}V47fog5y>`g!56HE=2I-sn44RX&KOvn##~o;K6e9s$iS^f zb#A50B{I3zt)lE4raIjzKGwj>cF=Mc%qf z?F{uPFUr8&IwmehtB;32bP935($IG&sHQj-x^*-T-AXRSKAr_9a>mal%Soy&20-<1H zyY>o!UDeHBOypKzcfN%8?TU%q%ALfmJpwlB`?nX|I$z_~9-gRn(^lx#_d9@F<%oiy zoUc-8?Ap!amDGiquKi|C1}X<;b$Db&Rm2yi=%)WPnWR0 zgV8f|4(bLJe}eN-ym`NrH&x}M!6Z0gDzl(C10Wge@!LT588ODpSNb5W@@ghck{fqiUa zlYq%!53{A9eGxFMfkKX;t5s+PG%Ry~!DKPTH&?QGiILIKF)^`^qdU<*?Va&%wl{%c zg&g=s)xH}ckznLg82nWyAsc2)$`^ali2 z7w9pqTb|Fun(&0D%nqN3imDvFroD45o1WdKs`7bU`AnZ_51J{NC3UF0@NQzCe$xWP z=9IOui^Ah3G;QF;;^4q&LPQ%hB+Jpu^=zG+Rdc|MG_BOB7KPv2!9wlIpGm!93DYt5gq)TH}-bhMB5$>SNg37 zeznB_yPkQ^V5diyLhiMWBg~0UN=i<7(xH$@ijq<@q|mSYJxep>e3s06El=D3q!O4w_`BlUkf`0W{H|kfw zcIejY(-x&-}x+RD=UfYz;6HsH8SjhwQmL)H!FDe*Ms20Unqj7T^aoTf`_T;YPG0St`HA5 zp9{)zn@BZ7T^5rTmn2}f7utkmyN;2G$2K-|D5`HrR216T)SP4+_0&bbZnjFLeAvKL zvice$s*2kmIZ!7M&QYnZ-LGM=`uf=ock^g8igOZaOp{~gF<13ucSw9`dOeHT7Ftlq zttYyt67@^xb!_pXRQze5-Px5MSdzeHmtXbGaMq_?s8otJU%lD*#5XKDrRaWVWm2n* zQE)jZi!iDdjtt@*rE>qeN8Ajr#}8dBqPpny8C5E2f8v!;aCf20JxIPTU5k|db9b3} zU5WG$FnhmP$fgzKt5xEz2&bs02<{8byMiwZ>cPuWC~9YK+xhdVEk5Da>u)N=oWANb zv05phJs?vNoYQl9_;MA)i;UMES+`>CahvadRx9NKc3VzdQX!q&5b2YI!(n=CF^DDD zVoXg-Ga)Xot2E<&8m8xJ^qL7c%s2h@`{gUQu3a*_ z1>6=KR?0=30a|roR!VAhVQpY0=wJY=pq+8n>>qyIv%+}O=1*okg7;2fNJ7p~M`KlK zVL@f3168Nj%vjntZ_UPoYmC?L_fX=K0m#kyk~R;)4oYL*EeC<#D`sF$eJYMl)0 zf5&@U&9<-j`n%N&7O)gh=M0Vx3pJ8qI7B{q-VcX&Enm51{rfYk5KKZ+6SNXKl<*2> z?fBuRmByR4{Cx%mJ980KZfZ>%K)~Vl&R@0m@H*plJHME@TMq6}2ugy=Rs9au37rj^ zco^bxatl})E9ZW|2P+FIh$^Cb0jB5&3g$CTchZ@aTi3iht3@h9FvSg(rV9`s?(7$E zSx?Vx{&+?dT+C45taMY&*EGOl4?pAbhM7b0M`!LWC@e&ZkYaKPsdO$D?qji84LlBO zh~De9^kRVRJY8u|8;8vp=q(D$w!P%xN_Kl!6JWBQ4X_!5&teKVRkn5_xI1B85*4n> zC0fbQyVsmCGGJ1meg&~JsU9k|Bf!U6CQ zzM()M#mijen$bNQ7!?8?SSX-hL}VZqBNDvSRrcO_xNvhZ71r%ARPp$2EiJ9BG#b)| zv`_7jN`=+c&NT~9VOsjA7-&JCj$}(C8;OKPA}lo5Ds;WF%YlNcQHY^pnt4Rfu2tlu zWF*BPH4UFWEj}5mqU!28gd}~;i2u}rc<{ci;DMf4ksBBJd^$% z(uIeNkZuUh7<;u~$&QeY*CYd^YZ)Qk5J=z)su}9ElNT-g`0V!Lb2`%Lkkv+P+YJd`E*%Hd-QcJ>Bb2G>1==VydUK2f1hNLPoo7BwWJ%T z)Q~RS-Zd!5^LQa3owts37?q9@Gg%hh3N9=m2wtgk_7b>r`z)T6%GL8O9sH zss<_pI>cNpVc+6ATFmu8$^jTcx*XJiaaYh|vj& zq@T2G;Q_5e*X1x!fQ6}5^pTcLKL8nbGdU$C6+>J`v=bpSGwU9~7xBaU8wKR$WfI+{ z;`jb1Ar}#HR(G6xVHejP=L8+_I7d6LJI;;c0-~CsE((kciW9IqO3qIPxq-WNO+AUe zod9x|Cxe`llH0;)tt+@wRni_a8RV{bSry@3n#f_7dHyxzq9YT$x~fuW(xH6Mmw?=fyPfog%qo?nFU9+1AP0_fZH3@C zC+dv#e_6<3$2op0HQ*&7*PcsFF6!sjXFqsJ$hDSbB~tUdO6tR27IJMh#o1};HATJm z;BoFHAlKPgT~=IFRqOcDkfVX)9PKJ})+@;U4?%9b@$!R{Lay;(5_$Eqi6M8_JwG{o z@3M&@cQ`dICfNJC4`-OhQSpzFC**ii!U*Jgf6Ao(>Emku$wz@EBan-^8XxL^!{OkU zu_kLh_L28%AlJ`gTL*>*cv!9fgYnd4s}5j@e9U2vHMk}!$aUAgXM91n$<`5mjXliu zF)35lnr(gpAqO=hqOp)$iJM~1z#s=C03ioIcKKu~9YU^{@Q=la7GHgg*Wb<4LJsPL zq90us;Q9dMatR9-+v*_K=rRJiER(GONkC=L2O(EU*tytC3%TAgkb|-bAqRiW*B%Ws zO}73u7)MB-mJx#|0meC!F5+#Cu0X;eQ|~XQ@xQA_broK0 zXu@Z0g$d*10-6friYG3>Doh+6AAuFdmrhdh->nB(ouqetp?_DeuZ>q_uQKo|1Ftgh KDg*xyGw?5jnr;XH literal 0 HcmV?d00001 diff --git a/pagelayout_editor/pl_editor_doc.icns b/pagelayout_editor/pl_editor_doc.icns new file mode 100644 index 0000000000000000000000000000000000000000..6760a09bb4bb5a22c066068b2c0c84df18e3b331 GIT binary patch literal 55232 zcmeIb2V4``+xI;P22in=wXLpO++Dk_Ygx2KKK1T4|9L+|BlQxzw4Yc*O_b1%=et^+_LX51m(Zpd3eld z2r_Tm`~Hor!u*`indzTWl0Lq6zy9GdjYelMS!@o%wTvu&`>>qJX2NVUE(>Oy56^vd zo0)Jw{#ktd({c`z9hUdvIyX2+B9`WSdc@>$Li6IU(Ico@^sf7>oHtxZ>0Ydo?8Fs?%## zL)9-WD=+(3)vtT?pMOz(Y08_Yrq#de`Xu*5ZS@m}ua+@BWEiSXW6v37QvJ*22Y-56 zd-Z8o6OJr@{`|p%`-bY@a`|xg4)J65l`Mh&>Ic7-#zbuPdVTPLvHA~ghPb#!kzO@a zeQ^2fum0ijdv`;SnH98DTPZMXmFOu5+KX19hOG*{2tm71O|@aupn(vy$Mks6|Hgl- zb%srig7WP!Ew3*G^;o@j%dY*04(;E$dG)$M(9S*B&7l3vpMAqF2Ht-9?Ag=Darf`s zx)F2ba%5QW#Q;AaFAtZUeFm)chtOD&P#_XH3dw?Ad_Gql`SVZUuh3m#NeP8oPN7h# z6%{bek=~V}yz$cyYyBYTwy>N(O^1>0Wo1lXR7l0Pv5V(0718e<>lBh7#uTW zFdUhkDpc4ZZwR^}qEMI|j$@@ckH=-e%uXy8O?~}`L90C=C{{!*%Oj=3X%^|93b2Fc z*$j2e58thJhoBfC{qru5K>vV%z`%fu0YUzscyuO{#n8kI8o0^@g02dgY3sQfRh6!~ z8kOXiakIWV4KA!!Et17$@~bcR?&)v@f&zqpALPQ!P7=|>1Ydjig#{J|9266@uIZmATt8L$k|1hw4NUiBzLih|m`q zBK-Jf2yzziGxlEH#nGfj@(%9avzLZmKk)W#x(q+Q0fNW^e)h&f1z(yHq9`aRDppo; z#+S*TWhiljH4sD;@N-s`NQ6~cSERwgA)!8;w5S^{1uAgdX2B{5f(88i)o0yY+=(Zh ziQD=*o!xhEA60*JIRu>(av9mlNlA$*8Ob2P{!C9wNlVU_N%6B6L(pjfhb@xH6iOus z0EI%W#hO>El;Fo5Am{|24Wfx#$>R%zBC%8^gXIGha=91{2hB4N9G8puVyQ$blPi=e zwWg{{tJT5UE-Ew{lx_}+Zp$hyDk%l|3Moe@aCwiiveIIvTdy7q=FgfoYst#xAa&U< zTu8F(uyB#R!{VjOSFD)t3C$>T53Mlc{|tXyqcPNQCR2I>U33Te4WnAlAM@2aqvr2hj-qDI-QqA<;MMVn3P2Acl3N%#Gjnw6Z9mX@B8n3kQ9C&LP0 zv!J&7$_?FDrA4cCnnt=W^#64KZ7TVu;>ow6{(CX-Qb20u*U8t|e?=)dSpQ|!O}>Wy zE4`YY`7AN2;r<(T>)E~BjOa%Cug@`VswVMH1N|2y-yF2)eQrWhWBs>0G3Rb0{a2^@ zI{7x)f9dG^3A4ZGzdTJ;ZSvj7;Vv9M}!t+JNMTOK` zb&@ap-qqs{EB5Z&f8fC0J^K&sJyv9zd~>#c+Hm^W+oNbDUmyVem!qxIfA>eMrK0ht z*+U2Y@MAuDr0>PVI{mjmDOAKCQKzP+rB706%hLt%bvkgFOo+Zd&szqv)6C+qc@C?~ z>h@n(&vW}7XTdZ3O-FXlw_8_V|IJLvfwTY2O-{?nY@q)t<#J_Jb+xv!{`-Hf`|iQV z5*Aia8)#oeK~X(h0rjROWM&3InP9Y6-&T!|h0M($v(Kp3INJE)zdCdRemuLu^T#)F zys7hBk7MoMaQn8l&;RcB!QbhH1l^UH0nL`ki)AH1m5y&dQ%`+^Y zUO}V7w1E{=Dy6)vw6vt8sHm{8pdc?VHzy}MD=RZIJ;!g!pBvV|P=^4Rd>0i9MIxC* zEQTeBlq7SN6C`NnVrcJL7-}DIo^)3WMiYe<<)tt_p75X&%H%1FE&l?CJ79-(l(O;? zI*m$&!4MpwdoT!8)h7qby+FRb|2g6v9TgmB&8a5YBox4?CQBEmifO_GFiA*A^0~n99m|!@c>d@vd;L67PQTOC>jLsp*0PTjx`Q{YMu9>fJl*#rhSO4tvMT6-Kl84Hfm zpI;*RIr_G};CI32G0Tx@#R9{M)I}D%flWvE!^f`!8@A8P3n5@Q3Wq?UNEjh1EGmTj zi0#O<qgHS4!D^zMQp3|V5x4it91#etagd8H5z^Y2IGus8Mza#HC7+p=TsC09{ z$B$|a82q6E&y-3o^>)E??-D+E;fkAE>|YK;gGjsfU9M(OIk>r8p*QzF`69TW==M9& zb-!{xRv30wiY>Gg*bgP{*c*jXUQj&kMKY;e35udZBe$eqkMOx)^ol9F7((HKaVbX& z>^Ecf@U~r%C?!|!f!pIFqKu*Ijs^S9&Q*RaLOFrg*p(b$pS%FtwG`N&-Mk~bn#mM^ z@<=6erAn#eO`SA*$hO%xQAydG59NhXuX#XUmpmWZxdhms*|l;U*Lbr@u zI(lZev)KEJ;3lM$KgT_r#fj4w8H_|pIEag7_)b`7fK{D3Ht1N`$>~V{8$EFB?1pJAxHc^M9AS{ z_M0&KW2-k@!tEUd5{Xz#9Y1%@Z$6oBA;2}aSN7F-b``OS&dl>3{WW~CmY8FG_ z4(vrT#gZ|LM$PEtjDq)SaCIjX1*5JkV9!C5WX%hm)M?8QR#%+D)EPw%r9 z1tEl;&=H(~*>hRy#2L^=I~eMDaLFov+}@rqsEYV*>G&zX{KiGqu+~hcL#jJyjpoy! zZ3{qg_SrA@)0^`oO!vR0j2qYU9jd@$2nH{3I#i*VVL-h)aT>H9n0Mb}xAcOJ%@MiV z^Tbp!i!`xUG^%w$JLu5tFd;{Pew+ra1$I4mEpYIzW@Rxv?RmU%p{R1hq`T2qu3jZx zgRa8YI$XUG5GCLUjn>_E&RgV#QeJbs7FF`-BG%`p$eD{IUvn@}3xNIF2f17}G48&7 zww-4+i>Y*9BudYreaM!1-Zd5hG+d47(5*A)yH~SWLbpYtxqoCb2khPLD=HN{94K}#!N(jF^3IHU};;4M6QsD zNrEmSu~;M$2t+ESqDHvm(vjoO>wqnjS6Rv9@nK;f@IFq=2TcS{124FwV!2XLYu|gx z@ZZnj_P~S>UT=Z-TVjb6dy@q#VO0mU8d%r1i?zehF=zDVFs~yRYvAVK#TT$wI4Z5b zuwD4eh*MP{E6^)pt_@ZgTphd}l*ydrRx| zq{>kXR}s``+B9ejup`)xowy;Vq8z3KP!S5DlpQv$pFQ|{+xaLo+io%J;Aro($k85g zKo(ofoi}g6Kp5&`+uM$hK(OL zjtIdE%x&k*wF`wT7cE?9yU2bH)SBwSh54UI^}arhrFvgus)xfYL!+awhBln*9h6lX zT{Q`{sYY|6UMdS3&-PdXR4B1*uSScH2RJ$By?09%HI(heGAVe~i`}WK#m6pO4)%ge z5`2pr%=WeBsQ2kNuKr|VlJIU|S%cZ$V6V^iG1rbBDR{$_Mn#l^8p!te(}%J)+gD-P{?WV4$8YP;_IP7{ zo$YgENiC1R0u85!Ntrjtz< zXbq|>8_}oFgTmnY6FrTm1K?_RG+^~scyrfnYf`JH{xEFF==u}=1ox1OAkT;H zIDYl)u6=v=?c2ZmLe$o^>o+b6s6Wx4!V^7m?)X_pxbvwK2$4iO-&mTL%JgYoC>9Ha ze7>+X&9|oc|BFWSzKxFPYtlS6q7T0u>eS$fUZ3T`h@Sc}TUp@R=!m{H$7@i=z5I9g z3*NgoC&!~gmzRb4>CuG={>{trr(OmoeT@DfxOb_UIsST-TXZqV@mHeCnwjHg=O`14 zQ1+FZ%)gW4%Zl&4t*n1UUpL2t5q-(K$M3VAH$TUV83n1i&m#VRlH(K)K4uSHz=eSF_0a{MAb-~G`YQlF7-=U~_w zX-_&~Iy&!Blj9dkvOVs)ZQQ$J`o3*jk!|MNckbK)Z)?BfujqPnyqzkBUCtKx)K6dxL;O8D!t>s_x@h)p1$1f|Kb5ki3NLIU`>%dD`b7(25EBV&S z>Q)0e-l2k{=J7-lkb`sIe)y31wg}bAN{b4$x%KDxd1ZW%u4qYKVPR2mehNpG z_AxOfyrCQ~$8-D!FLaGr7r0~BuI9JU;a&TE^J4=!-b0_`cbIUYWL9CjqPIdhx{liI;e<#-W^-vtb#TXXz>Hk99if5o%50x$E;psnxU zylrB8^C5NsumoEhXgGLPS>I>9FaD-QuK-i9nL~?EjS>}VC5V$7$LoAEdRzE(ccKM#OM0&i9YHuHuBzR6$+ zv2o*qK^TY4W-*!ID>^-UT#Y@{zEkJ!-}DryDoiTW!d$+D#I@`3jY>PjWU}k3c-p(T!#jph+`Viy^ znfYFVFFJ<85ssnAMPdMaf#`*}5uFhd5k}4+Cx}OpgT#ICF5+Lv7UD*;b$?z0@IfF3 ze}{yIg@;GLk;|hZBO@Zh!@@#Cf`czz3<7kozn?D{*L!<;dV09Kxw^VIJCPk7NkjyO z&!0Pc=FI6+Cr=zde(dOx!-o$YJg|S?zP)>P@7lF<$6wpGZQHtK^QMg(H>_W?ED*8@ z47vzBg@gi65fPEZs3nmR;o-nfNF6_3wSLHd!_Ow*XWiNWhyVjeH}gx0WpFu>LM%th zh^1yFC8T1ch*$^}kn)LnNG_B^%0@mDv!F~Q1Dl>;`RP+?G&p^YKV;z>7!+F-TJ5Rx z)OuEVXxggPAMgX_{((Um;o$Ec#=i^Ktp!sm2;lG8)zxyCP2yN^!SocK6Zb;pWu8kV zfv;AJaT_bWji|JgR7NN*r7)Saaz~02)v3aR7D^}52u!1;rGH=`P!p9pmbEP@DPuC} zB;3x8c9jl@27?~KKLEEPm06aT>CK1~GLUnj#nK6^x@HJy3xdH8#_gPGK6FopD{d>n zt7nwN02C`=TMk@PD2_nWiRM8MW{^y5t-yC=tdM18#Bxicts|8TOx@_w3`;sFfnL?p z-(PR(SPrTKG#Mn^%!PiPL0}uL2)=qNQn@9i95Z7vh*U?Q=1lizkeFUyn)(CRVq&=! z1-E6f7znT>)0{ws0-5A5Z2kN{16u@qU9g`ClnF}LUZ?+Z-BTH{zUrZ0gpe2=p+cAm2 zj!buEcrg80PA0Yl?+dsskzxgCB4EpAGm#1suyta%F}+zNrV|S>*slTF!2SYWFA7Yx z0`^p3Ujei)G07}vrWuPxX1cQQ60g;p`&`JvszyPmmXy*m+#IIGGhK{EtNa1GeR9I5uqCK6!t>Y?U4Z}q5Yp)A%dx%3ap0N^C*xkbe zJA+CkRuHH++_$b=wJ~NhVbj)wF4ta``Y{oX6`KtT1N3ogcY`&l!urZtyFVOGdk6XZ zdjz-zb-xI1li=PK6yWdc=d_D_?NuRg=glN>2mqkgpKj^u?v6VnR#?+2E}xh+eDkBE zPjIUFr%!30kTf{mJR?0Llbl8T+&w!dCo4G>{7-7~vmnIj_WNR>=4Dh{jTMIA>gI;G zUPVV5ts?r=>>;Pc3jA|DtZb_SlT|c;H6a2xg^YHtl2$O)RT{NiKn>aNclULf804%J7UQC3EVX%OS7!iDQ?Lq$(pYZDC>%1xzzv5%$5swG&u$Cn= zUAR^p4p!OKt5$&GIk~!Gif{#@R~&juAOj?T6fnMR0j~f`hyV_Ns6})=QTd0s=kGqe ze)J-j$tf-V;C$XcE~$*|%e6Gsb8#{1b;L?oqbHZc3iDb$Sl6psS#kd*lOvKBJdIAG z78K^Z^g0s$t-{J@<>c&=0m@eax|mHPa{YCHP@=}Y%H=E75_5Yo^)uDWM0Pf$sxv-#BbV7gl&^>dh` z^Q|=BFBHj`q67hiUxzP>`Nfq%wBPAa@#}SauRl&M`24w;$rrHGBkz9vL}4d}obkV% zj+NAti={W|%9U72iDYv9x`^DO=7J;I0o7=tP4__qQe2`A(bE(PE4?iXpNtrLa zkbsBTEHAEQC9b*xS9Ns6R59T3%hH;v!rJevwL-U9h)>Y_w^8T4-V`w^(jHuTnE3Fs zOjQ1gbUHXL0~FVdYX#maVg<&e+Y?E+G?+n6D}w3mO|RIO;yBtRR4>n z{zoD>9bF6)wFb4vx{L7d5L%m=G!5q-(j}wba%VjkVU@3rnY8)WIfx7Uo0h6`` zCO*3u9C77pz|pCT@0Cj`DWBiG%21$HGDd2!qt}g>*)-=m4q$_WjARN;Au(}at#<$> z-Kk-4oA?=}xc}aB){1TCjvb7+7IcZcZm?alP$^^-Bqb!uz??oQ?M)~gaOY(~jfdq} z6$ocxI1P&)dV2<^s)}XsfJm(LWD}TJ1Oo>H0D!D{@bgboXE`jLF~#0J_8NKJ)D;&+ zRdOMxEHmM?7)IMyiOXLFxdl8Z0PW<+wdV7ASVJvewgmHX{=Cr(gUc{pXhcFVc!5=B zYH+(7j-vNh_xgFZ{h}GehfY1!+)e146QSd%Kv#6X_DG`-C3-yagC;@Ir zT$oP~8ogMZJ%@XtgL%1xnu-`*ASwt{WSCA%U)p}uxaq4Fj2$_8^3p9^7tGuMCMZ;? zW#URoX2RXuaWB$o0&aeMbU@6@3NqK44L(2v56iH6Se-t54yy;9jxf418OF;Y#>p;l zya^2EEKPL;d#+dt+wte81^#BY@aWqu+fvIPyY3r&Kp0g0V)fly)ZWlsaU|Fl@;b>rllsOWahs* z?RB@t%aSFyms6)cX|)oVfiT;fdV!_=u?GQA7qv^u!z z69hQviCq_^Od{m5Y30R*`FVNyl*H3+H;q1IOBMqk@JVyM3nJ4Bza&^aU`bmHOT->E zdZKFYDLsbHUT!~q^r&$&r;qJ#`R!$%!2@>bH7Yr%NF|#|2TzO@yv(z1H-HBrenoH( zR>w}9#9T1Ih(X^;_)=Ir5P$H%D^Vr=IH~i9KONT1`EBIbDYGVgZ#@W1fYcGI5wt_K z4!iCO;6f0+z`K>kE3E{`xfvzW#@7|=>Y-b;nPTKC<+S?kx& z9XDe1lo@~g(%ozqM~mu6V1<-$;pzZ+FEsq^Pj;j;F{CR`8 zM5GsoWxeETMFnZ#@M-pI9L9|tJ#pI95nZ~idyb+oP)AVfYOMI+Ay1_s$}OtPh&AFe zFbNrmA31gm7spCopL!K1Y+kpi%a<>lI(+2#=~Ksi+v&GwQnVVu%iaa3gVFLW}dgn^b=rexn5+5h+XtJX{# zJ#yUC8K8TN^N;~*orG(-=(U`=ZFx%BqJ=;TKGYUdVloldk8FMNZN3rI<`i-P?QIOxxx2 zej71n(u~PNZTjy{M70>@OV)W9nhO*QG!|fRF{uLwlMUsvGDua5Vc|C-u`2)ksIGr3 zTx>ge#Hc@JP94#wio&#^NVv{pg`6D6RoM&(4D(*9Tto7=204xT_YuAWHY290gqeBE`M}*z~J4k zex4rAo~~XbPZuu>Z`YF-a4E39gRzNv?A)~rD-w(K;=#)V3Ky5+2w{E~S}s!}208J>k`dw7lB~_IQ6xffJD=$7Gij_f(6lc)XEJwMK6L%b-OoDic%-^jZQwFE_hV zz~?ebvtB-UPnDJ5IIuga3dLTVN1^6il3Sf34d43LUmx-IVY7vDfxf9Z0wM3|bD50C zPJi+s2|U7zOJWb~j*wR=z(fP=@!GM<4fHu z+`lF|qxi#{4`~#!Od-PcWE#0#Q|*C5)s9t=)){T9#q$LS2ARxMaND*ISP2pKPX@sg zY)MhnFJ@DMKHmRWA(n!5KJIUxHgeXl+|2P z%gtMj%7cx{9Ob*MJt2$r_e;4v5ty_g72-ves+FpDex&n=BLGEg&clh=RI@6bn)|}j z3-+=0^1hy~#vK61UpUxmD0)|;19sKzA?^Av4@ebAVPSWXNP;^E#~j2R+qic9`VAW# z*W0XK`$UC%P|>dawFBO5y>qumg390lk|SU^SkvH}w`{?kz@Xk;@CHA@)BG4TLz zHpd(wK)<8@g0d=~pNY-o2m~-60uDMF^;Jsc{ex>(xU8~Sx;#z=UQlVYD(3xDr{Qzf zXU>AhZA2=)nrF!Eu1%!Ca^k;X&Y@)*d)0 zx(*shtddF*Fmnf%5#?>b1G1yqOapG@1Td`-D>=+1$}MXP4sSF!s_NV2NI8dF38wi~ zR>HWhjX_qV1T%rK!Xi}&xDP{Bh{ggR5|L3twHB>7;|!!B1!5{rShr!r7wW_I=P)?f zmnlrW6S%Mf5g#wKNC9rsu&6B<3xTH-SW1?)1AWR?3ruE|P-@ z;ojTHU#qTL_YOn}%tkm}an)T(G`z(4>?v>+J7TT9e^;0o%!7*Ev0M-igE*Mmk?B6Vfo;?*Z|tS+CNJ;wG-U}P9EyiEl5(Txxp z9_Z=m9|cF7U-b3_`4I88^76lWJtijV(j}+hwoWU~-BQ*ST)o;TNVt05e%kZ}c3un3 z?QCuBkcE)l1zR(_h43P1p|c%f{`_U+J9SQnSDDwGeaG+6j&0kvcx^V{vUTegWHb0~ zxz%jTW_S~{*?9|L!{)<559^#wSg~@Y@pOwv(OxdjFI@>v&R$oaHeyI%GC2Uf1AP_& zcO5dyE11j5qg%j-J>0XH@ToB&Irxsa-k z7sAqI%igH<(P#;tAZiMR2oUgSkBAY8nN;cyd=XVdHOU}g+DR5KTlN}!9mH;`4G17o zG8a)0^$K_azBqsB(gx2*K*JEhodA&`auA$K4{$c|i!Qo&$&y#5-oc|C-mX~ju}ULg zIy-hY=HE?41Win;4RLs}x$$HxtnS#!;GTr=>z++ikd)5gY^;Nr+&2mKix<}?Km?uG z)IAXto}_eCk?_KQA>iQfwEz|u#^xs)%1=^w0WkQKWUT#{rxQWjVW+#{r<4*gLPLlhAQ@?mjm}h6##Ho7EB)Jbb)#NFL zFwfQ&oGBv;tb{^AB@dgwjfFT_;skOHQSJ(w$yH$qX5<(imCfhd+CFtwn}hY)l!59e zDsu^*7cA!5+MZQLsN+@UnfM>t&R$?^>-xzt+cn2G*CQ_ie8abRxC|T$fS?65TWAPa z>2U$Y)@;Gdi%`b}3+68XT<_eubLPyRJqxT|V?JZX^y$QDW`F*POeIe7n~Y3Brow+B z)6Az&pD_cT*>2XX*|X=&nG0r@&L=K_=An@B|BzOqqLrv0^QYAKi%szqT?{W&rO~@$Y#xaS3Zp0E$50pfE2d$8EcBd`OB*!2pU!fzDBn z>jNnIe+^Jz&HR;qU4G(b46^sYP7f+I`N=!bPkDt8-Mz0otIJRH`vH9GVXYLU4Qm9Khf`NegboVeYpbN)&yGmik~<#ezI$( zypjs|iA;>2pr>BB5OC{7U4Eh;{1ra|9Ox-4%z*{=VHkgp^ff>6^THGn&QH8blH>fu zyDL5+jqnqljr>H72N+O2*az;00g6jvEe23zy?UbuD9YYl2?%|V-xxsAnPC7ZhMYFw zVl{Wo#`%fD4=*x{%jtlhD18+h5uH%nC_nK9>tkAxrT~h2cj8`VfJIL8KirSF*(gBK z!AKq8*8`TBW1rA*5Tt2<;(h#+M~|O>%%x_%e|zUzBLGERCl;6!;AKqH07WSPDB|M) zK=C;%J?(Yey>|@)6zz>{19nAVsRfSa7%+|I5ERMpUOs#BG&wV|AT#`Wg9L?jtrtXM zj)60ECz1g_@%n6I{Dg^< zHoyri?}POe@M*p|_ync6K#xzH!9H5+ag(p`iJAb$zA(eGemL8pY$iUzVbQ^gg-ziT zMi)3VgUI@T&{An-A18Hb5qhG70YMPpybLVuhds$C)GdThv@-$@IA79FpN}*xgio}u zAskHAwJn2BSl5apfO5b}4tn&zrzbiX=n1J9<4Is?ZOy$*KZGZKFd`42g4oh;^05v`*ZcZkLl^y4@cKknvCr(uYOiWZsDJT^QStT!gHq4nk@*A7Q zH#BJV71W&5G&ljOB@l?&xy4K{U5Hnj;J#_U5j{eesqv;-&$pHcLgTFGM2D3qd)G2St!M+}`XXRhBIuelbp z7VXD~3sb~lM18mfC<(tbub9qZFldDz9zA)Tl;S%4mvwg^-MfDexlexJ{LsCoc}&HA zt(TVo-;>f)7;Gl3G$%3cMgm2i>ookQlQF0{-?1(!F|=M%LMY-tye|+is2^^}zNK(w z;?Lv}gOAElJtu*|SME9^UxtAV;P!8PO>RO;d~cuwPIASZj6EwNlCobsOGqvg%T=N* zOi!khE3{rHz$A3dz$A+Xe1jGm)D#LnSn3x5_%QfEAcSEi z#z+a3kV#@$@}!zZNeLr^agwWgyRipkvF3I$mk*Y=6zj#0NOfxU-QCOVU6$A^ba;S6 z4Am-X$kOHTD(e-i&OK2!ib-@cHUvj^>u0Ne%luM=a`3UClURlq{fJbn)?AwQ!?!Nq z+4Sijs#jO!pX&E5Jji;$cS|A^O(PPWaRA^1M;qPy``y_B34j=coke1q0Bak}fjVT? zFWKywVpI}=S@X(ISDp9=N(%EC?r_W6{7&9 z1}9ZY<#WeF`F7^>wI{ z%A_Rl$N_^dgb)r%0G7`ZpsLNHB#u(R&+}A*{|8^#F?ytfl%Ih$jaUOnO*M=!sEbs$ z0m}#@8dwc!08vSA9wBicmkH<#y>cgv8s(pHA>~>H4ckB?XBkSXQL{)N7o+YK7^h>EOh!>w3dzN0+H`r#zt6TY=qs}ph!3zjxdXi zM4~!HMn#3VpFHk-`AYPaAP+ZJk{i(-Fcl z&Hd{Sv$Hb`p7@X(U238!LV|YJ<4I;Qi=LmGlW{xp*&B?IaQ66DgoN9PfG6pN#ravE z^NQ0SdS6c|D$kDfbZK~*i3YI)10k_)*X8?fGv2;R$}TF&d*KtClty8tTyY8fmxRQT zt8p*mqoNbCiV8BG_}xx=RV1Ok4Ra0p_k=_g?D{Y%J2O7Y^KMdHmQ+~wCeW?L2#Emi z;JeRXzlpl|JQ*V-WP+l{!5)_%wIm@Cdo?`jR%mQRdCJrGr3zJLUYxIA%MlWx?gtJB zy)I*xrN4LsR+x~nGwufZ$2@IOLSnLAOo_CTn*H`wI+)cdrKMgE489%Tl7z%yJDiXx zOn!x}FrkrDyotFK(ZYnpMLi*5Tw+30`aU)!;y)rJ3JipVSXlb{&ebdb2_ZqvdUfy4 zqlEMd0Xr}0N%XB3jV&=z7hY&CAt7X!Wxap#^wFc|iFwq_k0}rSBSNAqH}&0%xO$%&(BPGpYZ(Yv*h%TB?S@x5g|b>%1KZD@b=Az7P7uW#?)|K0KuI3b~sM=c!C zfApfov&a7P20-Hwo9=H;(^h%=FQKkch?BC5mnek?4=34HzP!{Osg@?RCQA2cBzx8!`5~ zE(1JrIh6=LY2TUW!EZhzp?SZ~E8+RW8&M(74xJn`NW@PHJ`(&WCOp8)`PAkKLwv|%$4s%c^RxA`vzWhR zf8FIIhSkSMREi}0Yp}=VTah6b&aPju_EgwgpRpr0-+%Ie^pG6q{K);W#q%3@!!$`p zaD`I7(_fL-uUzstwQcbd=KBh3)PC;BVD?|y{x;xxxFRqGfOBk@DWmd4J1`+wbzh#<}L&q zsEv;vjZhR4e;o>supT;M{nh595scJ0hRzg?$Z{Dw{DcIc5sy#*wS~0JZ2LBNyTzt0 z&kS?~`|yQZarF~er=p2fB=9v8hMr*a0m)DaI0geAp?9GHcmy{68e2uefJcyZ z&0Ry{D5a9e$A1ylKu1UfS{Pl7SU#%RG2(SwiIzr4hC@U1fw$r8%|8$vVHGVS#Rmvi# z{7Ifkm@#{CbLfaGi}-kH z`)2QgveL2(4s&O@%z@@2bF8Lq&Eir@!NtIg2X3){`MVM|6}K*Z*4tw2O85YY-mv;q}wJqVGagF!ieo^Ny|1oHblZ&gnho=|#>1NZD`*M zKHgrQ9`0@~U^_Ck&6ghQ`BsK}4g9uWpKp3~@7AT0 zO?zw0w#{&BS`@Q3Z3)(R8M^i8^-Z6?SSbc!#rXM`Uxy4CI&|2u;loE5w&BBu0k1=T z{pIJuKmGW__uma1&>wT%vwPRhdf(<|rqa#dZ(~ld#0t@=bJuR&dxBzM<@k2Mz=7Wl z8ub15-~XWBz}}!ig9Z*9FyPz%{rX~#dvxpCrBg?&+60R>|Il|$Db27_ShZ{4!3LD0 zOV@7Qy7%bWvsbTg@U3@m{6D>V_3YWBd-rZ#L5(}wbZFnMMLgFO0oySH<**=FT3T7R gYu6qW25cSm8@Ah_efxIptgS6A32n{W{GBTQe;3Xj<^TWy literal 0 HcmV?d00001 From e6e13b260991fa45effce3b9bf10ea9e730fea3f Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Tue, 27 Aug 2013 10:32:39 +0200 Subject: [PATCH 42/42] Fixed GLEW library detection for Mac OS X. --- CMakeModules/FindGLEW.cmake | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/CMakeModules/FindGLEW.cmake b/CMakeModules/FindGLEW.cmake index 5b9b814872..88e9a50757 100644 --- a/CMakeModules/FindGLEW.cmake +++ b/CMakeModules/FindGLEW.cmake @@ -42,12 +42,16 @@ ELSE (WIN32) IF (APPLE) # These values for Apple could probably do with improvement. - FIND_PATH( GLEW_INCLUDE_DIR glew.h + FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h /System/Library/Frameworks/GLEW.framework/Versions/A/Headers + /opt/local/include ${OPENGL_LIBRARY_DIR} ) - SET(GLEW_GLEW_LIBRARY "-framework GLEW" CACHE STRING "GLEW library for OSX") - SET(GLEW_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") + + FIND_LIBRARY( GLEW_GLEW_LIBRARY GLEW + /opt/local/lib + ) + ELSE (APPLE) FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h